From cc880c2f635fa88233224f6c160a4c8cea6885c2 Mon Sep 17 00:00:00 2001 From: hc-github-team-tf-azure <> Date: Fri, 28 Jul 2023 12:04:38 +0000 Subject: [PATCH] Updating based on 508797160 --- .../2022-09-01/adminrulecollections/README.md | 86 - .../2022-09-01/adminrulecollections/client.go | 26 - .../adminrulecollections/constants.go | 57 - .../adminrulecollections/id_rulecollection.go | 153 - .../id_rulecollection_test.go | 372 --- .../id_securityadminconfiguration.go | 140 - .../id_securityadminconfiguration_test.go | 327 -- .../method_createorupdate.go | 56 - .../adminrulecollections/method_delete.go | 99 - .../adminrulecollections/method_get.go | 51 - .../adminrulecollections/method_list.go | 117 - .../model_adminrulecollection.go | 17 - ...del_adminrulecollectionpropertiesformat.go | 10 - .../model_networkmanagersecuritygroupitem.go | 8 - .../adminrulecollections/predicates.go | 32 - .../adminrulecollections/version.go | 12 - .../network/2022-09-01/adminrules/README.md | 86 - .../network/2022-09-01/adminrules/client.go | 26 - .../2022-09-01/adminrules/constants.go | 277 -- .../network/2022-09-01/adminrules/id_rule.go | 166 - .../2022-09-01/adminrules/id_rule_test.go | 417 --- .../adminrules/id_rulecollection.go | 153 - .../adminrules/id_rulecollection_test.go | 372 --- .../adminrules/method_createorupdate.go | 63 - .../2022-09-01/adminrules/method_delete.go | 99 - .../2022-09-01/adminrules/method_get.go | 58 - .../2022-09-01/adminrules/method_list.go | 89 - .../adminrules/model_addressprefixitem.go | 9 - .../adminrules/model_adminpropertiesformat.go | 17 - .../2022-09-01/adminrules/model_adminrule.go | 48 - .../adminrules/model_baseadminrule.go | 56 - .../model_defaultadminpropertiesformat.go | 18 - .../adminrules/model_defaultadminrule.go | 48 - .../2022-09-01/adminrules/predicates.go | 12 - .../network/2022-09-01/adminrules/version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 1013 ------ .../id_applicationgateway.go | 127 - .../id_applicationgateway_test.go | 282 -- ...icationgatewayprivateendpointconnection.go | 140 - ...ongatewayprivateendpointconnection_test.go | 327 -- .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../method_update.go | 74 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - ...icationgatewayprivateendpointconnection.go | 12 - ...ewayprivateendpointconnectionproperties.go | 11 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../model_delegation.go | 12 - .../model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../predicates.go | 32 - .../version.go | 12 - .../README.md | 37 - .../client.go | 26 - .../id_applicationgateway.go | 127 - .../id_applicationgateway_test.go | 282 -- .../method_list.go | 89 - ...l_applicationgatewayprivatelinkresource.go | 12 - ...iongatewayprivatelinkresourceproperties.go | 10 - .../predicates.go | 32 - .../version.go | 12 - .../2022-09-01/applicationgateways/README.md | 286 -- .../2022-09-01/applicationgateways/client.go | 26 - .../applicationgateways/constants.go | 1978 ------------ .../id_applicationgateway.go | 127 - .../id_applicationgateway_test.go | 282 -- .../id_predefinedpolicy.go | 116 - .../id_predefinedpolicy_test.go | 267 -- .../method_backendhealth.go | 98 - .../method_backendhealthondemand.go | 102 - .../method_createorupdate.go | 74 - .../applicationgateways/method_delete.go | 71 - .../applicationgateways/method_get.go | 51 - .../method_getsslpredefinedpolicy.go | 51 - .../applicationgateways/method_list.go | 90 - .../applicationgateways/method_listall.go | 90 - .../method_listavailablerequestheaders.go | 53 - .../method_listavailableresponseheaders.go | 53 - .../method_listavailableservervariables.go | 53 - .../method_listavailablessloptions.go | 53 - ...thod_listavailablesslpredefinedpolicies.go | 90 - .../method_listavailablewafrulesets.go | 53 - .../applicationgateways/method_start.go | 70 - .../applicationgateways/method_stop.go | 70 - .../applicationgateways/method_updatetags.go | 55 - .../model_applicationgateway.go | 21 - ...icationgatewayauthenticationcertificate.go | 12 - ...thenticationcertificatepropertiesformat.go | 9 - ...pplicationgatewayautoscaleconfiguration.go | 9 - ...l_applicationgatewayavailablessloptions.go | 13 - ...ewayavailablessloptionspropertiesformat.go | 11 - ...cationgatewayavailablewafrulesetsresult.go | 8 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - .../model_applicationgatewaybackendhealth.go | 8 - ...icationgatewaybackendhealthhttpsettings.go | 9 - ...applicationgatewaybackendhealthondemand.go | 9 - ...del_applicationgatewaybackendhealthpool.go | 9 - ...l_applicationgatewaybackendhealthserver.go | 11 - ...l_applicationgatewaybackendhttpsettings.go | 12 - ...ewaybackendhttpsettingspropertiesformat.go | 21 - ...model_applicationgatewaybackendsettings.go | 12 - ...ngatewaybackendsettingspropertiesformat.go | 15 - ...plicationgatewayclientauthconfiguration.go | 9 - ...el_applicationgatewayconnectiondraining.go | 9 - .../model_applicationgatewaycustomerror.go | 9 - ...icationgatewayfirewalldisabledrulegroup.go | 9 - ...del_applicationgatewayfirewallexclusion.go | 10 - .../model_applicationgatewayfirewallrule.go | 12 - ...del_applicationgatewayfirewallrulegroup.go | 10 - ...model_applicationgatewayfirewallruleset.go | 13 - ...ngatewayfirewallrulesetpropertiesformat.go | 12 - ...plicationgatewayfrontendipconfiguration.go | 12 - ...frontendipconfigurationpropertiesformat.go | 13 - .../model_applicationgatewayfrontendport.go | 12 - ...tiongatewayfrontendportpropertiesformat.go | 9 - ...l_applicationgatewayglobalconfiguration.go | 9 - ...l_applicationgatewayheaderconfiguration.go | 9 - .../model_applicationgatewayhttplistener.go | 12 - ...tiongatewayhttplistenerpropertiesformat.go | 18 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationgatewaylistener.go | 12 - ...licationgatewaylistenerpropertiesformat.go | 13 - ...pplicationgatewayloaddistributionpolicy.go | 12 - ...yloaddistributionpolicypropertiesformat.go | 10 - ...pplicationgatewayloaddistributiontarget.go | 12 - ...yloaddistributiontargetpropertiesformat.go | 9 - .../model_applicationgatewayondemandprobe.go | 15 - .../model_applicationgatewaypathrule.go | 12 - ...licationgatewaypathrulepropertiesformat.go | 15 - ...icationgatewayprivateendpointconnection.go | 12 - ...ewayprivateendpointconnectionproperties.go | 11 - ...licationgatewayprivatelinkconfiguration.go | 12 - ...tewayprivatelinkconfigurationproperties.go | 9 - ...cationgatewayprivatelinkipconfiguration.go | 12 - ...wayprivatelinkipconfigurationproperties.go | 12 - .../model_applicationgatewayprobe.go | 12 - ...licationgatewayprobehealthresponsematch.go | 9 - ...applicationgatewayprobepropertiesformat.go | 19 - ...odel_applicationgatewaypropertiesformat.go | 42 - ...applicationgatewayredirectconfiguration.go | 12 - ...ayredirectconfigurationpropertiesformat.go | 15 - ...el_applicationgatewayrequestroutingrule.go | 12 - ...tewayrequestroutingrulepropertiesformat.go | 17 - .../model_applicationgatewayrewriterule.go | 11 - ..._applicationgatewayrewriteruleactionset.go | 10 - ..._applicationgatewayrewriterulecondition.go | 11 - .../model_applicationgatewayrewriteruleset.go | 11 - ...ongatewayrewriterulesetpropertiesformat.go | 9 - .../model_applicationgatewayroutingrule.go | 12 - ...ationgatewayroutingrulepropertiesformat.go | 13 - .../model_applicationgatewaysku.go | 10 - .../model_applicationgatewaysslcertificate.go | 12 - ...ongatewaysslcertificatepropertiesformat.go | 12 - .../model_applicationgatewaysslpolicy.go | 12 - ...l_applicationgatewaysslpredefinedpolicy.go | 10 - ...ewaysslpredefinedpolicypropertiesformat.go | 9 - .../model_applicationgatewaysslprofile.go | 12 - ...cationgatewaysslprofilepropertiesformat.go | 11 - ...licationgatewaytrustedclientcertificate.go | 12 - ...rustedclientcertificatepropertiesformat.go | 11 - ...pplicationgatewaytrustedrootcertificate.go | 12 - ...ytrustedrootcertificatepropertiesformat.go | 10 - ...odel_applicationgatewayurlconfiguration.go | 10 - .../model_applicationgatewayurlpathmap.go | 12 - ...cationgatewayurlpathmappropertiesformat.go | 14 - ...ewaywebapplicationfirewallconfiguration.go | 17 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../applicationgateways/model_ddossettings.go | 9 - .../applicationgateways/model_delegation.go | 12 - .../applicationgateways/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../applicationgateways/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../applicationgateways/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../applicationgateways/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../applicationgateways/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../applicationgateways/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../applicationgateways/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../applicationgateways/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../applicationgateways/model_subresource.go | 8 - .../applicationgateways/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../applicationgateways/predicates.go | 55 - .../2022-09-01/applicationgateways/version.go | 12 - .../README.md | 53 - .../client.go | 26 - .../constants.go | 195 -- .../id_location.go | 114 - .../id_location_test.go | 237 -- ...iongatewaywafdynamicmanifestsdefaultget.go | 52 - ...pplicationgatewaywafdynamicmanifestsget.go | 89 - ...plicationgatewayfirewallmanifestruleset.go | 12 - .../model_applicationgatewayfirewallrule.go | 12 - ...del_applicationgatewayfirewallrulegroup.go | 10 - ...tewaywafdynamicmanifestpropertiesresult.go | 9 - ...licationgatewaywafdynamicmanifestresult.go | 11 - .../model_defaultrulesetpropertyformat.go | 9 - .../predicates.go | 27 - .../version.go | 12 - .../applicationsecuritygroups/README.md | 120 - .../applicationsecuritygroups/client.go | 26 - .../applicationsecuritygroups/constants.go | 57 - .../id_applicationsecuritygroup.go | 127 - .../id_applicationsecuritygroup_test.go | 282 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../applicationsecuritygroups/method_get.go | 51 - .../applicationsecuritygroups/method_list.go | 90 - .../method_listall.go | 90 - .../method_updatetags.go | 55 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_tagsobject.go | 8 - .../applicationsecuritygroups/predicates.go | 37 - .../applicationsecuritygroups/version.go | 12 - .../2022-09-01/availabledelegations/README.md | 54 - .../2022-09-01/availabledelegations/client.go | 26 - .../availabledelegations/id_location.go | 114 - .../availabledelegations/id_location_test.go | 237 -- .../id_providerlocation.go | 127 - .../id_providerlocation_test.go | 282 -- .../method_availabledelegationslist.go | 89 - ...d_availableresourcegroupdelegationslist.go | 89 - .../model_availabledelegation.go | 12 - .../availabledelegations/predicates.go | 32 - .../availabledelegations/version.go | 12 - .../availableservicealiases/README.md | 54 - .../availableservicealiases/client.go | 26 - .../availableservicealiases/id_location.go | 114 - .../id_location_test.go | 237 -- .../id_providerlocation.go | 127 - .../id_providerlocation_test.go | 282 -- .../method_availableservicealiaseslist.go | 89 - ...ilableservicealiaseslistbyresourcegroup.go | 89 - .../model_availableservicealias.go | 11 - .../availableservicealiases/predicates.go | 32 - .../availableservicealiases/version.go | 12 - .../2022-09-01/azurefirewalls/README.md | 128 - .../2022-09-01/azurefirewalls/client.go | 26 - .../2022-09-01/azurefirewalls/constants.go | 359 --- .../azurefirewalls/id_azurefirewall.go | 127 - .../azurefirewalls/id_azurefirewall_test.go | 282 -- ...ethod_azurefirewallslistlearnedprefixes.go | 70 - .../azurefirewalls/method_createorupdate.go | 74 - .../azurefirewalls/method_delete.go | 71 - .../2022-09-01/azurefirewalls/method_get.go | 51 - .../2022-09-01/azurefirewalls/method_list.go | 90 - .../azurefirewalls/method_listall.go | 90 - .../azurefirewalls/method_updatetags.go | 74 - .../azurefirewalls/model_azurefirewall.go | 19 - .../model_azurefirewallapplicationrule.go | 14 - ..._azurefirewallapplicationrulecollection.go | 11 - ...plicationrulecollectionpropertiesformat.go | 11 - ...el_azurefirewallapplicationruleprotocol.go | 9 - .../model_azurefirewallipconfiguration.go | 12 - ...firewallipconfigurationpropertiesformat.go | 11 - .../model_azurefirewallipgroups.go | 9 - .../model_azurefirewallnatrcaction.go | 8 - .../model_azurefirewallnatrule.go | 17 - .../model_azurefirewallnatrulecollection.go | 11 - ...zurefirewallnatrulecollectionproperties.go | 11 - .../model_azurefirewallnetworkrule.go | 16 - ...odel_azurefirewallnetworkrulecollection.go | 11 - ...llnetworkrulecollectionpropertiesformat.go | 11 - .../model_azurefirewallpropertiesformat.go | 20 - .../model_azurefirewallpublicipaddress.go | 8 - .../model_azurefirewallrcaction.go | 8 - .../azurefirewalls/model_azurefirewallsku.go | 9 - .../azurefirewalls/model_hubipaddresses.go | 9 - .../model_hubpublicipaddresses.go | 9 - .../azurefirewalls/model_ipprefixeslist.go | 8 - .../azurefirewalls/model_subresource.go | 8 - .../azurefirewalls/model_tagsobject.go | 8 - .../2022-09-01/azurefirewalls/predicates.go | 37 - .../2022-09-01/azurefirewalls/version.go | 12 - .../network/2022-09-01/bastionhosts/README.md | 216 -- .../network/2022-09-01/bastionhosts/client.go | 26 - .../2022-09-01/bastionhosts/constants.go | 180 -- .../2022-09-01/bastionhosts/id_bastionhost.go | 127 - .../bastionhosts/id_bastionhost_test.go | 282 -- .../bastionhosts/method_createorupdate.go | 74 - .../2022-09-01/bastionhosts/method_delete.go | 71 - .../method_deletebastionshareablelink.go | 74 - .../method_disconnectactivesessions.go | 89 - .../2022-09-01/bastionhosts/method_get.go | 51 - .../bastionhosts/method_getactivesessions.go | 84 - .../method_getbastionshareablelink.go | 89 - .../2022-09-01/bastionhosts/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_putbastionshareablelink.go | 88 - .../bastionhosts/method_updatetags.go | 74 - .../model_bastionactivesession.go | 18 - .../bastionhosts/model_bastionhost.go | 15 - .../model_bastionhostipconfiguration.go | 12 - ...tionhostipconfigurationpropertiesformat.go | 11 - .../model_bastionhostpropertiesformat.go | 16 - .../bastionhosts/model_bastionsessionstate.go | 10 - .../model_bastionshareablelink.go | 11 - .../model_bastionshareablelinklistrequest.go | 8 - .../2022-09-01/bastionhosts/model_resource.go | 12 - .../bastionhosts/model_sessionids.go | 8 - .../2022-09-01/bastionhosts/model_sku.go | 8 - .../bastionhosts/model_subresource.go | 8 - .../bastionhosts/model_tagsobject.go | 8 - .../2022-09-01/bastionhosts/predicates.go | 141 - .../2022-09-01/bastionhosts/version.go | 12 - .../2022-09-01/bastionshareablelink/README.md | 81 - .../2022-09-01/bastionshareablelink/client.go | 26 - .../bastionshareablelink/id_bastionhost.go | 127 - .../id_bastionhost_test.go | 282 -- .../method_deletebastionshareablelink.go | 74 - .../method_getbastionshareablelink.go | 89 - .../method_putbastionshareablelink.go | 88 - .../model_bastionshareablelink.go | 11 - .../model_bastionshareablelinklistrequest.go | 8 - .../bastionshareablelink/model_resource.go | 12 - .../bastionshareablelink/predicates.go | 27 - .../bastionshareablelink/version.go | 12 - .../bgpservicecommunities/README.md | 37 - .../bgpservicecommunities/client.go | 26 - .../bgpservicecommunities/method_list.go | 90 - .../model_bgpcommunity.go | 13 - .../model_bgpservicecommunity.go | 13 - ...del_bgpservicecommunitypropertiesformat.go | 9 - .../bgpservicecommunities/predicates.go | 32 - .../bgpservicecommunities/version.go | 12 - .../checkdnsavailabilities/README.md | 36 - .../checkdnsavailabilities/client.go | 26 - .../checkdnsavailabilities/id_location.go | 114 - .../id_location_test.go | 237 -- .../method_checkdnsnameavailability.go | 80 - .../model_dnsnameavailabilityresult.go | 8 - .../checkdnsavailabilities/version.go | 12 - resource-manager/network/2022-09-01/client.go | 982 ------ .../cloudservicepublicipaddresses/README.md | 70 - .../cloudservicepublicipaddresses/client.go | 26 - .../constants.go | 1013 ------ .../id_providercloudservice.go | 127 - .../id_providercloudservice_test.go | 282 -- ...addressesgetcloudservicepublicipaddress.go | 81 - ...resseslistcloudservicepublicipaddresses.go | 89 - ...oudserviceroleinstancepublicipaddresses.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../model_delegation.go | 12 - .../model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../predicates.go | 37 - .../cloudservicepublicipaddresses/version.go | 12 - .../2022-09-01/connectionmonitors/README.md | 138 - .../2022-09-01/connectionmonitors/client.go | 26 - .../connectionmonitors/constants.go | 770 ----- .../id_connectionmonitor.go | 140 - .../id_connectionmonitor_test.go | 327 -- .../connectionmonitors/id_networkwatcher.go | 127 - .../id_networkwatcher_test.go | 282 -- .../method_createorupdate.go | 102 - .../connectionmonitors/method_delete.go | 70 - .../connectionmonitors/method_get.go | 51 - .../connectionmonitors/method_list.go | 52 - .../connectionmonitors/method_query.go | 70 - .../connectionmonitors/method_start.go | 70 - .../connectionmonitors/method_stop.go | 70 - .../connectionmonitors/method_updatetags.go | 55 - .../model_connectionmonitor.go | 10 - .../model_connectionmonitordestination.go | 10 - .../model_connectionmonitorendpoint.go | 14 - .../model_connectionmonitorendpointfilter.go | 9 - ...del_connectionmonitorendpointfilteritem.go | 9 - .../model_connectionmonitorendpointscope.go | 9 - ...odel_connectionmonitorendpointscopeitem.go | 8 - ...odel_connectionmonitorhttpconfiguration.go | 13 - ...odel_connectionmonitoricmpconfiguration.go | 8 - .../model_connectionmonitorlistresult.go | 8 - .../model_connectionmonitoroutput.go | 9 - .../model_connectionmonitorparameters.go | 16 - .../model_connectionmonitorqueryresult.go | 9 - .../model_connectionmonitorresult.go | 14 - ...model_connectionmonitorresultproperties.go | 38 - .../model_connectionmonitorsource.go | 9 - ...model_connectionmonitorsuccessthreshold.go | 9 - ...model_connectionmonitortcpconfiguration.go | 10 - ...odel_connectionmonitortestconfiguration.go | 15 - .../model_connectionmonitortestgroup.go | 12 - ...odel_connectionmonitorworkspacesettings.go | 8 - .../model_connectionstatesnapshot.go | 47 - .../model_connectivityhop.go | 16 - .../model_connectivityissue.go | 11 - .../connectionmonitors/model_hoplink.go | 13 - .../model_hoplinkproperties.go | 10 - .../connectionmonitors/model_httpheader.go | 9 - .../connectionmonitors/model_tagsobject.go | 8 - .../2022-09-01/connectionmonitors/version.go | 12 - .../connectivityconfigurations/README.md | 86 - .../connectivityconfigurations/client.go | 26 - .../connectivityconfigurations/constants.go | 262 -- .../id_connectivityconfiguration.go | 140 - .../id_connectivityconfiguration_test.go | 327 -- .../id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- .../method_createorupdate.go | 56 - .../method_delete.go | 99 - .../connectivityconfigurations/method_get.go | 51 - .../connectivityconfigurations/method_list.go | 117 - .../model_connectivityconfiguration.go | 17 - ...del_connectivityconfigurationproperties.go | 14 - .../model_connectivitygroupitem.go | 11 - .../connectivityconfigurations/model_hub.go | 9 - .../connectivityconfigurations/predicates.go | 32 - .../connectivityconfigurations/version.go | 12 - .../2022-09-01/customipprefixes/README.md | 120 - .../2022-09-01/customipprefixes/client.go | 26 - .../2022-09-01/customipprefixes/constants.go | 222 -- .../customipprefixes/id_customipprefix.go | 127 - .../id_customipprefix_test.go | 282 -- .../customipprefixes/method_createorupdate.go | 74 - .../customipprefixes/method_delete.go | 71 - .../2022-09-01/customipprefixes/method_get.go | 80 - .../customipprefixes/method_list.go | 90 - .../customipprefixes/method_listall.go | 90 - .../customipprefixes/method_updatetags.go | 55 - .../customipprefixes/model_customipprefix.go | 21 - .../model_customipprefixpropertiesformat.go | 22 - .../customipprefixes/model_subresource.go | 8 - .../customipprefixes/model_tagsobject.go | 8 - .../2022-09-01/customipprefixes/predicates.go | 37 - .../2022-09-01/customipprefixes/version.go | 12 - .../2022-09-01/ddoscustompolicies/README.md | 86 - .../2022-09-01/ddoscustompolicies/client.go | 26 - .../ddoscustompolicies/constants.go | 57 - .../ddoscustompolicies/id_ddoscustompolicy.go | 127 - .../id_ddoscustompolicy_test.go | 282 -- .../method_createorupdate.go | 74 - .../ddoscustompolicies/method_delete.go | 71 - .../ddoscustompolicies/method_get.go | 51 - .../ddoscustompolicies/method_updatetags.go | 55 - .../model_ddoscustompolicy.go | 14 - .../model_ddoscustompolicypropertiesformat.go | 9 - .../ddoscustompolicies/model_tagsobject.go | 8 - .../2022-09-01/ddoscustompolicies/version.go | 12 - .../2022-09-01/ddosprotectionplans/README.md | 120 - .../2022-09-01/ddosprotectionplans/client.go | 26 - .../ddosprotectionplans/constants.go | 57 - .../id_ddosprotectionplan.go | 127 - .../id_ddosprotectionplan_test.go | 282 -- .../method_createorupdate.go | 74 - .../ddosprotectionplans/method_delete.go | 71 - .../ddosprotectionplans/method_get.go | 51 - .../ddosprotectionplans/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../ddosprotectionplans/method_updatetags.go | 55 - .../model_ddosprotectionplan.go | 14 - ...odel_ddosprotectionplanpropertiesformat.go | 11 - .../ddosprotectionplans/model_subresource.go | 8 - .../ddosprotectionplans/model_tagsobject.go | 8 - .../ddosprotectionplans/predicates.go | 37 - .../2022-09-01/ddosprotectionplans/version.go | 12 - .../2022-09-01/dscpconfiguration/README.md | 65 - .../2022-09-01/dscpconfiguration/client.go | 26 - .../2022-09-01/dscpconfiguration/constants.go | 1075 ------- .../dscpconfiguration/id_dscpconfiguration.go | 127 - .../id_dscpconfiguration_test.go | 282 -- .../method_createorupdate.go | 74 - .../dscpconfiguration/method_delete.go | 71 - .../dscpconfiguration/method_get.go | 51 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../dscpconfiguration/model_ddossettings.go | 9 - .../dscpconfiguration/model_delegation.go | 12 - .../model_dscpconfiguration.go | 14 - ...model_dscpconfigurationpropertiesformat.go | 18 - .../dscpconfiguration/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../dscpconfiguration/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../dscpconfiguration/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../dscpconfiguration/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../dscpconfiguration/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../dscpconfiguration/model_qosdefinition.go | 13 - .../dscpconfiguration/model_qosiprange.go | 9 - .../dscpconfiguration/model_qosportrange.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../dscpconfiguration/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../dscpconfiguration/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../dscpconfiguration/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../dscpconfiguration/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../dscpconfiguration/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../dscpconfiguration/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-09-01/dscpconfiguration/version.go | 12 - .../2022-09-01/dscpconfigurations/README.md | 54 - .../2022-09-01/dscpconfigurations/client.go | 26 - .../dscpconfigurations/constants.go | 1075 ------- .../method_dscpconfigurationlist.go | 90 - .../method_dscpconfigurationlistall.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../dscpconfigurations/model_ddossettings.go | 9 - .../dscpconfigurations/model_delegation.go | 12 - .../model_dscpconfiguration.go | 14 - ...model_dscpconfigurationpropertiesformat.go | 18 - .../dscpconfigurations/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../dscpconfigurations/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../dscpconfigurations/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../dscpconfigurations/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../dscpconfigurations/model_qosdefinition.go | 13 - .../dscpconfigurations/model_qosiprange.go | 9 - .../dscpconfigurations/model_qosportrange.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../dscpconfigurations/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../dscpconfigurations/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../dscpconfigurations/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../dscpconfigurations/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../dscpconfigurations/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../dscpconfigurations/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../dscpconfigurations/predicates.go | 37 - .../2022-09-01/dscpconfigurations/version.go | 12 - .../2022-09-01/endpointservices/README.md | 37 - .../2022-09-01/endpointservices/client.go | 26 - .../endpointservices/id_location.go | 114 - .../endpointservices/id_location_test.go | 237 -- .../method_availableendpointserviceslist.go | 89 - .../model_endpointserviceresult.go | 10 - .../2022-09-01/endpointservices/predicates.go | 27 - .../2022-09-01/endpointservices/version.go | 12 - .../expressroutecircuitarptable/README.md | 32 - .../expressroutecircuitarptable/client.go | 26 - .../id_arptable.go | 153 - .../id_arptable_test.go | 372 --- ...method_expressroutecircuitslistarptable.go | 70 - .../model_expressroutecircuitarptable.go | 11 - ..._expressroutecircuitsarptablelistresult.go | 9 - .../expressroutecircuitarptable/version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 98 - .../id_authorization.go | 140 - .../id_authorization_test.go | 327 -- .../id_expressroutecircuit.go | 127 - .../id_expressroutecircuit_test.go | 282 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../model_authorizationpropertiesformat.go | 10 - .../model_expressroutecircuitauthorization.go | 12 - .../predicates.go | 32 - .../version.go | 12 - .../expressroutecircuitconnections/README.md | 82 - .../expressroutecircuitconnections/client.go | 26 - .../constants.go | 101 - .../id_peeringconnection.go | 153 - .../id_peeringconnection_test.go | 372 --- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 90 - .../model_expressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_ipv6circuitconnectionconfig.go | 9 - .../model_subresource.go | 8 - .../predicates.go | 32 - .../expressroutecircuitconnections/version.go | 12 - .../expressroutecircuitpeerings/README.md | 82 - .../expressroutecircuitpeerings/client.go | 26 - .../expressroutecircuitpeerings/constants.go | 274 -- .../id_expressroutecircuit.go | 127 - .../id_expressroutecircuit_test.go | 282 -- .../method_createorupdate.go | 75 - .../method_delete.go | 72 - .../expressroutecircuitpeerings/method_get.go | 52 - .../method_list.go | 89 - .../model_expressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_expressroutecircuitpeering.go | 12 - .../model_expressroutecircuitpeeringconfig.go | 13 - ...ressroutecircuitpeeringpropertiesformat.go | 27 - .../model_expressroutecircuitstats.go | 11 - .../model_expressrouteconnectionid.go | 8 - .../model_ipv6circuitconnectionconfig.go | 9 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - ...model_peerexpressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_subresource.go | 8 - .../expressroutecircuitpeerings/predicates.go | 32 - .../expressroutecircuitpeerings/version.go | 12 - .../expressroutecircuitroutestable/README.md | 32 - .../expressroutecircuitroutestable/client.go | 26 - .../id_peeringroutetable.go | 153 - .../id_peeringroutetable_test.go | 372 --- ...hod_expressroutecircuitslistroutestable.go | 70 - .../model_expressroutecircuitroutestable.go | 12 - ...pressroutecircuitsroutestablelistresult.go | 9 - .../expressroutecircuitroutestable/version.go | 12 - .../README.md | 32 - .../client.go | 26 - .../id_routetablessummary.go | 153 - .../id_routetablessummary_test.go | 372 --- ...ressroutecircuitslistroutestablesummary.go | 70 - ...l_expressroutecircuitroutestablesummary.go | 12 - ...utecircuitsroutestablesummarylistresult.go | 9 - .../version.go | 12 - .../2022-09-01/expressroutecircuits/README.md | 120 - .../2022-09-01/expressroutecircuits/client.go | 26 - .../expressroutecircuits/constants.go | 450 --- .../id_expressroutecircuit.go | 127 - .../id_expressroutecircuit_test.go | 282 -- .../method_createorupdate.go | 74 - .../expressroutecircuits/method_delete.go | 71 - .../expressroutecircuits/method_get.go | 51 - .../expressroutecircuits/method_list.go | 90 - .../expressroutecircuits/method_listall.go | 90 - .../expressroutecircuits/method_updatetags.go | 55 - .../model_authorizationpropertiesformat.go | 10 - .../model_expressroutecircuit.go | 15 - .../model_expressroutecircuitauthorization.go | 12 - .../model_expressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_expressroutecircuitpeering.go | 12 - .../model_expressroutecircuitpeeringconfig.go | 13 - ...ressroutecircuitpeeringpropertiesformat.go | 27 - ...del_expressroutecircuitpropertiesformat.go | 23 - ...ssroutecircuitserviceproviderproperties.go | 10 - .../model_expressroutecircuitsku.go | 10 - .../model_expressroutecircuitstats.go | 11 - .../model_expressrouteconnectionid.go | 8 - .../model_ipv6circuitconnectionconfig.go | 9 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - ...model_peerexpressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../expressroutecircuits/model_subresource.go | 8 - .../expressroutecircuits/model_tagsobject.go | 8 - .../expressroutecircuits/predicates.go | 37 - .../expressroutecircuits/version.go | 12 - .../expressroutecircuitstats/README.md | 52 - .../expressroutecircuitstats/client.go | 26 - .../id_expressroutecircuit.go | 127 - .../id_expressroutecircuit_test.go | 282 -- ...hod_expressroutecircuitsgetpeeringstats.go | 53 - .../method_expressroutecircuitsgetstats.go | 52 - .../model_expressroutecircuitstats.go | 11 - .../expressroutecircuitstats/version.go | 12 - .../expressrouteconnections/README.md | 81 - .../expressrouteconnections/client.go | 26 - .../expressrouteconnections/constants.go | 98 - .../id_expressrouteconnection.go | 140 - .../id_expressrouteconnection_test.go | 327 -- .../id_expressroutegateway.go | 127 - .../id_expressroutegateway_test.go | 282 -- .../method_createorupdate.go | 74 - .../expressrouteconnections/method_delete.go | 71 - .../expressrouteconnections/method_get.go | 51 - .../expressrouteconnections/method_list.go | 52 - .../model_expressroutecircuitpeeringid.go | 8 - .../model_expressrouteconnection.go | 10 - .../model_expressrouteconnectionlist.go | 8 - .../model_expressrouteconnectionproperties.go | 15 - .../model_propagatedroutetable.go | 9 - .../model_routingconfiguration.go | 12 - .../model_staticroute.go | 10 - .../model_staticroutesconfig.go | 9 - .../model_subresource.go | 8 - .../model_vnetroute.go | 10 - .../expressrouteconnections/version.go | 12 - .../README.md | 32 - .../client.go | 26 - .../id_peeringarptable.go | 153 - .../id_peeringarptable_test.go | 372 --- ...xpressroutecrossconnectionslistarptable.go | 70 - .../model_expressroutecircuitarptable.go | 11 - ..._expressroutecircuitsarptablelistresult.go | 9 - .../version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 230 -- .../id_expressroutecrossconnection.go | 127 - .../id_expressroutecrossconnection_test.go | 282 -- .../id_peering.go | 140 - .../id_peering_test.go | 327 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../model_expressroutecircuitpeeringconfig.go | 13 - ...odel_expressroutecrossconnectionpeering.go | 11 - ...ssroutecrossconnectionpeeringproperties.go | 22 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - .../model_subresource.go | 8 - .../predicates.go | 27 - .../version.go | 12 - .../README.md | 32 - .../client.go | 26 - ...ssroutecrossconnectionpeeringroutetable.go | 153 - ...tecrossconnectionpeeringroutetable_test.go | 372 --- ...essroutecrossconnectionslistroutestable.go | 70 - .../model_expressroutecircuitroutestable.go | 12 - ...pressroutecircuitsroutestablelistresult.go | 9 - .../version.go | 12 - .../README.md | 32 - .../client.go | 26 - .../id_peeringroutetablessummary.go | 153 - .../id_peeringroutetablessummary_test.go | 372 --- ...ecrossconnectionslistroutestablesummary.go | 70 - ...sroutecrossconnectionroutestablesummary.go | 11 - ...connectionsroutestablesummarylistresult.go | 9 - .../version.go | 12 - .../expressroutecrossconnections/README.md | 108 - .../expressroutecrossconnections/client.go | 26 - .../expressroutecrossconnections/constants.go | 277 -- .../id_expressroutecrossconnection.go | 127 - .../id_expressroutecrossconnection_test.go | 282 -- .../method_createorupdate.go | 73 - .../method_get.go | 51 - .../method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_updatetags.go | 55 - .../model_expressroutecircuitpeeringconfig.go | 13 - .../model_expressroutecircuitreference.go | 8 - .../model_expressroutecrossconnection.go | 14 - ...odel_expressroutecrossconnectionpeering.go | 11 - ...ssroutecrossconnectionpeeringproperties.go | 22 - ...l_expressroutecrossconnectionproperties.go | 17 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../predicates.go | 37 - .../expressroutecrossconnections/version.go | 12 - .../2022-09-01/expressroutegateways/README.md | 114 - .../2022-09-01/expressroutegateways/client.go | 26 - .../expressroutegateways/constants.go | 98 - .../id_expressroutegateway.go | 127 - .../id_expressroutegateway_test.go | 282 -- .../method_createorupdate.go | 74 - .../expressroutegateways/method_delete.go | 71 - .../expressroutegateways/method_get.go | 51 - .../method_listbyresourcegroup.go | 53 - .../method_listbysubscription.go | 53 - .../expressroutegateways/method_updatetags.go | 74 - .../model_expressroutecircuitpeeringid.go | 8 - .../model_expressrouteconnection.go | 10 - .../model_expressrouteconnectionproperties.go | 15 - .../model_expressroutegateway.go | 14 - .../model_expressroutegatewaylist.go | 8 - .../model_expressroutegatewayproperties.go | 12 - ...gatewaypropertiesautoscaleconfiguration.go | 8 - ...ypropertiesautoscaleconfigurationbounds.go | 9 - .../model_propagatedroutetable.go | 9 - .../model_routingconfiguration.go | 12 - .../expressroutegateways/model_staticroute.go | 10 - .../model_staticroutesconfig.go | 9 - .../expressroutegateways/model_subresource.go | 8 - .../expressroutegateways/model_tagsobject.go | 8 - .../model_virtualhubid.go | 8 - .../expressroutegateways/model_vnetroute.go | 10 - .../expressroutegateways/version.go | 12 - .../2022-09-01/expressroutelinks/README.md | 53 - .../2022-09-01/expressroutelinks/client.go | 26 - .../2022-09-01/expressroutelinks/constants.go | 227 -- .../expressroutelinks/id_expressrouteport.go | 127 - .../id_expressrouteport_test.go | 282 -- .../2022-09-01/expressroutelinks/id_link.go | 140 - .../expressroutelinks/id_link_test.go | 327 -- .../expressroutelinks/method_get.go | 51 - .../expressroutelinks/method_list.go | 89 - .../model_expressroutelink.go | 11 - .../model_expressroutelinkmacsecconfig.go | 11 - .../model_expressroutelinkpropertiesformat.go | 16 - .../expressroutelinks/predicates.go | 27 - .../2022-09-01/expressroutelinks/version.go | 12 - .../expressrouteportauthorizations/README.md | 82 - .../expressrouteportauthorizations/client.go | 26 - .../constants.go | 98 - .../id_expressrouteport.go | 127 - .../id_expressrouteport_test.go | 282 -- .../id_expressrouteportauthorization.go | 140 - .../id_expressrouteportauthorization_test.go | 327 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../model_expressrouteportauthorization.go | 12 - ...srouteportauthorizationpropertiesformat.go | 11 - .../predicates.go | 32 - .../expressrouteportauthorizations/version.go | 12 - .../2022-09-01/expressrouteports/README.md | 141 - .../2022-09-01/expressrouteports/client.go | 26 - .../2022-09-01/expressrouteports/constants.go | 309 -- .../expressrouteports/id_expressrouteport.go | 127 - .../id_expressrouteport_test.go | 282 -- .../method_createorupdate.go | 74 - .../expressrouteports/method_delete.go | 71 - .../expressrouteports/method_generateloa.go | 56 - .../expressrouteports/method_get.go | 51 - .../expressrouteports/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../expressrouteports/method_updatetags.go | 55 - .../model_expressroutelink.go | 11 - .../model_expressroutelinkmacsecconfig.go | 11 - .../model_expressroutelinkpropertiesformat.go | 16 - .../model_expressrouteport.go | 19 - .../model_expressrouteportpropertiesformat.go | 19 - ...del_generateexpressrouteportsloarequest.go | 8 - ...odel_generateexpressrouteportsloaresult.go | 8 - .../expressrouteports/model_subresource.go | 8 - .../expressrouteports/model_tagsobject.go | 8 - .../expressrouteports/predicates.go | 37 - .../2022-09-01/expressrouteports/version.go | 12 - .../expressrouteportslocations/README.md | 53 - .../expressrouteportslocations/client.go | 26 - .../expressrouteportslocations/constants.go | 57 - .../id_expressrouteportslocation.go | 114 - .../id_expressrouteportslocation_test.go | 237 -- .../expressrouteportslocations/method_get.go | 51 - .../expressrouteportslocations/method_list.go | 90 - .../model_expressrouteportslocation.go | 13 - ...del_expressrouteportslocationbandwidths.go | 9 - ...pressrouteportslocationpropertiesformat.go | 11 - .../expressrouteportslocations/predicates.go | 32 - .../expressrouteportslocations/version.go | 12 - .../expressrouteproviderports/README.md | 52 - .../expressrouteproviderports/client.go | 26 - .../id_expressrouteproviderport.go | 114 - .../id_expressrouteproviderport_test.go | 237 -- .../method_expressrouteproviderport.go | 51 - .../method_locationlist.go | 81 - .../model_expressrouteproviderport.go | 14 - ...odel_expressrouteproviderportlistresult.go | 9 - ...odel_expressrouteproviderportproperties.go | 15 - .../expressrouteproviderports/version.go | 12 - .../expressrouteserviceproviders/README.md | 37 - .../expressrouteserviceproviders/client.go | 26 - .../expressrouteserviceproviders/constants.go | 57 - .../method_list.go | 90 - .../model_expressrouteserviceprovider.go | 13 - ...ssrouteserviceproviderbandwidthsoffered.go | 9 - ...essrouteserviceproviderpropertiesformat.go | 10 - .../predicates.go | 32 - .../expressrouteserviceproviders/version.go | 12 - .../2022-09-01/firewallpolicies/README.md | 236 -- .../2022-09-01/firewallpolicies/client.go | 26 - .../2022-09-01/firewallpolicies/constants.go | 366 --- .../firewallpolicies/id_firewallpolicy.go | 127 - .../id_firewallpolicy_test.go | 282 -- .../firewallpolicies/method_createorupdate.go | 74 - .../firewallpolicies/method_delete.go | 71 - ...allpolicyidpssignaturesfiltervalueslist.go | 56 - ...method_firewallpolicyidpssignatureslist.go | 56 - ...irewallpolicyidpssignaturesoverridesget.go | 52 - ...rewallpolicyidpssignaturesoverrideslist.go | 52 - ...ewallpolicyidpssignaturesoverridespatch.go | 56 - ...irewallpolicyidpssignaturesoverridesput.go | 56 - .../2022-09-01/firewallpolicies/method_get.go | 80 - .../firewallpolicies/method_list.go | 90 - .../firewallpolicies/method_listall.go | 90 - .../firewallpolicies/method_updatetags.go | 55 - .../firewallpolicies/model_dnssettings.go | 10 - .../firewallpolicies/model_explicitproxy.go | 13 - .../firewallpolicies/model_filteritems.go | 9 - .../firewallpolicies/model_firewallpolicy.go | 19 - ...odel_firewallpolicycertificateauthority.go | 9 - .../model_firewallpolicyinsights.go | 10 - .../model_firewallpolicyintrusiondetection.go | 9 - ...iondetectionbypasstrafficspecifications.go | 15 - ...llpolicyintrusiondetectionconfiguration.go | 10 - ...ntrusiondetectionsignaturespecification.go | 9 - ...del_firewallpolicyloganalyticsresources.go | 9 - ...del_firewallpolicyloganalyticsworkspace.go | 9 - .../model_firewallpolicypropertiesformat.go | 22 - .../model_firewallpolicysku.go | 8 - .../model_firewallpolicysnat.go | 9 - .../model_firewallpolicysql.go | 8 - ...odel_firewallpolicythreatintelwhitelist.go | 9 - .../model_firewallpolicytransportsecurity.go | 8 - .../firewallpolicies/model_idpsqueryobject.go | 12 - .../firewallpolicies/model_orderby.go | 9 - .../firewallpolicies/model_queryresults.go | 9 - ...del_signatureoverridesfiltervaluesquery.go | 8 - ..._signatureoverridesfiltervaluesresponse.go | 8 - .../model_signaturesoverrides.go | 11 - .../model_signaturesoverrideslist.go | 8 - .../model_signaturesoverridesproperties.go | 8 - .../model_singlequeryresult.go | 18 - .../firewallpolicies/model_subresource.go | 8 - .../firewallpolicies/model_tagsobject.go | 8 - .../2022-09-01/firewallpolicies/predicates.go | 37 - .../2022-09-01/firewallpolicies/version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 309 -- .../id_firewallpolicy.go | 127 - .../id_firewallpolicy_test.go | 282 -- .../id_rulecollectiongroup.go | 140 - .../id_rulecollectiongroup_test.go | 327 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../model_applicationrule.go | 51 - ...odel_firewallpolicyfilterrulecollection.go | 81 - ...irewallpolicyfilterrulecollectionaction.go | 8 - .../model_firewallpolicynatrulecollection.go | 81 - ...l_firewallpolicynatrulecollectionaction.go | 8 - .../model_firewallpolicyrule.go | 64 - ...l_firewallpolicyruleapplicationprotocol.go | 9 - .../model_firewallpolicyrulecollection.go | 56 - ...model_firewallpolicyrulecollectiongroup.go | 12 - ...wallpolicyrulecollectiongroupproperties.go | 51 - .../model_natrule.go | 50 - .../model_networkrule.go | 49 - .../predicates.go | 32 - .../version.go | 12 - .../network/2022-09-01/flowlogs/README.md | 103 - .../network/2022-09-01/flowlogs/client.go | 26 - .../network/2022-09-01/flowlogs/constants.go | 95 - .../network/2022-09-01/flowlogs/id_flowlog.go | 140 - .../2022-09-01/flowlogs/id_flowlog_test.go | 327 -- .../2022-09-01/flowlogs/id_networkwatcher.go | 127 - .../flowlogs/id_networkwatcher_test.go | 282 -- .../flowlogs/method_createorupdate.go | 74 - .../2022-09-01/flowlogs/method_delete.go | 70 - .../network/2022-09-01/flowlogs/method_get.go | 51 - .../2022-09-01/flowlogs/method_list.go | 89 - .../2022-09-01/flowlogs/method_updatetags.go | 55 - .../2022-09-01/flowlogs/model_flowlog.go | 14 - .../flowlogs/model_flowlogformatparameters.go | 9 - .../flowlogs/model_flowlogpropertiesformat.go | 15 - .../model_retentionpolicyparameters.go | 9 - .../2022-09-01/flowlogs/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../network/2022-09-01/flowlogs/predicates.go | 37 - .../network/2022-09-01/flowlogs/version.go | 12 - .../2022-09-01/ipallocations/README.md | 120 - .../2022-09-01/ipallocations/client.go | 26 - .../2022-09-01/ipallocations/constants.go | 92 - .../ipallocations/id_ipallocation.go | 127 - .../ipallocations/id_ipallocation_test.go | 282 -- .../ipallocations/method_createorupdate.go | 74 - .../2022-09-01/ipallocations/method_delete.go | 71 - .../2022-09-01/ipallocations/method_get.go | 80 - .../2022-09-01/ipallocations/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../ipallocations/method_updatetags.go | 55 - .../ipallocations/model_ipallocation.go | 14 - .../model_ipallocationpropertiesformat.go | 15 - .../ipallocations/model_subresource.go | 8 - .../ipallocations/model_tagsobject.go | 8 - .../2022-09-01/ipallocations/predicates.go | 37 - .../2022-09-01/ipallocations/version.go | 12 - .../network/2022-09-01/ipgroups/README.md | 120 - .../network/2022-09-01/ipgroups/client.go | 26 - .../network/2022-09-01/ipgroups/constants.go | 57 - .../network/2022-09-01/ipgroups/id_ipgroup.go | 127 - .../2022-09-01/ipgroups/id_ipgroup_test.go | 282 -- .../ipgroups/method_createorupdate.go | 74 - .../2022-09-01/ipgroups/method_delete.go | 71 - .../network/2022-09-01/ipgroups/method_get.go | 80 - .../2022-09-01/ipgroups/method_list.go | 90 - .../ipgroups/method_listbyresourcegroup.go | 90 - .../ipgroups/method_updategroups.go | 55 - .../2022-09-01/ipgroups/model_ipgroup.go | 14 - .../ipgroups/model_ipgrouppropertiesformat.go | 11 - .../2022-09-01/ipgroups/model_subresource.go | 8 - .../2022-09-01/ipgroups/model_tagsobject.go | 8 - .../network/2022-09-01/ipgroups/predicates.go | 37 - .../network/2022-09-01/ipgroups/version.go | 12 - .../2022-09-01/loadbalancers/README.md | 427 --- .../2022-09-01/loadbalancers/client.go | 26 - .../2022-09-01/loadbalancers/constants.go | 1230 -------- .../loadbalancers/id_backendaddresspool.go | 140 - .../id_backendaddresspool_test.go | 327 -- .../id_frontendipconfiguration.go | 140 - .../id_frontendipconfiguration_test.go | 327 -- .../loadbalancers/id_inboundnatrule.go | 140 - .../loadbalancers/id_inboundnatrule_test.go | 327 -- .../loadbalancers/id_loadbalancer.go | 127 - .../loadbalancers/id_loadbalancer_test.go | 282 -- .../id_loadbalancerbackendaddresspool.go | 140 - .../id_loadbalancerbackendaddresspool_test.go | 327 -- .../loadbalancers/id_loadbalancingrule.go | 140 - .../id_loadbalancingrule_test.go | 327 -- .../2022-09-01/loadbalancers/id_location.go | 114 - .../loadbalancers/id_location_test.go | 237 -- .../loadbalancers/id_outboundrule.go | 140 - .../loadbalancers/id_outboundrule_test.go | 327 -- .../2022-09-01/loadbalancers/id_probe.go | 140 - .../2022-09-01/loadbalancers/id_probe_test.go | 327 -- .../loadbalancers/method_createorupdate.go | 74 - .../2022-09-01/loadbalancers/method_delete.go | 71 - .../2022-09-01/loadbalancers/method_get.go | 80 - .../method_inboundnatrulescreateorupdate.go | 74 - .../method_inboundnatrulesdelete.go | 71 - .../method_inboundnatrulesget.go | 80 - .../method_inboundnatruleslist.go | 89 - .../2022-09-01/loadbalancers/method_list.go | 90 - .../loadbalancers/method_listall.go | 90 - .../method_listinboundnatruleportmappings.go | 74 - ...lancerbackendaddresspoolscreateorupdate.go | 74 - ...d_loadbalancerbackendaddresspoolsdelete.go | 71 - ...thod_loadbalancerbackendaddresspoolsget.go | 51 - ...hod_loadbalancerbackendaddresspoolslist.go | 89 - ...loadbalancerfrontendipconfigurationsget.go | 51 - ...oadbalancerfrontendipconfigurationslist.go | 89 - ...ethod_loadbalancerloadbalancingrulesget.go | 51 - ...thod_loadbalancerloadbalancingruleslist.go | 89 - ...ethod_loadbalancernetworkinterfaceslist.go | 89 - .../method_loadbalanceroutboundrulesget.go | 51 - .../method_loadbalanceroutboundruleslist.go | 89 - .../method_loadbalancerprobesget.go | 51 - .../method_loadbalancerprobeslist.go | 89 - .../method_swappublicipaddresses.go | 74 - .../loadbalancers/method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - ...ackendaddressinboundnatruleportmappings.go | 8 - .../loadbalancers/model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../loadbalancers/model_ddossettings.go | 9 - .../loadbalancers/model_delegation.go | 12 - .../2022-09-01/loadbalancers/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../loadbalancers/model_inboundnatpool.go | 12 - .../model_inboundnatpoolpropertiesformat.go | 16 - .../loadbalancers/model_inboundnatrule.go | 12 - .../model_inboundnatruleportmapping.go | 11 - .../model_inboundnatrulepropertiesformat.go | 19 - .../loadbalancers/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../2022-09-01/loadbalancers/model_iptag.go | 9 - .../loadbalancers/model_loadbalancer.go | 20 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_loadbalancerpropertiesformat.go | 16 - .../loadbalancers/model_loadbalancersku.go | 9 - .../model_loadbalancervipswaprequest.go | 8 - ...ervipswaprequestfrontendipconfiguration.go | 9 - ...equestfrontendipconfigurationproperties.go | 8 - .../loadbalancers/model_loadbalancingrule.go | 12 - ...model_loadbalancingrulepropertiesformat.go | 20 - .../loadbalancers/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../loadbalancers/model_natgatewaysku.go | 8 - .../loadbalancers/model_natruleportmapping.go | 10 - .../loadbalancers/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../loadbalancers/model_outboundrule.go | 12 - .../model_outboundrulepropertiesformat.go | 14 - .../loadbalancers/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../loadbalancers/model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../2022-09-01/loadbalancers/model_probe.go | 12 - .../model_probepropertiesformat.go | 15 - .../loadbalancers/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../loadbalancers/model_publicipaddresssku.go | 9 - ...l_queryinboundnatruleportmappingrequest.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../loadbalancers/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-09-01/loadbalancers/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../loadbalancers/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../loadbalancers/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../2022-09-01/loadbalancers/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../loadbalancers/model_subresource.go | 8 - .../loadbalancers/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../loadbalancers/model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-09-01/loadbalancers/predicates.go | 238 -- .../2022-09-01/loadbalancers/version.go | 12 - .../2022-09-01/localnetworkgateways/README.md | 103 - .../2022-09-01/localnetworkgateways/client.go | 26 - .../localnetworkgateways/constants.go | 57 - .../id_localnetworkgateway.go | 127 - .../id_localnetworkgateway_test.go | 282 -- .../method_createorupdate.go | 74 - .../localnetworkgateways/method_delete.go | 71 - .../localnetworkgateways/method_get.go | 51 - .../localnetworkgateways/method_list.go | 90 - .../localnetworkgateways/method_updatetags.go | 55 - .../model_addressspace.go | 8 - .../localnetworkgateways/model_bgpsettings.go | 11 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_localnetworkgateway.go | 14 - ...del_localnetworkgatewaypropertiesformat.go | 13 - .../localnetworkgateways/model_tagsobject.go | 8 - .../localnetworkgateways/predicates.go | 37 - .../localnetworkgateways/version.go | 12 - .../network/2022-09-01/natgateways/README.md | 120 - .../network/2022-09-01/natgateways/client.go | 26 - .../2022-09-01/natgateways/constants.go | 95 - .../2022-09-01/natgateways/id_natgateway.go | 127 - .../natgateways/id_natgateway_test.go | 282 -- .../natgateways/method_createorupdate.go | 75 - .../2022-09-01/natgateways/method_delete.go | 71 - .../2022-09-01/natgateways/method_get.go | 80 - .../2022-09-01/natgateways/method_list.go | 90 - .../2022-09-01/natgateways/method_listall.go | 90 - .../natgateways/method_updatetags.go | 55 - .../natgateways/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../natgateways/model_natgatewaysku.go | 8 - .../natgateways/model_subresource.go | 8 - .../natgateways/model_tagsobject.go | 8 - .../2022-09-01/natgateways/predicates.go | 37 - .../network/2022-09-01/natgateways/version.go | 12 - .../2022-09-01/networkgroups/README.md | 86 - .../2022-09-01/networkgroups/client.go | 26 - .../2022-09-01/networkgroups/constants.go | 57 - .../networkgroups/id_networkgroup.go | 140 - .../networkgroups/id_networkgroup_test.go | 327 -- .../networkgroups/id_networkmanager.go | 127 - .../networkgroups/id_networkmanager_test.go | 282 -- .../networkgroups/method_createorupdate.go | 85 - .../2022-09-01/networkgroups/method_delete.go | 99 - .../2022-09-01/networkgroups/method_get.go | 51 - .../2022-09-01/networkgroups/method_list.go | 117 - .../networkgroups/model_networkgroup.go | 17 - .../model_networkgroupproperties.go | 9 - .../2022-09-01/networkgroups/predicates.go | 32 - .../2022-09-01/networkgroups/version.go | 12 - .../2022-09-01/networkinterfaces/README.md | 360 --- .../2022-09-01/networkinterfaces/client.go | 26 - .../2022-09-01/networkinterfaces/constants.go | 1362 -------- .../id_providercloudservice.go | 127 - .../id_providercloudservice_test.go | 282 -- .../networkinterfaces/id_roleinstance.go | 140 - .../networkinterfaces/id_roleinstance_test.go | 327 -- .../id_roleinstancenetworkinterface.go | 153 - .../id_roleinstancenetworkinterface_test.go | 372 --- .../networkinterfaces/id_tapconfiguration.go | 140 - .../id_tapconfiguration_test.go | 327 -- .../networkinterfaces/id_virtualmachine.go | 140 - .../id_virtualmachine_test.go | 327 -- .../id_virtualmachinescaleset.go | 127 - .../id_virtualmachinescaleset_test.go | 282 -- .../method_createorupdate.go | 75 - .../networkinterfaces/method_delete.go | 72 - .../networkinterfaces/method_get.go | 81 - .../method_getcloudservicenetworkinterface.go | 80 - .../method_geteffectiveroutetable.go | 71 - ...etvirtualmachinescalesetipconfiguration.go | 81 - ...tvirtualmachinescalesetnetworkinterface.go | 81 - .../networkinterfaces/method_list.go | 90 - .../networkinterfaces/method_listall.go | 90 - ...ethod_listcloudservicenetworkinterfaces.go | 89 - ...oudserviceroleinstancenetworkinterfaces.go | 89 - ...thod_listeffectivenetworksecuritygroups.go | 71 - ...tvirtualmachinescalesetipconfigurations.go | 118 - ...virtualmachinescalesetnetworkinterfaces.go | 89 - ...rtualmachinescalesetvmnetworkinterfaces.go | 89 - ...hod_networkinterfaceipconfigurationsget.go | 52 - ...od_networkinterfaceipconfigurationslist.go | 90 - ...ethod_networkinterfaceloadbalancerslist.go | 90 - ...od_networkinterfacetapconfigurationsget.go | 51 - ...d_networkinterfacetapconfigurationslist.go | 90 - .../networkinterfaces/method_updatetags.go | 56 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../networkinterfaces/model_ddossettings.go | 9 - .../networkinterfaces/model_delegation.go | 12 - .../model_effectivenetworksecuritygroup.go | 11 - ...ffectivenetworksecuritygroupassociation.go | 10 - ...effectivenetworksecuritygrouplistresult.go | 9 - .../model_effectivenetworksecurityrule.go | 22 - .../networkinterfaces/model_effectiveroute.go | 14 - .../model_effectiveroutelistresult.go | 9 - .../networkinterfaces/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../networkinterfaces/model_inboundnatpool.go | 12 - .../model_inboundnatpoolpropertiesformat.go | 16 - .../networkinterfaces/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../networkinterfaces/model_iptag.go | 9 - .../networkinterfaces/model_loadbalancer.go | 20 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_loadbalancerpropertiesformat.go | 16 - .../model_loadbalancersku.go | 9 - .../model_loadbalancingrule.go | 12 - ...model_loadbalancingrulepropertiesformat.go | 20 - .../networkinterfaces/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../networkinterfaces/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../networkinterfaces/model_outboundrule.go | 12 - .../model_outboundrulepropertiesformat.go | 14 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../networkinterfaces/model_probe.go | 12 - .../model_probepropertiesformat.go | 15 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../networkinterfaces/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../networkinterfaces/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../networkinterfaces/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../networkinterfaces/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../networkinterfaces/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../networkinterfaces/model_subresource.go | 8 - .../networkinterfaces/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../networkinterfaces/predicates.go | 126 - .../2022-09-01/networkinterfaces/version.go | 12 - .../README.md | 41 - .../client.go | 26 - .../constants.go | 277 -- .../id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- .../method_listactivesecurityadminrules.go | 56 - .../model_activebasesecurityadminrule.go | 56 - .../model_activeconfigurationparameter.go | 9 - .../model_activedefaultsecurityadminrule.go | 63 - .../model_activesecurityadminrule.go | 63 - ...odel_activesecurityadminruleslistresult.go | 49 - .../model_addressprefixitem.go | 9 - .../model_adminpropertiesformat.go | 17 - .../model_configurationgroup.go | 9 - .../model_defaultadminpropertiesformat.go | 18 - .../model_networkgroupproperties.go | 9 - .../model_networkmanagersecuritygroupitem.go | 8 - .../version.go | 12 - .../README.md | 41 - .../client.go | 26 - .../constants.go | 262 -- .../id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- ...od_listactiveconnectivityconfigurations.go | 56 - .../model_activeconfigurationparameter.go | 9 - .../model_activeconnectivityconfiguration.go | 30 - ...iveconnectivityconfigurationslistresult.go | 9 - .../model_configurationgroup.go | 9 - ...del_connectivityconfigurationproperties.go | 14 - .../model_connectivitygroupitem.go | 11 - .../model_hub.go | 9 - .../model_networkgroupproperties.go | 9 - .../version.go | 12 - .../networkmanagerconnections/README.md | 160 - .../networkmanagerconnections/client.go | 26 - .../networkmanagerconnections/constants.go | 60 - .../id_networkmanagerconnection.go | 114 - .../id_networkmanagerconnection_test.go | 237 -- .../id_providers2networkmanagerconnection.go | 116 - ...providers2networkmanagerconnection_test.go | 267 -- ...networkmanagerconnectionscreateorupdate.go | 56 - ...entgroupnetworkmanagerconnectionsdelete.go | 47 - ...gementgroupnetworkmanagerconnectionsget.go | 51 - ...ementgroupnetworkmanagerconnectionslist.go | 118 - ...networkmanagerconnectionscreateorupdate.go | 56 - ...criptionnetworkmanagerconnectionsdelete.go | 47 - ...ubscriptionnetworkmanagerconnectionsget.go | 51 - ...bscriptionnetworkmanagerconnectionslist.go | 118 - .../model_networkmanagerconnection.go | 17 - ...odel_networkmanagerconnectionproperties.go | 10 - .../networkmanagerconnections/predicates.go | 32 - .../networkmanagerconnections/version.go | 12 - .../README.md | 41 - .../client.go | 26 - .../constants.go | 262 -- ...agereffectiveconnectivityconfigurations.go | 57 - .../model_configurationgroup.go | 9 - ...del_connectivityconfigurationproperties.go | 14 - .../model_connectivitygroupitem.go | 11 - ...odel_effectiveconnectivityconfiguration.go | 10 - .../model_hub.go | 9 - .../model_networkgroupproperties.go | 9 - ...tiveconnectivityconfigurationlistresult.go | 9 - .../model_queryrequestoptions.go | 8 - .../version.go | 12 - .../README.md | 41 - .../client.go | 26 - .../constants.go | 277 -- ...tworkmanagereffectivesecurityadminrules.go | 57 - .../model_addressprefixitem.go | 9 - .../model_adminpropertiesformat.go | 17 - .../model_configurationgroup.go | 9 - .../model_defaultadminpropertiesformat.go | 18 - .../model_effectivebasesecurityadminrule.go | 56 - ...model_effectivedefaultsecurityadminrule.go | 46 - .../model_effectivesecurityadminrule.go | 46 - .../model_networkgroupproperties.go | 9 - ...ereffectivesecurityadminruleslistresult.go | 49 - .../model_networkmanagersecuritygroupitem.go | 8 - .../model_queryrequestoptions.go | 8 - .../version.go | 12 - .../2022-09-01/networkmanagers/README.md | 162 - .../2022-09-01/networkmanagers/client.go | 26 - .../2022-09-01/networkmanagers/constants.go | 145 - .../networkmanagers/id_networkmanager.go | 127 - .../networkmanagers/id_networkmanager_test.go | 282 -- .../networkmanagers/method_createorupdate.go | 56 - .../networkmanagers/method_delete.go | 99 - .../2022-09-01/networkmanagers/method_get.go | 51 - .../2022-09-01/networkmanagers/method_list.go | 118 - .../method_listbysubscription.go | 118 - .../method_networkmanagercommitspost.go | 74 - ...thod_networkmanagerdeploymentstatuslist.go | 56 - .../networkmanagers/method_patch.go | 55 - .../model_crosstenantscopes.go | 10 - .../networkmanagers/model_networkmanager.go | 19 - .../model_networkmanagercommit.go | 11 - .../model_networkmanagerdeploymentstatus.go | 31 - ...etworkmanagerdeploymentstatuslistresult.go | 9 - ...networkmanagerdeploymentstatusparameter.go | 10 - .../model_networkmanagerproperties.go | 11 - ...rkmanagerpropertiesnetworkmanagerscopes.go | 10 - .../networkmanagers/model_patchobject.go | 8 - .../2022-09-01/networkmanagers/predicates.go | 37 - .../2022-09-01/networkmanagers/version.go | 12 - .../2022-09-01/networkprofiles/README.md | 124 - .../2022-09-01/networkprofiles/client.go | 26 - .../2022-09-01/networkprofiles/constants.go | 1013 ------ .../networkprofiles/id_networkprofile.go | 127 - .../networkprofiles/id_networkprofile_test.go | 282 -- .../networkprofiles/method_createorupdate.go | 56 - .../networkprofiles/method_delete.go | 71 - .../2022-09-01/networkprofiles/method_get.go | 80 - .../2022-09-01/networkprofiles/method_list.go | 90 - .../networkprofiles/method_listall.go | 90 - .../networkprofiles/method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_containernetworkinterface.go | 12 - ..._containernetworkinterfaceconfiguration.go | 12 - ...kinterfaceconfigurationpropertiesformat.go | 10 - ...ontainernetworkinterfaceipconfiguration.go | 11 - ...nterfaceipconfigurationpropertiesformat.go | 8 - ...ntainernetworkinterfacepropertiesformat.go | 11 - .../model_customdnsconfigpropertiesformat.go | 9 - .../networkprofiles/model_ddossettings.go | 9 - .../networkprofiles/model_delegation.go | 12 - .../networkprofiles/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../networkprofiles/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../networkprofiles/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../2022-09-01/networkprofiles/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../networkprofiles/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../networkprofiles/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../networkprofiles/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../networkprofiles/model_networkprofile.go | 14 - .../model_networkprofilepropertiesformat.go | 11 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../networkprofiles/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../networkprofiles/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../networkprofiles/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-09-01/networkprofiles/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../networkprofiles/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../networkprofiles/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../networkprofiles/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../networkprofiles/model_subresource.go | 8 - .../networkprofiles/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-09-01/networkprofiles/predicates.go | 37 - .../2022-09-01/networkprofiles/version.go | 12 - .../networksecuritygroups/README.md | 120 - .../networksecuritygroups/client.go | 26 - .../networksecuritygroups/constants.go | 1013 ------ .../id_networksecuritygroup.go | 127 - .../id_networksecuritygroup_test.go | 282 -- .../method_createorupdate.go | 74 - .../networksecuritygroups/method_delete.go | 71 - .../networksecuritygroups/method_get.go | 80 - .../networksecuritygroups/method_list.go | 90 - .../networksecuritygroups/method_listall.go | 90 - .../method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../networksecuritygroups/model_delegation.go | 12 - .../networksecuritygroups/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../networksecuritygroups/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../networksecuritygroups/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../networksecuritygroups/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../networksecuritygroups/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../networksecuritygroups/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - .../networksecuritygroups/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../networksecuritygroups/predicates.go | 37 - .../networksecuritygroups/version.go | 12 - .../networkvirtualappliances/README.md | 137 - .../networkvirtualappliances/client.go | 26 - .../networkvirtualappliances/constants.go | 98 - .../id_inboundsecurityrule.go | 140 - .../id_inboundsecurityrule_test.go | 327 -- .../id_networkvirtualappliance.go | 127 - .../id_networkvirtualappliance_test.go | 282 -- .../method_createorupdate.go | 74 - .../networkvirtualappliances/method_delete.go | 71 - .../networkvirtualappliances/method_get.go | 80 - ...ethod_inboundsecurityrulecreateorupdate.go | 74 - .../networkvirtualappliances/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_updatetags.go | 55 - .../model_delegationproperties.go | 9 - .../model_inboundsecurityrule.go | 12 - .../model_inboundsecurityruleproperties.go | 9 - .../model_inboundsecurityrules.go | 10 - .../model_networkvirtualappliance.go | 19 - ...networkvirtualappliancepropertiesformat.go | 22 - .../model_partnermanagedresourceproperties.go | 10 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../model_virtualappliancenicproperties.go | 10 - .../model_virtualapplianceskuproperties.go | 10 - .../networkvirtualappliances/predicates.go | 37 - .../networkvirtualappliances/version.go | 12 - .../2022-09-01/networkwatchers/README.md | 330 -- .../2022-09-01/networkwatchers/client.go | 26 - .../2022-09-01/networkwatchers/constants.go | 855 ----- .../networkwatchers/id_networkwatcher.go | 127 - .../networkwatchers/id_networkwatcher_test.go | 282 -- .../method_checkconnectivity.go | 74 - .../networkwatchers/method_createorupdate.go | 56 - .../networkwatchers/method_delete.go | 70 - .../2022-09-01/networkwatchers/method_get.go | 51 - .../method_getazurereachabilityreport.go | 74 - .../method_getflowlogstatus.go | 74 - ...ethod_getnetworkconfigurationdiagnostic.go | 74 - .../networkwatchers/method_getnexthop.go | 74 - .../networkwatchers/method_gettopology.go | 56 - .../method_gettroubleshooting.go | 74 - .../method_gettroubleshootingresult.go | 74 - .../method_getvmsecurityrules.go | 74 - .../2022-09-01/networkwatchers/method_list.go | 53 - .../networkwatchers/method_listall.go | 53 - .../method_listavailableproviders.go | 74 - .../method_setflowlogconfiguration.go | 74 - .../networkwatchers/method_updatetags.go | 55 - .../networkwatchers/method_verifyipflow.go | 74 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_availableproviderslist.go | 8 - .../model_availableproviderslistcity.go | 9 - .../model_availableproviderslistcountry.go | 10 - .../model_availableproviderslistparameters.go | 11 - .../model_availableprovidersliststate.go | 10 - .../model_azurereachabilityreport.go | 10 - .../model_azurereachabilityreportitem.go | 10 - ...odel_azurereachabilityreportlatencyinfo.go | 27 - .../model_azurereachabilityreportlocation.go | 10 - ...model_azurereachabilityreportparameters.go | 36 - .../model_connectivitydestination.go | 10 - .../networkwatchers/model_connectivityhop.go | 16 - .../model_connectivityinformation.go | 14 - .../model_connectivityissue.go | 11 - .../model_connectivityparameters.go | 12 - .../model_connectivitysource.go | 9 - .../model_effectivenetworksecurityrule.go | 22 - .../model_evaluatednetworksecuritygroup.go | 11 - .../model_flowlogformatparameters.go | 9 - .../model_flowloginformation.go | 10 - .../model_flowlogproperties.go | 11 - .../model_flowlogstatusparameters.go | 8 - .../networkwatchers/model_hoplink.go | 13 - .../model_hoplinkproperties.go | 10 - .../model_httpconfiguration.go | 10 - .../networkwatchers/model_httpheader.go | 9 - .../networkwatchers/model_matchedrule.go | 9 - ...etworkconfigurationdiagnosticparameters.go | 10 - ...l_networkconfigurationdiagnosticprofile.go | 12 - ..._networkconfigurationdiagnosticresponse.go | 8 - ...el_networkconfigurationdiagnosticresult.go | 9 - .../model_networkinterfaceassociation.go | 9 - .../model_networksecuritygroupresult.go | 9 - ...el_networksecurityrulesevaluationresult.go | 13 - .../networkwatchers/model_networkwatcher.go | 14 - .../model_networkwatcherlistresult.go | 8 - .../model_networkwatcherpropertiesformat.go | 8 - .../model_nexthopparameters.go | 11 - .../networkwatchers/model_nexthopresult.go | 10 - .../model_protocolconfiguration.go | 8 - .../model_querytroubleshootingparameters.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../model_securitygroupnetworkinterface.go | 9 - .../model_securitygroupviewparameters.go | 8 - .../model_securitygroupviewresult.go | 8 - .../networkwatchers/model_securityrule.go | 12 - .../model_securityruleassociations.go | 11 - .../model_securityrulepropertiesformat.go | 23 - .../model_subnetassociation.go | 9 - .../networkwatchers/model_subresource.go | 8 - .../networkwatchers/model_tagsobject.go | 8 - .../networkwatchers/model_topology.go | 41 - .../model_topologyassociation.go | 10 - .../model_topologyparameters.go | 10 - .../networkwatchers/model_topologyresource.go | 11 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_troubleshootingdetails.go | 12 - .../model_troubleshootingparameters.go | 9 - .../model_troubleshootingproperties.go | 9 - ...model_troubleshootingrecommendedactions.go | 11 - .../model_troubleshootingresult.go | 41 - .../model_verificationipflowparameters.go | 15 - .../model_verificationipflowresult.go | 9 - .../2022-09-01/networkwatchers/version.go | 12 - .../2022-09-01/p2svpngateways/README.md | 112 - .../2022-09-01/p2svpngateways/client.go | 26 - .../2022-09-01/p2svpngateways/constants.go | 183 -- .../method_disconnectp2svpnconnections.go | 75 - .../method_generatevpnprofile.go | 75 - .../method_getp2svpnconnectionhealth.go | 71 - ...ethod_getp2svpnconnectionhealthdetailed.go | 75 - .../2022-09-01/p2svpngateways/method_reset.go | 71 - .../p2svpngateways/method_updatetags.go | 75 - .../p2svpngateways/model_addressspace.go | 8 - .../model_p2sconnectionconfiguration.go | 11 - ...el_p2sconnectionconfigurationproperties.go | 13 - .../model_p2svpnconnectionhealth.go | 8 - .../model_p2svpnconnectionhealthrequest.go | 9 - .../model_p2svpnconnectionrequest.go | 8 - .../p2svpngateways/model_p2svpngateway.go | 14 - .../model_p2svpngatewayproperties.go | 15 - .../model_p2svpnprofileparameters.go | 8 - .../model_propagatedroutetable.go | 9 - .../model_routingconfiguration.go | 12 - .../p2svpngateways/model_staticroute.go | 10 - .../model_staticroutesconfig.go | 9 - .../p2svpngateways/model_subresource.go | 8 - .../p2svpngateways/model_tagsobject.go | 8 - .../p2svpngateways/model_vnetroute.go | 10 - .../model_vpnclientconnectionhealth.go | 11 - .../model_vpnprofileresponse.go | 8 - ...model_vpnserverconfigurationpolicygroup.go | 12 - ...vpnserverconfigurationpolicygroupmember.go | 10 - ...erverconfigurationpolicygroupproperties.go | 12 - .../2022-09-01/p2svpngateways/version.go | 12 - .../2022-09-01/packetcaptures/README.md | 105 - .../2022-09-01/packetcaptures/client.go | 26 - .../2022-09-01/packetcaptures/constants.go | 242 -- .../packetcaptures/id_networkwatcher.go | 127 - .../packetcaptures/id_networkwatcher_test.go | 282 -- .../packetcaptures/id_packetcapture.go | 140 - .../packetcaptures/id_packetcapture_test.go | 327 -- .../packetcaptures/method_create.go | 73 - .../packetcaptures/method_delete.go | 70 - .../2022-09-01/packetcaptures/method_get.go | 51 - .../packetcaptures/method_getstatus.go | 70 - .../2022-09-01/packetcaptures/method_list.go | 52 - .../2022-09-01/packetcaptures/method_stop.go | 70 - .../packetcaptures/model_packetcapture.go | 8 - .../model_packetcapturefilter.go | 12 - .../model_packetcapturelistresult.go | 8 - .../model_packetcapturemachinescope.go | 9 - .../model_packetcaptureparameters.go | 15 - .../model_packetcapturequerystatusresult.go | 31 - .../model_packetcaptureresult.go | 11 - .../model_packetcaptureresultproperties.go | 16 - .../model_packetcapturestoragelocation.go | 10 - .../2022-09-01/packetcaptures/version.go | 12 - .../README.md | 53 - .../client.go | 26 - .../constants.go | 101 - .../id_peerconnection.go | 153 - .../id_peerconnection_test.go | 372 --- .../method_get.go | 51 - .../method_list.go | 90 - ...model_peerexpressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_subresource.go | 8 - .../predicates.go | 32 - .../version.go | 12 - .../2022-09-01/privatednszonegroups/README.md | 82 - .../2022-09-01/privatednszonegroups/client.go | 26 - .../privatednszonegroups/constants.go | 57 - .../id_privatednszonegroup.go | 140 - .../id_privatednszonegroup_test.go | 327 -- .../id_privateendpoint.go | 127 - .../id_privateendpoint_test.go | 282 -- .../method_createorupdate.go | 74 - .../privatednszonegroups/method_delete.go | 71 - .../privatednszonegroups/method_get.go | 51 - .../privatednszonegroups/method_list.go | 89 - .../model_privatednszoneconfig.go | 9 - .../model_privatednszonegroup.go | 11 - ...del_privatednszonegrouppropertiesformat.go | 9 - .../model_privatednszonepropertiesformat.go | 9 - .../privatednszonegroups/model_recordset.go | 13 - .../privatednszonegroups/predicates.go | 27 - .../privatednszonegroups/version.go | 12 - .../2022-09-01/privateendpoints/README.md | 133 - .../2022-09-01/privateendpoints/client.go | 26 - .../2022-09-01/privateendpoints/constants.go | 1013 ------ .../privateendpoints/id_location.go | 114 - .../privateendpoints/id_location_test.go | 237 -- .../privateendpoints/id_privateendpoint.go | 127 - .../id_privateendpoint_test.go | 282 -- .../privateendpoints/id_providerlocation.go | 127 - .../id_providerlocation_test.go | 282 -- ...ethod_availableprivateendpointtypeslist.go | 89 - ...privateendpointtypeslistbyresourcegroup.go | 89 - .../privateendpoints/method_createorupdate.go | 74 - .../privateendpoints/method_delete.go | 71 - .../2022-09-01/privateendpoints/method_get.go | 80 - .../privateendpoints/method_list.go | 90 - .../method_listbysubscription.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_availableprivateendpointtype.go | 12 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../privateendpoints/model_ddossettings.go | 9 - .../privateendpoints/model_delegation.go | 12 - .../privateendpoints/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../privateendpoints/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../privateendpoints/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../privateendpoints/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../privateendpoints/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../privateendpoints/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../privateendpoints/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../privateendpoints/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../privateendpoints/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../privateendpoints/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../privateendpoints/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../privateendpoints/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../privateendpoints/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../privateendpoints/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-09-01/privateendpoints/predicates.go | 70 - .../2022-09-01/privateendpoints/version.go | 12 - .../2022-09-01/privatelinkservice/README.md | 37 - .../2022-09-01/privatelinkservice/client.go | 26 - .../privatelinkservice/constants.go | 1013 ------ .../id_privatelinkservice.go | 127 - .../id_privatelinkservice_test.go | 282 -- .../method_createorupdate.go | 74 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../privatelinkservice/model_ddossettings.go | 9 - .../privatelinkservice/model_delegation.go | 12 - .../privatelinkservice/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../privatelinkservice/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../privatelinkservice/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../privatelinkservice/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../privatelinkservice/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../privatelinkservice/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../privatelinkservice/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../privatelinkservice/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../privatelinkservice/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../privatelinkservice/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-09-01/privatelinkservice/version.go | 12 - .../2022-09-01/privatelinkservices/README.md | 216 -- .../2022-09-01/privatelinkservices/client.go | 26 - .../privatelinkservices/constants.go | 1013 ------ .../privatelinkservices/id_location.go | 114 - .../privatelinkservices/id_location_test.go | 237 -- .../id_privateendpointconnection.go | 140 - .../id_privateendpointconnection_test.go | 327 -- .../id_privatelinkservice.go | 127 - .../id_privatelinkservice_test.go | 282 -- .../id_providerlocation.go | 127 - .../id_providerlocation_test.go | 282 -- ...ethod_checkprivatelinkservicevisibility.go | 74 - ...atelinkservicevisibilitybyresourcegroup.go | 74 - .../privatelinkservices/method_delete.go | 71 - .../method_deleteprivateendpointconnection.go | 71 - .../privatelinkservices/method_get.go | 80 - .../method_getprivateendpointconnection.go | 80 - .../privatelinkservices/method_list.go | 90 - ...hod_listautoapprovedprivatelinkservices.go | 89 - ...rovedprivatelinkservicesbyresourcegroup.go | 89 - .../method_listbysubscription.go | 90 - .../method_listprivateendpointconnections.go | 89 - .../method_updateprivateendpointconnection.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_autoapprovedprivatelinkservice.go | 8 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - ...heckprivatelinkservicevisibilityrequest.go | 8 - .../model_customdnsconfigpropertiesformat.go | 9 - .../privatelinkservices/model_ddossettings.go | 9 - .../privatelinkservices/model_delegation.go | 12 - .../privatelinkservices/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../privatelinkservices/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../privatelinkservices/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_privatelinkservicevisibility.go | 8 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../privatelinkservices/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../privatelinkservices/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../privatelinkservices/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../privatelinkservices/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../privatelinkservices/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../privatelinkservices/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../privatelinkservices/predicates.go | 78 - .../2022-09-01/privatelinkservices/version.go | 12 - .../2022-09-01/publicipaddresses/README.md | 132 - .../2022-09-01/publicipaddresses/client.go | 26 - .../2022-09-01/publicipaddresses/constants.go | 1054 ------- .../method_createorupdate.go | 75 - .../method_ddosprotectionstatus.go | 71 - .../publicipaddresses/method_delete.go | 72 - .../publicipaddresses/method_get.go | 81 - .../publicipaddresses/method_list.go | 90 - .../publicipaddresses/method_listall.go | 90 - .../publicipaddresses/method_updatetags.go | 56 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../publicipaddresses/model_ddossettings.go | 9 - .../publicipaddresses/model_delegation.go | 12 - .../publicipaddresses/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../publicipaddresses/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../publicipaddresses/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../publicipaddresses/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../publicipaddresses/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - ...odel_publicipddosprotectionstatusresult.go | 11 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../publicipaddresses/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../publicipaddresses/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../publicipaddresses/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../publicipaddresses/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../publicipaddresses/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../publicipaddresses/model_subresource.go | 8 - .../publicipaddresses/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../publicipaddresses/predicates.go | 37 - .../2022-09-01/publicipaddresses/version.go | 12 - .../2022-09-01/publicipprefixes/README.md | 120 - .../2022-09-01/publicipprefixes/client.go | 26 - .../2022-09-01/publicipprefixes/constants.go | 215 -- .../publicipprefixes/id_publicipprefix.go | 127 - .../id_publicipprefix_test.go | 282 -- .../publicipprefixes/method_createorupdate.go | 74 - .../publicipprefixes/method_delete.go | 71 - .../2022-09-01/publicipprefixes/method_get.go | 80 - .../publicipprefixes/method_list.go | 90 - .../publicipprefixes/method_listall.go | 90 - .../publicipprefixes/method_updatetags.go | 55 - .../publicipprefixes/model_iptag.go | 9 - .../publicipprefixes/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../publicipprefixes/model_natgatewaysku.go | 8 - .../publicipprefixes/model_publicipprefix.go | 22 - .../model_publicipprefixpropertiesformat.go | 17 - .../model_publicipprefixsku.go | 9 - .../model_referencedpublicipaddress.go | 8 - .../publicipprefixes/model_subresource.go | 8 - .../publicipprefixes/model_tagsobject.go | 8 - .../2022-09-01/publicipprefixes/predicates.go | 37 - .../2022-09-01/publicipprefixes/version.go | 12 - .../2022-09-01/routefilterrules/README.md | 82 - .../2022-09-01/routefilterrules/client.go | 26 - .../2022-09-01/routefilterrules/constants.go | 136 - .../routefilterrules/id_routefilter.go | 127 - .../routefilterrules/id_routefilter_test.go | 282 -- .../routefilterrules/id_routefilterrule.go | 140 - .../id_routefilterrule_test.go | 327 -- .../routefilterrules/method_createorupdate.go | 74 - .../routefilterrules/method_delete.go | 71 - .../2022-09-01/routefilterrules/method_get.go | 51 - .../method_listbyroutefilter.go | 89 - .../routefilterrules/model_routefilterrule.go | 12 - .../model_routefilterrulepropertiesformat.go | 11 - .../2022-09-01/routefilterrules/predicates.go | 32 - .../2022-09-01/routefilterrules/version.go | 12 - .../network/2022-09-01/routefilters/README.md | 120 - .../network/2022-09-01/routefilters/client.go | 26 - .../2022-09-01/routefilters/constants.go | 353 --- .../2022-09-01/routefilters/id_routefilter.go | 127 - .../routefilters/id_routefilter_test.go | 282 -- .../routefilters/method_createorupdate.go | 74 - .../2022-09-01/routefilters/method_delete.go | 71 - .../2022-09-01/routefilters/method_get.go | 80 - .../2022-09-01/routefilters/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../routefilters/method_updatetags.go | 55 - .../model_expressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_expressroutecircuitpeering.go | 12 - .../model_expressroutecircuitpeeringconfig.go | 13 - ...ressroutecircuitpeeringpropertiesformat.go | 27 - .../model_expressroutecircuitstats.go | 11 - .../model_expressrouteconnectionid.go | 8 - .../model_ipv6circuitconnectionconfig.go | 9 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - ...model_peerexpressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../routefilters/model_routefilter.go | 14 - .../model_routefilterpropertiesformat.go | 11 - .../routefilters/model_routefilterrule.go | 12 - .../model_routefilterrulepropertiesformat.go | 11 - .../routefilters/model_subresource.go | 8 - .../routefilters/model_tagsobject.go | 8 - .../2022-09-01/routefilters/predicates.go | 37 - .../2022-09-01/routefilters/version.go | 12 - .../network/2022-09-01/routes/README.md | 82 - .../network/2022-09-01/routes/client.go | 26 - .../network/2022-09-01/routes/constants.go | 107 - .../network/2022-09-01/routes/id_route.go | 140 - .../2022-09-01/routes/id_route_test.go | 327 -- .../2022-09-01/routes/id_routetable.go | 127 - .../2022-09-01/routes/id_routetable_test.go | 282 -- .../routes/method_createorupdate.go | 74 - .../2022-09-01/routes/method_delete.go | 71 - .../network/2022-09-01/routes/method_get.go | 51 - .../network/2022-09-01/routes/method_list.go | 89 - .../network/2022-09-01/routes/model_route.go | 12 - .../routes/model_routepropertiesformat.go | 12 - .../network/2022-09-01/routes/predicates.go | 32 - .../network/2022-09-01/routes/version.go | 12 - .../network/2022-09-01/routetables/README.md | 120 - .../network/2022-09-01/routetables/client.go | 26 - .../2022-09-01/routetables/constants.go | 1013 ------ .../2022-09-01/routetables/id_routetable.go | 127 - .../routetables/id_routetable_test.go | 282 -- .../routetables/method_createorupdate.go | 74 - .../2022-09-01/routetables/method_delete.go | 71 - .../2022-09-01/routetables/method_get.go | 80 - .../2022-09-01/routetables/method_list.go | 90 - .../2022-09-01/routetables/method_listall.go | 90 - .../routetables/method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../routetables/model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../routetables/model_ddossettings.go | 9 - .../routetables/model_delegation.go | 12 - .../2022-09-01/routetables/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../routetables/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../routetables/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../2022-09-01/routetables/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../routetables/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../routetables/model_natgatewaysku.go | 8 - .../routetables/model_natruleportmapping.go | 10 - .../routetables/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../routetables/model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../routetables/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../routetables/model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../routetables/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../routetables/model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../routetables/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-09-01/routetables/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../routetables/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../routetables/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../2022-09-01/routetables/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../routetables/model_subresource.go | 8 - .../routetables/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../routetables/model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-09-01/routetables/predicates.go | 37 - .../network/2022-09-01/routetables/version.go | 12 - .../2022-09-01/scopeconnections/README.md | 90 - .../2022-09-01/scopeconnections/client.go | 26 - .../2022-09-01/scopeconnections/constants.go | 60 - .../scopeconnections/id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- .../scopeconnections/id_scopeconnection.go | 140 - .../id_scopeconnection_test.go | 327 -- .../scopeconnections/method_createorupdate.go | 56 - .../scopeconnections/method_delete.go | 47 - .../2022-09-01/scopeconnections/method_get.go | 51 - .../scopeconnections/method_list.go | 117 - .../scopeconnections/model_scopeconnection.go | 17 - .../model_scopeconnectionproperties.go | 11 - .../2022-09-01/scopeconnections/predicates.go | 32 - .../2022-09-01/scopeconnections/version.go | 12 - .../securityadminconfigurations/README.md | 86 - .../securityadminconfigurations/client.go | 26 - .../securityadminconfigurations/constants.go | 101 - .../id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- .../id_securityadminconfiguration.go | 140 - .../id_securityadminconfiguration_test.go | 327 -- .../method_createorupdate.go | 56 - .../method_delete.go | 99 - .../securityadminconfigurations/method_get.go | 51 - .../method_list.go | 117 - .../model_securityadminconfiguration.go | 17 - ...urityadminconfigurationpropertiesformat.go | 10 - .../securityadminconfigurations/predicates.go | 32 - .../securityadminconfigurations/version.go | 12 - .../securitypartnerproviders/README.md | 120 - .../securitypartnerproviders/client.go | 26 - .../securitypartnerproviders/constants.go | 148 - .../id_securitypartnerprovider.go | 127 - .../id_securitypartnerprovider_test.go | 282 -- .../method_createorupdate.go | 74 - .../securitypartnerproviders/method_delete.go | 71 - .../securitypartnerproviders/method_get.go | 51 - .../securitypartnerproviders/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_updatetags.go | 55 - .../model_securitypartnerprovider.go | 14 - ...securitypartnerproviderpropertiesformat.go | 11 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../securitypartnerproviders/predicates.go | 37 - .../securitypartnerproviders/version.go | 12 - .../2022-09-01/securityrules/README.md | 115 - .../2022-09-01/securityrules/client.go | 26 - .../2022-09-01/securityrules/constants.go | 192 -- .../securityrules/id_defaultsecurityrule.go | 140 - .../id_defaultsecurityrule_test.go | 327 -- .../securityrules/id_networksecuritygroup.go | 127 - .../id_networksecuritygroup_test.go | 282 -- .../securityrules/id_securityrule.go | 140 - .../securityrules/id_securityrule_test.go | 327 -- .../securityrules/method_createorupdate.go | 74 - .../method_defaultsecurityrulesget.go | 51 - .../method_defaultsecurityruleslist.go | 89 - .../2022-09-01/securityrules/method_delete.go | 71 - .../2022-09-01/securityrules/method_get.go | 51 - .../2022-09-01/securityrules/method_list.go | 89 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../securityrules/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../2022-09-01/securityrules/predicates.go | 32 - .../2022-09-01/securityrules/version.go | 12 - .../serviceendpointpolicies/README.md | 120 - .../serviceendpointpolicies/client.go | 26 - .../serviceendpointpolicies/constants.go | 1013 ------ .../id_serviceendpointpolicy.go | 127 - .../id_serviceendpointpolicy_test.go | 282 -- .../method_createorupdate.go | 74 - .../serviceendpointpolicies/method_delete.go | 71 - .../serviceendpointpolicies/method_get.go | 80 - .../serviceendpointpolicies/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../model_delegation.go | 12 - .../serviceendpointpolicies/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../serviceendpointpolicies/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../serviceendpointpolicies/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../serviceendpointpolicies/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../serviceendpointpolicies/predicates.go | 42 - .../serviceendpointpolicies/version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 57 - .../id_serviceendpointpolicy.go | 127 - .../id_serviceendpointpolicy_test.go | 282 -- .../id_serviceendpointpolicydefinition.go | 140 - ...id_serviceendpointpolicydefinition_test.go | 327 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_listbyresourcegroup.go | 89 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - .../predicates.go | 32 - .../version.go | 12 - .../network/2022-09-01/servicetags/README.md | 53 - .../network/2022-09-01/servicetags/client.go | 26 - .../2022-09-01/servicetags/id_location.go | 114 - .../servicetags/id_location_test.go | 237 -- .../method_servicetaginformationlist.go | 121 - .../servicetags/method_servicetagslist.go | 52 - .../model_servicetaginformation.go | 11 - ...l_servicetaginformationpropertiesformat.go | 12 - .../model_servicetagslistresult.go | 14 - .../2022-09-01/servicetags/predicates.go | 27 - .../network/2022-09-01/servicetags/version.go | 12 - .../2022-09-01/staticmembers/README.md | 90 - .../2022-09-01/staticmembers/client.go | 26 - .../2022-09-01/staticmembers/constants.go | 57 - .../staticmembers/id_networkgroup.go | 140 - .../staticmembers/id_networkgroup_test.go | 327 -- .../staticmembers/id_staticmember.go | 153 - .../staticmembers/id_staticmember_test.go | 372 --- .../staticmembers/method_createorupdate.go | 56 - .../2022-09-01/staticmembers/method_delete.go | 47 - .../2022-09-01/staticmembers/method_get.go | 51 - .../2022-09-01/staticmembers/method_list.go | 117 - .../staticmembers/model_staticmember.go | 17 - .../model_staticmemberproperties.go | 10 - .../2022-09-01/staticmembers/predicates.go | 32 - .../2022-09-01/staticmembers/version.go | 12 - .../network/2022-09-01/subnets/README.md | 82 - .../network/2022-09-01/subnets/client.go | 26 - .../network/2022-09-01/subnets/constants.go | 1013 ------ .../subnets/method_createorupdate.go | 75 - .../2022-09-01/subnets/method_delete.go | 72 - .../network/2022-09-01/subnets/method_get.go | 81 - .../network/2022-09-01/subnets/method_list.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../subnets/model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../subnets/model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../2022-09-01/subnets/model_ddossettings.go | 9 - .../2022-09-01/subnets/model_delegation.go | 12 - .../2022-09-01/subnets/model_flowlog.go | 14 - .../subnets/model_flowlogformatparameters.go | 9 - .../subnets/model_flowlogpropertiesformat.go | 15 - .../subnets/model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../subnets/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../subnets/model_ipconfiguration.go | 11 - .../subnets/model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../network/2022-09-01/subnets/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../2022-09-01/subnets/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../2022-09-01/subnets/model_natgatewaysku.go | 8 - .../subnets/model_natruleportmapping.go | 10 - .../subnets/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../subnets/model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../subnets/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../subnets/model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../subnets/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../subnets/model_publicipaddresssku.go | 9 - .../subnets/model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../2022-09-01/subnets/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../network/2022-09-01/subnets/model_route.go | 12 - .../subnets/model_routepropertiesformat.go | 12 - .../2022-09-01/subnets/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../2022-09-01/subnets/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../subnets/model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../subnets/model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../2022-09-01/subnets/model_subnet.go | 12 - .../subnets/model_subnetpropertiesformat.go | 26 - .../2022-09-01/subnets/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../subnets/model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../network/2022-09-01/subnets/predicates.go | 32 - .../network/2022-09-01/subnets/version.go | 12 - .../2022-09-01/trafficanalytics/README.md | 54 - .../2022-09-01/trafficanalytics/client.go | 26 - .../2022-09-01/trafficanalytics/constants.go | 48 - .../trafficanalytics/id_networkwatcher.go | 127 - .../id_networkwatcher_test.go | 282 -- .../method_networkwatchersgetflowlogstatus.go | 74 - ..._networkwatcherssetflowlogconfiguration.go | 74 - .../model_flowlogformatparameters.go | 9 - .../model_flowloginformation.go | 10 - .../model_flowlogproperties.go | 11 - .../model_flowlogstatusparameters.go | 8 - .../model_retentionpolicyparameters.go | 9 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../2022-09-01/trafficanalytics/version.go | 12 - .../network/2022-09-01/usages/README.md | 37 - .../network/2022-09-01/usages/client.go | 26 - .../network/2022-09-01/usages/constants.go | 48 - .../network/2022-09-01/usages/id_location.go | 114 - .../2022-09-01/usages/id_location_test.go | 237 -- .../network/2022-09-01/usages/method_list.go | 89 - .../network/2022-09-01/usages/model_usage.go | 12 - .../2022-09-01/usages/model_usagename.go | 9 - .../network/2022-09-01/usages/predicates.go | 27 - .../network/2022-09-01/usages/version.go | 12 - .../network/2022-09-01/vipswap/README.md | 69 - .../network/2022-09-01/vipswap/client.go | 26 - .../network/2022-09-01/vipswap/constants.go | 51 - .../2022-09-01/vipswap/id_cloudservice.go | 127 - .../vipswap/id_cloudservice_test.go | 282 -- .../2022-09-01/vipswap/method_create.go | 74 - .../network/2022-09-01/vipswap/method_get.go | 52 - .../network/2022-09-01/vipswap/method_list.go | 52 - .../2022-09-01/vipswap/model_swapresource.go | 11 - .../vipswap/model_swapresourcelistresult.go | 8 - .../vipswap/model_swapresourceproperties.go | 8 - .../network/2022-09-01/vipswap/version.go | 12 - .../virtualappliancesites/README.md | 82 - .../virtualappliancesites/client.go | 26 - .../virtualappliancesites/constants.go | 57 - .../id_networkvirtualappliance.go | 127 - .../id_networkvirtualappliance_test.go | 282 -- .../id_virtualappliancesite.go | 140 - .../id_virtualappliancesite_test.go | 327 -- .../method_createorupdate.go | 74 - .../virtualappliancesites/method_delete.go | 71 - .../virtualappliancesites/method_get.go | 51 - .../virtualappliancesites/method_list.go | 89 - .../model_breakoutcategorypolicies.go | 10 - .../model_office365policyproperties.go | 8 - .../model_virtualappliancesite.go | 12 - .../model_virtualappliancesiteproperties.go | 10 - .../virtualappliancesites/predicates.go | 32 - .../virtualappliancesites/version.go | 12 - .../2022-09-01/virtualapplianceskus/README.md | 53 - .../2022-09-01/virtualapplianceskus/client.go | 26 - .../id_networkvirtualappliancesku.go | 114 - .../id_networkvirtualappliancesku_test.go | 237 -- .../virtualapplianceskus/method_get.go | 51 - .../virtualapplianceskus/method_list.go | 90 - .../model_networkvirtualappliancesku.go | 14 - ...del_networkvirtualapplianceskuinstances.go | 9 - ...workvirtualapplianceskupropertiesformat.go | 10 - .../virtualapplianceskus/predicates.go | 37 - .../virtualapplianceskus/version.go | 12 - .../README.md | 207 -- .../client.go | 26 - .../constants.go | 1137 ------- .../id_connection.go | 127 - .../id_connection_test.go | 282 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_getikesas.go | 70 - .../method_getsharedkey.go | 52 - .../method_list.go | 90 - .../method_resetconnection.go | 69 - .../method_resetsharedkey.go | 74 - .../method_setsharedkey.go | 74 - .../method_startpacketcapture.go | 74 - .../method_stoppacketcapture.go | 74 - .../method_updatetags.go | 74 - .../model_addressspace.go | 8 - .../model_bgpsettings.go | 11 - .../model_connectionresetsharedkey.go | 8 - .../model_connectionsharedkey.go | 9 - ...atewaycustombgpipaddressipconfiguration.go | 9 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_ipsecpolicy.go | 15 - .../model_localnetworkgateway.go | 14 - ...del_localnetworkgatewaypropertiesformat.go | 13 - .../model_radiusserver.go | 10 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../model_trafficselectorpolicy.go | 9 - .../model_tunnelconnectionhealth.go | 12 - .../model_virtualnetworkgateway.go | 19 - .../model_virtualnetworkgatewayconnection.go | 14 - ...etworkgatewayconnectionpropertiesformat.go | 34 - ...el_virtualnetworkgatewayipconfiguration.go | 11 - ...kgatewayipconfigurationpropertiesformat.go | 12 - .../model_virtualnetworkgatewaynatrule.go | 12 - ..._virtualnetworkgatewaynatruleproperties.go | 13 - .../model_virtualnetworkgatewaypolicygroup.go | 11 - ..._virtualnetworkgatewaypolicygroupmember.go | 10 - ...tualnetworkgatewaypolicygroupproperties.go | 12 - ...l_virtualnetworkgatewaypropertiesformat.go | 30 - .../model_virtualnetworkgatewaysku.go | 10 - .../model_vngclientconnectionconfiguration.go | 11 - ...clientconnectionconfigurationproperties.go | 10 - .../model_vpnclientconfiguration.go | 20 - .../model_vpnclientrevokedcertificate.go | 11 - ...lientrevokedcertificatepropertiesformat.go | 9 - .../model_vpnclientrootcertificate.go | 11 - ...pnclientrootcertificatepropertiesformat.go | 9 - .../model_vpnnatrulemapping.go | 9 - .../model_vpnpacketcapturestartparameters.go | 8 - .../model_vpnpacketcapturestopparameters.go | 8 - .../predicates.go | 37 - .../version.go | 12 - .../virtualnetworkgateways/README.md | 413 --- .../virtualnetworkgateways/client.go | 26 - .../virtualnetworkgateways/constants.go | 1269 -------- .../virtualnetworkgateways/id_connection.go | 127 - .../id_connection_test.go | 282 -- .../id_virtualnetworkgateway.go | 127 - .../id_virtualnetworkgateway_test.go | 282 -- .../id_virtualnetworkgatewaynatrule.go | 140 - .../id_virtualnetworkgatewaynatrule_test.go | 327 -- .../method_createorupdate.go | 74 - .../virtualnetworkgateways/method_delete.go | 71 - ...nectvirtualnetworkgatewayvpnconnections.go | 74 - .../method_generatevpnclientpackage.go | 74 - .../method_generatevpnprofile.go | 74 - .../virtualnetworkgateways/method_get.go | 51 - .../method_getadvertisedroutes.go | 98 - .../method_getbgppeerstatus.go | 98 - .../method_getlearnedroutes.go | 70 - .../method_getvpnclientconnectionhealth.go | 70 - .../method_getvpnclientipsecparameters.go | 69 - .../method_getvpnprofilepackageurl.go | 70 - .../virtualnetworkgateways/method_list.go | 90 - .../method_listconnections.go | 89 - .../virtualnetworkgateways/method_reset.go | 98 - .../method_resetvpnclientsharedkey.go | 70 - .../method_setvpnclientipsecparameters.go | 74 - .../method_startpacketcapture.go | 74 - .../method_stoppacketcapture.go | 74 - .../method_supportedvpndevices.go | 52 - .../method_updatetags.go | 74 - ...ualnetworkgatewaynatrulescreateorupdate.go | 74 - ...hod_virtualnetworkgatewaynatrulesdelete.go | 71 - ...method_virtualnetworkgatewaynatrulesget.go | 51 - ...ewaynatruleslistbyvirtualnetworkgateway.go | 89 - .../method_vpndeviceconfigurationscript.go | 56 - .../model_addressspace.go | 8 - .../model_bgppeerstatus.go | 15 - .../model_bgppeerstatuslistresult.go | 8 - .../model_bgpsettings.go | 11 - ...atewaycustombgpipaddressipconfiguration.go | 9 - .../model_gatewayroute.go | 14 - .../model_gatewayroutelistresult.go | 8 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_ipsecpolicy.go | 15 - .../model_p2svpnconnectionrequest.go | 8 - .../model_radiusserver.go | 10 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../model_trafficselectorpolicy.go | 9 - .../model_tunnelconnectionhealth.go | 12 - ...irtualnetworkconnectiongatewayreference.go | 8 - .../model_virtualnetworkgateway.go | 19 - ...rtualnetworkgatewayconnectionlistentity.go | 14 - ...wayconnectionlistentitypropertiesformat.go | 30 - ...el_virtualnetworkgatewayipconfiguration.go | 11 - ...kgatewayipconfigurationpropertiesformat.go | 12 - .../model_virtualnetworkgatewaynatrule.go | 12 - ..._virtualnetworkgatewaynatruleproperties.go | 13 - .../model_virtualnetworkgatewaypolicygroup.go | 11 - ..._virtualnetworkgatewaypolicygroupmember.go | 10 - ...tualnetworkgatewaypolicygroupproperties.go | 12 - ...l_virtualnetworkgatewaypropertiesformat.go | 30 - .../model_virtualnetworkgatewaysku.go | 10 - .../model_vngclientconnectionconfiguration.go | 11 - ...clientconnectionconfigurationproperties.go | 10 - .../model_vpnclientconfiguration.go | 20 - .../model_vpnclientconnectionhealthdetail.go | 19 - ...nclientconnectionhealthdetaillistresult.go | 8 - .../model_vpnclientipsecparameters.go | 15 - .../model_vpnclientparameters.go | 11 - .../model_vpnclientrevokedcertificate.go | 11 - ...lientrevokedcertificatepropertiesformat.go | 9 - .../model_vpnclientrootcertificate.go | 11 - ...pnclientrootcertificatepropertiesformat.go | 9 - .../model_vpndevicescriptparameters.go | 10 - .../model_vpnnatrulemapping.go | 9 - .../model_vpnpacketcapturestartparameters.go | 8 - .../model_vpnpacketcapturestopparameters.go | 8 - .../virtualnetworkgateways/predicates.go | 98 - .../virtualnetworkgateways/version.go | 12 - .../virtualnetworkpeerings/README.md | 82 - .../virtualnetworkpeerings/client.go | 26 - .../virtualnetworkpeerings/constants.go | 227 -- .../id_virtualnetworkpeering.go | 140 - .../id_virtualnetworkpeering_test.go | 327 -- .../method_createorupdate.go | 102 - .../virtualnetworkpeerings/method_delete.go | 71 - .../virtualnetworkpeerings/method_get.go | 51 - .../virtualnetworkpeerings/method_list.go | 90 - .../model_addressspace.go | 8 - .../model_subresource.go | 8 - .../model_virtualnetworkbgpcommunities.go | 9 - .../model_virtualnetworkencryption.go | 9 - .../model_virtualnetworkpeering.go | 12 - ...l_virtualnetworkpeeringpropertiesformat.go | 21 - .../virtualnetworkpeerings/predicates.go | 32 - .../virtualnetworkpeerings/version.go | 12 - .../2022-09-01/virtualnetworks/README.md | 236 -- .../2022-09-01/virtualnetworks/client.go | 26 - .../2022-09-01/virtualnetworks/constants.go | 1186 ------- .../virtualnetworks/method_createorupdate.go | 75 - .../virtualnetworks/method_delete.go | 72 - .../2022-09-01/virtualnetworks/method_get.go | 81 - .../2022-09-01/virtualnetworks/method_list.go | 90 - .../virtualnetworks/method_listall.go | 90 - .../method_resourcenavigationlinkslist.go | 53 - .../method_serviceassociationlinkslist.go | 53 - .../method_subnetspreparenetworkpolicies.go | 75 - .../method_subnetsunpreparenetworkpolicies.go | 75 - .../virtualnetworks/method_updatetags.go | 56 - ...rtualnetworkscheckipaddressavailability.go | 81 - ...virtualnetworkslistddosprotectionstatus.go | 117 - .../method_virtualnetworkslistusage.go | 90 - .../virtualnetworks/model_addressspace.go | 8 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../virtualnetworks/model_ddossettings.go | 9 - .../virtualnetworks/model_delegation.go | 12 - .../virtualnetworks/model_dhcpoptions.go | 8 - .../virtualnetworks/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../virtualnetworks/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipaddressavailabilityresult.go | 10 - .../virtualnetworks/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../2022-09-01/virtualnetworks/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../virtualnetworks/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../virtualnetworks/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkintentpolicy.go | 13 - .../model_networkintentpolicyconfiguration.go | 9 - .../virtualnetworks/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_preparenetworkpoliciesrequest.go | 9 - .../virtualnetworks/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../virtualnetworks/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - ...odel_publicipddosprotectionstatusresult.go | 11 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - ...model_resourcenavigationlinkslistresult.go | 9 - .../virtualnetworks/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-09-01/virtualnetworks/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../virtualnetworks/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../virtualnetworks/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_serviceassociationlinkslistresult.go | 9 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../virtualnetworks/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../virtualnetworks/model_subresource.go | 8 - .../virtualnetworks/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_unpreparenetworkpoliciesrequest.go | 8 - .../virtualnetworks/model_virtualnetwork.go | 19 - .../model_virtualnetworkbgpcommunities.go | 9 - .../model_virtualnetworkencryption.go | 9 - .../model_virtualnetworkpeering.go | 12 - ...l_virtualnetworkpeeringpropertiesformat.go | 21 - .../model_virtualnetworkpropertiesformat.go | 21 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../model_virtualnetworkusage.go | 12 - .../model_virtualnetworkusagename.go | 9 - .../2022-09-01/virtualnetworks/predicates.go | 88 - .../2022-09-01/virtualnetworks/version.go | 12 - .../2022-09-01/virtualnetworktap/README.md | 86 - .../2022-09-01/virtualnetworktap/client.go | 26 - .../2022-09-01/virtualnetworktap/constants.go | 1013 ------ .../virtualnetworktap/id_virtualnetworktap.go | 127 - .../id_virtualnetworktap_test.go | 282 -- .../method_createorupdate.go | 74 - .../virtualnetworktap/method_delete.go | 71 - .../virtualnetworktap/method_get.go | 51 - .../virtualnetworktap/method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../virtualnetworktap/model_ddossettings.go | 9 - .../virtualnetworktap/model_delegation.go | 12 - .../virtualnetworktap/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../virtualnetworktap/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../virtualnetworktap/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../virtualnetworktap/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../virtualnetworktap/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../virtualnetworktap/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../virtualnetworktap/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../virtualnetworktap/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../virtualnetworktap/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../virtualnetworktap/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../virtualnetworktap/model_subresource.go | 8 - .../virtualnetworktap/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-09-01/virtualnetworktap/version.go | 12 - .../2022-09-01/virtualnetworktaps/README.md | 54 - .../2022-09-01/virtualnetworktaps/client.go | 26 - .../virtualnetworktaps/constants.go | 1013 ------ .../virtualnetworktaps/method_listall.go | 90 - .../method_listbyresourcegroup.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../virtualnetworktaps/model_ddossettings.go | 9 - .../virtualnetworktaps/model_delegation.go | 12 - .../virtualnetworktaps/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../virtualnetworktaps/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../virtualnetworktaps/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../virtualnetworktaps/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../virtualnetworktaps/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../virtualnetworktaps/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../virtualnetworktaps/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../virtualnetworktaps/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../virtualnetworktaps/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../virtualnetworktaps/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../virtualnetworktaps/predicates.go | 37 - .../2022-09-01/virtualnetworktaps/version.go | 12 - .../virtualrouterpeerings/README.md | 82 - .../virtualrouterpeerings/client.go | 26 - .../virtualrouterpeerings/constants.go | 57 - .../virtualrouterpeerings/id_virtualrouter.go | 127 - .../id_virtualrouter_test.go | 282 -- .../method_createorupdate.go | 75 - .../virtualrouterpeerings/method_delete.go | 72 - .../virtualrouterpeerings/method_get.go | 52 - .../virtualrouterpeerings/method_list.go | 89 - .../model_virtualrouterpeering.go | 12 - .../model_virtualrouterpeeringproperties.go | 10 - .../virtualrouterpeerings/predicates.go | 32 - .../virtualrouterpeerings/version.go | 12 - .../2022-09-01/virtualrouters/README.md | 99 - .../2022-09-01/virtualrouters/client.go | 26 - .../2022-09-01/virtualrouters/constants.go | 57 - .../virtualrouters/id_virtualrouter.go | 127 - .../virtualrouters/id_virtualrouter_test.go | 282 -- .../virtualrouters/method_createorupdate.go | 74 - .../virtualrouters/method_delete.go | 71 - .../2022-09-01/virtualrouters/method_get.go | 80 - .../2022-09-01/virtualrouters/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../virtualrouters/model_subresource.go | 8 - .../virtualrouters/model_virtualrouter.go | 14 - .../model_virtualrouterpropertiesformat.go | 13 - .../2022-09-01/virtualrouters/predicates.go | 37 - .../2022-09-01/virtualrouters/version.go | 12 - .../network/2022-09-01/virtualwans/README.md | 1405 --------- .../network/2022-09-01/virtualwans/client.go | 26 - .../2022-09-01/virtualwans/constants.go | 2197 ------------- .../id_configurationpolicygroup.go | 140 - .../id_configurationpolicygroup_test.go | 327 -- .../virtualwans/id_hubroutetable.go | 140 - .../virtualwans/id_hubroutetable_test.go | 327 -- .../id_hubvirtualnetworkconnection.go | 140 - .../id_hubvirtualnetworkconnection_test.go | 327 -- .../2022-09-01/virtualwans/id_natrule.go | 140 - .../2022-09-01/virtualwans/id_natrule_test.go | 327 -- .../2022-09-01/virtualwans/id_routemap.go | 140 - .../virtualwans/id_routemap_test.go | 327 -- .../virtualwans/id_routingintent.go | 140 - .../virtualwans/id_routingintent_test.go | 327 -- .../2022-09-01/virtualwans/id_virtualhub.go | 127 - .../virtualwans/id_virtualhub_test.go | 282 -- .../virtualwans/id_virtualhubroutetable.go | 140 - .../id_virtualhubroutetable_test.go | 327 -- .../2022-09-01/virtualwans/id_virtualwan.go | 127 - .../virtualwans/id_virtualwan_test.go | 282 -- .../2022-09-01/virtualwans/id_vpngateway.go | 127 - .../virtualwans/id_vpngateway_test.go | 282 -- .../virtualwans/id_vpnlinkconnection.go | 153 - .../virtualwans/id_vpnlinkconnection_test.go | 372 --- .../virtualwans/id_vpnserverconfiguration.go | 127 - .../id_vpnserverconfiguration_test.go | 282 -- .../2022-09-01/virtualwans/id_vpnsite.go | 127 - .../2022-09-01/virtualwans/id_vpnsite_test.go | 282 -- .../2022-09-01/virtualwans/id_vpnsitelink.go | 140 - .../virtualwans/id_vpnsitelink_test.go | 327 -- ...configurationpolicygroupscreateorupdate.go | 74 - .../method_configurationpolicygroupsdelete.go | 71 - .../method_configurationpolicygroupsget.go | 51 - ...olicygroupslistbyvpnserverconfiguration.go | 89 - ...tualwanvpnserverconfigurationvpnprofile.go | 74 - .../method_hubroutetablescreateorupdate.go | 74 - .../method_hubroutetablesdelete.go | 71 - .../virtualwans/method_hubroutetablesget.go | 51 - .../virtualwans/method_hubroutetableslist.go | 89 - ...virtualnetworkconnectionscreateorupdate.go | 74 - ...thod_hubvirtualnetworkconnectionsdelete.go | 71 - .../method_hubvirtualnetworkconnectionsget.go | 51 - ...method_hubvirtualnetworkconnectionslist.go | 89 - .../method_natrulescreateorupdate.go | 74 - .../virtualwans/method_natrulesdelete.go | 71 - .../virtualwans/method_natrulesget.go | 51 - .../method_natruleslistbyvpngateway.go | 89 - .../method_p2svpngatewayscreateorupdate.go | 75 - .../method_p2svpngatewaysdelete.go | 72 - .../virtualwans/method_p2svpngatewaysget.go | 52 - .../virtualwans/method_p2svpngatewayslist.go | 90 - ...ethod_p2svpngatewayslistbyresourcegroup.go | 90 - .../method_routemapscreateorupdate.go | 74 - .../virtualwans/method_routemapsdelete.go | 71 - .../virtualwans/method_routemapsget.go | 51 - .../virtualwans/method_routemapslist.go | 89 - .../method_routingintentcreateorupdate.go | 74 - .../virtualwans/method_routingintentdelete.go | 71 - .../virtualwans/method_routingintentget.go | 51 - .../virtualwans/method_routingintentlist.go | 89 - .../method_supportedsecurityproviders.go | 52 - .../virtualwans/method_updatetags.go | 55 - ...d_virtualhubbgpconnectioncreateorupdate.go | 75 - .../method_virtualhubbgpconnectiondelete.go | 72 - .../method_virtualhubbgpconnectionget.go | 52 - .../method_virtualhubbgpconnectionslist.go | 89 - ...alhubbgpconnectionslistadvertisedroutes.go | 71 - ...rtualhubbgpconnectionslistlearnedroutes.go | 71 - ...virtualhubipconfigurationcreateorupdate.go | 75 - .../method_virtualhubipconfigurationdelete.go | 72 - .../method_virtualhubipconfigurationget.go | 52 - .../method_virtualhubipconfigurationlist.go | 89 - ...d_virtualhubroutetablev2screateorupdate.go | 74 - .../method_virtualhubroutetablev2sdelete.go | 71 - .../method_virtualhubroutetablev2sget.go | 51 - .../method_virtualhubroutetablev2slist.go | 89 - .../method_virtualhubscreateorupdate.go | 74 - .../virtualwans/method_virtualhubsdelete.go | 71 - .../virtualwans/method_virtualhubsget.go | 51 - ...virtualhubsgeteffectivevirtualhubroutes.go | 74 - .../method_virtualhubsgetinboundroutes.go | 74 - .../method_virtualhubsgetoutboundroutes.go | 74 - .../virtualwans/method_virtualhubslist.go | 90 - .../method_virtualhubslistbyresourcegroup.go | 90 - .../method_virtualhubsupdatetags.go | 55 - .../method_virtualwanscreateorupdate.go | 74 - .../virtualwans/method_virtualwansdelete.go | 71 - .../virtualwans/method_virtualwansget.go | 51 - .../virtualwans/method_virtualwanslist.go | 90 - .../method_virtualwanslistbyresourcegroup.go | 90 - .../method_vpnconnectionscreateorupdate.go | 75 - .../method_vpnconnectionsdelete.go | 72 - .../virtualwans/method_vpnconnectionsget.go | 52 - .../method_vpnconnectionslistbyvpngateway.go | 89 - ...method_vpnconnectionsstartpacketcapture.go | 75 - .../method_vpnconnectionsstoppacketcapture.go | 75 - .../method_vpngatewayscreateorupdate.go | 74 - .../virtualwans/method_vpngatewaysdelete.go | 71 - .../virtualwans/method_vpngatewaysget.go | 51 - .../virtualwans/method_vpngatewayslist.go | 90 - .../method_vpngatewayslistbyresourcegroup.go | 90 - .../method_vpnlinkconnectionsgetikesas.go | 70 - ...d_vpnlinkconnectionslistbyvpnconnection.go | 90 - ...figurationsassociatedwithvirtualwanlist.go | 70 - ...d_vpnserverconfigurationscreateorupdate.go | 74 - .../method_vpnserverconfigurationsdelete.go | 71 - .../method_vpnserverconfigurationsget.go | 51 - .../method_vpnserverconfigurationslist.go | 90 - ...serverconfigurationslistbyresourcegroup.go | 90 - .../method_vpnsitelinkconnectionsget.go | 51 - .../virtualwans/method_vpnsitelinksget.go | 51 - .../method_vpnsitelinkslistbyvpnsite.go | 89 - .../method_vpnsitesconfigurationdownload.go | 74 - .../method_vpnsitescreateorupdate.go | 74 - .../virtualwans/method_vpnsitesdelete.go | 71 - .../virtualwans/method_vpnsitesget.go | 51 - .../virtualwans/method_vpnsiteslist.go | 90 - .../method_vpnsiteslistbyresourcegroup.go | 90 - .../model_aadauthenticationparameters.go | 10 - .../2022-09-01/virtualwans/model_action.go | 9 - .../virtualwans/model_addressspace.go | 8 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../virtualwans/model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../virtualwans/model_bgpconnection.go | 12 - .../model_bgpconnectionproperties.go | 12 - .../virtualwans/model_bgpsettings.go | 11 - .../2022-09-01/virtualwans/model_criterion.go | 11 - .../model_customdnsconfigpropertiesformat.go | 9 - .../virtualwans/model_ddossettings.go | 9 - .../virtualwans/model_delegation.go | 12 - .../virtualwans/model_deviceproperties.go | 10 - .../model_effectiveroutesparameters.go | 9 - .../2022-09-01/virtualwans/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...atewaycustombgpipaddressipconfiguration.go | 9 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_getinboundroutesparameters.go | 9 - .../model_getoutboundroutesparameters.go | 9 - .../model_getvpnsitesconfigurationrequest.go | 9 - .../virtualwans/model_hubipconfiguration.go | 12 - ...odel_hubipconfigurationpropertiesformat.go | 12 - .../2022-09-01/virtualwans/model_hubroute.go | 12 - .../virtualwans/model_hubroutetable.go | 12 - .../model_hubroutetableproperties.go | 12 - .../model_hubvirtualnetworkconnection.go | 11 - ...l_hubvirtualnetworkconnectionproperties.go | 13 - .../virtualwans/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../virtualwans/model_ipconfiguration.go | 11 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../virtualwans/model_ipsecpolicy.go | 15 - .../2022-09-01/virtualwans/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../virtualwans/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../virtualwans/model_natgatewaysku.go | 8 - .../virtualwans/model_natruleportmapping.go | 10 - .../virtualwans/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../virtualwans/model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_o365breakoutcategorypolicies.go | 10 - .../virtualwans/model_o365policyproperties.go | 8 - .../model_p2sconnectionconfiguration.go | 11 - ...el_p2sconnectionconfigurationproperties.go | 13 - .../virtualwans/model_p2svpngateway.go | 14 - .../model_p2svpngatewayproperties.go | 15 - .../2022-09-01/virtualwans/model_parameter.go | 10 - .../2022-09-01/virtualwans/model_peerroute.go | 14 - .../virtualwans/model_peerroutelist.go | 8 - .../virtualwans/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../virtualwans/model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../virtualwans/model_propagatedroutetable.go | 9 - .../virtualwans/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../virtualwans/model_publicipaddresssku.go | 9 - .../virtualwans/model_radiusserver.go | 10 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../virtualwans/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-09-01/virtualwans/model_route.go | 12 - .../2022-09-01/virtualwans/model_routemap.go | 12 - .../virtualwans/model_routemapproperties.go | 11 - .../virtualwans/model_routemaprule.go | 11 - .../model_routepropertiesformat.go | 12 - .../virtualwans/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../virtualwans/model_routingconfiguration.go | 12 - .../virtualwans/model_routingintent.go | 12 - .../model_routingintentproperties.go | 9 - .../virtualwans/model_routingpolicy.go | 10 - .../virtualwans/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../virtualwans/model_staticroute.go | 10 - .../virtualwans/model_staticroutesconfig.go | 9 - .../2022-09-01/virtualwans/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../virtualwans/model_subresource.go | 8 - .../virtualwans/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_trafficselectorpolicy.go | 9 - .../virtualwans/model_virtualhub.go | 15 - .../virtualwans/model_virtualhubproperties.go | 29 - .../virtualwans/model_virtualhubroute.go | 9 - .../virtualwans/model_virtualhubroutetable.go | 8 - .../model_virtualhubroutetablev2.go | 11 - .../model_virtualhubroutetablev2properties.go | 10 - .../virtualwans/model_virtualhubroutev2.go | 11 - .../virtualwans/model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - ...del_virtualrouterautoscaleconfiguration.go | 8 - .../virtualwans/model_virtualwan.go | 14 - .../virtualwans/model_virtualwanproperties.go | 15 - .../model_virtualwansecurityprovider.go | 10 - .../model_virtualwansecurityproviders.go | 8 - .../model_virtualwanvpnprofileparameters.go | 9 - .../2022-09-01/virtualwans/model_vnetroute.go | 10 - .../model_vpnclientconnectionhealth.go | 11 - .../virtualwans/model_vpnconnection.go | 11 - ...nconnectionpacketcapturestartparameters.go | 9 - ...pnconnectionpacketcapturestopparameters.go | 9 - .../model_vpnconnectionproperties.go | 26 - .../virtualwans/model_vpngateway.go | 14 - .../model_vpngatewayipconfiguration.go | 10 - .../virtualwans/model_vpngatewaynatrule.go | 12 - .../model_vpngatewaynatruleproperties.go | 15 - .../virtualwans/model_vpngatewayproperties.go | 16 - .../virtualwans/model_vpnlinkbgpsettings.go | 9 - .../model_vpnlinkproviderproperties.go | 9 - .../virtualwans/model_vpnnatrulemapping.go | 9 - .../virtualwans/model_vpnprofileresponse.go | 8 - ...serverconfigradiusclientrootcertificate.go | 9 - ...serverconfigradiusserverrootcertificate.go | 9 - .../model_vpnserverconfiguration.go | 14 - ...model_vpnserverconfigurationpolicygroup.go | 12 - ...vpnserverconfigurationpolicygroupmember.go | 10 - ...erverconfigurationpolicygroupproperties.go | 12 - .../model_vpnserverconfigurationproperties.go | 23 - .../model_vpnserverconfigurationsresponse.go | 8 - ...serverconfigvpnclientrevokedcertificate.go | 9 - ...vpnserverconfigvpnclientrootcertificate.go | 9 - .../2022-09-01/virtualwans/model_vpnsite.go | 14 - .../virtualwans/model_vpnsitelink.go | 12 - .../model_vpnsitelinkconnection.go | 12 - .../model_vpnsitelinkconnectionproperties.go | 25 - .../model_vpnsitelinkproperties.go | 12 - .../virtualwans/model_vpnsiteproperties.go | 17 - .../2022-09-01/virtualwans/predicates.go | 528 ---- .../network/2022-09-01/virtualwans/version.go | 12 - .../vmsspublicipaddresses/README.md | 70 - .../vmsspublicipaddresses/client.go | 26 - .../vmsspublicipaddresses/constants.go | 1013 ------ .../id_virtualmachinescaleset.go | 127 - .../id_virtualmachinescaleset_test.go | 282 -- ...etvirtualmachinescalesetpublicipaddress.go | 81 - ...virtualmachinescalesetpublicipaddresses.go | 89 - ...rtualmachinescalesetvmpublicipaddresses.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../vmsspublicipaddresses/model_delegation.go | 12 - .../vmsspublicipaddresses/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../vmsspublicipaddresses/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../vmsspublicipaddresses/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../vmsspublicipaddresses/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../vmsspublicipaddresses/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../vmsspublicipaddresses/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../vmsspublicipaddresses/predicates.go | 37 - .../vmsspublicipaddresses/version.go | 12 - .../network/2022-09-01/vpngateways/README.md | 83 - .../network/2022-09-01/vpngateways/client.go | 26 - .../2022-09-01/vpngateways/constants.go | 657 ---- .../2022-09-01/vpngateways/id_vpngateway.go | 127 - .../vpngateways/id_vpngateway_test.go | 282 -- .../2022-09-01/vpngateways/method_reset.go | 98 - .../vpngateways/method_startpacketcapture.go | 74 - .../vpngateways/method_stoppacketcapture.go | 74 - .../vpngateways/method_updatetags.go | 74 - .../vpngateways/model_bgpsettings.go | 11 - ...atewaycustombgpipaddressipconfiguration.go | 9 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../vpngateways/model_ipsecpolicy.go | 15 - .../vpngateways/model_propagatedroutetable.go | 9 - .../vpngateways/model_routingconfiguration.go | 12 - .../vpngateways/model_staticroute.go | 10 - .../vpngateways/model_staticroutesconfig.go | 9 - .../vpngateways/model_subresource.go | 8 - .../vpngateways/model_tagsobject.go | 8 - .../model_trafficselectorpolicy.go | 9 - .../2022-09-01/vpngateways/model_vnetroute.go | 10 - .../vpngateways/model_vpnconnection.go | 11 - .../model_vpnconnectionproperties.go | 26 - .../vpngateways/model_vpngateway.go | 14 - .../model_vpngatewayipconfiguration.go | 10 - .../vpngateways/model_vpngatewaynatrule.go | 12 - .../model_vpngatewaynatruleproperties.go | 15 - ..._vpngatewaypacketcapturestartparameters.go | 8 - ...l_vpngatewaypacketcapturestopparameters.go | 8 - .../vpngateways/model_vpngatewayproperties.go | 16 - .../vpngateways/model_vpnnatrulemapping.go | 9 - .../model_vpnsitelinkconnection.go | 12 - .../model_vpnsitelinkconnectionproperties.go | 25 - .../network/2022-09-01/vpngateways/version.go | 12 - .../2022-09-01/vpnlinkconnections/client.go | 26 - .../id_vpnlinkconnection.go | 153 - .../id_vpnlinkconnection_test.go | 372 --- .../method_resetconnection.go | 69 - .../2022-09-01/vpnlinkconnections/version.go | 12 - .../vpnserverconfigurations/README.md | 41 - .../vpnserverconfigurations/client.go | 26 - .../vpnserverconfigurations/constants.go | 572 ---- .../id_vpnserverconfiguration.go | 127 - .../id_vpnserverconfiguration_test.go | 282 -- .../method_updatetags.go | 55 - .../model_aadauthenticationparameters.go | 10 - .../model_addressspace.go | 8 - .../model_ipsecpolicy.go | 15 - .../model_p2sconnectionconfiguration.go | 11 - ...el_p2sconnectionconfigurationproperties.go | 13 - .../model_p2svpngateway.go | 14 - .../model_p2svpngatewayproperties.go | 15 - .../model_propagatedroutetable.go | 9 - .../model_radiusserver.go | 10 - .../model_routingconfiguration.go | 12 - .../model_staticroute.go | 10 - .../model_staticroutesconfig.go | 9 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../model_vnetroute.go | 10 - .../model_vpnclientconnectionhealth.go | 11 - ...serverconfigradiusclientrootcertificate.go | 9 - ...serverconfigradiusserverrootcertificate.go | 9 - .../model_vpnserverconfiguration.go | 14 - ...model_vpnserverconfigurationpolicygroup.go | 12 - ...vpnserverconfigurationpolicygroupmember.go | 10 - ...erverconfigurationpolicygroupproperties.go | 12 - .../model_vpnserverconfigurationproperties.go | 23 - ...serverconfigvpnclientrevokedcertificate.go | 9 - ...vpnserverconfigvpnclientrootcertificate.go | 9 - .../vpnserverconfigurations/version.go | 12 - .../network/2022-09-01/vpnsites/README.md | 41 - .../network/2022-09-01/vpnsites/client.go | 26 - .../network/2022-09-01/vpnsites/constants.go | 57 - .../network/2022-09-01/vpnsites/id_vpnsite.go | 127 - .../2022-09-01/vpnsites/id_vpnsite_test.go | 282 -- .../2022-09-01/vpnsites/method_updatetags.go | 55 - .../2022-09-01/vpnsites/model_addressspace.go | 8 - .../2022-09-01/vpnsites/model_bgpsettings.go | 11 - .../vpnsites/model_deviceproperties.go | 10 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_o365breakoutcategorypolicies.go | 10 - .../vpnsites/model_o365policyproperties.go | 8 - .../2022-09-01/vpnsites/model_subresource.go | 8 - .../2022-09-01/vpnsites/model_tagsobject.go | 8 - .../vpnsites/model_vpnlinkbgpsettings.go | 9 - .../model_vpnlinkproviderproperties.go | 9 - .../2022-09-01/vpnsites/model_vpnsite.go | 14 - .../2022-09-01/vpnsites/model_vpnsitelink.go | 12 - .../vpnsites/model_vpnsitelinkproperties.go | 12 - .../vpnsites/model_vpnsiteproperties.go | 17 - .../network/2022-09-01/vpnsites/version.go | 12 - .../webapplicationfirewallpolicies/README.md | 103 - .../webapplicationfirewallpolicies/client.go | 26 - .../constants.go | 2437 -------------- ...tiongatewaywebapplicationfirewallpolicy.go | 127 - ...atewaywebapplicationfirewallpolicy_test.go | 282 -- .../method_createorupdate.go | 56 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 90 - .../method_listall.go | 90 - .../model_applicationgateway.go | 21 - ...icationgatewayauthenticationcertificate.go | 12 - ...thenticationcertificatepropertiesformat.go | 9 - ...pplicationgatewayautoscaleconfiguration.go | 9 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...l_applicationgatewaybackendhttpsettings.go | 12 - ...ewaybackendhttpsettingspropertiesformat.go | 21 - ...model_applicationgatewaybackendsettings.go | 12 - ...ngatewaybackendsettingspropertiesformat.go | 15 - ...plicationgatewayclientauthconfiguration.go | 9 - ...el_applicationgatewayconnectiondraining.go | 9 - .../model_applicationgatewaycustomerror.go | 9 - ...icationgatewayfirewalldisabledrulegroup.go | 9 - ...del_applicationgatewayfirewallexclusion.go | 10 - ...plicationgatewayfrontendipconfiguration.go | 12 - ...frontendipconfigurationpropertiesformat.go | 13 - .../model_applicationgatewayfrontendport.go | 12 - ...tiongatewayfrontendportpropertiesformat.go | 9 - ...l_applicationgatewayglobalconfiguration.go | 9 - ...l_applicationgatewayheaderconfiguration.go | 9 - .../model_applicationgatewayhttplistener.go | 12 - ...tiongatewayhttplistenerpropertiesformat.go | 18 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationgatewaylistener.go | 12 - ...licationgatewaylistenerpropertiesformat.go | 13 - ...pplicationgatewayloaddistributionpolicy.go | 12 - ...yloaddistributionpolicypropertiesformat.go | 10 - ...pplicationgatewayloaddistributiontarget.go | 12 - ...yloaddistributiontargetpropertiesformat.go | 9 - .../model_applicationgatewaypathrule.go | 12 - ...licationgatewaypathrulepropertiesformat.go | 15 - ...icationgatewayprivateendpointconnection.go | 12 - ...ewayprivateendpointconnectionproperties.go | 11 - ...licationgatewayprivatelinkconfiguration.go | 12 - ...tewayprivatelinkconfigurationproperties.go | 9 - ...cationgatewayprivatelinkipconfiguration.go | 12 - ...wayprivatelinkipconfigurationproperties.go | 12 - .../model_applicationgatewayprobe.go | 12 - ...licationgatewayprobehealthresponsematch.go | 9 - ...applicationgatewayprobepropertiesformat.go | 19 - ...odel_applicationgatewaypropertiesformat.go | 42 - ...applicationgatewayredirectconfiguration.go | 12 - ...ayredirectconfigurationpropertiesformat.go | 15 - ...el_applicationgatewayrequestroutingrule.go | 12 - ...tewayrequestroutingrulepropertiesformat.go | 17 - .../model_applicationgatewayrewriterule.go | 11 - ..._applicationgatewayrewriteruleactionset.go | 10 - ..._applicationgatewayrewriterulecondition.go | 11 - .../model_applicationgatewayrewriteruleset.go | 11 - ...ongatewayrewriterulesetpropertiesformat.go | 9 - .../model_applicationgatewayroutingrule.go | 12 - ...ationgatewayroutingrulepropertiesformat.go | 13 - .../model_applicationgatewaysku.go | 10 - .../model_applicationgatewaysslcertificate.go | 12 - ...ongatewaysslcertificatepropertiesformat.go | 12 - .../model_applicationgatewaysslpolicy.go | 12 - .../model_applicationgatewaysslprofile.go | 12 - ...cationgatewaysslprofilepropertiesformat.go | 11 - ...licationgatewaytrustedclientcertificate.go | 12 - ...rustedclientcertificatepropertiesformat.go | 11 - ...pplicationgatewaytrustedrootcertificate.go | 12 - ...ytrustedrootcertificatepropertiesformat.go | 10 - ...odel_applicationgatewayurlconfiguration.go | 10 - .../model_applicationgatewayurlpathmap.go | 12 - ...cationgatewayurlpathmappropertiesformat.go | 14 - ...ewaywebapplicationfirewallconfiguration.go | 17 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../model_delegation.go | 12 - .../model_exclusionmanagedrule.go | 8 - .../model_exclusionmanagedrulegroup.go | 9 - .../model_exclusionmanagedruleset.go | 10 - .../model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_managedrulegroupoverride.go | 9 - .../model_managedruleoverride.go | 10 - .../model_managedrulesdefinition.go | 9 - .../model_managedruleset.go | 10 - .../model_matchcondition.go | 12 - .../model_matchvariable.go | 9 - .../model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 28 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_owaspcrsexclusionentry.go | 11 - .../model_policysettings.go | 14 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 11 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 10 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../model_webapplicationfirewallcustomrule.go | 14 - .../model_webapplicationfirewallpolicy.go | 14 - ...plicationfirewallpolicypropertiesformat.go | 15 - .../predicates.go | 37 - .../webapplicationfirewallpolicies/version.go | 12 - .../2022-09-01/webcategories/README.md | 53 - .../2022-09-01/webcategories/client.go | 26 - .../webcategories/id_azurewebcategory.go | 114 - .../webcategories/id_azurewebcategory_test.go | 237 -- .../2022-09-01/webcategories/method_get.go | 80 - .../method_listbysubscription.go | 90 - .../webcategories/model_azurewebcategory.go | 12 - .../model_azurewebcategorypropertiesformat.go | 8 - .../2022-09-01/webcategories/predicates.go | 32 - .../2022-09-01/webcategories/version.go | 12 - .../2022-11-01/adminrulecollections/README.md | 86 - .../2022-11-01/adminrulecollections/client.go | 26 - .../adminrulecollections/constants.go | 57 - .../adminrulecollections/id_rulecollection.go | 153 - .../id_rulecollection_test.go | 372 --- .../id_securityadminconfiguration.go | 140 - .../id_securityadminconfiguration_test.go | 327 -- .../method_createorupdate.go | 56 - .../adminrulecollections/method_delete.go | 99 - .../adminrulecollections/method_get.go | 51 - .../adminrulecollections/method_list.go | 117 - .../model_adminrulecollection.go | 17 - ...del_adminrulecollectionpropertiesformat.go | 10 - .../model_networkmanagersecuritygroupitem.go | 8 - .../adminrulecollections/predicates.go | 32 - .../adminrulecollections/version.go | 12 - .../network/2022-11-01/adminrules/README.md | 86 - .../network/2022-11-01/adminrules/client.go | 26 - .../2022-11-01/adminrules/constants.go | 277 -- .../network/2022-11-01/adminrules/id_rule.go | 166 - .../2022-11-01/adminrules/id_rule_test.go | 417 --- .../adminrules/id_rulecollection.go | 153 - .../adminrules/id_rulecollection_test.go | 372 --- .../adminrules/method_createorupdate.go | 63 - .../2022-11-01/adminrules/method_delete.go | 99 - .../2022-11-01/adminrules/method_get.go | 58 - .../2022-11-01/adminrules/method_list.go | 89 - .../adminrules/model_addressprefixitem.go | 9 - .../adminrules/model_adminpropertiesformat.go | 17 - .../2022-11-01/adminrules/model_adminrule.go | 48 - .../adminrules/model_baseadminrule.go | 56 - .../model_defaultadminpropertiesformat.go | 18 - .../adminrules/model_defaultadminrule.go | 48 - .../2022-11-01/adminrules/predicates.go | 12 - .../network/2022-11-01/adminrules/version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 1110 ------- .../id_applicationgateway.go | 127 - .../id_applicationgateway_test.go | 282 -- ...icationgatewayprivateendpointconnection.go | 140 - ...ongatewayprivateendpointconnection_test.go | 327 -- .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../method_update.go | 74 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - ...icationgatewayprivateendpointconnection.go | 12 - ...ewayprivateendpointconnectionproperties.go | 11 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../model_delegation.go | 12 - .../model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../predicates.go | 32 - .../version.go | 12 - .../README.md | 37 - .../client.go | 26 - .../id_applicationgateway.go | 127 - .../id_applicationgateway_test.go | 282 -- .../method_list.go | 89 - ...l_applicationgatewayprivatelinkresource.go | 12 - ...iongatewayprivatelinkresourceproperties.go | 10 - .../predicates.go | 32 - .../version.go | 12 - .../2022-11-01/applicationgateways/README.md | 286 -- .../2022-11-01/applicationgateways/client.go | 26 - .../applicationgateways/constants.go | 2075 ------------ .../id_applicationgateway.go | 127 - .../id_applicationgateway_test.go | 282 -- .../id_predefinedpolicy.go | 116 - .../id_predefinedpolicy_test.go | 267 -- .../method_backendhealth.go | 98 - .../method_backendhealthondemand.go | 102 - .../method_createorupdate.go | 74 - .../applicationgateways/method_delete.go | 71 - .../applicationgateways/method_get.go | 51 - .../method_getsslpredefinedpolicy.go | 51 - .../applicationgateways/method_list.go | 90 - .../applicationgateways/method_listall.go | 90 - .../method_listavailablerequestheaders.go | 53 - .../method_listavailableresponseheaders.go | 53 - .../method_listavailableservervariables.go | 53 - .../method_listavailablessloptions.go | 53 - ...thod_listavailablesslpredefinedpolicies.go | 90 - .../method_listavailablewafrulesets.go | 53 - .../applicationgateways/method_start.go | 70 - .../applicationgateways/method_stop.go | 70 - .../applicationgateways/method_updatetags.go | 55 - .../model_applicationgateway.go | 21 - ...icationgatewayauthenticationcertificate.go | 12 - ...thenticationcertificatepropertiesformat.go | 9 - ...pplicationgatewayautoscaleconfiguration.go | 9 - ...l_applicationgatewayavailablessloptions.go | 13 - ...ewayavailablessloptionspropertiesformat.go | 11 - ...cationgatewayavailablewafrulesetsresult.go | 8 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - .../model_applicationgatewaybackendhealth.go | 8 - ...icationgatewaybackendhealthhttpsettings.go | 9 - ...applicationgatewaybackendhealthondemand.go | 9 - ...del_applicationgatewaybackendhealthpool.go | 9 - ...l_applicationgatewaybackendhealthserver.go | 11 - ...l_applicationgatewaybackendhttpsettings.go | 12 - ...ewaybackendhttpsettingspropertiesformat.go | 21 - ...model_applicationgatewaybackendsettings.go | 12 - ...ngatewaybackendsettingspropertiesformat.go | 15 - ...plicationgatewayclientauthconfiguration.go | 9 - ...el_applicationgatewayconnectiondraining.go | 9 - .../model_applicationgatewaycustomerror.go | 9 - ...icationgatewayfirewalldisabledrulegroup.go | 9 - ...del_applicationgatewayfirewallexclusion.go | 10 - .../model_applicationgatewayfirewallrule.go | 12 - ...del_applicationgatewayfirewallrulegroup.go | 10 - ...model_applicationgatewayfirewallruleset.go | 13 - ...ngatewayfirewallrulesetpropertiesformat.go | 12 - ...plicationgatewayfrontendipconfiguration.go | 12 - ...frontendipconfigurationpropertiesformat.go | 13 - .../model_applicationgatewayfrontendport.go | 12 - ...tiongatewayfrontendportpropertiesformat.go | 9 - ...l_applicationgatewayglobalconfiguration.go | 9 - ...l_applicationgatewayheaderconfiguration.go | 9 - .../model_applicationgatewayhttplistener.go | 12 - ...tiongatewayhttplistenerpropertiesformat.go | 18 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationgatewaylistener.go | 12 - ...licationgatewaylistenerpropertiesformat.go | 13 - ...pplicationgatewayloaddistributionpolicy.go | 12 - ...yloaddistributionpolicypropertiesformat.go | 10 - ...pplicationgatewayloaddistributiontarget.go | 12 - ...yloaddistributiontargetpropertiesformat.go | 9 - .../model_applicationgatewayondemandprobe.go | 15 - .../model_applicationgatewaypathrule.go | 12 - ...licationgatewaypathrulepropertiesformat.go | 15 - ...icationgatewayprivateendpointconnection.go | 12 - ...ewayprivateendpointconnectionproperties.go | 11 - ...licationgatewayprivatelinkconfiguration.go | 12 - ...tewayprivatelinkconfigurationproperties.go | 9 - ...cationgatewayprivatelinkipconfiguration.go | 12 - ...wayprivatelinkipconfigurationproperties.go | 12 - .../model_applicationgatewayprobe.go | 12 - ...licationgatewayprobehealthresponsematch.go | 9 - ...applicationgatewayprobepropertiesformat.go | 19 - ...odel_applicationgatewaypropertiesformat.go | 42 - ...applicationgatewayredirectconfiguration.go | 12 - ...ayredirectconfigurationpropertiesformat.go | 15 - ...el_applicationgatewayrequestroutingrule.go | 12 - ...tewayrequestroutingrulepropertiesformat.go | 17 - .../model_applicationgatewayrewriterule.go | 11 - ..._applicationgatewayrewriteruleactionset.go | 10 - ..._applicationgatewayrewriterulecondition.go | 11 - .../model_applicationgatewayrewriteruleset.go | 11 - ...ongatewayrewriterulesetpropertiesformat.go | 9 - .../model_applicationgatewayroutingrule.go | 12 - ...ationgatewayroutingrulepropertiesformat.go | 13 - .../model_applicationgatewaysku.go | 10 - .../model_applicationgatewaysslcertificate.go | 12 - ...ongatewaysslcertificatepropertiesformat.go | 12 - .../model_applicationgatewaysslpolicy.go | 12 - ...l_applicationgatewaysslpredefinedpolicy.go | 10 - ...ewaysslpredefinedpolicypropertiesformat.go | 9 - .../model_applicationgatewaysslprofile.go | 12 - ...cationgatewaysslprofilepropertiesformat.go | 11 - ...licationgatewaytrustedclientcertificate.go | 12 - ...rustedclientcertificatepropertiesformat.go | 11 - ...pplicationgatewaytrustedrootcertificate.go | 12 - ...ytrustedrootcertificatepropertiesformat.go | 10 - ...odel_applicationgatewayurlconfiguration.go | 10 - .../model_applicationgatewayurlpathmap.go | 12 - ...cationgatewayurlpathmappropertiesformat.go | 14 - ...ewaywebapplicationfirewallconfiguration.go | 17 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../applicationgateways/model_ddossettings.go | 9 - .../applicationgateways/model_delegation.go | 12 - .../applicationgateways/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../applicationgateways/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../applicationgateways/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../applicationgateways/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../applicationgateways/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../applicationgateways/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../applicationgateways/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../applicationgateways/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../applicationgateways/model_subresource.go | 8 - .../applicationgateways/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../applicationgateways/predicates.go | 55 - .../2022-11-01/applicationgateways/version.go | 12 - .../README.md | 53 - .../client.go | 26 - .../constants.go | 195 -- .../id_location.go | 114 - .../id_location_test.go | 237 -- ...iongatewaywafdynamicmanifestsdefaultget.go | 52 - ...pplicationgatewaywafdynamicmanifestsget.go | 89 - ...plicationgatewayfirewallmanifestruleset.go | 12 - .../model_applicationgatewayfirewallrule.go | 12 - ...del_applicationgatewayfirewallrulegroup.go | 10 - ...tewaywafdynamicmanifestpropertiesresult.go | 9 - ...licationgatewaywafdynamicmanifestresult.go | 11 - .../model_defaultrulesetpropertyformat.go | 9 - .../predicates.go | 27 - .../version.go | 12 - .../applicationsecuritygroups/README.md | 120 - .../applicationsecuritygroups/client.go | 26 - .../applicationsecuritygroups/constants.go | 57 - .../id_applicationsecuritygroup.go | 127 - .../id_applicationsecuritygroup_test.go | 282 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../applicationsecuritygroups/method_get.go | 51 - .../applicationsecuritygroups/method_list.go | 90 - .../method_listall.go | 90 - .../method_updatetags.go | 55 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_tagsobject.go | 8 - .../applicationsecuritygroups/predicates.go | 37 - .../applicationsecuritygroups/version.go | 12 - .../2022-11-01/availabledelegations/README.md | 54 - .../2022-11-01/availabledelegations/client.go | 26 - .../availabledelegations/id_location.go | 114 - .../availabledelegations/id_location_test.go | 237 -- .../id_providerlocation.go | 127 - .../id_providerlocation_test.go | 282 -- .../method_availabledelegationslist.go | 89 - ...d_availableresourcegroupdelegationslist.go | 89 - .../model_availabledelegation.go | 12 - .../availabledelegations/predicates.go | 32 - .../availabledelegations/version.go | 12 - .../availableservicealiases/README.md | 54 - .../availableservicealiases/client.go | 26 - .../availableservicealiases/id_location.go | 114 - .../id_location_test.go | 237 -- .../id_providerlocation.go | 127 - .../id_providerlocation_test.go | 282 -- .../method_availableservicealiaseslist.go | 89 - ...ilableservicealiaseslistbyresourcegroup.go | 89 - .../model_availableservicealias.go | 11 - .../availableservicealiases/predicates.go | 32 - .../availableservicealiases/version.go | 12 - .../2022-11-01/azurefirewalls/README.md | 145 - .../2022-11-01/azurefirewalls/client.go | 26 - .../2022-11-01/azurefirewalls/constants.go | 412 --- .../azurefirewalls/id_azurefirewall.go | 127 - .../azurefirewalls/id_azurefirewall_test.go | 282 -- ...ethod_azurefirewallslistlearnedprefixes.go | 70 - .../azurefirewalls/method_createorupdate.go | 74 - .../azurefirewalls/method_delete.go | 71 - .../2022-11-01/azurefirewalls/method_get.go | 51 - .../2022-11-01/azurefirewalls/method_list.go | 90 - .../azurefirewalls/method_listall.go | 90 - .../azurefirewalls/method_packetcapture.go | 73 - .../azurefirewalls/method_updatetags.go | 74 - .../azurefirewalls/model_azurefirewall.go | 19 - .../model_azurefirewallapplicationrule.go | 14 - ..._azurefirewallapplicationrulecollection.go | 11 - ...plicationrulecollectionpropertiesformat.go | 11 - ...el_azurefirewallapplicationruleprotocol.go | 9 - .../model_azurefirewallipconfiguration.go | 12 - ...firewallipconfigurationpropertiesformat.go | 11 - .../model_azurefirewallipgroups.go | 9 - .../model_azurefirewallnatrcaction.go | 8 - .../model_azurefirewallnatrule.go | 17 - .../model_azurefirewallnatrulecollection.go | 11 - ...zurefirewallnatrulecollectionproperties.go | 11 - .../model_azurefirewallnetworkrule.go | 16 - ...odel_azurefirewallnetworkrulecollection.go | 11 - ...llnetworkrulecollectionpropertiesformat.go | 11 - .../model_azurefirewallpacketcaptureflags.go | 8 - .../model_azurefirewallpacketcapturerule.go | 10 - .../model_azurefirewallpropertiesformat.go | 20 - .../model_azurefirewallpublicipaddress.go | 8 - .../model_azurefirewallrcaction.go | 8 - .../azurefirewalls/model_azurefirewallsku.go | 9 - .../model_firewallpacketcaptureparameters.go | 9 - ...l_firewallpacketcaptureparametersformat.go | 14 - .../azurefirewalls/model_hubipaddresses.go | 9 - .../model_hubpublicipaddresses.go | 9 - .../azurefirewalls/model_ipprefixeslist.go | 8 - .../azurefirewalls/model_subresource.go | 8 - .../azurefirewalls/model_tagsobject.go | 8 - .../2022-11-01/azurefirewalls/predicates.go | 37 - .../2022-11-01/azurefirewalls/version.go | 12 - .../network/2022-11-01/bastionhosts/README.md | 216 -- .../network/2022-11-01/bastionhosts/client.go | 26 - .../2022-11-01/bastionhosts/constants.go | 180 -- .../2022-11-01/bastionhosts/id_bastionhost.go | 127 - .../bastionhosts/id_bastionhost_test.go | 282 -- .../bastionhosts/method_createorupdate.go | 74 - .../2022-11-01/bastionhosts/method_delete.go | 71 - .../method_deletebastionshareablelink.go | 74 - .../method_disconnectactivesessions.go | 89 - .../2022-11-01/bastionhosts/method_get.go | 51 - .../bastionhosts/method_getactivesessions.go | 84 - .../method_getbastionshareablelink.go | 89 - .../2022-11-01/bastionhosts/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_putbastionshareablelink.go | 88 - .../bastionhosts/method_updatetags.go | 74 - .../model_bastionactivesession.go | 18 - .../bastionhosts/model_bastionhost.go | 15 - .../model_bastionhostipconfiguration.go | 12 - ...tionhostipconfigurationpropertiesformat.go | 11 - .../model_bastionhostpropertiesformat.go | 17 - .../bastionhosts/model_bastionsessionstate.go | 10 - .../model_bastionshareablelink.go | 11 - .../model_bastionshareablelinklistrequest.go | 8 - .../2022-11-01/bastionhosts/model_resource.go | 12 - .../bastionhosts/model_sessionids.go | 8 - .../2022-11-01/bastionhosts/model_sku.go | 8 - .../bastionhosts/model_subresource.go | 8 - .../bastionhosts/model_tagsobject.go | 8 - .../2022-11-01/bastionhosts/predicates.go | 141 - .../2022-11-01/bastionhosts/version.go | 12 - .../2022-11-01/bastionshareablelink/README.md | 81 - .../2022-11-01/bastionshareablelink/client.go | 26 - .../bastionshareablelink/id_bastionhost.go | 127 - .../id_bastionhost_test.go | 282 -- .../method_deletebastionshareablelink.go | 74 - .../method_getbastionshareablelink.go | 89 - .../method_putbastionshareablelink.go | 88 - .../model_bastionshareablelink.go | 11 - .../model_bastionshareablelinklistrequest.go | 8 - .../bastionshareablelink/model_resource.go | 12 - .../bastionshareablelink/predicates.go | 27 - .../bastionshareablelink/version.go | 12 - .../bgpservicecommunities/README.md | 37 - .../bgpservicecommunities/client.go | 26 - .../bgpservicecommunities/method_list.go | 90 - .../model_bgpcommunity.go | 13 - .../model_bgpservicecommunity.go | 13 - ...del_bgpservicecommunitypropertiesformat.go | 9 - .../bgpservicecommunities/predicates.go | 32 - .../bgpservicecommunities/version.go | 12 - .../checkdnsavailabilities/README.md | 36 - .../checkdnsavailabilities/client.go | 26 - .../checkdnsavailabilities/id_location.go | 114 - .../id_location_test.go | 237 -- .../method_checkdnsnameavailability.go | 80 - .../model_dnsnameavailabilityresult.go | 8 - .../checkdnsavailabilities/version.go | 12 - resource-manager/network/2022-11-01/client.go | 982 ------ .../cloudservicepublicipaddresses/README.md | 70 - .../cloudservicepublicipaddresses/client.go | 26 - .../constants.go | 1110 ------- .../id_providercloudservice.go | 127 - .../id_providercloudservice_test.go | 282 -- ...addressesgetcloudservicepublicipaddress.go | 81 - ...resseslistcloudservicepublicipaddresses.go | 89 - ...oudserviceroleinstancepublicipaddresses.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../model_delegation.go | 12 - .../model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../predicates.go | 37 - .../cloudservicepublicipaddresses/version.go | 12 - .../2022-11-01/connectionmonitors/README.md | 138 - .../2022-11-01/connectionmonitors/client.go | 26 - .../connectionmonitors/constants.go | 770 ----- .../id_connectionmonitor.go | 140 - .../id_connectionmonitor_test.go | 327 -- .../connectionmonitors/id_networkwatcher.go | 127 - .../id_networkwatcher_test.go | 282 -- .../method_createorupdate.go | 102 - .../connectionmonitors/method_delete.go | 70 - .../connectionmonitors/method_get.go | 51 - .../connectionmonitors/method_list.go | 52 - .../connectionmonitors/method_query.go | 70 - .../connectionmonitors/method_start.go | 70 - .../connectionmonitors/method_stop.go | 70 - .../connectionmonitors/method_updatetags.go | 55 - .../model_connectionmonitor.go | 10 - .../model_connectionmonitordestination.go | 10 - .../model_connectionmonitorendpoint.go | 14 - .../model_connectionmonitorendpointfilter.go | 9 - ...del_connectionmonitorendpointfilteritem.go | 9 - .../model_connectionmonitorendpointscope.go | 9 - ...odel_connectionmonitorendpointscopeitem.go | 8 - ...odel_connectionmonitorhttpconfiguration.go | 13 - ...odel_connectionmonitoricmpconfiguration.go | 8 - .../model_connectionmonitorlistresult.go | 8 - .../model_connectionmonitoroutput.go | 9 - .../model_connectionmonitorparameters.go | 16 - .../model_connectionmonitorqueryresult.go | 9 - .../model_connectionmonitorresult.go | 14 - ...model_connectionmonitorresultproperties.go | 38 - .../model_connectionmonitorsource.go | 9 - ...model_connectionmonitorsuccessthreshold.go | 9 - ...model_connectionmonitortcpconfiguration.go | 10 - ...odel_connectionmonitortestconfiguration.go | 15 - .../model_connectionmonitortestgroup.go | 12 - ...odel_connectionmonitorworkspacesettings.go | 8 - .../model_connectionstatesnapshot.go | 47 - .../model_connectivityhop.go | 16 - .../model_connectivityissue.go | 11 - .../connectionmonitors/model_hoplink.go | 13 - .../model_hoplinkproperties.go | 10 - .../connectionmonitors/model_httpheader.go | 9 - .../connectionmonitors/model_tagsobject.go | 8 - .../2022-11-01/connectionmonitors/version.go | 12 - .../connectivityconfigurations/README.md | 86 - .../connectivityconfigurations/client.go | 26 - .../connectivityconfigurations/constants.go | 262 -- .../id_connectivityconfiguration.go | 140 - .../id_connectivityconfiguration_test.go | 327 -- .../id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- .../method_createorupdate.go | 56 - .../method_delete.go | 99 - .../connectivityconfigurations/method_get.go | 51 - .../connectivityconfigurations/method_list.go | 117 - .../model_connectivityconfiguration.go | 17 - ...del_connectivityconfigurationproperties.go | 14 - .../model_connectivitygroupitem.go | 11 - .../connectivityconfigurations/model_hub.go | 9 - .../connectivityconfigurations/predicates.go | 32 - .../connectivityconfigurations/version.go | 12 - .../2022-11-01/customipprefixes/README.md | 120 - .../2022-11-01/customipprefixes/client.go | 26 - .../2022-11-01/customipprefixes/constants.go | 222 -- .../customipprefixes/id_customipprefix.go | 127 - .../id_customipprefix_test.go | 282 -- .../customipprefixes/method_createorupdate.go | 74 - .../customipprefixes/method_delete.go | 71 - .../2022-11-01/customipprefixes/method_get.go | 80 - .../customipprefixes/method_list.go | 90 - .../customipprefixes/method_listall.go | 90 - .../customipprefixes/method_updatetags.go | 55 - .../customipprefixes/model_customipprefix.go | 21 - .../model_customipprefixpropertiesformat.go | 22 - .../customipprefixes/model_subresource.go | 8 - .../customipprefixes/model_tagsobject.go | 8 - .../2022-11-01/customipprefixes/predicates.go | 37 - .../2022-11-01/customipprefixes/version.go | 12 - .../2022-11-01/ddoscustompolicies/README.md | 86 - .../2022-11-01/ddoscustompolicies/client.go | 26 - .../ddoscustompolicies/constants.go | 57 - .../ddoscustompolicies/id_ddoscustompolicy.go | 127 - .../id_ddoscustompolicy_test.go | 282 -- .../method_createorupdate.go | 74 - .../ddoscustompolicies/method_delete.go | 71 - .../ddoscustompolicies/method_get.go | 51 - .../ddoscustompolicies/method_updatetags.go | 55 - .../model_ddoscustompolicy.go | 14 - .../model_ddoscustompolicypropertiesformat.go | 9 - .../ddoscustompolicies/model_tagsobject.go | 8 - .../2022-11-01/ddoscustompolicies/version.go | 12 - .../2022-11-01/ddosprotectionplans/README.md | 120 - .../2022-11-01/ddosprotectionplans/client.go | 26 - .../ddosprotectionplans/constants.go | 57 - .../id_ddosprotectionplan.go | 127 - .../id_ddosprotectionplan_test.go | 282 -- .../method_createorupdate.go | 74 - .../ddosprotectionplans/method_delete.go | 71 - .../ddosprotectionplans/method_get.go | 51 - .../ddosprotectionplans/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../ddosprotectionplans/method_updatetags.go | 55 - .../model_ddosprotectionplan.go | 14 - ...odel_ddosprotectionplanpropertiesformat.go | 11 - .../ddosprotectionplans/model_subresource.go | 8 - .../ddosprotectionplans/model_tagsobject.go | 8 - .../ddosprotectionplans/predicates.go | 37 - .../2022-11-01/ddosprotectionplans/version.go | 12 - .../2022-11-01/dscpconfiguration/README.md | 65 - .../2022-11-01/dscpconfiguration/client.go | 26 - .../2022-11-01/dscpconfiguration/constants.go | 1172 ------- .../dscpconfiguration/id_dscpconfiguration.go | 127 - .../id_dscpconfiguration_test.go | 282 -- .../method_createorupdate.go | 74 - .../dscpconfiguration/method_delete.go | 71 - .../dscpconfiguration/method_get.go | 51 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../dscpconfiguration/model_ddossettings.go | 9 - .../dscpconfiguration/model_delegation.go | 12 - .../model_dscpconfiguration.go | 14 - ...model_dscpconfigurationpropertiesformat.go | 18 - .../dscpconfiguration/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../dscpconfiguration/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../dscpconfiguration/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../dscpconfiguration/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../dscpconfiguration/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../dscpconfiguration/model_qosdefinition.go | 13 - .../dscpconfiguration/model_qosiprange.go | 9 - .../dscpconfiguration/model_qosportrange.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../dscpconfiguration/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../dscpconfiguration/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../dscpconfiguration/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../dscpconfiguration/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../dscpconfiguration/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../dscpconfiguration/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-11-01/dscpconfiguration/version.go | 12 - .../2022-11-01/dscpconfigurations/README.md | 54 - .../2022-11-01/dscpconfigurations/client.go | 26 - .../dscpconfigurations/constants.go | 1172 ------- .../method_dscpconfigurationlist.go | 90 - .../method_dscpconfigurationlistall.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../dscpconfigurations/model_ddossettings.go | 9 - .../dscpconfigurations/model_delegation.go | 12 - .../model_dscpconfiguration.go | 14 - ...model_dscpconfigurationpropertiesformat.go | 18 - .../dscpconfigurations/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../dscpconfigurations/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../dscpconfigurations/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../dscpconfigurations/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../dscpconfigurations/model_qosdefinition.go | 13 - .../dscpconfigurations/model_qosiprange.go | 9 - .../dscpconfigurations/model_qosportrange.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../dscpconfigurations/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../dscpconfigurations/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../dscpconfigurations/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../dscpconfigurations/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../dscpconfigurations/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../dscpconfigurations/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../dscpconfigurations/predicates.go | 37 - .../2022-11-01/dscpconfigurations/version.go | 12 - .../2022-11-01/endpointservices/README.md | 37 - .../2022-11-01/endpointservices/client.go | 26 - .../endpointservices/id_location.go | 114 - .../endpointservices/id_location_test.go | 237 -- .../method_availableendpointserviceslist.go | 89 - .../model_endpointserviceresult.go | 10 - .../2022-11-01/endpointservices/predicates.go | 27 - .../2022-11-01/endpointservices/version.go | 12 - .../expressroutecircuitarptable/README.md | 32 - .../expressroutecircuitarptable/client.go | 26 - .../id_arptable.go | 153 - .../id_arptable_test.go | 372 --- ...method_expressroutecircuitslistarptable.go | 70 - .../model_expressroutecircuitarptable.go | 11 - ..._expressroutecircuitsarptablelistresult.go | 9 - .../expressroutecircuitarptable/version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 98 - .../id_authorization.go | 140 - .../id_authorization_test.go | 327 -- .../id_expressroutecircuit.go | 127 - .../id_expressroutecircuit_test.go | 282 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../model_authorizationpropertiesformat.go | 10 - .../model_expressroutecircuitauthorization.go | 12 - .../predicates.go | 32 - .../version.go | 12 - .../expressroutecircuitconnections/README.md | 82 - .../expressroutecircuitconnections/client.go | 26 - .../constants.go | 101 - .../id_peeringconnection.go | 153 - .../id_peeringconnection_test.go | 372 --- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 90 - .../model_expressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_ipv6circuitconnectionconfig.go | 9 - .../model_subresource.go | 8 - .../predicates.go | 32 - .../expressroutecircuitconnections/version.go | 12 - .../expressroutecircuitpeerings/README.md | 82 - .../expressroutecircuitpeerings/client.go | 26 - .../expressroutecircuitpeerings/constants.go | 274 -- .../id_expressroutecircuit.go | 127 - .../id_expressroutecircuit_test.go | 282 -- .../method_createorupdate.go | 75 - .../method_delete.go | 72 - .../expressroutecircuitpeerings/method_get.go | 52 - .../method_list.go | 89 - .../model_expressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_expressroutecircuitpeering.go | 12 - .../model_expressroutecircuitpeeringconfig.go | 13 - ...ressroutecircuitpeeringpropertiesformat.go | 27 - .../model_expressroutecircuitstats.go | 11 - .../model_expressrouteconnectionid.go | 8 - .../model_ipv6circuitconnectionconfig.go | 9 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - ...model_peerexpressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_subresource.go | 8 - .../expressroutecircuitpeerings/predicates.go | 32 - .../expressroutecircuitpeerings/version.go | 12 - .../expressroutecircuitroutestable/README.md | 32 - .../expressroutecircuitroutestable/client.go | 26 - .../id_peeringroutetable.go | 153 - .../id_peeringroutetable_test.go | 372 --- ...hod_expressroutecircuitslistroutestable.go | 70 - .../model_expressroutecircuitroutestable.go | 12 - ...pressroutecircuitsroutestablelistresult.go | 9 - .../expressroutecircuitroutestable/version.go | 12 - .../README.md | 32 - .../client.go | 26 - .../id_routetablessummary.go | 153 - .../id_routetablessummary_test.go | 372 --- ...ressroutecircuitslistroutestablesummary.go | 70 - ...l_expressroutecircuitroutestablesummary.go | 12 - ...utecircuitsroutestablesummarylistresult.go | 9 - .../version.go | 12 - .../2022-11-01/expressroutecircuits/README.md | 120 - .../2022-11-01/expressroutecircuits/client.go | 26 - .../expressroutecircuits/constants.go | 450 --- .../id_expressroutecircuit.go | 127 - .../id_expressroutecircuit_test.go | 282 -- .../method_createorupdate.go | 74 - .../expressroutecircuits/method_delete.go | 71 - .../expressroutecircuits/method_get.go | 51 - .../expressroutecircuits/method_list.go | 90 - .../expressroutecircuits/method_listall.go | 90 - .../expressroutecircuits/method_updatetags.go | 55 - .../model_authorizationpropertiesformat.go | 10 - .../model_expressroutecircuit.go | 15 - .../model_expressroutecircuitauthorization.go | 12 - .../model_expressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_expressroutecircuitpeering.go | 12 - .../model_expressroutecircuitpeeringconfig.go | 13 - ...ressroutecircuitpeeringpropertiesformat.go | 27 - ...del_expressroutecircuitpropertiesformat.go | 23 - ...ssroutecircuitserviceproviderproperties.go | 10 - .../model_expressroutecircuitsku.go | 10 - .../model_expressroutecircuitstats.go | 11 - .../model_expressrouteconnectionid.go | 8 - .../model_ipv6circuitconnectionconfig.go | 9 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - ...model_peerexpressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../expressroutecircuits/model_subresource.go | 8 - .../expressroutecircuits/model_tagsobject.go | 8 - .../expressroutecircuits/predicates.go | 37 - .../expressroutecircuits/version.go | 12 - .../expressroutecircuitstats/README.md | 52 - .../expressroutecircuitstats/client.go | 26 - .../id_expressroutecircuit.go | 127 - .../id_expressroutecircuit_test.go | 282 -- ...hod_expressroutecircuitsgetpeeringstats.go | 53 - .../method_expressroutecircuitsgetstats.go | 52 - .../model_expressroutecircuitstats.go | 11 - .../expressroutecircuitstats/version.go | 12 - .../expressrouteconnections/README.md | 81 - .../expressrouteconnections/client.go | 26 - .../expressrouteconnections/constants.go | 98 - .../id_expressrouteconnection.go | 140 - .../id_expressrouteconnection_test.go | 327 -- .../id_expressroutegateway.go | 127 - .../id_expressroutegateway_test.go | 282 -- .../method_createorupdate.go | 74 - .../expressrouteconnections/method_delete.go | 71 - .../expressrouteconnections/method_get.go | 51 - .../expressrouteconnections/method_list.go | 52 - .../model_expressroutecircuitpeeringid.go | 8 - .../model_expressrouteconnection.go | 10 - .../model_expressrouteconnectionlist.go | 8 - .../model_expressrouteconnectionproperties.go | 15 - .../model_propagatedroutetable.go | 9 - .../model_routingconfiguration.go | 12 - .../model_staticroute.go | 10 - .../model_staticroutesconfig.go | 9 - .../model_subresource.go | 8 - .../model_vnetroute.go | 10 - .../expressrouteconnections/version.go | 12 - .../README.md | 32 - .../client.go | 26 - .../id_peeringarptable.go | 153 - .../id_peeringarptable_test.go | 372 --- ...xpressroutecrossconnectionslistarptable.go | 70 - .../model_expressroutecircuitarptable.go | 11 - ..._expressroutecircuitsarptablelistresult.go | 9 - .../version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 230 -- .../id_expressroutecrossconnection.go | 127 - .../id_expressroutecrossconnection_test.go | 282 -- .../id_peering.go | 140 - .../id_peering_test.go | 327 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../model_expressroutecircuitpeeringconfig.go | 13 - ...odel_expressroutecrossconnectionpeering.go | 11 - ...ssroutecrossconnectionpeeringproperties.go | 22 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - .../model_subresource.go | 8 - .../predicates.go | 27 - .../version.go | 12 - .../README.md | 32 - .../client.go | 26 - ...ssroutecrossconnectionpeeringroutetable.go | 153 - ...tecrossconnectionpeeringroutetable_test.go | 372 --- ...essroutecrossconnectionslistroutestable.go | 70 - .../model_expressroutecircuitroutestable.go | 12 - ...pressroutecircuitsroutestablelistresult.go | 9 - .../version.go | 12 - .../README.md | 32 - .../client.go | 26 - .../id_peeringroutetablessummary.go | 153 - .../id_peeringroutetablessummary_test.go | 372 --- ...ecrossconnectionslistroutestablesummary.go | 70 - ...sroutecrossconnectionroutestablesummary.go | 11 - ...connectionsroutestablesummarylistresult.go | 9 - .../version.go | 12 - .../expressroutecrossconnections/README.md | 108 - .../expressroutecrossconnections/client.go | 26 - .../expressroutecrossconnections/constants.go | 277 -- .../id_expressroutecrossconnection.go | 127 - .../id_expressroutecrossconnection_test.go | 282 -- .../method_createorupdate.go | 73 - .../method_get.go | 51 - .../method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_updatetags.go | 55 - .../model_expressroutecircuitpeeringconfig.go | 13 - .../model_expressroutecircuitreference.go | 8 - .../model_expressroutecrossconnection.go | 14 - ...odel_expressroutecrossconnectionpeering.go | 11 - ...ssroutecrossconnectionpeeringproperties.go | 22 - ...l_expressroutecrossconnectionproperties.go | 17 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../predicates.go | 37 - .../expressroutecrossconnections/version.go | 12 - .../2022-11-01/expressroutegateways/README.md | 114 - .../2022-11-01/expressroutegateways/client.go | 26 - .../expressroutegateways/constants.go | 98 - .../id_expressroutegateway.go | 127 - .../id_expressroutegateway_test.go | 282 -- .../method_createorupdate.go | 74 - .../expressroutegateways/method_delete.go | 71 - .../expressroutegateways/method_get.go | 51 - .../method_listbyresourcegroup.go | 53 - .../method_listbysubscription.go | 53 - .../expressroutegateways/method_updatetags.go | 74 - .../model_expressroutecircuitpeeringid.go | 8 - .../model_expressrouteconnection.go | 10 - .../model_expressrouteconnectionproperties.go | 15 - .../model_expressroutegateway.go | 14 - .../model_expressroutegatewaylist.go | 8 - .../model_expressroutegatewayproperties.go | 12 - ...gatewaypropertiesautoscaleconfiguration.go | 8 - ...ypropertiesautoscaleconfigurationbounds.go | 9 - .../model_propagatedroutetable.go | 9 - .../model_routingconfiguration.go | 12 - .../expressroutegateways/model_staticroute.go | 10 - .../model_staticroutesconfig.go | 9 - .../expressroutegateways/model_subresource.go | 8 - .../expressroutegateways/model_tagsobject.go | 8 - .../model_virtualhubid.go | 8 - .../expressroutegateways/model_vnetroute.go | 10 - .../expressroutegateways/version.go | 12 - .../2022-11-01/expressroutelinks/README.md | 53 - .../2022-11-01/expressroutelinks/client.go | 26 - .../2022-11-01/expressroutelinks/constants.go | 227 -- .../expressroutelinks/id_expressrouteport.go | 127 - .../id_expressrouteport_test.go | 282 -- .../2022-11-01/expressroutelinks/id_link.go | 140 - .../expressroutelinks/id_link_test.go | 327 -- .../expressroutelinks/method_get.go | 51 - .../expressroutelinks/method_list.go | 89 - .../model_expressroutelink.go | 11 - .../model_expressroutelinkmacsecconfig.go | 11 - .../model_expressroutelinkpropertiesformat.go | 16 - .../expressroutelinks/predicates.go | 27 - .../2022-11-01/expressroutelinks/version.go | 12 - .../expressrouteportauthorizations/README.md | 82 - .../expressrouteportauthorizations/client.go | 26 - .../constants.go | 98 - .../id_expressrouteport.go | 127 - .../id_expressrouteport_test.go | 282 -- .../id_expressrouteportauthorization.go | 140 - .../id_expressrouteportauthorization_test.go | 327 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../model_expressrouteportauthorization.go | 12 - ...srouteportauthorizationpropertiesformat.go | 11 - .../predicates.go | 32 - .../expressrouteportauthorizations/version.go | 12 - .../2022-11-01/expressrouteports/README.md | 141 - .../2022-11-01/expressrouteports/client.go | 26 - .../2022-11-01/expressrouteports/constants.go | 309 -- .../expressrouteports/id_expressrouteport.go | 127 - .../id_expressrouteport_test.go | 282 -- .../method_createorupdate.go | 74 - .../expressrouteports/method_delete.go | 71 - .../expressrouteports/method_generateloa.go | 56 - .../expressrouteports/method_get.go | 51 - .../expressrouteports/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../expressrouteports/method_updatetags.go | 55 - .../model_expressroutelink.go | 11 - .../model_expressroutelinkmacsecconfig.go | 11 - .../model_expressroutelinkpropertiesformat.go | 16 - .../model_expressrouteport.go | 19 - .../model_expressrouteportpropertiesformat.go | 19 - ...del_generateexpressrouteportsloarequest.go | 8 - ...odel_generateexpressrouteportsloaresult.go | 8 - .../expressrouteports/model_subresource.go | 8 - .../expressrouteports/model_tagsobject.go | 8 - .../expressrouteports/predicates.go | 37 - .../2022-11-01/expressrouteports/version.go | 12 - .../expressrouteportslocations/README.md | 53 - .../expressrouteportslocations/client.go | 26 - .../expressrouteportslocations/constants.go | 57 - .../id_expressrouteportslocation.go | 114 - .../id_expressrouteportslocation_test.go | 237 -- .../expressrouteportslocations/method_get.go | 51 - .../expressrouteportslocations/method_list.go | 90 - .../model_expressrouteportslocation.go | 13 - ...del_expressrouteportslocationbandwidths.go | 9 - ...pressrouteportslocationpropertiesformat.go | 11 - .../expressrouteportslocations/predicates.go | 32 - .../expressrouteportslocations/version.go | 12 - .../expressrouteproviderports/README.md | 52 - .../expressrouteproviderports/client.go | 26 - .../id_expressrouteproviderport.go | 114 - .../id_expressrouteproviderport_test.go | 237 -- .../method_expressrouteproviderport.go | 51 - .../method_locationlist.go | 81 - .../model_expressrouteproviderport.go | 14 - ...odel_expressrouteproviderportlistresult.go | 9 - ...odel_expressrouteproviderportproperties.go | 15 - .../expressrouteproviderports/version.go | 12 - .../expressrouteserviceproviders/README.md | 37 - .../expressrouteserviceproviders/client.go | 26 - .../expressrouteserviceproviders/constants.go | 57 - .../method_list.go | 90 - .../model_expressrouteserviceprovider.go | 13 - ...ssrouteserviceproviderbandwidthsoffered.go | 9 - ...essrouteserviceproviderpropertiesformat.go | 10 - .../predicates.go | 32 - .../expressrouteserviceproviders/version.go | 12 - .../2022-11-01/firewallpolicies/README.md | 236 -- .../2022-11-01/firewallpolicies/client.go | 26 - .../2022-11-01/firewallpolicies/constants.go | 366 --- .../firewallpolicies/id_firewallpolicy.go | 127 - .../id_firewallpolicy_test.go | 282 -- .../firewallpolicies/method_createorupdate.go | 74 - .../firewallpolicies/method_delete.go | 71 - ...allpolicyidpssignaturesfiltervalueslist.go | 56 - ...method_firewallpolicyidpssignatureslist.go | 56 - ...irewallpolicyidpssignaturesoverridesget.go | 52 - ...rewallpolicyidpssignaturesoverrideslist.go | 52 - ...ewallpolicyidpssignaturesoverridespatch.go | 56 - ...irewallpolicyidpssignaturesoverridesput.go | 56 - .../2022-11-01/firewallpolicies/method_get.go | 80 - .../firewallpolicies/method_list.go | 90 - .../firewallpolicies/method_listall.go | 90 - .../firewallpolicies/method_updatetags.go | 55 - .../firewallpolicies/model_dnssettings.go | 10 - .../firewallpolicies/model_explicitproxy.go | 13 - .../firewallpolicies/model_filteritems.go | 9 - .../firewallpolicies/model_firewallpolicy.go | 19 - ...odel_firewallpolicycertificateauthority.go | 9 - .../model_firewallpolicyinsights.go | 10 - .../model_firewallpolicyintrusiondetection.go | 9 - ...iondetectionbypasstrafficspecifications.go | 15 - ...llpolicyintrusiondetectionconfiguration.go | 10 - ...ntrusiondetectionsignaturespecification.go | 9 - ...del_firewallpolicyloganalyticsresources.go | 9 - ...del_firewallpolicyloganalyticsworkspace.go | 9 - .../model_firewallpolicypropertiesformat.go | 22 - .../model_firewallpolicysku.go | 8 - .../model_firewallpolicysnat.go | 9 - .../model_firewallpolicysql.go | 8 - ...odel_firewallpolicythreatintelwhitelist.go | 9 - .../model_firewallpolicytransportsecurity.go | 8 - .../firewallpolicies/model_idpsqueryobject.go | 12 - .../firewallpolicies/model_orderby.go | 9 - .../firewallpolicies/model_queryresults.go | 9 - ...del_signatureoverridesfiltervaluesquery.go | 8 - ..._signatureoverridesfiltervaluesresponse.go | 8 - .../model_signaturesoverrides.go | 11 - .../model_signaturesoverrideslist.go | 8 - .../model_signaturesoverridesproperties.go | 8 - .../model_singlequeryresult.go | 18 - .../firewallpolicies/model_subresource.go | 8 - .../firewallpolicies/model_tagsobject.go | 8 - .../2022-11-01/firewallpolicies/predicates.go | 37 - .../2022-11-01/firewallpolicies/version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 309 -- .../id_firewallpolicy.go | 127 - .../id_firewallpolicy_test.go | 282 -- .../id_rulecollectiongroup.go | 140 - .../id_rulecollectiongroup_test.go | 327 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 89 - .../model_applicationrule.go | 52 - ...odel_firewallpolicyfilterrulecollection.go | 81 - ...irewallpolicyfilterrulecollectionaction.go | 8 - .../model_firewallpolicyhttpheadertoinsert.go | 9 - .../model_firewallpolicynatrulecollection.go | 81 - ...l_firewallpolicynatrulecollectionaction.go | 8 - .../model_firewallpolicyrule.go | 64 - ...l_firewallpolicyruleapplicationprotocol.go | 9 - .../model_firewallpolicyrulecollection.go | 56 - ...model_firewallpolicyrulecollectiongroup.go | 12 - ...wallpolicyrulecollectiongroupproperties.go | 51 - .../model_natrule.go | 50 - .../model_networkrule.go | 49 - .../predicates.go | 32 - .../version.go | 12 - .../network/2022-11-01/flowlogs/README.md | 103 - .../network/2022-11-01/flowlogs/client.go | 26 - .../network/2022-11-01/flowlogs/constants.go | 95 - .../network/2022-11-01/flowlogs/id_flowlog.go | 140 - .../2022-11-01/flowlogs/id_flowlog_test.go | 327 -- .../2022-11-01/flowlogs/id_networkwatcher.go | 127 - .../flowlogs/id_networkwatcher_test.go | 282 -- .../flowlogs/method_createorupdate.go | 74 - .../2022-11-01/flowlogs/method_delete.go | 70 - .../network/2022-11-01/flowlogs/method_get.go | 51 - .../2022-11-01/flowlogs/method_list.go | 89 - .../2022-11-01/flowlogs/method_updatetags.go | 55 - .../2022-11-01/flowlogs/model_flowlog.go | 14 - .../flowlogs/model_flowlogformatparameters.go | 9 - .../flowlogs/model_flowlogpropertiesformat.go | 15 - .../model_retentionpolicyparameters.go | 9 - .../2022-11-01/flowlogs/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../network/2022-11-01/flowlogs/predicates.go | 37 - .../network/2022-11-01/flowlogs/version.go | 12 - .../2022-11-01/ipallocations/README.md | 120 - .../2022-11-01/ipallocations/client.go | 26 - .../2022-11-01/ipallocations/constants.go | 92 - .../ipallocations/id_ipallocation.go | 127 - .../ipallocations/id_ipallocation_test.go | 282 -- .../ipallocations/method_createorupdate.go | 74 - .../2022-11-01/ipallocations/method_delete.go | 71 - .../2022-11-01/ipallocations/method_get.go | 80 - .../2022-11-01/ipallocations/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../ipallocations/method_updatetags.go | 55 - .../ipallocations/model_ipallocation.go | 14 - .../model_ipallocationpropertiesformat.go | 15 - .../ipallocations/model_subresource.go | 8 - .../ipallocations/model_tagsobject.go | 8 - .../2022-11-01/ipallocations/predicates.go | 37 - .../2022-11-01/ipallocations/version.go | 12 - .../network/2022-11-01/ipgroups/README.md | 120 - .../network/2022-11-01/ipgroups/client.go | 26 - .../network/2022-11-01/ipgroups/constants.go | 57 - .../network/2022-11-01/ipgroups/id_ipgroup.go | 127 - .../2022-11-01/ipgroups/id_ipgroup_test.go | 282 -- .../ipgroups/method_createorupdate.go | 74 - .../2022-11-01/ipgroups/method_delete.go | 71 - .../network/2022-11-01/ipgroups/method_get.go | 80 - .../2022-11-01/ipgroups/method_list.go | 90 - .../ipgroups/method_listbyresourcegroup.go | 90 - .../ipgroups/method_updategroups.go | 55 - .../2022-11-01/ipgroups/model_ipgroup.go | 14 - .../ipgroups/model_ipgrouppropertiesformat.go | 11 - .../2022-11-01/ipgroups/model_subresource.go | 8 - .../2022-11-01/ipgroups/model_tagsobject.go | 8 - .../network/2022-11-01/ipgroups/predicates.go | 37 - .../network/2022-11-01/ipgroups/version.go | 12 - .../2022-11-01/loadbalancers/README.md | 427 --- .../2022-11-01/loadbalancers/client.go | 26 - .../2022-11-01/loadbalancers/constants.go | 1327 -------- .../loadbalancers/id_backendaddresspool.go | 140 - .../id_backendaddresspool_test.go | 327 -- .../id_frontendipconfiguration.go | 140 - .../id_frontendipconfiguration_test.go | 327 -- .../loadbalancers/id_inboundnatrule.go | 140 - .../loadbalancers/id_inboundnatrule_test.go | 327 -- .../loadbalancers/id_loadbalancer.go | 127 - .../loadbalancers/id_loadbalancer_test.go | 282 -- .../id_loadbalancerbackendaddresspool.go | 140 - .../id_loadbalancerbackendaddresspool_test.go | 327 -- .../loadbalancers/id_loadbalancingrule.go | 140 - .../id_loadbalancingrule_test.go | 327 -- .../2022-11-01/loadbalancers/id_location.go | 114 - .../loadbalancers/id_location_test.go | 237 -- .../loadbalancers/id_outboundrule.go | 140 - .../loadbalancers/id_outboundrule_test.go | 327 -- .../2022-11-01/loadbalancers/id_probe.go | 140 - .../2022-11-01/loadbalancers/id_probe_test.go | 327 -- .../loadbalancers/method_createorupdate.go | 74 - .../2022-11-01/loadbalancers/method_delete.go | 71 - .../2022-11-01/loadbalancers/method_get.go | 80 - .../method_inboundnatrulescreateorupdate.go | 74 - .../method_inboundnatrulesdelete.go | 71 - .../method_inboundnatrulesget.go | 80 - .../method_inboundnatruleslist.go | 89 - .../2022-11-01/loadbalancers/method_list.go | 90 - .../loadbalancers/method_listall.go | 90 - .../method_listinboundnatruleportmappings.go | 74 - ...lancerbackendaddresspoolscreateorupdate.go | 74 - ...d_loadbalancerbackendaddresspoolsdelete.go | 71 - ...thod_loadbalancerbackendaddresspoolsget.go | 51 - ...hod_loadbalancerbackendaddresspoolslist.go | 89 - ...loadbalancerfrontendipconfigurationsget.go | 51 - ...oadbalancerfrontendipconfigurationslist.go | 89 - ...ethod_loadbalancerloadbalancingrulesget.go | 51 - ...thod_loadbalancerloadbalancingruleslist.go | 89 - ...ethod_loadbalancernetworkinterfaceslist.go | 89 - .../method_loadbalanceroutboundrulesget.go | 51 - .../method_loadbalanceroutboundruleslist.go | 89 - .../method_loadbalancerprobesget.go | 51 - .../method_loadbalancerprobeslist.go | 89 - .../method_swappublicipaddresses.go | 74 - .../loadbalancers/method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - ...ackendaddressinboundnatruleportmappings.go | 8 - .../loadbalancers/model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../loadbalancers/model_ddossettings.go | 9 - .../loadbalancers/model_delegation.go | 12 - .../2022-11-01/loadbalancers/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../loadbalancers/model_inboundnatpool.go | 12 - .../model_inboundnatpoolpropertiesformat.go | 16 - .../loadbalancers/model_inboundnatrule.go | 12 - .../model_inboundnatruleportmapping.go | 11 - .../model_inboundnatrulepropertiesformat.go | 19 - .../loadbalancers/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../2022-11-01/loadbalancers/model_iptag.go | 9 - .../loadbalancers/model_loadbalancer.go | 20 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_loadbalancerpropertiesformat.go | 16 - .../loadbalancers/model_loadbalancersku.go | 9 - .../model_loadbalancervipswaprequest.go | 8 - ...ervipswaprequestfrontendipconfiguration.go | 9 - ...equestfrontendipconfigurationproperties.go | 8 - .../loadbalancers/model_loadbalancingrule.go | 12 - ...model_loadbalancingrulepropertiesformat.go | 20 - .../loadbalancers/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../loadbalancers/model_natgatewaysku.go | 8 - .../loadbalancers/model_natruleportmapping.go | 10 - .../loadbalancers/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../loadbalancers/model_outboundrule.go | 12 - .../model_outboundrulepropertiesformat.go | 14 - .../loadbalancers/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../loadbalancers/model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../2022-11-01/loadbalancers/model_probe.go | 12 - .../model_probepropertiesformat.go | 15 - .../loadbalancers/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../loadbalancers/model_publicipaddresssku.go | 9 - ...l_queryinboundnatruleportmappingrequest.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../loadbalancers/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-11-01/loadbalancers/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../loadbalancers/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../loadbalancers/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../2022-11-01/loadbalancers/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../loadbalancers/model_subresource.go | 8 - .../loadbalancers/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../loadbalancers/model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-11-01/loadbalancers/predicates.go | 238 -- .../2022-11-01/loadbalancers/version.go | 12 - .../2022-11-01/localnetworkgateways/README.md | 103 - .../2022-11-01/localnetworkgateways/client.go | 26 - .../localnetworkgateways/constants.go | 57 - .../id_localnetworkgateway.go | 127 - .../id_localnetworkgateway_test.go | 282 -- .../method_createorupdate.go | 74 - .../localnetworkgateways/method_delete.go | 71 - .../localnetworkgateways/method_get.go | 51 - .../localnetworkgateways/method_list.go | 90 - .../localnetworkgateways/method_updatetags.go | 55 - .../model_addressspace.go | 8 - .../localnetworkgateways/model_bgpsettings.go | 11 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_localnetworkgateway.go | 14 - ...del_localnetworkgatewaypropertiesformat.go | 13 - .../localnetworkgateways/model_tagsobject.go | 8 - .../localnetworkgateways/predicates.go | 37 - .../localnetworkgateways/version.go | 12 - .../network/2022-11-01/natgateways/README.md | 120 - .../network/2022-11-01/natgateways/client.go | 26 - .../2022-11-01/natgateways/constants.go | 95 - .../2022-11-01/natgateways/id_natgateway.go | 127 - .../natgateways/id_natgateway_test.go | 282 -- .../natgateways/method_createorupdate.go | 75 - .../2022-11-01/natgateways/method_delete.go | 71 - .../2022-11-01/natgateways/method_get.go | 80 - .../2022-11-01/natgateways/method_list.go | 90 - .../2022-11-01/natgateways/method_listall.go | 90 - .../natgateways/method_updatetags.go | 55 - .../natgateways/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../natgateways/model_natgatewaysku.go | 8 - .../natgateways/model_subresource.go | 8 - .../natgateways/model_tagsobject.go | 8 - .../2022-11-01/natgateways/predicates.go | 37 - .../network/2022-11-01/natgateways/version.go | 12 - .../2022-11-01/networkgroups/README.md | 86 - .../2022-11-01/networkgroups/client.go | 26 - .../2022-11-01/networkgroups/constants.go | 57 - .../networkgroups/id_networkgroup.go | 140 - .../networkgroups/id_networkgroup_test.go | 327 -- .../networkgroups/id_networkmanager.go | 127 - .../networkgroups/id_networkmanager_test.go | 282 -- .../networkgroups/method_createorupdate.go | 85 - .../2022-11-01/networkgroups/method_delete.go | 99 - .../2022-11-01/networkgroups/method_get.go | 51 - .../2022-11-01/networkgroups/method_list.go | 117 - .../networkgroups/model_networkgroup.go | 17 - .../model_networkgroupproperties.go | 9 - .../2022-11-01/networkgroups/predicates.go | 32 - .../2022-11-01/networkgroups/version.go | 12 - .../2022-11-01/networkinterfaces/README.md | 360 --- .../2022-11-01/networkinterfaces/client.go | 26 - .../2022-11-01/networkinterfaces/constants.go | 1459 --------- .../id_providercloudservice.go | 127 - .../id_providercloudservice_test.go | 282 -- .../networkinterfaces/id_roleinstance.go | 140 - .../networkinterfaces/id_roleinstance_test.go | 327 -- .../id_roleinstancenetworkinterface.go | 153 - .../id_roleinstancenetworkinterface_test.go | 372 --- .../networkinterfaces/id_tapconfiguration.go | 140 - .../id_tapconfiguration_test.go | 327 -- .../networkinterfaces/id_virtualmachine.go | 140 - .../id_virtualmachine_test.go | 327 -- .../id_virtualmachinescaleset.go | 127 - .../id_virtualmachinescaleset_test.go | 282 -- .../method_createorupdate.go | 75 - .../networkinterfaces/method_delete.go | 72 - .../networkinterfaces/method_get.go | 81 - .../method_getcloudservicenetworkinterface.go | 80 - .../method_geteffectiveroutetable.go | 71 - ...etvirtualmachinescalesetipconfiguration.go | 81 - ...tvirtualmachinescalesetnetworkinterface.go | 81 - .../networkinterfaces/method_list.go | 90 - .../networkinterfaces/method_listall.go | 90 - ...ethod_listcloudservicenetworkinterfaces.go | 89 - ...oudserviceroleinstancenetworkinterfaces.go | 89 - ...thod_listeffectivenetworksecuritygroups.go | 71 - ...tvirtualmachinescalesetipconfigurations.go | 118 - ...virtualmachinescalesetnetworkinterfaces.go | 89 - ...rtualmachinescalesetvmnetworkinterfaces.go | 89 - ...hod_networkinterfaceipconfigurationsget.go | 52 - ...od_networkinterfaceipconfigurationslist.go | 90 - ...ethod_networkinterfaceloadbalancerslist.go | 90 - ...od_networkinterfacetapconfigurationsget.go | 51 - ...d_networkinterfacetapconfigurationslist.go | 90 - .../networkinterfaces/method_updatetags.go | 56 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../networkinterfaces/model_ddossettings.go | 9 - .../networkinterfaces/model_delegation.go | 12 - .../model_effectivenetworksecuritygroup.go | 11 - ...ffectivenetworksecuritygroupassociation.go | 10 - ...effectivenetworksecuritygrouplistresult.go | 9 - .../model_effectivenetworksecurityrule.go | 22 - .../networkinterfaces/model_effectiveroute.go | 14 - .../model_effectiveroutelistresult.go | 9 - .../networkinterfaces/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../networkinterfaces/model_inboundnatpool.go | 12 - .../model_inboundnatpoolpropertiesformat.go | 16 - .../networkinterfaces/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../networkinterfaces/model_iptag.go | 9 - .../networkinterfaces/model_loadbalancer.go | 20 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_loadbalancerpropertiesformat.go | 16 - .../model_loadbalancersku.go | 9 - .../model_loadbalancingrule.go | 12 - ...model_loadbalancingrulepropertiesformat.go | 20 - .../networkinterfaces/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../networkinterfaces/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../networkinterfaces/model_outboundrule.go | 12 - .../model_outboundrulepropertiesformat.go | 14 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../networkinterfaces/model_probe.go | 12 - .../model_probepropertiesformat.go | 15 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../networkinterfaces/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../networkinterfaces/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../networkinterfaces/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../networkinterfaces/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../networkinterfaces/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../networkinterfaces/model_subresource.go | 8 - .../networkinterfaces/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../networkinterfaces/predicates.go | 126 - .../2022-11-01/networkinterfaces/version.go | 12 - .../README.md | 41 - .../client.go | 26 - .../constants.go | 277 -- .../id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- .../method_listactivesecurityadminrules.go | 56 - .../model_activebasesecurityadminrule.go | 56 - .../model_activeconfigurationparameter.go | 9 - .../model_activedefaultsecurityadminrule.go | 63 - .../model_activesecurityadminrule.go | 63 - ...odel_activesecurityadminruleslistresult.go | 49 - .../model_addressprefixitem.go | 9 - .../model_adminpropertiesformat.go | 17 - .../model_configurationgroup.go | 9 - .../model_defaultadminpropertiesformat.go | 18 - .../model_networkgroupproperties.go | 9 - .../model_networkmanagersecuritygroupitem.go | 8 - .../version.go | 12 - .../README.md | 41 - .../client.go | 26 - .../constants.go | 262 -- .../id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- ...od_listactiveconnectivityconfigurations.go | 56 - .../model_activeconfigurationparameter.go | 9 - .../model_activeconnectivityconfiguration.go | 30 - ...iveconnectivityconfigurationslistresult.go | 9 - .../model_configurationgroup.go | 9 - ...del_connectivityconfigurationproperties.go | 14 - .../model_connectivitygroupitem.go | 11 - .../model_hub.go | 9 - .../model_networkgroupproperties.go | 9 - .../version.go | 12 - .../networkmanagerconnections/README.md | 160 - .../networkmanagerconnections/client.go | 26 - .../networkmanagerconnections/constants.go | 60 - .../id_networkmanagerconnection.go | 114 - .../id_networkmanagerconnection_test.go | 237 -- .../id_providers2networkmanagerconnection.go | 116 - ...providers2networkmanagerconnection_test.go | 267 -- ...networkmanagerconnectionscreateorupdate.go | 56 - ...entgroupnetworkmanagerconnectionsdelete.go | 47 - ...gementgroupnetworkmanagerconnectionsget.go | 51 - ...ementgroupnetworkmanagerconnectionslist.go | 118 - ...networkmanagerconnectionscreateorupdate.go | 56 - ...criptionnetworkmanagerconnectionsdelete.go | 47 - ...ubscriptionnetworkmanagerconnectionsget.go | 51 - ...bscriptionnetworkmanagerconnectionslist.go | 118 - .../model_networkmanagerconnection.go | 17 - ...odel_networkmanagerconnectionproperties.go | 10 - .../networkmanagerconnections/predicates.go | 32 - .../networkmanagerconnections/version.go | 12 - .../README.md | 41 - .../client.go | 26 - .../constants.go | 262 -- ...agereffectiveconnectivityconfigurations.go | 57 - .../model_configurationgroup.go | 9 - ...del_connectivityconfigurationproperties.go | 14 - .../model_connectivitygroupitem.go | 11 - ...odel_effectiveconnectivityconfiguration.go | 10 - .../model_hub.go | 9 - .../model_networkgroupproperties.go | 9 - ...tiveconnectivityconfigurationlistresult.go | 9 - .../model_queryrequestoptions.go | 8 - .../version.go | 12 - .../README.md | 41 - .../client.go | 26 - .../constants.go | 277 -- ...tworkmanagereffectivesecurityadminrules.go | 57 - .../model_addressprefixitem.go | 9 - .../model_adminpropertiesformat.go | 17 - .../model_configurationgroup.go | 9 - .../model_defaultadminpropertiesformat.go | 18 - .../model_effectivebasesecurityadminrule.go | 56 - ...model_effectivedefaultsecurityadminrule.go | 46 - .../model_effectivesecurityadminrule.go | 46 - .../model_networkgroupproperties.go | 9 - ...ereffectivesecurityadminruleslistresult.go | 49 - .../model_networkmanagersecuritygroupitem.go | 8 - .../model_queryrequestoptions.go | 8 - .../version.go | 12 - .../2022-11-01/networkmanagers/README.md | 162 - .../2022-11-01/networkmanagers/client.go | 26 - .../2022-11-01/networkmanagers/constants.go | 145 - .../networkmanagers/id_networkmanager.go | 127 - .../networkmanagers/id_networkmanager_test.go | 282 -- .../networkmanagers/method_createorupdate.go | 56 - .../networkmanagers/method_delete.go | 99 - .../2022-11-01/networkmanagers/method_get.go | 51 - .../2022-11-01/networkmanagers/method_list.go | 118 - .../method_listbysubscription.go | 118 - .../method_networkmanagercommitspost.go | 74 - ...thod_networkmanagerdeploymentstatuslist.go | 56 - .../networkmanagers/method_patch.go | 55 - .../model_crosstenantscopes.go | 10 - .../networkmanagers/model_networkmanager.go | 19 - .../model_networkmanagercommit.go | 11 - .../model_networkmanagerdeploymentstatus.go | 31 - ...etworkmanagerdeploymentstatuslistresult.go | 9 - ...networkmanagerdeploymentstatusparameter.go | 10 - .../model_networkmanagerproperties.go | 11 - ...rkmanagerpropertiesnetworkmanagerscopes.go | 10 - .../networkmanagers/model_patchobject.go | 8 - .../2022-11-01/networkmanagers/predicates.go | 37 - .../2022-11-01/networkmanagers/version.go | 12 - .../2022-11-01/networkprofiles/README.md | 124 - .../2022-11-01/networkprofiles/client.go | 26 - .../2022-11-01/networkprofiles/constants.go | 1110 ------- .../networkprofiles/id_networkprofile.go | 127 - .../networkprofiles/id_networkprofile_test.go | 282 -- .../networkprofiles/method_createorupdate.go | 56 - .../networkprofiles/method_delete.go | 71 - .../2022-11-01/networkprofiles/method_get.go | 80 - .../2022-11-01/networkprofiles/method_list.go | 90 - .../networkprofiles/method_listall.go | 90 - .../networkprofiles/method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_containernetworkinterface.go | 12 - ..._containernetworkinterfaceconfiguration.go | 12 - ...kinterfaceconfigurationpropertiesformat.go | 10 - ...ontainernetworkinterfaceipconfiguration.go | 11 - ...nterfaceipconfigurationpropertiesformat.go | 8 - ...ntainernetworkinterfacepropertiesformat.go | 11 - .../model_customdnsconfigpropertiesformat.go | 9 - .../networkprofiles/model_ddossettings.go | 9 - .../networkprofiles/model_delegation.go | 12 - .../networkprofiles/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../networkprofiles/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../networkprofiles/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../2022-11-01/networkprofiles/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../networkprofiles/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../networkprofiles/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../networkprofiles/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../networkprofiles/model_networkprofile.go | 14 - .../model_networkprofilepropertiesformat.go | 11 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../networkprofiles/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../networkprofiles/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../networkprofiles/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-11-01/networkprofiles/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../networkprofiles/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../networkprofiles/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../networkprofiles/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../networkprofiles/model_subresource.go | 8 - .../networkprofiles/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-11-01/networkprofiles/predicates.go | 37 - .../2022-11-01/networkprofiles/version.go | 12 - .../networksecuritygroups/README.md | 120 - .../networksecuritygroups/client.go | 26 - .../networksecuritygroups/constants.go | 1110 ------- .../id_networksecuritygroup.go | 127 - .../id_networksecuritygroup_test.go | 282 -- .../method_createorupdate.go | 74 - .../networksecuritygroups/method_delete.go | 71 - .../networksecuritygroups/method_get.go | 80 - .../networksecuritygroups/method_list.go | 90 - .../networksecuritygroups/method_listall.go | 90 - .../method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../networksecuritygroups/model_delegation.go | 12 - .../networksecuritygroups/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../networksecuritygroups/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../networksecuritygroups/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../networksecuritygroups/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../networksecuritygroups/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../networksecuritygroups/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - .../networksecuritygroups/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../networksecuritygroups/predicates.go | 37 - .../networksecuritygroups/version.go | 12 - .../networkvirtualappliances/README.md | 137 - .../networkvirtualappliances/client.go | 26 - .../networkvirtualappliances/constants.go | 98 - .../id_inboundsecurityrule.go | 140 - .../id_inboundsecurityrule_test.go | 327 -- .../id_networkvirtualappliance.go | 127 - .../id_networkvirtualappliance_test.go | 282 -- .../method_createorupdate.go | 74 - .../networkvirtualappliances/method_delete.go | 71 - .../networkvirtualappliances/method_get.go | 80 - ...ethod_inboundsecurityrulecreateorupdate.go | 74 - .../networkvirtualappliances/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_updatetags.go | 55 - .../model_delegationproperties.go | 9 - .../model_inboundsecurityrule.go | 12 - .../model_inboundsecurityruleproperties.go | 9 - .../model_inboundsecurityrules.go | 10 - .../model_networkvirtualappliance.go | 19 - ...networkvirtualappliancepropertiesformat.go | 24 - .../model_partnermanagedresourceproperties.go | 10 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - ...virtualapplianceadditionalnicproperties.go | 9 - .../model_virtualappliancenicproperties.go | 11 - .../model_virtualapplianceskuproperties.go | 10 - .../networkvirtualappliances/predicates.go | 37 - .../networkvirtualappliances/version.go | 12 - .../2022-11-01/networkwatchers/README.md | 330 -- .../2022-11-01/networkwatchers/client.go | 26 - .../2022-11-01/networkwatchers/constants.go | 855 ----- .../networkwatchers/id_networkwatcher.go | 127 - .../networkwatchers/id_networkwatcher_test.go | 282 -- .../method_checkconnectivity.go | 74 - .../networkwatchers/method_createorupdate.go | 56 - .../networkwatchers/method_delete.go | 70 - .../2022-11-01/networkwatchers/method_get.go | 51 - .../method_getazurereachabilityreport.go | 74 - .../method_getflowlogstatus.go | 74 - ...ethod_getnetworkconfigurationdiagnostic.go | 74 - .../networkwatchers/method_getnexthop.go | 74 - .../networkwatchers/method_gettopology.go | 56 - .../method_gettroubleshooting.go | 74 - .../method_gettroubleshootingresult.go | 74 - .../method_getvmsecurityrules.go | 74 - .../2022-11-01/networkwatchers/method_list.go | 53 - .../networkwatchers/method_listall.go | 53 - .../method_listavailableproviders.go | 74 - .../method_setflowlogconfiguration.go | 74 - .../networkwatchers/method_updatetags.go | 55 - .../networkwatchers/method_verifyipflow.go | 74 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_availableproviderslist.go | 8 - .../model_availableproviderslistcity.go | 9 - .../model_availableproviderslistcountry.go | 10 - .../model_availableproviderslistparameters.go | 11 - .../model_availableprovidersliststate.go | 10 - .../model_azurereachabilityreport.go | 10 - .../model_azurereachabilityreportitem.go | 10 - ...odel_azurereachabilityreportlatencyinfo.go | 27 - .../model_azurereachabilityreportlocation.go | 10 - ...model_azurereachabilityreportparameters.go | 36 - .../model_connectivitydestination.go | 10 - .../networkwatchers/model_connectivityhop.go | 16 - .../model_connectivityinformation.go | 14 - .../model_connectivityissue.go | 11 - .../model_connectivityparameters.go | 12 - .../model_connectivitysource.go | 9 - .../model_effectivenetworksecurityrule.go | 22 - .../model_evaluatednetworksecuritygroup.go | 11 - .../model_flowlogformatparameters.go | 9 - .../model_flowloginformation.go | 10 - .../model_flowlogproperties.go | 11 - .../model_flowlogstatusparameters.go | 8 - .../networkwatchers/model_hoplink.go | 13 - .../model_hoplinkproperties.go | 10 - .../model_httpconfiguration.go | 10 - .../networkwatchers/model_httpheader.go | 9 - .../networkwatchers/model_matchedrule.go | 9 - ...etworkconfigurationdiagnosticparameters.go | 10 - ...l_networkconfigurationdiagnosticprofile.go | 12 - ..._networkconfigurationdiagnosticresponse.go | 8 - ...el_networkconfigurationdiagnosticresult.go | 9 - .../model_networkinterfaceassociation.go | 9 - .../model_networksecuritygroupresult.go | 9 - ...el_networksecurityrulesevaluationresult.go | 13 - .../networkwatchers/model_networkwatcher.go | 14 - .../model_networkwatcherlistresult.go | 8 - .../model_networkwatcherpropertiesformat.go | 8 - .../model_nexthopparameters.go | 11 - .../networkwatchers/model_nexthopresult.go | 10 - .../model_protocolconfiguration.go | 8 - .../model_querytroubleshootingparameters.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../model_securitygroupnetworkinterface.go | 9 - .../model_securitygroupviewparameters.go | 8 - .../model_securitygroupviewresult.go | 8 - .../networkwatchers/model_securityrule.go | 12 - .../model_securityruleassociations.go | 11 - .../model_securityrulepropertiesformat.go | 23 - .../model_subnetassociation.go | 9 - .../networkwatchers/model_subresource.go | 8 - .../networkwatchers/model_tagsobject.go | 8 - .../networkwatchers/model_topology.go | 41 - .../model_topologyassociation.go | 10 - .../model_topologyparameters.go | 10 - .../networkwatchers/model_topologyresource.go | 11 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_troubleshootingdetails.go | 12 - .../model_troubleshootingparameters.go | 9 - .../model_troubleshootingproperties.go | 9 - ...model_troubleshootingrecommendedactions.go | 11 - .../model_troubleshootingresult.go | 41 - .../model_verificationipflowparameters.go | 15 - .../model_verificationipflowresult.go | 9 - .../2022-11-01/networkwatchers/version.go | 12 - .../2022-11-01/p2svpngateways/README.md | 112 - .../2022-11-01/p2svpngateways/client.go | 26 - .../2022-11-01/p2svpngateways/constants.go | 183 -- .../method_disconnectp2svpnconnections.go | 75 - .../method_generatevpnprofile.go | 75 - .../method_getp2svpnconnectionhealth.go | 71 - ...ethod_getp2svpnconnectionhealthdetailed.go | 75 - .../2022-11-01/p2svpngateways/method_reset.go | 71 - .../p2svpngateways/method_updatetags.go | 75 - .../p2svpngateways/model_addressspace.go | 8 - .../model_p2sconnectionconfiguration.go | 11 - ...el_p2sconnectionconfigurationproperties.go | 13 - .../model_p2svpnconnectionhealth.go | 8 - .../model_p2svpnconnectionhealthrequest.go | 9 - .../model_p2svpnconnectionrequest.go | 8 - .../p2svpngateways/model_p2svpngateway.go | 14 - .../model_p2svpngatewayproperties.go | 15 - .../model_p2svpnprofileparameters.go | 8 - .../model_propagatedroutetable.go | 9 - .../model_routingconfiguration.go | 12 - .../p2svpngateways/model_staticroute.go | 10 - .../model_staticroutesconfig.go | 9 - .../p2svpngateways/model_subresource.go | 8 - .../p2svpngateways/model_tagsobject.go | 8 - .../p2svpngateways/model_vnetroute.go | 10 - .../model_vpnclientconnectionhealth.go | 11 - .../model_vpnprofileresponse.go | 8 - ...model_vpnserverconfigurationpolicygroup.go | 12 - ...vpnserverconfigurationpolicygroupmember.go | 10 - ...erverconfigurationpolicygroupproperties.go | 12 - .../2022-11-01/p2svpngateways/version.go | 12 - .../2022-11-01/packetcaptures/README.md | 105 - .../2022-11-01/packetcaptures/client.go | 26 - .../2022-11-01/packetcaptures/constants.go | 242 -- .../packetcaptures/id_networkwatcher.go | 127 - .../packetcaptures/id_networkwatcher_test.go | 282 -- .../packetcaptures/id_packetcapture.go | 140 - .../packetcaptures/id_packetcapture_test.go | 327 -- .../packetcaptures/method_create.go | 73 - .../packetcaptures/method_delete.go | 70 - .../2022-11-01/packetcaptures/method_get.go | 51 - .../packetcaptures/method_getstatus.go | 70 - .../2022-11-01/packetcaptures/method_list.go | 52 - .../2022-11-01/packetcaptures/method_stop.go | 70 - .../packetcaptures/model_packetcapture.go | 8 - .../model_packetcapturefilter.go | 12 - .../model_packetcapturelistresult.go | 8 - .../model_packetcapturemachinescope.go | 9 - .../model_packetcaptureparameters.go | 15 - .../model_packetcapturequerystatusresult.go | 31 - .../model_packetcaptureresult.go | 11 - .../model_packetcaptureresultproperties.go | 16 - .../model_packetcapturestoragelocation.go | 10 - .../2022-11-01/packetcaptures/version.go | 12 - .../README.md | 53 - .../client.go | 26 - .../constants.go | 101 - .../id_peerconnection.go | 153 - .../id_peerconnection_test.go | 372 --- .../method_get.go | 51 - .../method_list.go | 90 - ...model_peerexpressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_subresource.go | 8 - .../predicates.go | 32 - .../version.go | 12 - .../2022-11-01/privatednszonegroups/README.md | 82 - .../2022-11-01/privatednszonegroups/client.go | 26 - .../privatednszonegroups/constants.go | 57 - .../id_privatednszonegroup.go | 140 - .../id_privatednszonegroup_test.go | 327 -- .../id_privateendpoint.go | 127 - .../id_privateendpoint_test.go | 282 -- .../method_createorupdate.go | 74 - .../privatednszonegroups/method_delete.go | 71 - .../privatednszonegroups/method_get.go | 51 - .../privatednszonegroups/method_list.go | 89 - .../model_privatednszoneconfig.go | 9 - .../model_privatednszonegroup.go | 11 - ...del_privatednszonegrouppropertiesformat.go | 9 - .../model_privatednszonepropertiesformat.go | 9 - .../privatednszonegroups/model_recordset.go | 13 - .../privatednszonegroups/predicates.go | 27 - .../privatednszonegroups/version.go | 12 - .../2022-11-01/privateendpoints/README.md | 133 - .../2022-11-01/privateendpoints/client.go | 26 - .../2022-11-01/privateendpoints/constants.go | 1110 ------- .../privateendpoints/id_location.go | 114 - .../privateendpoints/id_location_test.go | 237 -- .../privateendpoints/id_privateendpoint.go | 127 - .../id_privateendpoint_test.go | 282 -- .../privateendpoints/id_providerlocation.go | 127 - .../id_providerlocation_test.go | 282 -- ...ethod_availableprivateendpointtypeslist.go | 89 - ...privateendpointtypeslistbyresourcegroup.go | 89 - .../privateendpoints/method_createorupdate.go | 74 - .../privateendpoints/method_delete.go | 71 - .../2022-11-01/privateendpoints/method_get.go | 80 - .../privateendpoints/method_list.go | 90 - .../method_listbysubscription.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_availableprivateendpointtype.go | 12 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../privateendpoints/model_ddossettings.go | 9 - .../privateendpoints/model_delegation.go | 12 - .../privateendpoints/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../privateendpoints/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../privateendpoints/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../privateendpoints/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../privateendpoints/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../privateendpoints/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../privateendpoints/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../privateendpoints/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../privateendpoints/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../privateendpoints/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../privateendpoints/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../privateendpoints/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../privateendpoints/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../privateendpoints/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-11-01/privateendpoints/predicates.go | 70 - .../2022-11-01/privateendpoints/version.go | 12 - .../2022-11-01/privatelinkservice/README.md | 37 - .../2022-11-01/privatelinkservice/client.go | 26 - .../privatelinkservice/constants.go | 1110 ------- .../id_privatelinkservice.go | 127 - .../id_privatelinkservice_test.go | 282 -- .../method_createorupdate.go | 74 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../privatelinkservice/model_ddossettings.go | 9 - .../privatelinkservice/model_delegation.go | 12 - .../privatelinkservice/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../privatelinkservice/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../privatelinkservice/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../privatelinkservice/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../privatelinkservice/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../privatelinkservice/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../privatelinkservice/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../privatelinkservice/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../privatelinkservice/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../privatelinkservice/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-11-01/privatelinkservice/version.go | 12 - .../2022-11-01/privatelinkservices/README.md | 216 -- .../2022-11-01/privatelinkservices/client.go | 26 - .../privatelinkservices/constants.go | 1110 ------- .../privatelinkservices/id_location.go | 114 - .../privatelinkservices/id_location_test.go | 237 -- .../id_privateendpointconnection.go | 140 - .../id_privateendpointconnection_test.go | 327 -- .../id_privatelinkservice.go | 127 - .../id_privatelinkservice_test.go | 282 -- .../id_providerlocation.go | 127 - .../id_providerlocation_test.go | 282 -- ...ethod_checkprivatelinkservicevisibility.go | 74 - ...atelinkservicevisibilitybyresourcegroup.go | 74 - .../privatelinkservices/method_delete.go | 71 - .../method_deleteprivateendpointconnection.go | 71 - .../privatelinkservices/method_get.go | 80 - .../method_getprivateendpointconnection.go | 80 - .../privatelinkservices/method_list.go | 90 - ...hod_listautoapprovedprivatelinkservices.go | 89 - ...rovedprivatelinkservicesbyresourcegroup.go | 89 - .../method_listbysubscription.go | 90 - .../method_listprivateendpointconnections.go | 89 - .../method_updateprivateendpointconnection.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_autoapprovedprivatelinkservice.go | 8 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - ...heckprivatelinkservicevisibilityrequest.go | 8 - .../model_customdnsconfigpropertiesformat.go | 9 - .../privatelinkservices/model_ddossettings.go | 9 - .../privatelinkservices/model_delegation.go | 12 - .../privatelinkservices/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../privatelinkservices/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../privatelinkservices/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_privatelinkservicevisibility.go | 8 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../privatelinkservices/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../privatelinkservices/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../privatelinkservices/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../privatelinkservices/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../privatelinkservices/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../privatelinkservices/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../privatelinkservices/predicates.go | 78 - .../2022-11-01/privatelinkservices/version.go | 12 - .../2022-11-01/publicipaddresses/README.md | 132 - .../2022-11-01/publicipaddresses/client.go | 26 - .../2022-11-01/publicipaddresses/constants.go | 1151 ------- .../method_createorupdate.go | 75 - .../method_ddosprotectionstatus.go | 71 - .../publicipaddresses/method_delete.go | 72 - .../publicipaddresses/method_get.go | 81 - .../publicipaddresses/method_list.go | 90 - .../publicipaddresses/method_listall.go | 90 - .../publicipaddresses/method_updatetags.go | 56 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../publicipaddresses/model_ddossettings.go | 9 - .../publicipaddresses/model_delegation.go | 12 - .../publicipaddresses/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../publicipaddresses/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../publicipaddresses/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../publicipaddresses/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../publicipaddresses/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - ...odel_publicipddosprotectionstatusresult.go | 11 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../publicipaddresses/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../publicipaddresses/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../publicipaddresses/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../publicipaddresses/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../publicipaddresses/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../publicipaddresses/model_subresource.go | 8 - .../publicipaddresses/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../publicipaddresses/predicates.go | 37 - .../2022-11-01/publicipaddresses/version.go | 12 - .../2022-11-01/publicipprefixes/README.md | 120 - .../2022-11-01/publicipprefixes/client.go | 26 - .../2022-11-01/publicipprefixes/constants.go | 215 -- .../publicipprefixes/id_publicipprefix.go | 127 - .../id_publicipprefix_test.go | 282 -- .../publicipprefixes/method_createorupdate.go | 74 - .../publicipprefixes/method_delete.go | 71 - .../2022-11-01/publicipprefixes/method_get.go | 80 - .../publicipprefixes/method_list.go | 90 - .../publicipprefixes/method_listall.go | 90 - .../publicipprefixes/method_updatetags.go | 55 - .../publicipprefixes/model_iptag.go | 9 - .../publicipprefixes/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../publicipprefixes/model_natgatewaysku.go | 8 - .../publicipprefixes/model_publicipprefix.go | 22 - .../model_publicipprefixpropertiesformat.go | 17 - .../model_publicipprefixsku.go | 9 - .../model_referencedpublicipaddress.go | 8 - .../publicipprefixes/model_subresource.go | 8 - .../publicipprefixes/model_tagsobject.go | 8 - .../2022-11-01/publicipprefixes/predicates.go | 37 - .../2022-11-01/publicipprefixes/version.go | 12 - .../2022-11-01/routefilterrules/README.md | 82 - .../2022-11-01/routefilterrules/client.go | 26 - .../2022-11-01/routefilterrules/constants.go | 136 - .../routefilterrules/id_routefilter.go | 127 - .../routefilterrules/id_routefilter_test.go | 282 -- .../routefilterrules/id_routefilterrule.go | 140 - .../id_routefilterrule_test.go | 327 -- .../routefilterrules/method_createorupdate.go | 74 - .../routefilterrules/method_delete.go | 71 - .../2022-11-01/routefilterrules/method_get.go | 51 - .../method_listbyroutefilter.go | 89 - .../routefilterrules/model_routefilterrule.go | 12 - .../model_routefilterrulepropertiesformat.go | 11 - .../2022-11-01/routefilterrules/predicates.go | 32 - .../2022-11-01/routefilterrules/version.go | 12 - .../network/2022-11-01/routefilters/README.md | 120 - .../network/2022-11-01/routefilters/client.go | 26 - .../2022-11-01/routefilters/constants.go | 353 --- .../2022-11-01/routefilters/id_routefilter.go | 127 - .../routefilters/id_routefilter_test.go | 282 -- .../routefilters/method_createorupdate.go | 74 - .../2022-11-01/routefilters/method_delete.go | 71 - .../2022-11-01/routefilters/method_get.go | 80 - .../2022-11-01/routefilters/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../routefilters/method_updatetags.go | 55 - .../model_expressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../model_expressroutecircuitpeering.go | 12 - .../model_expressroutecircuitpeeringconfig.go | 13 - ...ressroutecircuitpeeringpropertiesformat.go | 27 - .../model_expressroutecircuitstats.go | 11 - .../model_expressrouteconnectionid.go | 8 - .../model_ipv6circuitconnectionconfig.go | 9 - ...el_ipv6expressroutecircuitpeeringconfig.go | 12 - ...model_peerexpressroutecircuitconnection.go | 12 - ...sroutecircuitconnectionpropertiesformat.go | 14 - .../routefilters/model_routefilter.go | 14 - .../model_routefilterpropertiesformat.go | 11 - .../routefilters/model_routefilterrule.go | 12 - .../model_routefilterrulepropertiesformat.go | 11 - .../routefilters/model_subresource.go | 8 - .../routefilters/model_tagsobject.go | 8 - .../2022-11-01/routefilters/predicates.go | 37 - .../2022-11-01/routefilters/version.go | 12 - .../network/2022-11-01/routes/README.md | 82 - .../network/2022-11-01/routes/client.go | 26 - .../network/2022-11-01/routes/constants.go | 107 - .../network/2022-11-01/routes/id_route.go | 140 - .../2022-11-01/routes/id_route_test.go | 327 -- .../2022-11-01/routes/id_routetable.go | 127 - .../2022-11-01/routes/id_routetable_test.go | 282 -- .../routes/method_createorupdate.go | 74 - .../2022-11-01/routes/method_delete.go | 71 - .../network/2022-11-01/routes/method_get.go | 51 - .../network/2022-11-01/routes/method_list.go | 89 - .../network/2022-11-01/routes/model_route.go | 12 - .../routes/model_routepropertiesformat.go | 12 - .../network/2022-11-01/routes/predicates.go | 32 - .../network/2022-11-01/routes/version.go | 12 - .../network/2022-11-01/routetables/README.md | 120 - .../network/2022-11-01/routetables/client.go | 26 - .../2022-11-01/routetables/constants.go | 1110 ------- .../2022-11-01/routetables/id_routetable.go | 127 - .../routetables/id_routetable_test.go | 282 -- .../routetables/method_createorupdate.go | 74 - .../2022-11-01/routetables/method_delete.go | 71 - .../2022-11-01/routetables/method_get.go | 80 - .../2022-11-01/routetables/method_list.go | 90 - .../2022-11-01/routetables/method_listall.go | 90 - .../routetables/method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../routetables/model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../routetables/model_ddossettings.go | 9 - .../routetables/model_delegation.go | 12 - .../2022-11-01/routetables/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../routetables/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../routetables/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../2022-11-01/routetables/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../routetables/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../routetables/model_natgatewaysku.go | 8 - .../routetables/model_natruleportmapping.go | 10 - .../routetables/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../routetables/model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../routetables/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../routetables/model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../routetables/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../routetables/model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../routetables/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-11-01/routetables/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../routetables/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../routetables/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../2022-11-01/routetables/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../routetables/model_subresource.go | 8 - .../routetables/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../routetables/model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-11-01/routetables/predicates.go | 37 - .../network/2022-11-01/routetables/version.go | 12 - .../2022-11-01/scopeconnections/README.md | 90 - .../2022-11-01/scopeconnections/client.go | 26 - .../2022-11-01/scopeconnections/constants.go | 60 - .../scopeconnections/id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- .../scopeconnections/id_scopeconnection.go | 140 - .../id_scopeconnection_test.go | 327 -- .../scopeconnections/method_createorupdate.go | 56 - .../scopeconnections/method_delete.go | 47 - .../2022-11-01/scopeconnections/method_get.go | 51 - .../scopeconnections/method_list.go | 117 - .../scopeconnections/model_scopeconnection.go | 17 - .../model_scopeconnectionproperties.go | 11 - .../2022-11-01/scopeconnections/predicates.go | 32 - .../2022-11-01/scopeconnections/version.go | 12 - .../securityadminconfigurations/README.md | 86 - .../securityadminconfigurations/client.go | 26 - .../securityadminconfigurations/constants.go | 101 - .../id_networkmanager.go | 127 - .../id_networkmanager_test.go | 282 -- .../id_securityadminconfiguration.go | 140 - .../id_securityadminconfiguration_test.go | 327 -- .../method_createorupdate.go | 56 - .../method_delete.go | 99 - .../securityadminconfigurations/method_get.go | 51 - .../method_list.go | 117 - .../model_securityadminconfiguration.go | 17 - ...urityadminconfigurationpropertiesformat.go | 10 - .../securityadminconfigurations/predicates.go | 32 - .../securityadminconfigurations/version.go | 12 - .../securitypartnerproviders/README.md | 120 - .../securitypartnerproviders/client.go | 26 - .../securitypartnerproviders/constants.go | 148 - .../id_securitypartnerprovider.go | 127 - .../id_securitypartnerprovider_test.go | 282 -- .../method_createorupdate.go | 74 - .../securitypartnerproviders/method_delete.go | 71 - .../securitypartnerproviders/method_get.go | 51 - .../securitypartnerproviders/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_updatetags.go | 55 - .../model_securitypartnerprovider.go | 14 - ...securitypartnerproviderpropertiesformat.go | 11 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../securitypartnerproviders/predicates.go | 37 - .../securitypartnerproviders/version.go | 12 - .../2022-11-01/securityrules/README.md | 115 - .../2022-11-01/securityrules/client.go | 26 - .../2022-11-01/securityrules/constants.go | 192 -- .../securityrules/id_defaultsecurityrule.go | 140 - .../id_defaultsecurityrule_test.go | 327 -- .../securityrules/id_networksecuritygroup.go | 127 - .../id_networksecuritygroup_test.go | 282 -- .../securityrules/id_securityrule.go | 140 - .../securityrules/id_securityrule_test.go | 327 -- .../securityrules/method_createorupdate.go | 74 - .../method_defaultsecurityrulesget.go | 51 - .../method_defaultsecurityruleslist.go | 89 - .../2022-11-01/securityrules/method_delete.go | 71 - .../2022-11-01/securityrules/method_get.go | 51 - .../2022-11-01/securityrules/method_list.go | 89 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../securityrules/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../2022-11-01/securityrules/predicates.go | 32 - .../2022-11-01/securityrules/version.go | 12 - .../serviceendpointpolicies/README.md | 120 - .../serviceendpointpolicies/client.go | 26 - .../serviceendpointpolicies/constants.go | 1110 ------- .../id_serviceendpointpolicy.go | 127 - .../id_serviceendpointpolicy_test.go | 282 -- .../method_createorupdate.go | 74 - .../serviceendpointpolicies/method_delete.go | 71 - .../serviceendpointpolicies/method_get.go | 80 - .../serviceendpointpolicies/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../model_delegation.go | 12 - .../serviceendpointpolicies/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../serviceendpointpolicies/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../serviceendpointpolicies/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../serviceendpointpolicies/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../serviceendpointpolicies/predicates.go | 42 - .../serviceendpointpolicies/version.go | 12 - .../README.md | 82 - .../client.go | 26 - .../constants.go | 57 - .../id_serviceendpointpolicy.go | 127 - .../id_serviceendpointpolicy_test.go | 282 -- .../id_serviceendpointpolicydefinition.go | 140 - ...id_serviceendpointpolicydefinition_test.go | 327 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_listbyresourcegroup.go | 89 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - .../predicates.go | 32 - .../version.go | 12 - .../network/2022-11-01/servicetags/README.md | 53 - .../network/2022-11-01/servicetags/client.go | 26 - .../2022-11-01/servicetags/id_location.go | 114 - .../servicetags/id_location_test.go | 237 -- .../method_servicetaginformationlist.go | 121 - .../servicetags/method_servicetagslist.go | 52 - .../model_servicetaginformation.go | 11 - ...l_servicetaginformationpropertiesformat.go | 12 - .../model_servicetagslistresult.go | 14 - .../2022-11-01/servicetags/predicates.go | 27 - .../network/2022-11-01/servicetags/version.go | 12 - .../2022-11-01/staticmembers/README.md | 90 - .../2022-11-01/staticmembers/client.go | 26 - .../2022-11-01/staticmembers/constants.go | 57 - .../staticmembers/id_networkgroup.go | 140 - .../staticmembers/id_networkgroup_test.go | 327 -- .../staticmembers/id_staticmember.go | 153 - .../staticmembers/id_staticmember_test.go | 372 --- .../staticmembers/method_createorupdate.go | 56 - .../2022-11-01/staticmembers/method_delete.go | 47 - .../2022-11-01/staticmembers/method_get.go | 51 - .../2022-11-01/staticmembers/method_list.go | 117 - .../staticmembers/model_staticmember.go | 17 - .../model_staticmemberproperties.go | 10 - .../2022-11-01/staticmembers/predicates.go | 32 - .../2022-11-01/staticmembers/version.go | 12 - .../network/2022-11-01/subnets/README.md | 82 - .../network/2022-11-01/subnets/client.go | 26 - .../network/2022-11-01/subnets/constants.go | 1110 ------- .../subnets/method_createorupdate.go | 75 - .../2022-11-01/subnets/method_delete.go | 72 - .../network/2022-11-01/subnets/method_get.go | 81 - .../network/2022-11-01/subnets/method_list.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../subnets/model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../subnets/model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../2022-11-01/subnets/model_ddossettings.go | 9 - .../2022-11-01/subnets/model_delegation.go | 12 - .../2022-11-01/subnets/model_flowlog.go | 14 - .../subnets/model_flowlogformatparameters.go | 9 - .../subnets/model_flowlogpropertiesformat.go | 15 - .../subnets/model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../subnets/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../subnets/model_ipconfiguration.go | 11 - .../subnets/model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../network/2022-11-01/subnets/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../2022-11-01/subnets/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../2022-11-01/subnets/model_natgatewaysku.go | 8 - .../subnets/model_natruleportmapping.go | 10 - .../subnets/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../subnets/model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../subnets/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../subnets/model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../subnets/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../subnets/model_publicipaddresssku.go | 9 - .../subnets/model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../2022-11-01/subnets/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../network/2022-11-01/subnets/model_route.go | 12 - .../subnets/model_routepropertiesformat.go | 12 - .../2022-11-01/subnets/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../2022-11-01/subnets/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../subnets/model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../subnets/model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../2022-11-01/subnets/model_subnet.go | 12 - .../subnets/model_subnetpropertiesformat.go | 26 - .../2022-11-01/subnets/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../subnets/model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../network/2022-11-01/subnets/predicates.go | 32 - .../network/2022-11-01/subnets/version.go | 12 - .../2022-11-01/trafficanalytics/README.md | 54 - .../2022-11-01/trafficanalytics/client.go | 26 - .../2022-11-01/trafficanalytics/constants.go | 48 - .../trafficanalytics/id_networkwatcher.go | 127 - .../id_networkwatcher_test.go | 282 -- .../method_networkwatchersgetflowlogstatus.go | 74 - ..._networkwatcherssetflowlogconfiguration.go | 74 - .../model_flowlogformatparameters.go | 9 - .../model_flowloginformation.go | 10 - .../model_flowlogproperties.go | 11 - .../model_flowlogstatusparameters.go | 8 - .../model_retentionpolicyparameters.go | 9 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../2022-11-01/trafficanalytics/version.go | 12 - .../network/2022-11-01/usages/README.md | 37 - .../network/2022-11-01/usages/client.go | 26 - .../network/2022-11-01/usages/constants.go | 48 - .../network/2022-11-01/usages/id_location.go | 114 - .../2022-11-01/usages/id_location_test.go | 237 -- .../network/2022-11-01/usages/method_list.go | 89 - .../network/2022-11-01/usages/model_usage.go | 12 - .../2022-11-01/usages/model_usagename.go | 9 - .../network/2022-11-01/usages/predicates.go | 27 - .../network/2022-11-01/usages/version.go | 12 - .../network/2022-11-01/vipswap/README.md | 69 - .../network/2022-11-01/vipswap/client.go | 26 - .../network/2022-11-01/vipswap/constants.go | 51 - .../2022-11-01/vipswap/id_cloudservice.go | 127 - .../vipswap/id_cloudservice_test.go | 282 -- .../2022-11-01/vipswap/method_create.go | 74 - .../network/2022-11-01/vipswap/method_get.go | 52 - .../network/2022-11-01/vipswap/method_list.go | 52 - .../2022-11-01/vipswap/model_swapresource.go | 11 - .../vipswap/model_swapresourcelistresult.go | 8 - .../vipswap/model_swapresourceproperties.go | 8 - .../network/2022-11-01/vipswap/version.go | 12 - .../virtualappliancesites/README.md | 82 - .../virtualappliancesites/client.go | 26 - .../virtualappliancesites/constants.go | 57 - .../id_networkvirtualappliance.go | 127 - .../id_networkvirtualappliance_test.go | 282 -- .../id_virtualappliancesite.go | 140 - .../id_virtualappliancesite_test.go | 327 -- .../method_createorupdate.go | 74 - .../virtualappliancesites/method_delete.go | 71 - .../virtualappliancesites/method_get.go | 51 - .../virtualappliancesites/method_list.go | 89 - .../model_breakoutcategorypolicies.go | 10 - .../model_office365policyproperties.go | 8 - .../model_virtualappliancesite.go | 12 - .../model_virtualappliancesiteproperties.go | 10 - .../virtualappliancesites/predicates.go | 32 - .../virtualappliancesites/version.go | 12 - .../2022-11-01/virtualapplianceskus/README.md | 53 - .../2022-11-01/virtualapplianceskus/client.go | 26 - .../id_networkvirtualappliancesku.go | 114 - .../id_networkvirtualappliancesku_test.go | 237 -- .../virtualapplianceskus/method_get.go | 51 - .../virtualapplianceskus/method_list.go | 90 - .../model_networkvirtualappliancesku.go | 14 - ...del_networkvirtualapplianceskuinstances.go | 9 - ...workvirtualapplianceskupropertiesformat.go | 10 - .../virtualapplianceskus/predicates.go | 37 - .../virtualapplianceskus/version.go | 12 - .../README.md | 207 -- .../client.go | 26 - .../constants.go | 1137 ------- .../id_connection.go | 127 - .../id_connection_test.go | 282 -- .../method_createorupdate.go | 74 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_getikesas.go | 70 - .../method_getsharedkey.go | 52 - .../method_list.go | 90 - .../method_resetconnection.go | 69 - .../method_resetsharedkey.go | 74 - .../method_setsharedkey.go | 74 - .../method_startpacketcapture.go | 74 - .../method_stoppacketcapture.go | 74 - .../method_updatetags.go | 74 - .../model_addressspace.go | 8 - .../model_bgpsettings.go | 11 - .../model_connectionresetsharedkey.go | 8 - .../model_connectionsharedkey.go | 9 - ...atewaycustombgpipaddressipconfiguration.go | 9 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_ipsecpolicy.go | 15 - .../model_localnetworkgateway.go | 14 - ...del_localnetworkgatewaypropertiesformat.go | 13 - .../model_radiusserver.go | 10 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../model_trafficselectorpolicy.go | 9 - .../model_tunnelconnectionhealth.go | 12 - .../model_virtualnetworkgateway.go | 19 - .../model_virtualnetworkgatewayconnection.go | 14 - ...etworkgatewayconnectionpropertiesformat.go | 34 - ...el_virtualnetworkgatewayipconfiguration.go | 11 - ...kgatewayipconfigurationpropertiesformat.go | 12 - .../model_virtualnetworkgatewaynatrule.go | 12 - ..._virtualnetworkgatewaynatruleproperties.go | 13 - .../model_virtualnetworkgatewaypolicygroup.go | 11 - ..._virtualnetworkgatewaypolicygroupmember.go | 10 - ...tualnetworkgatewaypolicygroupproperties.go | 12 - ...l_virtualnetworkgatewaypropertiesformat.go | 30 - .../model_virtualnetworkgatewaysku.go | 10 - .../model_vngclientconnectionconfiguration.go | 11 - ...clientconnectionconfigurationproperties.go | 10 - .../model_vpnclientconfiguration.go | 20 - .../model_vpnclientrevokedcertificate.go | 11 - ...lientrevokedcertificatepropertiesformat.go | 9 - .../model_vpnclientrootcertificate.go | 11 - ...pnclientrootcertificatepropertiesformat.go | 9 - .../model_vpnnatrulemapping.go | 9 - .../model_vpnpacketcapturestartparameters.go | 8 - .../model_vpnpacketcapturestopparameters.go | 8 - .../predicates.go | 37 - .../version.go | 12 - .../virtualnetworkgateways/README.md | 413 --- .../virtualnetworkgateways/client.go | 26 - .../virtualnetworkgateways/constants.go | 1269 -------- .../virtualnetworkgateways/id_connection.go | 127 - .../id_connection_test.go | 282 -- .../id_virtualnetworkgateway.go | 127 - .../id_virtualnetworkgateway_test.go | 282 -- .../id_virtualnetworkgatewaynatrule.go | 140 - .../id_virtualnetworkgatewaynatrule_test.go | 327 -- .../method_createorupdate.go | 74 - .../virtualnetworkgateways/method_delete.go | 71 - ...nectvirtualnetworkgatewayvpnconnections.go | 74 - .../method_generatevpnclientpackage.go | 74 - .../method_generatevpnprofile.go | 74 - .../virtualnetworkgateways/method_get.go | 51 - .../method_getadvertisedroutes.go | 98 - .../method_getbgppeerstatus.go | 98 - .../method_getlearnedroutes.go | 70 - .../method_getvpnclientconnectionhealth.go | 70 - .../method_getvpnclientipsecparameters.go | 69 - .../method_getvpnprofilepackageurl.go | 70 - .../virtualnetworkgateways/method_list.go | 90 - .../method_listconnections.go | 89 - .../virtualnetworkgateways/method_reset.go | 98 - .../method_resetvpnclientsharedkey.go | 70 - .../method_setvpnclientipsecparameters.go | 74 - .../method_startpacketcapture.go | 74 - .../method_stoppacketcapture.go | 74 - .../method_supportedvpndevices.go | 52 - .../method_updatetags.go | 74 - ...ualnetworkgatewaynatrulescreateorupdate.go | 74 - ...hod_virtualnetworkgatewaynatrulesdelete.go | 71 - ...method_virtualnetworkgatewaynatrulesget.go | 51 - ...ewaynatruleslistbyvirtualnetworkgateway.go | 89 - .../method_vpndeviceconfigurationscript.go | 56 - .../model_addressspace.go | 8 - .../model_bgppeerstatus.go | 15 - .../model_bgppeerstatuslistresult.go | 8 - .../model_bgpsettings.go | 11 - ...atewaycustombgpipaddressipconfiguration.go | 9 - .../model_gatewayroute.go | 14 - .../model_gatewayroutelistresult.go | 8 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_ipsecpolicy.go | 15 - .../model_p2svpnconnectionrequest.go | 8 - .../model_radiusserver.go | 10 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../model_trafficselectorpolicy.go | 9 - .../model_tunnelconnectionhealth.go | 12 - ...irtualnetworkconnectiongatewayreference.go | 8 - .../model_virtualnetworkgateway.go | 19 - ...rtualnetworkgatewayconnectionlistentity.go | 14 - ...wayconnectionlistentitypropertiesformat.go | 30 - ...el_virtualnetworkgatewayipconfiguration.go | 11 - ...kgatewayipconfigurationpropertiesformat.go | 12 - .../model_virtualnetworkgatewaynatrule.go | 12 - ..._virtualnetworkgatewaynatruleproperties.go | 13 - .../model_virtualnetworkgatewaypolicygroup.go | 11 - ..._virtualnetworkgatewaypolicygroupmember.go | 10 - ...tualnetworkgatewaypolicygroupproperties.go | 12 - ...l_virtualnetworkgatewaypropertiesformat.go | 30 - .../model_virtualnetworkgatewaysku.go | 10 - .../model_vngclientconnectionconfiguration.go | 11 - ...clientconnectionconfigurationproperties.go | 10 - .../model_vpnclientconfiguration.go | 20 - .../model_vpnclientconnectionhealthdetail.go | 19 - ...nclientconnectionhealthdetaillistresult.go | 8 - .../model_vpnclientipsecparameters.go | 15 - .../model_vpnclientparameters.go | 11 - .../model_vpnclientrevokedcertificate.go | 11 - ...lientrevokedcertificatepropertiesformat.go | 9 - .../model_vpnclientrootcertificate.go | 11 - ...pnclientrootcertificatepropertiesformat.go | 9 - .../model_vpndevicescriptparameters.go | 10 - .../model_vpnnatrulemapping.go | 9 - .../model_vpnpacketcapturestartparameters.go | 8 - .../model_vpnpacketcapturestopparameters.go | 8 - .../virtualnetworkgateways/predicates.go | 98 - .../virtualnetworkgateways/version.go | 12 - .../virtualnetworkpeerings/README.md | 82 - .../virtualnetworkpeerings/client.go | 26 - .../virtualnetworkpeerings/constants.go | 227 -- .../id_virtualnetworkpeering.go | 140 - .../id_virtualnetworkpeering_test.go | 327 -- .../method_createorupdate.go | 102 - .../virtualnetworkpeerings/method_delete.go | 71 - .../virtualnetworkpeerings/method_get.go | 51 - .../virtualnetworkpeerings/method_list.go | 90 - .../model_addressspace.go | 8 - .../model_subresource.go | 8 - .../model_virtualnetworkbgpcommunities.go | 9 - .../model_virtualnetworkencryption.go | 9 - .../model_virtualnetworkpeering.go | 12 - ...l_virtualnetworkpeeringpropertiesformat.go | 21 - .../virtualnetworkpeerings/predicates.go | 32 - .../virtualnetworkpeerings/version.go | 12 - .../2022-11-01/virtualnetworks/README.md | 236 -- .../2022-11-01/virtualnetworks/client.go | 26 - .../2022-11-01/virtualnetworks/constants.go | 1283 -------- .../virtualnetworks/method_createorupdate.go | 75 - .../virtualnetworks/method_delete.go | 72 - .../2022-11-01/virtualnetworks/method_get.go | 81 - .../2022-11-01/virtualnetworks/method_list.go | 90 - .../virtualnetworks/method_listall.go | 90 - .../method_resourcenavigationlinkslist.go | 53 - .../method_serviceassociationlinkslist.go | 53 - .../method_subnetspreparenetworkpolicies.go | 75 - .../method_subnetsunpreparenetworkpolicies.go | 75 - .../virtualnetworks/method_updatetags.go | 56 - ...rtualnetworkscheckipaddressavailability.go | 81 - ...virtualnetworkslistddosprotectionstatus.go | 117 - .../method_virtualnetworkslistusage.go | 90 - .../virtualnetworks/model_addressspace.go | 8 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../virtualnetworks/model_ddossettings.go | 9 - .../virtualnetworks/model_delegation.go | 12 - .../virtualnetworks/model_dhcpoptions.go | 8 - .../virtualnetworks/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../virtualnetworks/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipaddressavailabilityresult.go | 10 - .../virtualnetworks/model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../2022-11-01/virtualnetworks/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../virtualnetworks/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../virtualnetworks/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkintentpolicy.go | 13 - .../model_networkintentpolicyconfiguration.go | 9 - .../virtualnetworks/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_preparenetworkpoliciesrequest.go | 9 - .../virtualnetworks/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../virtualnetworks/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - ...odel_publicipddosprotectionstatusresult.go | 11 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - ...model_resourcenavigationlinkslistresult.go | 9 - .../virtualnetworks/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-11-01/virtualnetworks/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../virtualnetworks/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../virtualnetworks/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_serviceassociationlinkslistresult.go | 9 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../virtualnetworks/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../virtualnetworks/model_subresource.go | 8 - .../virtualnetworks/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_unpreparenetworkpoliciesrequest.go | 8 - .../virtualnetworks/model_virtualnetwork.go | 19 - .../model_virtualnetworkbgpcommunities.go | 9 - .../model_virtualnetworkencryption.go | 9 - .../model_virtualnetworkpeering.go | 12 - ...l_virtualnetworkpeeringpropertiesformat.go | 21 - .../model_virtualnetworkpropertiesformat.go | 21 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../model_virtualnetworkusage.go | 12 - .../model_virtualnetworkusagename.go | 9 - .../2022-11-01/virtualnetworks/predicates.go | 88 - .../2022-11-01/virtualnetworks/version.go | 12 - .../2022-11-01/virtualnetworktap/README.md | 86 - .../2022-11-01/virtualnetworktap/client.go | 26 - .../2022-11-01/virtualnetworktap/constants.go | 1110 ------- .../virtualnetworktap/id_virtualnetworktap.go | 127 - .../id_virtualnetworktap_test.go | 282 -- .../method_createorupdate.go | 74 - .../virtualnetworktap/method_delete.go | 71 - .../virtualnetworktap/method_get.go | 51 - .../virtualnetworktap/method_updatetags.go | 55 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../virtualnetworktap/model_ddossettings.go | 9 - .../virtualnetworktap/model_delegation.go | 12 - .../virtualnetworktap/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../virtualnetworktap/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../virtualnetworktap/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../virtualnetworktap/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../virtualnetworktap/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../virtualnetworktap/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../virtualnetworktap/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../virtualnetworktap/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../virtualnetworktap/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../virtualnetworktap/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../virtualnetworktap/model_subresource.go | 8 - .../virtualnetworktap/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../2022-11-01/virtualnetworktap/version.go | 12 - .../2022-11-01/virtualnetworktaps/README.md | 54 - .../2022-11-01/virtualnetworktaps/client.go | 26 - .../virtualnetworktaps/constants.go | 1110 ------- .../virtualnetworktaps/method_listall.go | 90 - .../method_listbyresourcegroup.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../virtualnetworktaps/model_ddossettings.go | 9 - .../virtualnetworktaps/model_delegation.go | 12 - .../virtualnetworktaps/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../virtualnetworktaps/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../virtualnetworktaps/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../virtualnetworktaps/model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../virtualnetworktaps/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../virtualnetworktaps/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../virtualnetworktaps/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../virtualnetworktaps/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../virtualnetworktaps/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../virtualnetworktaps/model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../virtualnetworktaps/predicates.go | 37 - .../2022-11-01/virtualnetworktaps/version.go | 12 - .../virtualrouterpeerings/README.md | 82 - .../virtualrouterpeerings/client.go | 26 - .../virtualrouterpeerings/constants.go | 57 - .../virtualrouterpeerings/id_virtualrouter.go | 127 - .../id_virtualrouter_test.go | 282 -- .../method_createorupdate.go | 75 - .../virtualrouterpeerings/method_delete.go | 72 - .../virtualrouterpeerings/method_get.go | 52 - .../virtualrouterpeerings/method_list.go | 89 - .../model_virtualrouterpeering.go | 12 - .../model_virtualrouterpeeringproperties.go | 10 - .../virtualrouterpeerings/predicates.go | 32 - .../virtualrouterpeerings/version.go | 12 - .../2022-11-01/virtualrouters/README.md | 99 - .../2022-11-01/virtualrouters/client.go | 26 - .../2022-11-01/virtualrouters/constants.go | 57 - .../virtualrouters/id_virtualrouter.go | 127 - .../virtualrouters/id_virtualrouter_test.go | 282 -- .../virtualrouters/method_createorupdate.go | 74 - .../virtualrouters/method_delete.go | 71 - .../2022-11-01/virtualrouters/method_get.go | 80 - .../2022-11-01/virtualrouters/method_list.go | 90 - .../method_listbyresourcegroup.go | 90 - .../virtualrouters/model_subresource.go | 8 - .../virtualrouters/model_virtualrouter.go | 14 - .../model_virtualrouterpropertiesformat.go | 13 - .../2022-11-01/virtualrouters/predicates.go | 37 - .../2022-11-01/virtualrouters/version.go | 12 - .../network/2022-11-01/virtualwans/README.md | 1467 --------- .../network/2022-11-01/virtualwans/client.go | 26 - .../2022-11-01/virtualwans/constants.go | 2294 -------------- .../id_configurationpolicygroup.go | 140 - .../id_configurationpolicygroup_test.go | 327 -- .../virtualwans/id_hubroutetable.go | 140 - .../virtualwans/id_hubroutetable_test.go | 327 -- .../id_hubvirtualnetworkconnection.go | 140 - .../id_hubvirtualnetworkconnection_test.go | 327 -- .../2022-11-01/virtualwans/id_natrule.go | 140 - .../2022-11-01/virtualwans/id_natrule_test.go | 327 -- .../virtualwans/id_networkvirtualappliance.go | 127 - .../id_networkvirtualappliance_test.go | 282 -- .../id_networkvirtualapplianceconnection.go | 140 - ..._networkvirtualapplianceconnection_test.go | 327 -- .../2022-11-01/virtualwans/id_routemap.go | 140 - .../virtualwans/id_routemap_test.go | 327 -- .../virtualwans/id_routingintent.go | 140 - .../virtualwans/id_routingintent_test.go | 327 -- .../2022-11-01/virtualwans/id_virtualhub.go | 127 - .../virtualwans/id_virtualhub_test.go | 282 -- .../virtualwans/id_virtualhubroutetable.go | 140 - .../id_virtualhubroutetable_test.go | 327 -- .../2022-11-01/virtualwans/id_virtualwan.go | 127 - .../virtualwans/id_virtualwan_test.go | 282 -- .../2022-11-01/virtualwans/id_vpngateway.go | 127 - .../virtualwans/id_vpngateway_test.go | 282 -- .../virtualwans/id_vpnlinkconnection.go | 153 - .../virtualwans/id_vpnlinkconnection_test.go | 372 --- .../virtualwans/id_vpnserverconfiguration.go | 127 - .../id_vpnserverconfiguration_test.go | 282 -- .../2022-11-01/virtualwans/id_vpnsite.go | 127 - .../2022-11-01/virtualwans/id_vpnsite_test.go | 282 -- .../2022-11-01/virtualwans/id_vpnsitelink.go | 140 - .../virtualwans/id_vpnsitelink_test.go | 327 -- ...configurationpolicygroupscreateorupdate.go | 74 - .../method_configurationpolicygroupsdelete.go | 71 - .../method_configurationpolicygroupsget.go | 51 - ...olicygroupslistbyvpnserverconfiguration.go | 89 - ...tualwanvpnserverconfigurationvpnprofile.go | 74 - .../method_hubroutetablescreateorupdate.go | 74 - .../method_hubroutetablesdelete.go | 71 - .../virtualwans/method_hubroutetablesget.go | 51 - .../virtualwans/method_hubroutetableslist.go | 89 - ...virtualnetworkconnectionscreateorupdate.go | 74 - ...thod_hubvirtualnetworkconnectionsdelete.go | 71 - .../method_hubvirtualnetworkconnectionsget.go | 51 - ...method_hubvirtualnetworkconnectionslist.go | 89 - .../method_natrulescreateorupdate.go | 74 - .../virtualwans/method_natrulesdelete.go | 71 - .../virtualwans/method_natrulesget.go | 51 - .../method_natruleslistbyvpngateway.go | 89 - ...rtualapplianceconnectionscreateorupdate.go | 74 - ...etworkvirtualapplianceconnectionsdelete.go | 71 - ...d_networkvirtualapplianceconnectionsget.go | 51 - ..._networkvirtualapplianceconnectionslist.go | 89 - .../method_p2svpngatewayscreateorupdate.go | 75 - .../method_p2svpngatewaysdelete.go | 72 - .../virtualwans/method_p2svpngatewaysget.go | 52 - .../virtualwans/method_p2svpngatewayslist.go | 90 - ...ethod_p2svpngatewayslistbyresourcegroup.go | 90 - .../method_routemapscreateorupdate.go | 74 - .../virtualwans/method_routemapsdelete.go | 71 - .../virtualwans/method_routemapsget.go | 51 - .../virtualwans/method_routemapslist.go | 89 - .../method_routingintentcreateorupdate.go | 74 - .../virtualwans/method_routingintentdelete.go | 71 - .../virtualwans/method_routingintentget.go | 51 - .../virtualwans/method_routingintentlist.go | 89 - .../method_supportedsecurityproviders.go | 52 - .../virtualwans/method_updatetags.go | 55 - ...d_virtualhubbgpconnectioncreateorupdate.go | 75 - .../method_virtualhubbgpconnectiondelete.go | 72 - .../method_virtualhubbgpconnectionget.go | 52 - .../method_virtualhubbgpconnectionslist.go | 89 - ...alhubbgpconnectionslistadvertisedroutes.go | 71 - ...rtualhubbgpconnectionslistlearnedroutes.go | 71 - ...virtualhubipconfigurationcreateorupdate.go | 75 - .../method_virtualhubipconfigurationdelete.go | 72 - .../method_virtualhubipconfigurationget.go | 52 - .../method_virtualhubipconfigurationlist.go | 89 - ...d_virtualhubroutetablev2screateorupdate.go | 74 - .../method_virtualhubroutetablev2sdelete.go | 71 - .../method_virtualhubroutetablev2sget.go | 51 - .../method_virtualhubroutetablev2slist.go | 89 - .../method_virtualhubscreateorupdate.go | 74 - .../virtualwans/method_virtualhubsdelete.go | 71 - .../virtualwans/method_virtualhubsget.go | 51 - ...virtualhubsgeteffectivevirtualhubroutes.go | 74 - .../method_virtualhubsgetinboundroutes.go | 74 - .../method_virtualhubsgetoutboundroutes.go | 74 - .../virtualwans/method_virtualhubslist.go | 90 - .../method_virtualhubslistbyresourcegroup.go | 90 - .../method_virtualhubsupdatetags.go | 55 - .../method_virtualwanscreateorupdate.go | 74 - .../virtualwans/method_virtualwansdelete.go | 71 - .../virtualwans/method_virtualwansget.go | 51 - .../virtualwans/method_virtualwanslist.go | 90 - .../method_virtualwanslistbyresourcegroup.go | 90 - .../method_vpnconnectionscreateorupdate.go | 75 - .../method_vpnconnectionsdelete.go | 72 - .../virtualwans/method_vpnconnectionsget.go | 52 - .../method_vpnconnectionslistbyvpngateway.go | 89 - ...method_vpnconnectionsstartpacketcapture.go | 75 - .../method_vpnconnectionsstoppacketcapture.go | 75 - .../method_vpngatewayscreateorupdate.go | 74 - .../virtualwans/method_vpngatewaysdelete.go | 71 - .../virtualwans/method_vpngatewaysget.go | 51 - .../virtualwans/method_vpngatewayslist.go | 90 - .../method_vpngatewayslistbyresourcegroup.go | 90 - .../method_vpnlinkconnectionsgetikesas.go | 70 - ...d_vpnlinkconnectionslistbyvpnconnection.go | 90 - ...figurationsassociatedwithvirtualwanlist.go | 70 - ...d_vpnserverconfigurationscreateorupdate.go | 74 - .../method_vpnserverconfigurationsdelete.go | 71 - .../method_vpnserverconfigurationsget.go | 51 - .../method_vpnserverconfigurationslist.go | 90 - ...serverconfigurationslistbyresourcegroup.go | 90 - .../method_vpnsitelinkconnectionsget.go | 51 - .../virtualwans/method_vpnsitelinksget.go | 51 - .../method_vpnsitelinkslistbyvpnsite.go | 89 - .../method_vpnsitesconfigurationdownload.go | 74 - .../method_vpnsitescreateorupdate.go | 74 - .../virtualwans/method_vpnsitesdelete.go | 71 - .../virtualwans/method_vpnsitesget.go | 51 - .../virtualwans/method_vpnsiteslist.go | 90 - .../method_vpnsiteslistbyresourcegroup.go | 90 - .../model_aadauthenticationparameters.go | 10 - .../2022-11-01/virtualwans/model_action.go | 9 - .../virtualwans/model_addressspace.go | 8 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../virtualwans/model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../virtualwans/model_bgpconnection.go | 12 - .../model_bgpconnectionproperties.go | 12 - .../virtualwans/model_bgpsettings.go | 11 - .../2022-11-01/virtualwans/model_criterion.go | 11 - .../model_customdnsconfigpropertiesformat.go | 9 - .../virtualwans/model_ddossettings.go | 9 - .../virtualwans/model_delegation.go | 12 - .../virtualwans/model_deviceproperties.go | 10 - .../model_effectiveroutemaproute.go | 10 - .../model_effectiveroutemaproutelist.go | 8 - .../model_effectiveroutesparameters.go | 9 - .../2022-11-01/virtualwans/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...atewaycustombgpipaddressipconfiguration.go | 9 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_getinboundroutesparameters.go | 9 - .../model_getoutboundroutesparameters.go | 9 - .../model_getvpnsitesconfigurationrequest.go | 9 - .../virtualwans/model_hubipconfiguration.go | 12 - ...odel_hubipconfigurationpropertiesformat.go | 12 - .../2022-11-01/virtualwans/model_hubroute.go | 12 - .../virtualwans/model_hubroutetable.go | 12 - .../model_hubroutetableproperties.go | 12 - .../model_hubvirtualnetworkconnection.go | 11 - ...l_hubvirtualnetworkconnectionproperties.go | 13 - .../virtualwans/model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../virtualwans/model_ipconfiguration.go | 11 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../virtualwans/model_ipsecpolicy.go | 15 - .../2022-11-01/virtualwans/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../virtualwans/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../virtualwans/model_natgatewaysku.go | 8 - .../virtualwans/model_natruleportmapping.go | 10 - .../virtualwans/model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../virtualwans/model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - ...model_networkvirtualapplianceconnection.go | 10 - ...orkvirtualapplianceconnectionproperties.go | 14 - .../model_o365breakoutcategorypolicies.go | 10 - .../virtualwans/model_o365policyproperties.go | 8 - .../model_p2sconnectionconfiguration.go | 11 - ...el_p2sconnectionconfigurationproperties.go | 13 - .../virtualwans/model_p2svpngateway.go | 14 - .../model_p2svpngatewayproperties.go | 15 - .../2022-11-01/virtualwans/model_parameter.go | 10 - .../2022-11-01/virtualwans/model_peerroute.go | 14 - .../virtualwans/model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../virtualwans/model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../virtualwans/model_propagatedroutetable.go | 9 - .../model_propagatedroutetablenfv.go | 9 - .../virtualwans/model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../virtualwans/model_publicipaddresssku.go | 9 - .../virtualwans/model_radiusserver.go | 10 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../virtualwans/model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../2022-11-01/virtualwans/model_route.go | 12 - .../2022-11-01/virtualwans/model_routemap.go | 12 - .../virtualwans/model_routemapproperties.go | 11 - .../virtualwans/model_routemaprule.go | 11 - .../model_routepropertiesformat.go | 12 - .../virtualwans/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../virtualwans/model_routingconfiguration.go | 12 - .../model_routingconfigurationnfv.go | 11 - ...odel_routingconfigurationnfvsubresource.go | 8 - .../virtualwans/model_routingintent.go | 12 - .../model_routingintentproperties.go | 9 - .../virtualwans/model_routingpolicy.go | 10 - .../virtualwans/model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../virtualwans/model_staticroute.go | 10 - .../virtualwans/model_staticroutesconfig.go | 9 - .../2022-11-01/virtualwans/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../virtualwans/model_subresource.go | 8 - .../virtualwans/model_tagsobject.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_trafficselectorpolicy.go | 9 - .../virtualwans/model_virtualhub.go | 15 - .../model_virtualhubeffectiveroute.go | 12 - .../model_virtualhubeffectiveroutelist.go | 8 - .../virtualwans/model_virtualhubproperties.go | 29 - .../virtualwans/model_virtualhubroute.go | 9 - .../virtualwans/model_virtualhubroutetable.go | 8 - .../model_virtualhubroutetablev2.go | 11 - .../model_virtualhubroutetablev2properties.go | 10 - .../virtualwans/model_virtualhubroutev2.go | 11 - .../virtualwans/model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - ...del_virtualrouterautoscaleconfiguration.go | 8 - .../virtualwans/model_virtualwan.go | 14 - .../virtualwans/model_virtualwanproperties.go | 15 - .../model_virtualwansecurityprovider.go | 10 - .../model_virtualwansecurityproviders.go | 8 - .../model_virtualwanvpnprofileparameters.go | 9 - .../2022-11-01/virtualwans/model_vnetroute.go | 10 - .../model_vpnclientconnectionhealth.go | 11 - .../virtualwans/model_vpnconnection.go | 11 - ...nconnectionpacketcapturestartparameters.go | 9 - ...pnconnectionpacketcapturestopparameters.go | 9 - .../model_vpnconnectionproperties.go | 26 - .../virtualwans/model_vpngateway.go | 14 - .../model_vpngatewayipconfiguration.go | 10 - .../virtualwans/model_vpngatewaynatrule.go | 12 - .../model_vpngatewaynatruleproperties.go | 15 - .../virtualwans/model_vpngatewayproperties.go | 16 - .../virtualwans/model_vpnlinkbgpsettings.go | 9 - .../model_vpnlinkproviderproperties.go | 9 - .../virtualwans/model_vpnnatrulemapping.go | 9 - .../virtualwans/model_vpnprofileresponse.go | 8 - ...serverconfigradiusclientrootcertificate.go | 9 - ...serverconfigradiusserverrootcertificate.go | 9 - .../model_vpnserverconfiguration.go | 14 - ...model_vpnserverconfigurationpolicygroup.go | 12 - ...vpnserverconfigurationpolicygroupmember.go | 10 - ...erverconfigurationpolicygroupproperties.go | 12 - .../model_vpnserverconfigurationproperties.go | 23 - .../model_vpnserverconfigurationsresponse.go | 8 - ...serverconfigvpnclientrevokedcertificate.go | 9 - ...vpnserverconfigvpnclientrootcertificate.go | 9 - .../2022-11-01/virtualwans/model_vpnsite.go | 14 - .../virtualwans/model_vpnsitelink.go | 12 - .../model_vpnsitelinkconnection.go | 12 - .../model_vpnsitelinkconnectionproperties.go | 25 - .../model_vpnsitelinkproperties.go | 12 - .../virtualwans/model_vpnsiteproperties.go | 17 - .../2022-11-01/virtualwans/predicates.go | 546 ---- .../network/2022-11-01/virtualwans/version.go | 12 - .../vmsspublicipaddresses/README.md | 70 - .../vmsspublicipaddresses/client.go | 26 - .../vmsspublicipaddresses/constants.go | 1110 ------- .../id_virtualmachinescaleset.go | 127 - .../id_virtualmachinescaleset_test.go | 282 -- ...etvirtualmachinescalesetpublicipaddress.go | 81 - ...virtualmachinescalesetpublicipaddresses.go | 89 - ...rtualmachinescalesetvmpublicipaddresses.go | 90 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../vmsspublicipaddresses/model_delegation.go | 12 - .../vmsspublicipaddresses/model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../vmsspublicipaddresses/model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../vmsspublicipaddresses/model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../vmsspublicipaddresses/model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../vmsspublicipaddresses/model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../vmsspublicipaddresses/model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../vmsspublicipaddresses/predicates.go | 37 - .../vmsspublicipaddresses/version.go | 12 - .../network/2022-11-01/vpngateways/README.md | 83 - .../network/2022-11-01/vpngateways/client.go | 26 - .../2022-11-01/vpngateways/constants.go | 657 ---- .../2022-11-01/vpngateways/id_vpngateway.go | 127 - .../vpngateways/id_vpngateway_test.go | 282 -- .../2022-11-01/vpngateways/method_reset.go | 98 - .../vpngateways/method_startpacketcapture.go | 74 - .../vpngateways/method_stoppacketcapture.go | 74 - .../vpngateways/method_updatetags.go | 74 - .../vpngateways/model_bgpsettings.go | 11 - ...atewaycustombgpipaddressipconfiguration.go | 9 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../vpngateways/model_ipsecpolicy.go | 15 - .../vpngateways/model_propagatedroutetable.go | 9 - .../vpngateways/model_routingconfiguration.go | 12 - .../vpngateways/model_staticroute.go | 10 - .../vpngateways/model_staticroutesconfig.go | 9 - .../vpngateways/model_subresource.go | 8 - .../vpngateways/model_tagsobject.go | 8 - .../model_trafficselectorpolicy.go | 9 - .../2022-11-01/vpngateways/model_vnetroute.go | 10 - .../vpngateways/model_vpnconnection.go | 11 - .../model_vpnconnectionproperties.go | 26 - .../vpngateways/model_vpngateway.go | 14 - .../model_vpngatewayipconfiguration.go | 10 - .../vpngateways/model_vpngatewaynatrule.go | 12 - .../model_vpngatewaynatruleproperties.go | 15 - ..._vpngatewaypacketcapturestartparameters.go | 8 - ...l_vpngatewaypacketcapturestopparameters.go | 8 - .../vpngateways/model_vpngatewayproperties.go | 16 - .../vpngateways/model_vpnnatrulemapping.go | 9 - .../model_vpnsitelinkconnection.go | 12 - .../model_vpnsitelinkconnectionproperties.go | 25 - .../network/2022-11-01/vpngateways/version.go | 12 - .../2022-11-01/vpnlinkconnections/client.go | 26 - .../id_vpnlinkconnection.go | 153 - .../id_vpnlinkconnection_test.go | 372 --- .../method_resetconnection.go | 69 - .../2022-11-01/vpnlinkconnections/version.go | 12 - .../vpnserverconfigurations/README.md | 41 - .../vpnserverconfigurations/client.go | 26 - .../vpnserverconfigurations/constants.go | 572 ---- .../id_vpnserverconfiguration.go | 127 - .../id_vpnserverconfiguration_test.go | 282 -- .../method_updatetags.go | 55 - .../model_aadauthenticationparameters.go | 10 - .../model_addressspace.go | 8 - .../model_ipsecpolicy.go | 15 - .../model_p2sconnectionconfiguration.go | 11 - ...el_p2sconnectionconfigurationproperties.go | 13 - .../model_p2svpngateway.go | 14 - .../model_p2svpngatewayproperties.go | 15 - .../model_propagatedroutetable.go | 9 - .../model_radiusserver.go | 10 - .../model_routingconfiguration.go | 12 - .../model_staticroute.go | 10 - .../model_staticroutesconfig.go | 9 - .../model_subresource.go | 8 - .../model_tagsobject.go | 8 - .../model_vnetroute.go | 10 - .../model_vpnclientconnectionhealth.go | 11 - ...serverconfigradiusclientrootcertificate.go | 9 - ...serverconfigradiusserverrootcertificate.go | 9 - .../model_vpnserverconfiguration.go | 14 - ...model_vpnserverconfigurationpolicygroup.go | 12 - ...vpnserverconfigurationpolicygroupmember.go | 10 - ...erverconfigurationpolicygroupproperties.go | 12 - .../model_vpnserverconfigurationproperties.go | 23 - ...serverconfigvpnclientrevokedcertificate.go | 9 - ...vpnserverconfigvpnclientrootcertificate.go | 9 - .../vpnserverconfigurations/version.go | 12 - .../network/2022-11-01/vpnsites/README.md | 41 - .../network/2022-11-01/vpnsites/client.go | 26 - .../network/2022-11-01/vpnsites/constants.go | 57 - .../network/2022-11-01/vpnsites/id_vpnsite.go | 127 - .../2022-11-01/vpnsites/id_vpnsite_test.go | 282 -- .../2022-11-01/vpnsites/method_updatetags.go | 55 - .../2022-11-01/vpnsites/model_addressspace.go | 8 - .../2022-11-01/vpnsites/model_bgpsettings.go | 11 - .../vpnsites/model_deviceproperties.go | 10 - .../model_ipconfigurationbgppeeringaddress.go | 11 - .../model_o365breakoutcategorypolicies.go | 10 - .../vpnsites/model_o365policyproperties.go | 8 - .../2022-11-01/vpnsites/model_subresource.go | 8 - .../2022-11-01/vpnsites/model_tagsobject.go | 8 - .../vpnsites/model_vpnlinkbgpsettings.go | 9 - .../model_vpnlinkproviderproperties.go | 9 - .../2022-11-01/vpnsites/model_vpnsite.go | 14 - .../2022-11-01/vpnsites/model_vpnsitelink.go | 12 - .../vpnsites/model_vpnsitelinkproperties.go | 12 - .../vpnsites/model_vpnsiteproperties.go | 17 - .../network/2022-11-01/vpnsites/version.go | 12 - .../webapplicationfirewallpolicies/README.md | 103 - .../webapplicationfirewallpolicies/client.go | 26 - .../constants.go | 2798 ----------------- ...tiongatewaywebapplicationfirewallpolicy.go | 127 - ...atewaywebapplicationfirewallpolicy_test.go | 282 -- .../method_createorupdate.go | 56 - .../method_delete.go | 71 - .../method_get.go | 51 - .../method_list.go | 90 - .../method_listall.go | 90 - .../model_applicationgateway.go | 21 - ...icationgatewayauthenticationcertificate.go | 12 - ...thenticationcertificatepropertiesformat.go | 9 - ...pplicationgatewayautoscaleconfiguration.go | 9 - .../model_applicationgatewaybackendaddress.go | 9 - ...el_applicationgatewaybackendaddresspool.go | 12 - ...tewaybackendaddresspoolpropertiesformat.go | 10 - ...l_applicationgatewaybackendhttpsettings.go | 12 - ...ewaybackendhttpsettingspropertiesformat.go | 21 - ...model_applicationgatewaybackendsettings.go | 12 - ...ngatewaybackendsettingspropertiesformat.go | 15 - ...plicationgatewayclientauthconfiguration.go | 9 - ...el_applicationgatewayconnectiondraining.go | 9 - .../model_applicationgatewaycustomerror.go | 9 - ...icationgatewayfirewalldisabledrulegroup.go | 9 - ...del_applicationgatewayfirewallexclusion.go | 10 - ...plicationgatewayfrontendipconfiguration.go | 12 - ...frontendipconfigurationpropertiesformat.go | 13 - .../model_applicationgatewayfrontendport.go | 12 - ...tiongatewayfrontendportpropertiesformat.go | 9 - ...l_applicationgatewayglobalconfiguration.go | 9 - ...l_applicationgatewayheaderconfiguration.go | 9 - .../model_applicationgatewayhttplistener.go | 12 - ...tiongatewayhttplistenerpropertiesformat.go | 18 - ...model_applicationgatewayipconfiguration.go | 12 - ...ngatewayipconfigurationpropertiesformat.go | 9 - .../model_applicationgatewaylistener.go | 12 - ...licationgatewaylistenerpropertiesformat.go | 13 - ...pplicationgatewayloaddistributionpolicy.go | 12 - ...yloaddistributionpolicypropertiesformat.go | 10 - ...pplicationgatewayloaddistributiontarget.go | 12 - ...yloaddistributiontargetpropertiesformat.go | 9 - .../model_applicationgatewaypathrule.go | 12 - ...licationgatewaypathrulepropertiesformat.go | 15 - ...icationgatewayprivateendpointconnection.go | 12 - ...ewayprivateendpointconnectionproperties.go | 11 - ...licationgatewayprivatelinkconfiguration.go | 12 - ...tewayprivatelinkconfigurationproperties.go | 9 - ...cationgatewayprivatelinkipconfiguration.go | 12 - ...wayprivatelinkipconfigurationproperties.go | 12 - .../model_applicationgatewayprobe.go | 12 - ...licationgatewayprobehealthresponsematch.go | 9 - ...applicationgatewayprobepropertiesformat.go | 19 - ...odel_applicationgatewaypropertiesformat.go | 42 - ...applicationgatewayredirectconfiguration.go | 12 - ...ayredirectconfigurationpropertiesformat.go | 15 - ...el_applicationgatewayrequestroutingrule.go | 12 - ...tewayrequestroutingrulepropertiesformat.go | 17 - .../model_applicationgatewayrewriterule.go | 11 - ..._applicationgatewayrewriteruleactionset.go | 10 - ..._applicationgatewayrewriterulecondition.go | 11 - .../model_applicationgatewayrewriteruleset.go | 11 - ...ongatewayrewriterulesetpropertiesformat.go | 9 - .../model_applicationgatewayroutingrule.go | 12 - ...ationgatewayroutingrulepropertiesformat.go | 13 - .../model_applicationgatewaysku.go | 10 - .../model_applicationgatewaysslcertificate.go | 12 - ...ongatewaysslcertificatepropertiesformat.go | 12 - .../model_applicationgatewaysslpolicy.go | 12 - .../model_applicationgatewaysslprofile.go | 12 - ...cationgatewaysslprofilepropertiesformat.go | 11 - ...licationgatewaytrustedclientcertificate.go | 12 - ...rustedclientcertificatepropertiesformat.go | 11 - ...pplicationgatewaytrustedrootcertificate.go | 12 - ...ytrustedrootcertificatepropertiesformat.go | 10 - ...odel_applicationgatewayurlconfiguration.go | 10 - .../model_applicationgatewayurlpathmap.go | 12 - ...cationgatewayurlpathmappropertiesformat.go | 14 - ...ewaywebapplicationfirewallconfiguration.go | 17 - .../model_applicationsecuritygroup.go | 14 - ...pplicationsecuritygrouppropertiesformat.go | 9 - .../model_backendaddresspool.go | 12 - ...odel_backendaddresspoolpropertiesformat.go | 18 - .../model_customdnsconfigpropertiesformat.go | 9 - .../model_ddossettings.go | 9 - .../model_delegation.go | 12 - .../model_exclusionmanagedrule.go | 8 - .../model_exclusionmanagedrulegroup.go | 9 - .../model_exclusionmanagedruleset.go | 10 - .../model_flowlog.go | 14 - .../model_flowlogformatparameters.go | 9 - .../model_flowlogpropertiesformat.go | 15 - .../model_frontendipconfiguration.go | 17 - ...frontendipconfigurationpropertiesformat.go | 19 - ...odel_gatewayloadbalancertunnelinterface.go | 11 - .../model_groupbyusersession.go | 8 - .../model_groupbyvariable.go | 8 - .../model_inboundnatrule.go | 12 - .../model_inboundnatrulepropertiesformat.go | 19 - .../model_ipconfiguration.go | 11 - .../model_ipconfigurationprofile.go | 12 - ..._ipconfigurationprofilepropertiesformat.go | 9 - .../model_ipconfigurationpropertiesformat.go | 12 - .../model_iptag.go | 9 - .../model_loadbalancerbackendaddress.go | 9 - ...dbalancerbackendaddresspropertiesformat.go | 14 - .../model_managedrulegroupoverride.go | 9 - .../model_managedruleoverride.go | 10 - .../model_managedrulesdefinition.go | 9 - .../model_managedruleset.go | 10 - .../model_matchcondition.go | 12 - .../model_matchvariable.go | 9 - .../model_natgateway.go | 20 - .../model_natgatewaypropertiesformat.go | 13 - .../model_natgatewaysku.go | 8 - .../model_natruleportmapping.go | 10 - .../model_networkinterface.go | 19 - .../model_networkinterfacednssettings.go | 12 - .../model_networkinterfaceipconfiguration.go | 12 - ...gurationprivatelinkconnectionproperties.go | 10 - ...nterfaceipconfigurationpropertiesformat.go | 21 - .../model_networkinterfacepropertiesformat.go | 29 - .../model_networkinterfacetapconfiguration.go | 12 - ...terfacetapconfigurationpropertiesformat.go | 9 - .../model_networksecuritygroup.go | 14 - ...el_networksecuritygrouppropertiesformat.go | 15 - .../model_owaspcrsexclusionentry.go | 11 - .../model_policysettings.go | 18 - .../model_policysettingslogscrubbing.go | 9 - .../model_privateendpoint.go | 19 - .../model_privateendpointconnection.go | 12 - ...del_privateendpointconnectionproperties.go | 12 - .../model_privateendpointipconfiguration.go | 11 - ...rivateendpointipconfigurationproperties.go | 10 - .../model_privateendpointproperties.go | 16 - .../model_privatelinkservice.go | 19 - .../model_privatelinkserviceconnection.go | 12 - ..._privatelinkserviceconnectionproperties.go | 12 - ...model_privatelinkserviceconnectionstate.go | 10 - ...model_privatelinkserviceipconfiguration.go | 12 - ...atelinkserviceipconfigurationproperties.go | 13 - .../model_privatelinkserviceproperties.go | 17 - .../model_publicipaddress.go | 22 - .../model_publicipaddressdnssettings.go | 11 - .../model_publicipaddresspropertiesformat.go | 23 - .../model_publicipaddresssku.go | 9 - .../model_resourcenavigationlink.go | 12 - .../model_resourcenavigationlinkformat.go | 10 - .../model_resourceset.go | 8 - .../model_retentionpolicyparameters.go | 9 - .../model_route.go | 12 - .../model_routepropertiesformat.go | 12 - .../model_routetable.go | 14 - .../model_routetablepropertiesformat.go | 12 - .../model_securityrule.go | 12 - .../model_securityrulepropertiesformat.go | 23 - .../model_serviceassociationlink.go | 12 - ..._serviceassociationlinkpropertiesformat.go | 12 - ...model_servicedelegationpropertiesformat.go | 10 - .../model_serviceendpointpolicy.go | 15 - .../model_serviceendpointpolicydefinition.go | 12 - ...ndpointpolicydefinitionpropertiesformat.go | 11 - ...l_serviceendpointpolicypropertiesformat.go | 13 - .../model_serviceendpointpropertiesformat.go | 10 - .../model_subnet.go | 12 - .../model_subnetpropertiesformat.go | 26 - .../model_subresource.go | 8 - ...trafficanalyticsconfigurationproperties.go | 12 - .../model_trafficanalyticsproperties.go | 8 - .../model_virtualnetworktap.go | 14 - ...model_virtualnetworktappropertiesformat.go | 13 - .../model_webapplicationfirewallcustomrule.go | 17 - .../model_webapplicationfirewallpolicy.go | 14 - ...plicationfirewallpolicypropertiesformat.go | 15 - ...el_webapplicationfirewallscrubbingrules.go | 11 - .../predicates.go | 37 - .../webapplicationfirewallpolicies/version.go | 12 - .../2022-11-01/webcategories/README.md | 53 - .../2022-11-01/webcategories/client.go | 26 - .../webcategories/id_azurewebcategory.go | 114 - .../webcategories/id_azurewebcategory_test.go | 237 -- .../2022-11-01/webcategories/method_get.go | 80 - .../method_listbysubscription.go | 90 - .../webcategories/model_azurewebcategory.go | 12 - .../model_azurewebcategorypropertiesformat.go | 8 - .../2022-11-01/webcategories/predicates.go | 32 - .../2022-11-01/webcategories/version.go | 12 - 8541 files changed, 428301 deletions(-) delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/README.md delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/client.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/constants.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/id_rulecollection.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/id_rulecollection_test.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/id_securityadminconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/id_securityadminconfiguration_test.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/method_get.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/method_list.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/model_adminrulecollection.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/model_adminrulecollectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/model_networkmanagersecuritygroupitem.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/predicates.go delete mode 100644 resource-manager/network/2022-09-01/adminrulecollections/version.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/README.md delete mode 100644 resource-manager/network/2022-09-01/adminrules/client.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/constants.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/id_rule.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/id_rule_test.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/id_rulecollection.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/id_rulecollection_test.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/method_get.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/method_list.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/model_addressprefixitem.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/model_adminpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/model_adminrule.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/model_baseadminrule.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/model_defaultadminpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/model_defaultadminrule.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/predicates.go delete mode 100644 resource-manager/network/2022-09-01/adminrules/version.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/README.md delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/client.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/constants.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway_test.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_get.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_list.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_update.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_route.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/predicates.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/version.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/README.md delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/client.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/id_applicationgateway.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/id_applicationgateway_test.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/method_list.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresource.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresourceproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/predicates.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/version.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/README.md delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/client.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/constants.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/id_applicationgateway.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/id_applicationgateway_test.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/id_predefinedpolicy.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/id_predefinedpolicy_test.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_backendhealth.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_backendhealthondemand.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_get.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_getsslpredefinedpolicy.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_list.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_listavailablerequestheaders.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_listavailableresponseheaders.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_listavailableservervariables.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_listavailablessloptions.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_listavailablesslpredefinedpolicies.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_listavailablewafrulesets.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_start.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_stop.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgateway.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablessloptions.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealth.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthpool.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthserver.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendsettings.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayconnectiondraining.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaycustomerror.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallexclusion.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallruleset.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendport.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayglobalconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayheaderconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayhttplistener.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaylistener.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayondemandprobe.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypathrule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobe.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayredirectconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrequestroutingrule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterulecondition.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriteruleset.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayroutingrule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslcertificate.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpolicy.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslprofile.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlpathmap.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_route.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/predicates.go delete mode 100644 resource-manager/network/2022-09-01/applicationgateways/version.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/README.md delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/client.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/constants.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/id_location.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsdefaultget.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsget.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallmanifestruleset.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrule.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrulegroup.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestpropertiesresult.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestresult.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_defaultrulesetpropertyformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/predicates.go delete mode 100644 resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/version.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/README.md delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/client.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/constants.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/id_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/id_applicationsecuritygroup_test.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/method_get.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/method_list.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/predicates.go delete mode 100644 resource-manager/network/2022-09-01/applicationsecuritygroups/version.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/README.md delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/client.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/id_location.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/id_providerlocation.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/id_providerlocation_test.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/method_availabledelegationslist.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/method_availableresourcegroupdelegationslist.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/model_availabledelegation.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/predicates.go delete mode 100644 resource-manager/network/2022-09-01/availabledelegations/version.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/README.md delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/client.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/id_location.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/id_providerlocation.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/id_providerlocation_test.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/method_availableservicealiaseslist.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/method_availableservicealiaseslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/model_availableservicealias.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/predicates.go delete mode 100644 resource-manager/network/2022-09-01/availableservicealiases/version.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/README.md delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/client.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/constants.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/id_azurefirewall.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/id_azurefirewall_test.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/method_azurefirewallslistlearnedprefixes.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/method_get.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/method_list.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewall.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrule.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrulecollection.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrulecollectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationruleprotocol.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipgroups.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrcaction.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrule.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrulecollection.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrulecollectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrule.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrulecollection.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrulecollectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallpublicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallrcaction.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallsku.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_hubipaddresses.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_hubpublicipaddresses.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_ipprefixeslist.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/predicates.go delete mode 100644 resource-manager/network/2022-09-01/azurefirewalls/version.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/README.md delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/client.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/constants.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/id_bastionhost.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/id_bastionhost_test.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_deletebastionshareablelink.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_disconnectactivesessions.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_get.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_getactivesessions.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_getbastionshareablelink.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_list.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_putbastionshareablelink.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_bastionactivesession.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_bastionhost.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_bastionhostipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_bastionhostpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_bastionsessionstate.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_bastionshareablelink.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_bastionshareablelinklistrequest.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_resource.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_sessionids.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_sku.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/predicates.go delete mode 100644 resource-manager/network/2022-09-01/bastionhosts/version.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/README.md delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/client.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/id_bastionhost.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/id_bastionhost_test.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/method_deletebastionshareablelink.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/method_getbastionshareablelink.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/method_putbastionshareablelink.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/model_bastionshareablelink.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/model_bastionshareablelinklistrequest.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/model_resource.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/predicates.go delete mode 100644 resource-manager/network/2022-09-01/bastionshareablelink/version.go delete mode 100644 resource-manager/network/2022-09-01/bgpservicecommunities/README.md delete mode 100644 resource-manager/network/2022-09-01/bgpservicecommunities/client.go delete mode 100644 resource-manager/network/2022-09-01/bgpservicecommunities/method_list.go delete mode 100644 resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpcommunity.go delete mode 100644 resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpservicecommunity.go delete mode 100644 resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpservicecommunitypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/bgpservicecommunities/predicates.go delete mode 100644 resource-manager/network/2022-09-01/bgpservicecommunities/version.go delete mode 100644 resource-manager/network/2022-09-01/checkdnsavailabilities/README.md delete mode 100644 resource-manager/network/2022-09-01/checkdnsavailabilities/client.go delete mode 100644 resource-manager/network/2022-09-01/checkdnsavailabilities/id_location.go delete mode 100644 resource-manager/network/2022-09-01/checkdnsavailabilities/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/checkdnsavailabilities/method_checkdnsnameavailability.go delete mode 100644 resource-manager/network/2022-09-01/checkdnsavailabilities/model_dnsnameavailabilityresult.go delete mode 100644 resource-manager/network/2022-09-01/checkdnsavailabilities/version.go delete mode 100644 resource-manager/network/2022-09-01/client.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/README.md delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/client.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/constants.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/id_providercloudservice.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/id_providercloudservice_test.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudservicepublicipaddresses.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudserviceroleinstancepublicipaddresses.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_route.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/predicates.go delete mode 100644 resource-manager/network/2022-09-01/cloudservicepublicipaddresses/version.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/README.md delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/client.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/constants.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/id_connectionmonitor.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/id_connectionmonitor_test.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/method_get.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/method_list.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/method_query.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/method_start.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/method_stop.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitor.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitordestination.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpoint.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointfilter.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointfilteritem.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointscope.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointscopeitem.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorhttpconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitoricmpconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorlistresult.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitoroutput.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorparameters.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorqueryresult.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorresult.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorresultproperties.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorsource.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorsuccessthreshold.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortcpconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortestconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortestgroup.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorworkspacesettings.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectionstatesnapshot.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectivityhop.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_connectivityissue.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_hoplink.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_hoplinkproperties.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_httpheader.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/connectionmonitors/version.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/README.md delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/client.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/constants.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/id_connectivityconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/id_connectivityconfiguration_test.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/id_networkmanager.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/method_get.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/method_list.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivityconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivityconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivitygroupitem.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/model_hub.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/predicates.go delete mode 100644 resource-manager/network/2022-09-01/connectivityconfigurations/version.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/README.md delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/client.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/constants.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/id_customipprefix.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/id_customipprefix_test.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/method_get.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/method_list.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/model_customipprefix.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/model_customipprefixpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/predicates.go delete mode 100644 resource-manager/network/2022-09-01/customipprefixes/version.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/README.md delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/client.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/constants.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/id_ddoscustompolicy.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/id_ddoscustompolicy_test.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/method_get.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/model_ddoscustompolicy.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/model_ddoscustompolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/ddoscustompolicies/version.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/README.md delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/client.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/constants.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/id_ddosprotectionplan.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/id_ddosprotectionplan_test.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/method_get.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/method_list.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/model_ddosprotectionplan.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/model_ddosprotectionplanpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/predicates.go delete mode 100644 resource-manager/network/2022-09-01/ddosprotectionplans/version.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/README.md delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/client.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/constants.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/id_dscpconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/id_dscpconfiguration_test.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/method_get.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_dscpconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_dscpconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_qosdefinition.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_qosiprange.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_qosportrange.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_route.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfiguration/version.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/README.md delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/client.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/constants.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/method_dscpconfigurationlist.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/method_dscpconfigurationlistall.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_dscpconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_dscpconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_qosdefinition.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_qosiprange.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_qosportrange.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_route.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/predicates.go delete mode 100644 resource-manager/network/2022-09-01/dscpconfigurations/version.go delete mode 100644 resource-manager/network/2022-09-01/endpointservices/README.md delete mode 100644 resource-manager/network/2022-09-01/endpointservices/client.go delete mode 100644 resource-manager/network/2022-09-01/endpointservices/id_location.go delete mode 100644 resource-manager/network/2022-09-01/endpointservices/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/endpointservices/method_availableendpointserviceslist.go delete mode 100644 resource-manager/network/2022-09-01/endpointservices/model_endpointserviceresult.go delete mode 100644 resource-manager/network/2022-09-01/endpointservices/predicates.go delete mode 100644 resource-manager/network/2022-09-01/endpointservices/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitarptable/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitarptable/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitarptable/id_arptable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitarptable/id_arptable_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitarptable/model_expressroutecircuitarptable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitarptable/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_authorization.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_authorization_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_expressroutecircuit_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/model_authorizationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/model_expressroutecircuitauthorization.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitauthorizations/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/id_peeringconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/id_peeringconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/model_expressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/model_expressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/model_ipv6circuitconnectionconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitconnections/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/id_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/id_expressroutecircuit_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeering.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitstats.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressrouteconnectionid.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_ipv6circuitconnectionconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitpeerings/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestable/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestable/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestable/id_peeringroutetable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestable/id_peeringroutetable_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestable/model_expressroutecircuitroutestable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestable/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/id_routetablessummary.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/id_routetablessummary_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitroutestablesummary.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/id_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/id_expressroutecircuit_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_authorizationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitauthorization.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeering.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitserviceproviderproperties.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitsku.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitstats.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_expressrouteconnectionid.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_ipv6circuitconnectionconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_peerexpressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_peerexpressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuits/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitstats/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitstats/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitstats/id_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitstats/id_expressroutecircuit_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitstats/model_expressroutecircuitstats.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecircuitstats/version.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/README.md delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/client.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/id_expressrouteconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/id_expressrouteconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/id_expressroutegateway.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/id_expressroutegateway_test.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_expressroutecircuitpeeringid.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnectionlist.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_staticroute.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/model_vnetroute.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteconnections/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/id_peeringarptable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/id_peeringarptable_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitarptable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_peering.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_peering_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeering.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeeringproperties.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitroutestable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionroutestablesummary.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/id_expressroutecrossconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/id_expressroutecrossconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecircuitreference.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionpeering.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionpeeringproperties.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressroutecrossconnections/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/id_expressroutegateway.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/id_expressroutegateway_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_expressroutecircuitpeeringid.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_expressrouteconnection.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_expressrouteconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegateway.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaylist.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewayproperties.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfigurationbounds.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_staticroute.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_virtualhubid.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/model_vnetroute.go delete mode 100644 resource-manager/network/2022-09-01/expressroutegateways/version.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/README.md delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/client.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/id_expressrouteport.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/id_expressrouteport_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/id_link.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/id_link_test.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelink.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelinkmacsecconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressroutelinks/version.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/README.md delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/client.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteport.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteport_test.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteportauthorization.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteportauthorization_test.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/model_expressrouteportauthorization.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/model_expressrouteportauthorizationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportauthorizations/version.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/README.md delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/client.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/id_expressrouteport.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/id_expressrouteport_test.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/method_generateloa.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/model_expressroutelink.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/model_expressroutelinkmacsecconfig.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/model_expressroutelinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/model_expressrouteport.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/model_expressrouteportpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/model_generateexpressrouteportsloarequest.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/model_generateexpressrouteportsloaresult.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteports/version.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/README.md delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/client.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/id_expressrouteportslocation.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/id_expressrouteportslocation_test.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/method_get.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocation.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocationbandwidths.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteportslocations/version.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/README.md delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/client.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/id_expressrouteproviderport.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/id_expressrouteproviderport_test.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/method_expressrouteproviderport.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/method_locationlist.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderport.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderportlistresult.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderportproperties.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteproviderports/version.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteserviceproviders/README.md delete mode 100644 resource-manager/network/2022-09-01/expressrouteserviceproviders/client.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteserviceproviders/constants.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteserviceproviders/method_list.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceprovider.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceproviderbandwidthsoffered.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceproviderpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteserviceproviders/predicates.go delete mode 100644 resource-manager/network/2022-09-01/expressrouteserviceproviders/version.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/README.md delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/client.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/constants.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/id_firewallpolicy.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/id_firewallpolicy_test.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_get.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_list.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_dnssettings.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_explicitproxy.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_filteritems.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicy.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicycertificateauthority.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyinsights.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetection.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionbypasstrafficspecifications.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionsignaturespecification.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyloganalyticsresources.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyloganalyticsworkspace.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysku.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysnat.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysql.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicythreatintelwhitelist.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicytransportsecurity.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_idpsqueryobject.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_orderby.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_queryresults.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_signatureoverridesfiltervaluesquery.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_signatureoverridesfiltervaluesresponse.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverrides.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverrideslist.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverridesproperties.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_singlequeryresult.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/predicates.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicies/version.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/README.md delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/client.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/constants.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy_test.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup_test.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_get.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_list.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_applicationrule.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollectionaction.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollectionaction.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyruleapplicationprotocol.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroup.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_natrule.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_networkrule.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/predicates.go delete mode 100644 resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/version.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/README.md delete mode 100644 resource-manager/network/2022-09-01/flowlogs/client.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/constants.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/id_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/id_flowlog_test.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/method_get.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/method_list.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/predicates.go delete mode 100644 resource-manager/network/2022-09-01/flowlogs/version.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/README.md delete mode 100644 resource-manager/network/2022-09-01/ipallocations/client.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/constants.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/id_ipallocation.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/id_ipallocation_test.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/method_get.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/method_list.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/model_ipallocation.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/model_ipallocationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/predicates.go delete mode 100644 resource-manager/network/2022-09-01/ipallocations/version.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/README.md delete mode 100644 resource-manager/network/2022-09-01/ipgroups/client.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/constants.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/id_ipgroup.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/id_ipgroup_test.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/method_get.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/method_list.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/method_updategroups.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/model_ipgroup.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/model_ipgrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/predicates.go delete mode 100644 resource-manager/network/2022-09-01/ipgroups/version.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/README.md delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/client.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/constants.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_backendaddresspool_test.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_frontendipconfiguration_test.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_inboundnatrule_test.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_loadbalancer.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_loadbalancer_test.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_loadbalancerbackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_loadbalancerbackendaddresspool_test.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_loadbalancingrule.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_loadbalancingrule_test.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_location.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_outboundrule.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_outboundrule_test.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_probe.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/id_probe_test.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_get.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulescreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulesdelete.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulesget.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_inboundnatruleslist.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_list.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_listinboundnatruleportmappings.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsdelete.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolslist.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationslist.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerloadbalancingruleslist.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancernetworkinterfaceslist.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalanceroutboundrulesget.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalanceroutboundruleslist.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerprobesget.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerprobeslist.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_swappublicipaddresses.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_backendaddressinboundnatruleportmappings.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_inboundnatpool.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_inboundnatpoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_inboundnatruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancer.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancersku.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequest.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancingrule.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_loadbalancingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_outboundrule.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_outboundrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_probe.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_probepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_queryinboundnatruleportmappingrequest.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_route.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/predicates.go delete mode 100644 resource-manager/network/2022-09-01/loadbalancers/version.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/README.md delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/client.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/constants.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/id_localnetworkgateway.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/id_localnetworkgateway_test.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/method_get.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/method_list.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/model_addressspace.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/model_localnetworkgateway.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/model_localnetworkgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/predicates.go delete mode 100644 resource-manager/network/2022-09-01/localnetworkgateways/version.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/README.md delete mode 100644 resource-manager/network/2022-09-01/natgateways/client.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/constants.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/id_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/id_natgateway_test.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/method_get.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/method_list.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/predicates.go delete mode 100644 resource-manager/network/2022-09-01/natgateways/version.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/README.md delete mode 100644 resource-manager/network/2022-09-01/networkgroups/client.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/id_networkgroup.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/id_networkgroup_test.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/id_networkmanager.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/method_get.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/method_list.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/model_networkgroup.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/predicates.go delete mode 100644 resource-manager/network/2022-09-01/networkgroups/version.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/README.md delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/client.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_providercloudservice.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_providercloudservice_test.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_roleinstance.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_roleinstance_test.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_roleinstancenetworkinterface.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_roleinstancenetworkinterface_test.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_tapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_tapconfiguration_test.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachine.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachine_test.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachinescaleset.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachinescaleset_test.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_get.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_getcloudservicenetworkinterface.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_geteffectiveroutetable.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_list.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_listcloudservicenetworkinterfaces.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_listcloudserviceroleinstancenetworkinterfaces.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetnetworkinterfaces.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetvmnetworkinterfaces.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceipconfigurationslist.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceloadbalancerslist.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfacetapconfigurationslist.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygroupassociation.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecurityrule.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_effectiveroute.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_effectiveroutelistresult.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatpool.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatpoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancer.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancersku.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancingrule.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_outboundrule.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_outboundrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_probe.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_probepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_route.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/predicates.go delete mode 100644 resource-manager/network/2022-09-01/networkinterfaces/version.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/README.md delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/client.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/id_networkmanager.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activeconfigurationparameter.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_addressprefixitem.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_adminpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_configurationgroup.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_defaultadminpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_networkmanagersecuritygroupitem.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconfigurations/version.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/README.md delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/client.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconfigurationparameter.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfigurationslistresult.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_configurationgroup.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_connectivityconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_connectivitygroupitem.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_hub.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/version.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/README.md delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/client.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/id_networkmanagerconnection.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/id_networkmanagerconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/id_providers2networkmanagerconnection.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/id_providers2networkmanagerconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsdelete.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsdelete.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/model_networkmanagerconnection.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/model_networkmanagerconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/predicates.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagerconnections/version.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/README.md delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/client.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_configurationgroup.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_connectivityconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_connectivitygroupitem.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_effectiveconnectivityconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_hub.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_networkmanagereffectiveconnectivityconfigurationlistresult.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_queryrequestoptions.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/version.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/README.md delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/client.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_addressprefixitem.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_adminpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_configurationgroup.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_defaultadminpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagersecuritygroupitem.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_queryrequestoptions.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/version.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/README.md delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/client.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/id_networkmanager.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/method_get.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/method_list.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/method_networkmanagercommitspost.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/method_patch.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/model_crosstenantscopes.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/model_networkmanager.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/model_networkmanagercommit.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatus.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatuslistresult.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatusparameter.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerpropertiesnetworkmanagerscopes.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/model_patchobject.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/predicates.go delete mode 100644 resource-manager/network/2022-09-01/networkmanagers/version.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/README.md delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/client.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/id_networkprofile.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/id_networkprofile_test.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/method_get.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/method_list.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterface.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkprofile.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networkprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_route.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/predicates.go delete mode 100644 resource-manager/network/2022-09-01/networkprofiles/version.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/README.md delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/client.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/constants.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/id_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/id_networksecuritygroup_test.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/method_get.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/method_list.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_route.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/predicates.go delete mode 100644 resource-manager/network/2022-09-01/networksecuritygroups/version.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/README.md delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/client.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/id_inboundsecurityrule.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/id_inboundsecurityrule_test.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/id_networkvirtualappliance.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/id_networkvirtualappliance_test.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/method_get.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/method_inboundsecurityrulecreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/method_list.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_delegationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityrule.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityruleproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityrules.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_networkvirtualappliance.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_networkvirtualappliancepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_partnermanagedresourceproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_virtualappliancenicproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/model_virtualapplianceskuproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/predicates.go delete mode 100644 resource-manager/network/2022-09-01/networkvirtualappliances/version.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/README.md delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/client.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/constants.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_checkconnectivity.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_get.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_getazurereachabilityreport.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_getflowlogstatus.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_getnetworkconfigurationdiagnostic.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_getnexthop.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_gettopology.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_gettroubleshooting.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_gettroubleshootingresult.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_getvmsecurityrules.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_list.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_listavailableproviders.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_setflowlogconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/method_verifyipflow.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslist.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistcity.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistcountry.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_availableprovidersliststate.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreport.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportitem.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportlatencyinfo.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportlocation.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_connectivitydestination.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_connectivityhop.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_connectivityinformation.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_connectivityissue.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_connectivityparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_connectivitysource.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_effectivenetworksecurityrule.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_evaluatednetworksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_flowloginformation.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_flowlogproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_flowlogstatusparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_hoplink.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_hoplinkproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_httpconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_httpheader.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_matchedrule.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticprofile.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticresponse.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticresult.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networkinterfaceassociation.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networksecuritygroupresult.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networksecurityrulesevaluationresult.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networkwatcher.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networkwatcherlistresult.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_networkwatcherpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_nexthopparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_nexthopresult.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_protocolconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_querytroubleshootingparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_securitygroupnetworkinterface.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_securitygroupviewparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_securitygroupviewresult.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_securityruleassociations.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_subnetassociation.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_topology.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_topologyassociation.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_topologyparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_topologyresource.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingdetails.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingproperties.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingrecommendedactions.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingresult.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_verificationipflowparameters.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/model_verificationipflowresult.go delete mode 100644 resource-manager/network/2022-09-01/networkwatchers/version.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/README.md delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/client.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/constants.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/method_disconnectp2svpnconnections.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/method_generatevpnprofile.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/method_getp2svpnconnectionhealth.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/method_getp2svpnconnectionhealthdetailed.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/method_reset.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_addressspace.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_p2sconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_p2sconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionhealth.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionhealthrequest.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionrequest.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_p2svpngateway.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_p2svpngatewayproperties.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnprofileparameters.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_staticroute.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_vnetroute.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_vpnclientconnectionhealth.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_vpnprofileresponse.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroup.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroupmember.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/p2svpngateways/version.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/README.md delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/client.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/constants.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/id_packetcapture.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/id_packetcapture_test.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/method_create.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/method_get.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/method_getstatus.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/method_list.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/method_stop.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/model_packetcapture.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/model_packetcapturefilter.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/model_packetcapturelistresult.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/model_packetcapturemachinescope.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureparameters.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/model_packetcapturequerystatusresult.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureresult.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureresultproperties.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/model_packetcapturestoragelocation.go delete mode 100644 resource-manager/network/2022-09-01/packetcaptures/version.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/README.md delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/client.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/constants.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/id_peerconnection.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/id_peerconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/method_get.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/method_list.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/predicates.go delete mode 100644 resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/version.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/README.md delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/client.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/constants.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/id_privatednszonegroup.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/id_privatednszonegroup_test.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/id_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/id_privateendpoint_test.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/method_get.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/method_list.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszoneconfig.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonegroup.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonegrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/model_recordset.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/predicates.go delete mode 100644 resource-manager/network/2022-09-01/privatednszonegroups/version.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/README.md delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/client.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/constants.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/id_location.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/id_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/id_privateendpoint_test.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/id_providerlocation.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/id_providerlocation_test.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/method_availableprivateendpointtypeslist.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/method_get.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/method_list.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_availableprivateendpointtype.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_route.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/predicates.go delete mode 100644 resource-manager/network/2022-09-01/privateendpoints/version.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/README.md delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/client.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/constants.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/id_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/id_privatelinkservice_test.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_route.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservice/version.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/README.md delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/client.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/constants.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/id_location.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/id_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/id_privateendpointconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/id_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/id_privatelinkservice_test.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/id_providerlocation.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/id_providerlocation_test.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_checkprivatelinkservicevisibility.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_checkprivatelinkservicevisibilitybyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_deleteprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_get.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_getprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_list.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_listautoapprovedprivatelinkservices.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_listautoapprovedprivatelinkservicesbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_listprivateendpointconnections.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/method_updateprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_autoapprovedprivatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_checkprivatelinkservicevisibilityrequest.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkservicevisibility.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_route.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/predicates.go delete mode 100644 resource-manager/network/2022-09-01/privatelinkservices/version.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/README.md delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/client.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/constants.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/method_ddosprotectionstatus.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/method_get.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/method_list.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_publicipddosprotectionstatusresult.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_route.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/predicates.go delete mode 100644 resource-manager/network/2022-09-01/publicipaddresses/version.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/README.md delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/client.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/constants.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/id_publicipprefix.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/id_publicipprefix_test.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/method_get.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/method_list.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefix.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefixpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefixsku.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_referencedpublicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/predicates.go delete mode 100644 resource-manager/network/2022-09-01/publicipprefixes/version.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/README.md delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/client.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/constants.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/id_routefilter.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/id_routefilter_test.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/id_routefilterrule.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/id_routefilterrule_test.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/method_get.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/method_listbyroutefilter.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/model_routefilterrule.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/model_routefilterrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/predicates.go delete mode 100644 resource-manager/network/2022-09-01/routefilterrules/version.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/README.md delete mode 100644 resource-manager/network/2022-09-01/routefilters/client.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/constants.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/id_routefilter.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/id_routefilter_test.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/method_get.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/method_list.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeering.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitstats.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_expressrouteconnectionid.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_ipv6circuitconnectionconfig.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_peerexpressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_peerexpressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_routefilter.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_routefilterpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_routefilterrule.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_routefilterrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/predicates.go delete mode 100644 resource-manager/network/2022-09-01/routefilters/version.go delete mode 100644 resource-manager/network/2022-09-01/routes/README.md delete mode 100644 resource-manager/network/2022-09-01/routes/client.go delete mode 100644 resource-manager/network/2022-09-01/routes/constants.go delete mode 100644 resource-manager/network/2022-09-01/routes/id_route.go delete mode 100644 resource-manager/network/2022-09-01/routes/id_route_test.go delete mode 100644 resource-manager/network/2022-09-01/routes/id_routetable.go delete mode 100644 resource-manager/network/2022-09-01/routes/id_routetable_test.go delete mode 100644 resource-manager/network/2022-09-01/routes/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/routes/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/routes/method_get.go delete mode 100644 resource-manager/network/2022-09-01/routes/method_list.go delete mode 100644 resource-manager/network/2022-09-01/routes/model_route.go delete mode 100644 resource-manager/network/2022-09-01/routes/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routes/predicates.go delete mode 100644 resource-manager/network/2022-09-01/routes/version.go delete mode 100644 resource-manager/network/2022-09-01/routetables/README.md delete mode 100644 resource-manager/network/2022-09-01/routetables/client.go delete mode 100644 resource-manager/network/2022-09-01/routetables/constants.go delete mode 100644 resource-manager/network/2022-09-01/routetables/id_routetable.go delete mode 100644 resource-manager/network/2022-09-01/routetables/id_routetable_test.go delete mode 100644 resource-manager/network/2022-09-01/routetables/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/routetables/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/routetables/method_get.go delete mode 100644 resource-manager/network/2022-09-01/routetables/method_list.go delete mode 100644 resource-manager/network/2022-09-01/routetables/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/routetables/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_route.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/routetables/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/routetables/predicates.go delete mode 100644 resource-manager/network/2022-09-01/routetables/version.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/README.md delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/client.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/constants.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/id_networkmanager.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/id_scopeconnection.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/id_scopeconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/method_get.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/method_list.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/model_scopeconnection.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/model_scopeconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/predicates.go delete mode 100644 resource-manager/network/2022-09-01/scopeconnections/version.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/README.md delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/client.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/constants.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/id_networkmanager.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/id_securityadminconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/id_securityadminconfiguration_test.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/method_get.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/method_list.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/model_securityadminconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/model_securityadminconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/predicates.go delete mode 100644 resource-manager/network/2022-09-01/securityadminconfigurations/version.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/README.md delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/client.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/constants.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/id_securitypartnerprovider.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/id_securitypartnerprovider_test.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/method_get.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/method_list.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/model_securitypartnerprovider.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/model_securitypartnerproviderpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/predicates.go delete mode 100644 resource-manager/network/2022-09-01/securitypartnerproviders/version.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/README.md delete mode 100644 resource-manager/network/2022-09-01/securityrules/client.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/constants.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/id_defaultsecurityrule.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/id_defaultsecurityrule_test.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/id_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/id_networksecuritygroup_test.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/id_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/id_securityrule_test.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/method_defaultsecurityrulesget.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/method_defaultsecurityruleslist.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/method_get.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/method_list.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/predicates.go delete mode 100644 resource-manager/network/2022-09-01/securityrules/version.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/README.md delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/client.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/constants.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/id_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/id_serviceendpointpolicy_test.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/method_get.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/method_list.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_route.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/predicates.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicies/version.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/README.md delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/client.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/constants.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy_test.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition_test.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_get.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/predicates.go delete mode 100644 resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/version.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/README.md delete mode 100644 resource-manager/network/2022-09-01/servicetags/client.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/id_location.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/method_servicetaginformationlist.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/method_servicetagslist.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/model_servicetaginformation.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/model_servicetaginformationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/model_servicetagslistresult.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/predicates.go delete mode 100644 resource-manager/network/2022-09-01/servicetags/version.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/README.md delete mode 100644 resource-manager/network/2022-09-01/staticmembers/client.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/constants.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/id_networkgroup.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/id_networkgroup_test.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/id_staticmember.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/id_staticmember_test.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/method_get.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/method_list.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/model_staticmember.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/model_staticmemberproperties.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/predicates.go delete mode 100644 resource-manager/network/2022-09-01/staticmembers/version.go delete mode 100644 resource-manager/network/2022-09-01/subnets/README.md delete mode 100644 resource-manager/network/2022-09-01/subnets/client.go delete mode 100644 resource-manager/network/2022-09-01/subnets/constants.go delete mode 100644 resource-manager/network/2022-09-01/subnets/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/subnets/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/subnets/method_get.go delete mode 100644 resource-manager/network/2022-09-01/subnets/method_list.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_route.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/subnets/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/subnets/predicates.go delete mode 100644 resource-manager/network/2022-09-01/subnets/version.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/README.md delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/client.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/constants.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/method_networkwatchersgetflowlogstatus.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/method_networkwatcherssetflowlogconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/model_flowloginformation.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/model_flowlogproperties.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/model_flowlogstatusparameters.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/trafficanalytics/version.go delete mode 100644 resource-manager/network/2022-09-01/usages/README.md delete mode 100644 resource-manager/network/2022-09-01/usages/client.go delete mode 100644 resource-manager/network/2022-09-01/usages/constants.go delete mode 100644 resource-manager/network/2022-09-01/usages/id_location.go delete mode 100644 resource-manager/network/2022-09-01/usages/id_location_test.go delete mode 100644 resource-manager/network/2022-09-01/usages/method_list.go delete mode 100644 resource-manager/network/2022-09-01/usages/model_usage.go delete mode 100644 resource-manager/network/2022-09-01/usages/model_usagename.go delete mode 100644 resource-manager/network/2022-09-01/usages/predicates.go delete mode 100644 resource-manager/network/2022-09-01/usages/version.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/README.md delete mode 100644 resource-manager/network/2022-09-01/vipswap/client.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/constants.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/id_cloudservice.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/id_cloudservice_test.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/method_create.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/method_get.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/method_list.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/model_swapresource.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/model_swapresourcelistresult.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/model_swapresourceproperties.go delete mode 100644 resource-manager/network/2022-09-01/vipswap/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/id_networkvirtualappliance.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/id_networkvirtualappliance_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/id_virtualappliancesite.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/id_virtualappliancesite_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/method_get.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/method_list.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/model_breakoutcategorypolicies.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/model_office365policyproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/model_virtualappliancesite.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/model_virtualappliancesiteproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualappliancesites/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/id_networkvirtualappliancesku.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/id_networkvirtualappliancesku_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/method_get.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/method_list.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualappliancesku.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualapplianceskuinstances.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualapplianceskupropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualapplianceskus/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/id_connection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/id_connection_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_get.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_getikesas.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_getsharedkey.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_list.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_resetconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_resetsharedkey.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_setsharedkey.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_startpacketcapture.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_stoppacketcapture.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_addressspace.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_connectionresetsharedkey.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_connectionsharedkey.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_gatewaycustombgpipaddressipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_localnetworkgateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_localnetworkgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_radiusserver.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_trafficselectorpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_tunnelconnectionhealth.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatruleproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupmember.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnnatrulemapping.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestartparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestopparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/id_connection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/id_connection_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgateway_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_disconnectvirtualnetworkgatewayvpnconnections.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_generatevpnclientpackage.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_generatevpnprofile.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_get.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_getadvertisedroutes.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_getbgppeerstatus.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_getlearnedroutes.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnclientconnectionhealth.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnclientipsecparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnprofilepackageurl.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_list.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_listconnections.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_reset.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_resetvpnclientsharedkey.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_setvpnclientipsecparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_startpacketcapture.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_stoppacketcapture.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_supportedvpndevices.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulescreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatruleslistbyvirtualnetworkgateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_addressspace.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgppeerstatus.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgppeerstatuslistresult.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewaycustombgpipaddressipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewayroute.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewayroutelistresult.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_p2svpnconnectionrequest.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_radiusserver.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_trafficselectorpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_tunnelconnectionhealth.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkconnectiongatewayreference.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentity.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentitypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaynatrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaynatruleproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupmember.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vngclientconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vngclientconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetail.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetaillistresult.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientipsecparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrevokedcertificate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrevokedcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrootcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpndevicescriptparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnnatrulemapping.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnpacketcapturestartparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnpacketcapturestopparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkgateways/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/id_virtualnetworkpeering.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/id_virtualnetworkpeering_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/method_get.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/method_list.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/model_addressspace.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkbgpcommunities.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkencryption.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkpeering.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworkpeerings/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_get.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_list.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_resourcenavigationlinkslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_serviceassociationlinkslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_subnetspreparenetworkpolicies.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_subnetsunpreparenetworkpolicies.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkslistusage.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_addressspace.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_dhcpoptions.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_ipaddressavailabilityresult.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkintentpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkintentpolicyconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_preparenetworkpoliciesrequest.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_publicipddosprotectionstatusresult.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlinkslistresult.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_route.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlinkslistresult.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_unpreparenetworkpoliciesrequest.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetwork.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkbgpcommunities.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkencryption.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpeering.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkusage.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkusagename.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworks/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/id_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/id_virtualnetworktap_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/method_get.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_route.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktap/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_route.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualnetworktaps/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/id_virtualrouter.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/id_virtualrouter_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/method_get.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/method_list.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/model_virtualrouterpeering.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/model_virtualrouterpeeringproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouterpeerings/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/id_virtualrouter.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/id_virtualrouter_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/method_get.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/method_list.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/model_virtualrouter.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/model_virtualrouterpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualrouters/version.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/README.md delete mode 100644 resource-manager/network/2022-09-01/virtualwans/client.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/constants.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_configurationpolicygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_configurationpolicygroup_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_hubroutetable.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_hubroutetable_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_hubvirtualnetworkconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_hubvirtualnetworkconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_natrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_natrule_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_routemap.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_routemap_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_routingintent.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_routingintent_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_virtualhub.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_virtualhub_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_virtualhubroutetable.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_virtualhubroutetable_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_virtualwan.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_virtualwan_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpngateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpngateway_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpnlinkconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpnlinkconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpnserverconfiguration_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpnsite.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpnsite_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpnsitelink.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/id_vpnsitelink_test.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupsdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupsget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupslistbyvpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_generatevirtualwanvpnserverconfigurationvpnprofile.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_hubroutetablescreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_hubroutetablesdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_hubroutetablesget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_hubroutetableslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionsdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionsget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_natrulescreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_natrulesdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_natrulesget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_natruleslistbyvpngateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewaysdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewaysget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_routemapscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_routemapsdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_routemapsget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_routemapslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_routingintentcreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_routingintentdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_routingintentget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_routingintentlist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_supportedsecurityproviders.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectioncreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectiondelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslistadvertisedroutes.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslistlearnedroutes.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationcreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationlist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2screateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2sdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2sget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2slist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubsdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubsget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgeteffectivevirtualhubroutes.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgetinboundroutes.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgetoutboundroutes.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualhubsupdatetags.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualwanscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualwansdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualwansget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualwanslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_virtualwanslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionslistbyvpngateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsstartpacketcapture.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsstoppacketcapture.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpngatewayscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpngatewaysdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpngatewaysget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpngatewayslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpngatewayslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnlinkconnectionsgetikesas.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnlinkconnectionslistbyvpnconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsassociatedwithvirtualwanlist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationscreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinkconnectionsget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinksget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinkslistbyvpnsite.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnsitesconfigurationdownload.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnsitescreateorupdate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnsitesdelete.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnsitesget.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnsiteslist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/method_vpnsiteslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_aadauthenticationparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_action.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_addressspace.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_bgpconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_bgpconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_criterion.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_deviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_effectiveroutesparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_gatewaycustombgpipaddressipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_getinboundroutesparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_getoutboundroutesparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_getvpnsitesconfigurationrequest.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_hubipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_hubipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_hubroute.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_hubroutetable.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_hubroutetableproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_hubvirtualnetworkconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_hubvirtualnetworkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_o365breakoutcategorypolicies.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_o365policyproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_p2sconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_p2sconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_p2svpngateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_p2svpngatewayproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_parameter.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_peerroute.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_peerroutelist.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_radiusserver.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_route.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routemap.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routemapproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routemaprule.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routingintent.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routingintentproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_routingpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_staticroute.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_trafficselectorpolicy.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualhub.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualhubproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualhubroute.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetable.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetablev2.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetablev2properties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutev2.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualrouterautoscaleconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualwan.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualwanproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualwansecurityprovider.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualwansecurityproviders.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_virtualwanvpnprofileparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vnetroute.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnclientconnectionhealth.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionpacketcapturestartparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionpacketcapturestopparameters.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpngateway.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpngatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpngatewaynatrule.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpngatewaynatruleproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpngatewayproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnlinkbgpsettings.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnlinkproviderproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnnatrulemapping.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnprofileresponse.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigradiusclientrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigradiusserverrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroup.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroupmember.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationsresponse.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigvpnclientrevokedcertificate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigvpnclientrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnsite.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnsitelink.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkconnection.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/model_vpnsiteproperties.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/predicates.go delete mode 100644 resource-manager/network/2022-09-01/virtualwans/version.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/README.md delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/client.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/constants.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/id_virtualmachinescaleset.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/id_virtualmachinescaleset_test.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetpublicipaddresses.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetvmpublicipaddresses.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_route.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/predicates.go delete mode 100644 resource-manager/network/2022-09-01/vmsspublicipaddresses/version.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/README.md delete mode 100644 resource-manager/network/2022-09-01/vpngateways/client.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/constants.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/id_vpngateway.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/id_vpngateway_test.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/method_reset.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/method_startpacketcapture.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/method_stoppacketcapture.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_gatewaycustombgpipaddressipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_staticroute.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_trafficselectorpolicy.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vnetroute.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpnconnection.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpnconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpngateway.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpngatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpngatewaynatrule.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpngatewaynatruleproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpngatewaypacketcapturestartparameters.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpngatewaypacketcapturestopparameters.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpngatewayproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpnnatrulemapping.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpnsitelinkconnection.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/model_vpnsitelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpngateways/version.go delete mode 100644 resource-manager/network/2022-09-01/vpnlinkconnections/client.go delete mode 100644 resource-manager/network/2022-09-01/vpnlinkconnections/id_vpnlinkconnection.go delete mode 100644 resource-manager/network/2022-09-01/vpnlinkconnections/id_vpnlinkconnection_test.go delete mode 100644 resource-manager/network/2022-09-01/vpnlinkconnections/method_resetconnection.go delete mode 100644 resource-manager/network/2022-09-01/vpnlinkconnections/version.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/README.md delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/client.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/constants.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/id_vpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/id_vpnserverconfiguration_test.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_aadauthenticationparameters.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_addressspace.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2sconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2sconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2svpngateway.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2svpngatewayproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_radiusserver.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_staticroute.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vnetroute.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnclientconnectionhealth.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigradiusclientrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigradiusserverrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroup.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupmember.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrevokedcertificate.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/vpnserverconfigurations/version.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/README.md delete mode 100644 resource-manager/network/2022-09-01/vpnsites/client.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/constants.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/id_vpnsite.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/id_vpnsite_test.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/method_updatetags.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_addressspace.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_deviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_o365breakoutcategorypolicies.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_o365policyproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_tagsobject.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_vpnlinkbgpsettings.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_vpnlinkproviderproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_vpnsite.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_vpnsitelink.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_vpnsitelinkproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/model_vpnsiteproperties.go delete mode 100644 resource-manager/network/2022-09-01/vpnsites/version.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/README.md delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/client.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/constants.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy_test.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_createorupdate.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_delete.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_get.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_list.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_listall.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgateway.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificate.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayautoscaleconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettings.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettingspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettings.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettingspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayclientauthconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayconnectiondraining.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaycustomerror.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfirewalldisabledrulegroup.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfirewallexclusion.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendport.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendportpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayglobalconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayheaderconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistener.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistenerpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaylistener.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaylistenerpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicy.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontarget.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontargetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypathrule.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypathrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobe.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobehealthresponsematch.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrule.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterule.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleactionset.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulecondition.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleset.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulesetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrule.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificate.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslpolicy.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofile.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificate.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificate.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmap.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaywebapplicationfirewallconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ddossettings.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_delegation.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedrule.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedrulegroup.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedruleset.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlog.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_iptag.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedruleoverride.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedrulesdefinition.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedruleset.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_matchcondition.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_matchvariable.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgateway.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterface.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_owaspcrsexclusionentry.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_policysettings.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourceset.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_route.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routetable.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_securityrule.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subnet.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subresource.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallcustomrule.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicy.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/predicates.go delete mode 100644 resource-manager/network/2022-09-01/webapplicationfirewallpolicies/version.go delete mode 100644 resource-manager/network/2022-09-01/webcategories/README.md delete mode 100644 resource-manager/network/2022-09-01/webcategories/client.go delete mode 100644 resource-manager/network/2022-09-01/webcategories/id_azurewebcategory.go delete mode 100644 resource-manager/network/2022-09-01/webcategories/id_azurewebcategory_test.go delete mode 100644 resource-manager/network/2022-09-01/webcategories/method_get.go delete mode 100644 resource-manager/network/2022-09-01/webcategories/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-09-01/webcategories/model_azurewebcategory.go delete mode 100644 resource-manager/network/2022-09-01/webcategories/model_azurewebcategorypropertiesformat.go delete mode 100644 resource-manager/network/2022-09-01/webcategories/predicates.go delete mode 100644 resource-manager/network/2022-09-01/webcategories/version.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/README.md delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/client.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/constants.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/id_rulecollection.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/id_rulecollection_test.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/id_securityadminconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/id_securityadminconfiguration_test.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/method_get.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/method_list.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/model_adminrulecollection.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/model_adminrulecollectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/model_networkmanagersecuritygroupitem.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/predicates.go delete mode 100644 resource-manager/network/2022-11-01/adminrulecollections/version.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/README.md delete mode 100644 resource-manager/network/2022-11-01/adminrules/client.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/constants.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/id_rule.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/id_rule_test.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/id_rulecollection.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/id_rulecollection_test.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/method_get.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/method_list.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/model_addressprefixitem.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/model_adminpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/model_adminrule.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/model_baseadminrule.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/model_defaultadminpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/model_defaultadminrule.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/predicates.go delete mode 100644 resource-manager/network/2022-11-01/adminrules/version.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/README.md delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/client.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/constants.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway_test.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_get.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_list.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_update.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_route.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/predicates.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/version.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/README.md delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/client.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/id_applicationgateway.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/id_applicationgateway_test.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/method_list.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresource.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresourceproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/predicates.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/version.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/README.md delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/client.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/constants.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/id_applicationgateway.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/id_applicationgateway_test.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/id_predefinedpolicy.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/id_predefinedpolicy_test.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_backendhealth.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_backendhealthondemand.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_get.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_getsslpredefinedpolicy.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_list.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_listavailablerequestheaders.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_listavailableresponseheaders.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_listavailableservervariables.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_listavailablessloptions.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_listavailablesslpredefinedpolicies.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_listavailablewafrulesets.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_start.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_stop.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgateway.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablessloptions.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealth.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthpool.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthserver.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendsettings.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayconnectiondraining.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaycustomerror.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallexclusion.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallruleset.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendport.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayglobalconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayheaderconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayhttplistener.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaylistener.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayondemandprobe.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypathrule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobe.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayredirectconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrequestroutingrule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterulecondition.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriteruleset.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayroutingrule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslcertificate.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpolicy.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslprofile.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlpathmap.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_route.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/predicates.go delete mode 100644 resource-manager/network/2022-11-01/applicationgateways/version.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/README.md delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/client.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/constants.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/id_location.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsdefaultget.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsget.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallmanifestruleset.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrule.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrulegroup.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestpropertiesresult.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestresult.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_defaultrulesetpropertyformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/predicates.go delete mode 100644 resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/version.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/README.md delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/client.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/constants.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/id_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/id_applicationsecuritygroup_test.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/method_get.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/method_list.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/predicates.go delete mode 100644 resource-manager/network/2022-11-01/applicationsecuritygroups/version.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/README.md delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/client.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/id_location.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/id_providerlocation.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/id_providerlocation_test.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/method_availabledelegationslist.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/method_availableresourcegroupdelegationslist.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/model_availabledelegation.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/predicates.go delete mode 100644 resource-manager/network/2022-11-01/availabledelegations/version.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/README.md delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/client.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/id_location.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/id_providerlocation.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/id_providerlocation_test.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/method_availableservicealiaseslist.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/method_availableservicealiaseslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/model_availableservicealias.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/predicates.go delete mode 100644 resource-manager/network/2022-11-01/availableservicealiases/version.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/README.md delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/client.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/constants.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/id_azurefirewall.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/id_azurefirewall_test.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/method_azurefirewallslistlearnedprefixes.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/method_get.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/method_list.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/method_packetcapture.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewall.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrule.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrulecollection.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrulecollectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationruleprotocol.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipgroups.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrcaction.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrule.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrulecollection.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrulecollectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrule.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrulecollection.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrulecollectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpacketcaptureflags.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpacketcapturerule.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpublicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallrcaction.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallsku.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_firewallpacketcaptureparameters.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_firewallpacketcaptureparametersformat.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_hubipaddresses.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_hubpublicipaddresses.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_ipprefixeslist.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/predicates.go delete mode 100644 resource-manager/network/2022-11-01/azurefirewalls/version.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/README.md delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/client.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/constants.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/id_bastionhost.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/id_bastionhost_test.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_deletebastionshareablelink.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_disconnectactivesessions.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_get.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_getactivesessions.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_getbastionshareablelink.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_list.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_putbastionshareablelink.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_bastionactivesession.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_bastionhost.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_bastionhostipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_bastionhostpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_bastionsessionstate.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_bastionshareablelink.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_bastionshareablelinklistrequest.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_resource.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_sessionids.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_sku.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/predicates.go delete mode 100644 resource-manager/network/2022-11-01/bastionhosts/version.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/README.md delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/client.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/id_bastionhost.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/id_bastionhost_test.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/method_deletebastionshareablelink.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/method_getbastionshareablelink.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/method_putbastionshareablelink.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/model_bastionshareablelink.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/model_bastionshareablelinklistrequest.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/model_resource.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/predicates.go delete mode 100644 resource-manager/network/2022-11-01/bastionshareablelink/version.go delete mode 100644 resource-manager/network/2022-11-01/bgpservicecommunities/README.md delete mode 100644 resource-manager/network/2022-11-01/bgpservicecommunities/client.go delete mode 100644 resource-manager/network/2022-11-01/bgpservicecommunities/method_list.go delete mode 100644 resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpcommunity.go delete mode 100644 resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpservicecommunity.go delete mode 100644 resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpservicecommunitypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/bgpservicecommunities/predicates.go delete mode 100644 resource-manager/network/2022-11-01/bgpservicecommunities/version.go delete mode 100644 resource-manager/network/2022-11-01/checkdnsavailabilities/README.md delete mode 100644 resource-manager/network/2022-11-01/checkdnsavailabilities/client.go delete mode 100644 resource-manager/network/2022-11-01/checkdnsavailabilities/id_location.go delete mode 100644 resource-manager/network/2022-11-01/checkdnsavailabilities/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/checkdnsavailabilities/method_checkdnsnameavailability.go delete mode 100644 resource-manager/network/2022-11-01/checkdnsavailabilities/model_dnsnameavailabilityresult.go delete mode 100644 resource-manager/network/2022-11-01/checkdnsavailabilities/version.go delete mode 100644 resource-manager/network/2022-11-01/client.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/README.md delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/client.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/constants.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/id_providercloudservice.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/id_providercloudservice_test.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudservicepublicipaddresses.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudserviceroleinstancepublicipaddresses.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_route.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/predicates.go delete mode 100644 resource-manager/network/2022-11-01/cloudservicepublicipaddresses/version.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/README.md delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/client.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/constants.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/id_connectionmonitor.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/id_connectionmonitor_test.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/method_get.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/method_list.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/method_query.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/method_start.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/method_stop.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitor.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitordestination.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpoint.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointfilter.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointfilteritem.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointscope.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointscopeitem.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorhttpconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitoricmpconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorlistresult.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitoroutput.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorparameters.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorqueryresult.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorresult.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorresultproperties.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorsource.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorsuccessthreshold.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortcpconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortestconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortestgroup.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorworkspacesettings.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectionstatesnapshot.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectivityhop.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_connectivityissue.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_hoplink.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_hoplinkproperties.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_httpheader.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/connectionmonitors/version.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/README.md delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/client.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/constants.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/id_connectivityconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/id_connectivityconfiguration_test.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/id_networkmanager.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/method_get.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/method_list.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivityconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivityconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivitygroupitem.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/model_hub.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/predicates.go delete mode 100644 resource-manager/network/2022-11-01/connectivityconfigurations/version.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/README.md delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/client.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/constants.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/id_customipprefix.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/id_customipprefix_test.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/method_get.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/method_list.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/model_customipprefix.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/model_customipprefixpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/predicates.go delete mode 100644 resource-manager/network/2022-11-01/customipprefixes/version.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/README.md delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/client.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/constants.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/id_ddoscustompolicy.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/id_ddoscustompolicy_test.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/method_get.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/model_ddoscustompolicy.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/model_ddoscustompolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/ddoscustompolicies/version.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/README.md delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/client.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/constants.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/id_ddosprotectionplan.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/id_ddosprotectionplan_test.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/method_get.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/method_list.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/model_ddosprotectionplan.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/model_ddosprotectionplanpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/predicates.go delete mode 100644 resource-manager/network/2022-11-01/ddosprotectionplans/version.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/README.md delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/client.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/constants.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/id_dscpconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/id_dscpconfiguration_test.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/method_get.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_dscpconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_dscpconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_qosdefinition.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_qosiprange.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_qosportrange.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_route.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfiguration/version.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/README.md delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/client.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/constants.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/method_dscpconfigurationlist.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/method_dscpconfigurationlistall.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_dscpconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_dscpconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_qosdefinition.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_qosiprange.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_qosportrange.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_route.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/predicates.go delete mode 100644 resource-manager/network/2022-11-01/dscpconfigurations/version.go delete mode 100644 resource-manager/network/2022-11-01/endpointservices/README.md delete mode 100644 resource-manager/network/2022-11-01/endpointservices/client.go delete mode 100644 resource-manager/network/2022-11-01/endpointservices/id_location.go delete mode 100644 resource-manager/network/2022-11-01/endpointservices/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/endpointservices/method_availableendpointserviceslist.go delete mode 100644 resource-manager/network/2022-11-01/endpointservices/model_endpointserviceresult.go delete mode 100644 resource-manager/network/2022-11-01/endpointservices/predicates.go delete mode 100644 resource-manager/network/2022-11-01/endpointservices/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitarptable/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitarptable/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitarptable/id_arptable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitarptable/id_arptable_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitarptable/model_expressroutecircuitarptable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitarptable/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_authorization.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_authorization_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_expressroutecircuit_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/model_authorizationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/model_expressroutecircuitauthorization.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitauthorizations/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/id_peeringconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/id_peeringconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/model_expressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/model_expressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/model_ipv6circuitconnectionconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitconnections/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/id_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/id_expressroutecircuit_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeering.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitstats.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressrouteconnectionid.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_ipv6circuitconnectionconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitpeerings/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestable/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestable/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestable/id_peeringroutetable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestable/id_peeringroutetable_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestable/model_expressroutecircuitroutestable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestable/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/id_routetablessummary.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/id_routetablessummary_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/model_expressroutecircuitroutestablesummary.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/id_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/id_expressroutecircuit_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_authorizationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitauthorization.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeering.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitserviceproviderproperties.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitsku.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitstats.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_expressrouteconnectionid.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_ipv6circuitconnectionconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_peerexpressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_peerexpressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuits/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitstats/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitstats/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitstats/id_expressroutecircuit.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitstats/id_expressroutecircuit_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitstats/model_expressroutecircuitstats.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecircuitstats/version.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/README.md delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/client.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/id_expressrouteconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/id_expressrouteconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/id_expressroutegateway.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/id_expressroutegateway_test.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_expressroutecircuitpeeringid.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnectionlist.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_staticroute.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/model_vnetroute.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteconnections/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/id_peeringarptable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/id_peeringarptable_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/model_expressroutecircuitarptable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_peering.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_peering_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeering.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeeringproperties.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/model_expressroutecircuitroutestable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionroutestablesummary.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/id_expressroutecrossconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/id_expressroutecrossconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecircuitreference.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionpeering.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionpeeringproperties.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressroutecrossconnections/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/id_expressroutegateway.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/id_expressroutegateway_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_expressroutecircuitpeeringid.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_expressrouteconnection.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_expressrouteconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegateway.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaylist.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewayproperties.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfigurationbounds.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_staticroute.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_virtualhubid.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/model_vnetroute.go delete mode 100644 resource-manager/network/2022-11-01/expressroutegateways/version.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/README.md delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/client.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/id_expressrouteport.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/id_expressrouteport_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/id_link.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/id_link_test.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelink.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelinkmacsecconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressroutelinks/version.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/README.md delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/client.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteport.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteport_test.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteportauthorization.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteportauthorization_test.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/model_expressrouteportauthorization.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/model_expressrouteportauthorizationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportauthorizations/version.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/README.md delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/client.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/id_expressrouteport.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/id_expressrouteport_test.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/method_generateloa.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/model_expressroutelink.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/model_expressroutelinkmacsecconfig.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/model_expressroutelinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/model_expressrouteport.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/model_expressrouteportpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/model_generateexpressrouteportsloarequest.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/model_generateexpressrouteportsloaresult.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteports/version.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/README.md delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/client.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/id_expressrouteportslocation.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/id_expressrouteportslocation_test.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/method_get.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocation.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocationbandwidths.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteportslocations/version.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/README.md delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/client.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/id_expressrouteproviderport.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/id_expressrouteproviderport_test.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/method_expressrouteproviderport.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/method_locationlist.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderport.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderportlistresult.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderportproperties.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteproviderports/version.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteserviceproviders/README.md delete mode 100644 resource-manager/network/2022-11-01/expressrouteserviceproviders/client.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteserviceproviders/constants.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteserviceproviders/method_list.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceprovider.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceproviderbandwidthsoffered.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceproviderpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteserviceproviders/predicates.go delete mode 100644 resource-manager/network/2022-11-01/expressrouteserviceproviders/version.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/README.md delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/client.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/constants.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/id_firewallpolicy.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/id_firewallpolicy_test.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_get.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_list.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_dnssettings.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_explicitproxy.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_filteritems.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicy.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicycertificateauthority.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyinsights.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetection.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionbypasstrafficspecifications.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionsignaturespecification.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyloganalyticsresources.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyloganalyticsworkspace.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysku.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysnat.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysql.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicythreatintelwhitelist.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicytransportsecurity.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_idpsqueryobject.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_orderby.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_queryresults.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_signatureoverridesfiltervaluesquery.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_signatureoverridesfiltervaluesresponse.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverrides.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverrideslist.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverridesproperties.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_singlequeryresult.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/predicates.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicies/version.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/README.md delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/client.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/constants.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy_test.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup_test.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_get.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_list.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_applicationrule.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollectionaction.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyhttpheadertoinsert.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollectionaction.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyruleapplicationprotocol.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroup.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_natrule.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_networkrule.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/predicates.go delete mode 100644 resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/version.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/README.md delete mode 100644 resource-manager/network/2022-11-01/flowlogs/client.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/constants.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/id_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/id_flowlog_test.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/method_get.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/method_list.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/predicates.go delete mode 100644 resource-manager/network/2022-11-01/flowlogs/version.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/README.md delete mode 100644 resource-manager/network/2022-11-01/ipallocations/client.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/constants.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/id_ipallocation.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/id_ipallocation_test.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/method_get.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/method_list.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/model_ipallocation.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/model_ipallocationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/predicates.go delete mode 100644 resource-manager/network/2022-11-01/ipallocations/version.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/README.md delete mode 100644 resource-manager/network/2022-11-01/ipgroups/client.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/constants.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/id_ipgroup.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/id_ipgroup_test.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/method_get.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/method_list.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/method_updategroups.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/model_ipgroup.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/model_ipgrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/predicates.go delete mode 100644 resource-manager/network/2022-11-01/ipgroups/version.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/README.md delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/client.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/constants.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_backendaddresspool_test.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_frontendipconfiguration_test.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_inboundnatrule_test.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_loadbalancer.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_loadbalancer_test.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_loadbalancerbackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_loadbalancerbackendaddresspool_test.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_loadbalancingrule.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_loadbalancingrule_test.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_location.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_outboundrule.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_outboundrule_test.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_probe.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/id_probe_test.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_get.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulescreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulesdelete.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulesget.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_inboundnatruleslist.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_list.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_listinboundnatruleportmappings.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsdelete.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolslist.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationslist.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerloadbalancingruleslist.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancernetworkinterfaceslist.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalanceroutboundrulesget.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalanceroutboundruleslist.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerprobesget.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerprobeslist.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_swappublicipaddresses.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_backendaddressinboundnatruleportmappings.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_inboundnatpool.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_inboundnatpoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_inboundnatruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancer.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancersku.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequest.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancingrule.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_loadbalancingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_outboundrule.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_outboundrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_probe.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_probepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_queryinboundnatruleportmappingrequest.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_route.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/predicates.go delete mode 100644 resource-manager/network/2022-11-01/loadbalancers/version.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/README.md delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/client.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/constants.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/id_localnetworkgateway.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/id_localnetworkgateway_test.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/method_get.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/method_list.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/model_addressspace.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/model_localnetworkgateway.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/model_localnetworkgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/predicates.go delete mode 100644 resource-manager/network/2022-11-01/localnetworkgateways/version.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/README.md delete mode 100644 resource-manager/network/2022-11-01/natgateways/client.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/constants.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/id_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/id_natgateway_test.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/method_get.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/method_list.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/predicates.go delete mode 100644 resource-manager/network/2022-11-01/natgateways/version.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/README.md delete mode 100644 resource-manager/network/2022-11-01/networkgroups/client.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/id_networkgroup.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/id_networkgroup_test.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/id_networkmanager.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/method_get.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/method_list.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/model_networkgroup.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/predicates.go delete mode 100644 resource-manager/network/2022-11-01/networkgroups/version.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/README.md delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/client.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_providercloudservice.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_providercloudservice_test.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_roleinstance.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_roleinstance_test.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_roleinstancenetworkinterface.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_roleinstancenetworkinterface_test.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_tapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_tapconfiguration_test.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachine.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachine_test.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachinescaleset.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachinescaleset_test.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_get.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_getcloudservicenetworkinterface.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_geteffectiveroutetable.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_list.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_listcloudservicenetworkinterfaces.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_listcloudserviceroleinstancenetworkinterfaces.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetnetworkinterfaces.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetvmnetworkinterfaces.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceipconfigurationslist.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceloadbalancerslist.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfacetapconfigurationslist.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygroupassociation.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecurityrule.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_effectiveroute.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_effectiveroutelistresult.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatpool.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatpoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancer.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancersku.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancingrule.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_outboundrule.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_outboundrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_probe.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_probepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_route.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/predicates.go delete mode 100644 resource-manager/network/2022-11-01/networkinterfaces/version.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/README.md delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/client.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/id_networkmanager.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activeconfigurationparameter.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_addressprefixitem.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_adminpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_configurationgroup.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_defaultadminpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_networkmanagersecuritygroupitem.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconfigurations/version.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/README.md delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/client.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconfigurationparameter.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfigurationslistresult.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_configurationgroup.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_connectivityconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_connectivitygroupitem.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_hub.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/version.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/README.md delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/client.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/id_networkmanagerconnection.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/id_networkmanagerconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/id_providers2networkmanagerconnection.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/id_providers2networkmanagerconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsdelete.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsdelete.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/model_networkmanagerconnection.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/model_networkmanagerconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/predicates.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagerconnections/version.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/README.md delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/client.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_configurationgroup.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_connectivityconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_connectivitygroupitem.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_effectiveconnectivityconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_hub.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_networkmanagereffectiveconnectivityconfigurationlistresult.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_queryrequestoptions.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/version.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/README.md delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/client.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_addressprefixitem.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_adminpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_configurationgroup.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_defaultadminpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkgroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagersecuritygroupitem.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_queryrequestoptions.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/version.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/README.md delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/client.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/id_networkmanager.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/method_get.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/method_list.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/method_networkmanagercommitspost.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/method_patch.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/model_crosstenantscopes.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/model_networkmanager.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/model_networkmanagercommit.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatus.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatuslistresult.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatusparameter.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerpropertiesnetworkmanagerscopes.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/model_patchobject.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/predicates.go delete mode 100644 resource-manager/network/2022-11-01/networkmanagers/version.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/README.md delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/client.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/id_networkprofile.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/id_networkprofile_test.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/method_get.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/method_list.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterface.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkprofile.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networkprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_route.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/predicates.go delete mode 100644 resource-manager/network/2022-11-01/networkprofiles/version.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/README.md delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/client.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/constants.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/id_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/id_networksecuritygroup_test.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/method_get.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/method_list.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_route.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/predicates.go delete mode 100644 resource-manager/network/2022-11-01/networksecuritygroups/version.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/README.md delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/client.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/id_inboundsecurityrule.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/id_inboundsecurityrule_test.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/id_networkvirtualappliance.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/id_networkvirtualappliance_test.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/method_get.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/method_inboundsecurityrulecreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/method_list.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_delegationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityrule.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityruleproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityrules.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_networkvirtualappliance.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_networkvirtualappliancepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_partnermanagedresourceproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualapplianceadditionalnicproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualappliancenicproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualapplianceskuproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/predicates.go delete mode 100644 resource-manager/network/2022-11-01/networkvirtualappliances/version.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/README.md delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/client.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/constants.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_checkconnectivity.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_get.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_getazurereachabilityreport.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_getflowlogstatus.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_getnetworkconfigurationdiagnostic.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_getnexthop.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_gettopology.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_gettroubleshooting.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_gettroubleshootingresult.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_getvmsecurityrules.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_list.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_listavailableproviders.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_setflowlogconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/method_verifyipflow.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslist.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistcity.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistcountry.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_availableprovidersliststate.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreport.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportitem.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportlatencyinfo.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportlocation.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_connectivitydestination.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_connectivityhop.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_connectivityinformation.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_connectivityissue.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_connectivityparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_connectivitysource.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_effectivenetworksecurityrule.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_evaluatednetworksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_flowloginformation.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_flowlogproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_flowlogstatusparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_hoplink.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_hoplinkproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_httpconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_httpheader.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_matchedrule.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticprofile.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticresponse.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticresult.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networkinterfaceassociation.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networksecuritygroupresult.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networksecurityrulesevaluationresult.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networkwatcher.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networkwatcherlistresult.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_networkwatcherpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_nexthopparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_nexthopresult.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_protocolconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_querytroubleshootingparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_securitygroupnetworkinterface.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_securitygroupviewparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_securitygroupviewresult.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_securityruleassociations.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_subnetassociation.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_topology.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_topologyassociation.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_topologyparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_topologyresource.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingdetails.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingproperties.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingrecommendedactions.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingresult.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_verificationipflowparameters.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/model_verificationipflowresult.go delete mode 100644 resource-manager/network/2022-11-01/networkwatchers/version.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/README.md delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/client.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/constants.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/method_disconnectp2svpnconnections.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/method_generatevpnprofile.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/method_getp2svpnconnectionhealth.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/method_getp2svpnconnectionhealthdetailed.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/method_reset.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_addressspace.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_p2sconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_p2sconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionhealth.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionhealthrequest.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionrequest.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_p2svpngateway.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_p2svpngatewayproperties.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnprofileparameters.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_staticroute.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_vnetroute.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_vpnclientconnectionhealth.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_vpnprofileresponse.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroup.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroupmember.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/p2svpngateways/version.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/README.md delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/client.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/constants.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/id_packetcapture.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/id_packetcapture_test.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/method_create.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/method_get.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/method_getstatus.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/method_list.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/method_stop.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/model_packetcapture.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/model_packetcapturefilter.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/model_packetcapturelistresult.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/model_packetcapturemachinescope.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureparameters.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/model_packetcapturequerystatusresult.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureresult.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureresultproperties.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/model_packetcapturestoragelocation.go delete mode 100644 resource-manager/network/2022-11-01/packetcaptures/version.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/README.md delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/client.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/constants.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/id_peerconnection.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/id_peerconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/method_get.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/method_list.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/predicates.go delete mode 100644 resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/version.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/README.md delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/client.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/constants.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/id_privatednszonegroup.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/id_privatednszonegroup_test.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/id_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/id_privateendpoint_test.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/method_get.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/method_list.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszoneconfig.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonegroup.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonegrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/model_recordset.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/predicates.go delete mode 100644 resource-manager/network/2022-11-01/privatednszonegroups/version.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/README.md delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/client.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/constants.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/id_location.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/id_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/id_privateendpoint_test.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/id_providerlocation.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/id_providerlocation_test.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/method_availableprivateendpointtypeslist.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/method_get.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/method_list.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_availableprivateendpointtype.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_route.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/predicates.go delete mode 100644 resource-manager/network/2022-11-01/privateendpoints/version.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/README.md delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/client.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/constants.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/id_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/id_privatelinkservice_test.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_route.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservice/version.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/README.md delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/client.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/constants.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/id_location.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/id_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/id_privateendpointconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/id_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/id_privatelinkservice_test.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/id_providerlocation.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/id_providerlocation_test.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_checkprivatelinkservicevisibility.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_checkprivatelinkservicevisibilitybyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_deleteprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_get.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_getprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_list.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_listautoapprovedprivatelinkservices.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_listautoapprovedprivatelinkservicesbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_listprivateendpointconnections.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/method_updateprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_autoapprovedprivatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_checkprivatelinkservicevisibilityrequest.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkservicevisibility.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_route.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/predicates.go delete mode 100644 resource-manager/network/2022-11-01/privatelinkservices/version.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/README.md delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/client.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/constants.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/method_ddosprotectionstatus.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/method_get.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/method_list.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_publicipddosprotectionstatusresult.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_route.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/predicates.go delete mode 100644 resource-manager/network/2022-11-01/publicipaddresses/version.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/README.md delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/client.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/constants.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/id_publicipprefix.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/id_publicipprefix_test.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/method_get.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/method_list.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefix.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefixpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefixsku.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_referencedpublicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/predicates.go delete mode 100644 resource-manager/network/2022-11-01/publicipprefixes/version.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/README.md delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/client.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/constants.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/id_routefilter.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/id_routefilter_test.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/id_routefilterrule.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/id_routefilterrule_test.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/method_get.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/method_listbyroutefilter.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/model_routefilterrule.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/model_routefilterrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/predicates.go delete mode 100644 resource-manager/network/2022-11-01/routefilterrules/version.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/README.md delete mode 100644 resource-manager/network/2022-11-01/routefilters/client.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/constants.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/id_routefilter.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/id_routefilter_test.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/method_get.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/method_list.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeering.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitstats.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_expressrouteconnectionid.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_ipv6circuitconnectionconfig.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_ipv6expressroutecircuitpeeringconfig.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_peerexpressroutecircuitconnection.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_peerexpressroutecircuitconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_routefilter.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_routefilterpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_routefilterrule.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_routefilterrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/predicates.go delete mode 100644 resource-manager/network/2022-11-01/routefilters/version.go delete mode 100644 resource-manager/network/2022-11-01/routes/README.md delete mode 100644 resource-manager/network/2022-11-01/routes/client.go delete mode 100644 resource-manager/network/2022-11-01/routes/constants.go delete mode 100644 resource-manager/network/2022-11-01/routes/id_route.go delete mode 100644 resource-manager/network/2022-11-01/routes/id_route_test.go delete mode 100644 resource-manager/network/2022-11-01/routes/id_routetable.go delete mode 100644 resource-manager/network/2022-11-01/routes/id_routetable_test.go delete mode 100644 resource-manager/network/2022-11-01/routes/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/routes/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/routes/method_get.go delete mode 100644 resource-manager/network/2022-11-01/routes/method_list.go delete mode 100644 resource-manager/network/2022-11-01/routes/model_route.go delete mode 100644 resource-manager/network/2022-11-01/routes/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routes/predicates.go delete mode 100644 resource-manager/network/2022-11-01/routes/version.go delete mode 100644 resource-manager/network/2022-11-01/routetables/README.md delete mode 100644 resource-manager/network/2022-11-01/routetables/client.go delete mode 100644 resource-manager/network/2022-11-01/routetables/constants.go delete mode 100644 resource-manager/network/2022-11-01/routetables/id_routetable.go delete mode 100644 resource-manager/network/2022-11-01/routetables/id_routetable_test.go delete mode 100644 resource-manager/network/2022-11-01/routetables/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/routetables/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/routetables/method_get.go delete mode 100644 resource-manager/network/2022-11-01/routetables/method_list.go delete mode 100644 resource-manager/network/2022-11-01/routetables/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/routetables/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_route.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/routetables/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/routetables/predicates.go delete mode 100644 resource-manager/network/2022-11-01/routetables/version.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/README.md delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/client.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/constants.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/id_networkmanager.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/id_scopeconnection.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/id_scopeconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/method_get.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/method_list.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/model_scopeconnection.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/model_scopeconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/predicates.go delete mode 100644 resource-manager/network/2022-11-01/scopeconnections/version.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/README.md delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/client.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/constants.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/id_networkmanager.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/id_networkmanager_test.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/id_securityadminconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/id_securityadminconfiguration_test.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/method_get.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/method_list.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/model_securityadminconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/model_securityadminconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/predicates.go delete mode 100644 resource-manager/network/2022-11-01/securityadminconfigurations/version.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/README.md delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/client.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/constants.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/id_securitypartnerprovider.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/id_securitypartnerprovider_test.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/method_get.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/method_list.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/model_securitypartnerprovider.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/model_securitypartnerproviderpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/predicates.go delete mode 100644 resource-manager/network/2022-11-01/securitypartnerproviders/version.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/README.md delete mode 100644 resource-manager/network/2022-11-01/securityrules/client.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/constants.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/id_defaultsecurityrule.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/id_defaultsecurityrule_test.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/id_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/id_networksecuritygroup_test.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/id_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/id_securityrule_test.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/method_defaultsecurityrulesget.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/method_defaultsecurityruleslist.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/method_get.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/method_list.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/predicates.go delete mode 100644 resource-manager/network/2022-11-01/securityrules/version.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/README.md delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/client.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/constants.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/id_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/id_serviceendpointpolicy_test.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/method_get.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/method_list.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_route.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/predicates.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicies/version.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/README.md delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/client.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/constants.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy_test.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition_test.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_get.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/predicates.go delete mode 100644 resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/version.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/README.md delete mode 100644 resource-manager/network/2022-11-01/servicetags/client.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/id_location.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/method_servicetaginformationlist.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/method_servicetagslist.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/model_servicetaginformation.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/model_servicetaginformationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/model_servicetagslistresult.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/predicates.go delete mode 100644 resource-manager/network/2022-11-01/servicetags/version.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/README.md delete mode 100644 resource-manager/network/2022-11-01/staticmembers/client.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/constants.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/id_networkgroup.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/id_networkgroup_test.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/id_staticmember.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/id_staticmember_test.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/method_get.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/method_list.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/model_staticmember.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/model_staticmemberproperties.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/predicates.go delete mode 100644 resource-manager/network/2022-11-01/staticmembers/version.go delete mode 100644 resource-manager/network/2022-11-01/subnets/README.md delete mode 100644 resource-manager/network/2022-11-01/subnets/client.go delete mode 100644 resource-manager/network/2022-11-01/subnets/constants.go delete mode 100644 resource-manager/network/2022-11-01/subnets/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/subnets/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/subnets/method_get.go delete mode 100644 resource-manager/network/2022-11-01/subnets/method_list.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_route.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/subnets/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/subnets/predicates.go delete mode 100644 resource-manager/network/2022-11-01/subnets/version.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/README.md delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/client.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/constants.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/id_networkwatcher.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/id_networkwatcher_test.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/method_networkwatchersgetflowlogstatus.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/method_networkwatcherssetflowlogconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/model_flowloginformation.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/model_flowlogproperties.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/model_flowlogstatusparameters.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/trafficanalytics/version.go delete mode 100644 resource-manager/network/2022-11-01/usages/README.md delete mode 100644 resource-manager/network/2022-11-01/usages/client.go delete mode 100644 resource-manager/network/2022-11-01/usages/constants.go delete mode 100644 resource-manager/network/2022-11-01/usages/id_location.go delete mode 100644 resource-manager/network/2022-11-01/usages/id_location_test.go delete mode 100644 resource-manager/network/2022-11-01/usages/method_list.go delete mode 100644 resource-manager/network/2022-11-01/usages/model_usage.go delete mode 100644 resource-manager/network/2022-11-01/usages/model_usagename.go delete mode 100644 resource-manager/network/2022-11-01/usages/predicates.go delete mode 100644 resource-manager/network/2022-11-01/usages/version.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/README.md delete mode 100644 resource-manager/network/2022-11-01/vipswap/client.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/constants.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/id_cloudservice.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/id_cloudservice_test.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/method_create.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/method_get.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/method_list.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/model_swapresource.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/model_swapresourcelistresult.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/model_swapresourceproperties.go delete mode 100644 resource-manager/network/2022-11-01/vipswap/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/id_networkvirtualappliance.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/id_networkvirtualappliance_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/id_virtualappliancesite.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/id_virtualappliancesite_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/method_get.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/method_list.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/model_breakoutcategorypolicies.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/model_office365policyproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/model_virtualappliancesite.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/model_virtualappliancesiteproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualappliancesites/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/id_networkvirtualappliancesku.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/id_networkvirtualappliancesku_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/method_get.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/method_list.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualappliancesku.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualapplianceskuinstances.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualapplianceskupropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualapplianceskus/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/id_connection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/id_connection_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_get.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_getikesas.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_getsharedkey.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_list.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_resetconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_resetsharedkey.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_setsharedkey.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_startpacketcapture.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_stoppacketcapture.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_addressspace.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_connectionresetsharedkey.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_connectionsharedkey.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_gatewaycustombgpipaddressipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_localnetworkgateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_localnetworkgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_radiusserver.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_trafficselectorpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_tunnelconnectionhealth.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnectionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatruleproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupmember.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnnatrulemapping.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestartparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestopparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/id_connection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/id_connection_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgateway_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_disconnectvirtualnetworkgatewayvpnconnections.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_generatevpnclientpackage.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_generatevpnprofile.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_get.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_getadvertisedroutes.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_getbgppeerstatus.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_getlearnedroutes.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnclientconnectionhealth.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnclientipsecparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnprofilepackageurl.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_list.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_listconnections.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_reset.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_resetvpnclientsharedkey.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_setvpnclientipsecparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_startpacketcapture.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_stoppacketcapture.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_supportedvpndevices.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulescreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatruleslistbyvirtualnetworkgateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_addressspace.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgppeerstatus.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgppeerstatuslistresult.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewaycustombgpipaddressipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewayroute.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewayroutelistresult.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_p2svpnconnectionrequest.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_radiusserver.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_trafficselectorpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_tunnelconnectionhealth.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkconnectiongatewayreference.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentity.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentitypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaynatrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaynatruleproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupmember.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vngclientconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vngclientconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetail.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetaillistresult.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientipsecparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrevokedcertificate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrevokedcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrootcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpndevicescriptparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnnatrulemapping.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnpacketcapturestartparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnpacketcapturestopparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkgateways/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/id_virtualnetworkpeering.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/id_virtualnetworkpeering_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/method_get.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/method_list.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/model_addressspace.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkbgpcommunities.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkencryption.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkpeering.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworkpeerings/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_get.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_list.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_resourcenavigationlinkslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_serviceassociationlinkslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_subnetspreparenetworkpolicies.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_subnetsunpreparenetworkpolicies.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkslistusage.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_addressspace.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_dhcpoptions.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_ipaddressavailabilityresult.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkintentpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkintentpolicyconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_preparenetworkpoliciesrequest.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_publicipddosprotectionstatusresult.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlinkslistresult.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_route.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlinkslistresult.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_unpreparenetworkpoliciesrequest.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetwork.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkbgpcommunities.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkencryption.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpeering.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpeeringpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkusage.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkusagename.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworks/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/id_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/id_virtualnetworktap_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/method_get.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_route.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktap/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_route.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualnetworktaps/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/id_virtualrouter.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/id_virtualrouter_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/method_get.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/method_list.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/model_virtualrouterpeering.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/model_virtualrouterpeeringproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouterpeerings/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/id_virtualrouter.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/id_virtualrouter_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/method_get.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/method_list.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/method_listbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/model_virtualrouter.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/model_virtualrouterpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualrouters/version.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/README.md delete mode 100644 resource-manager/network/2022-11-01/virtualwans/client.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/constants.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_configurationpolicygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_configurationpolicygroup_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_hubroutetable.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_hubroutetable_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_hubvirtualnetworkconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_hubvirtualnetworkconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_natrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_natrule_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_networkvirtualappliance.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_networkvirtualappliance_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_networkvirtualapplianceconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_networkvirtualapplianceconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_routemap.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_routemap_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_routingintent.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_routingintent_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_virtualhub.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_virtualhub_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_virtualhubroutetable.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_virtualhubroutetable_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_virtualwan.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_virtualwan_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpngateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpngateway_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpnlinkconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpnlinkconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpnserverconfiguration_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpnsite.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpnsite_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpnsitelink.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/id_vpnsitelink_test.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupsdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupsget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupslistbyvpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_generatevirtualwanvpnserverconfigurationvpnprofile.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_hubroutetablescreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_hubroutetablesdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_hubroutetablesget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_hubroutetableslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionsdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionsget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_natrulescreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_natrulesdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_natrulesget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_natruleslistbyvpngateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionsdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionsget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewaysdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewaysget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_routemapscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_routemapsdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_routemapsget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_routemapslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_routingintentcreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_routingintentdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_routingintentget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_routingintentlist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_supportedsecurityproviders.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectioncreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectiondelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslistadvertisedroutes.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslistlearnedroutes.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationcreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationlist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2screateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2sdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2sget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2slist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubsdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubsget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgeteffectivevirtualhubroutes.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgetinboundroutes.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgetoutboundroutes.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualhubsupdatetags.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualwanscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualwansdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualwansget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualwanslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_virtualwanslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionslistbyvpngateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsstartpacketcapture.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsstoppacketcapture.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpngatewayscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpngatewaysdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpngatewaysget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpngatewayslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpngatewayslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnlinkconnectionsgetikesas.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnlinkconnectionslistbyvpnconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsassociatedwithvirtualwanlist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationscreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinkconnectionsget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinksget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinkslistbyvpnsite.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnsitesconfigurationdownload.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnsitescreateorupdate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnsitesdelete.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnsitesget.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnsiteslist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/method_vpnsiteslistbyresourcegroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_aadauthenticationparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_action.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_addressspace.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_bgpconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_bgpconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_criterion.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_deviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_effectiveroutemaproute.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_effectiveroutemaproutelist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_effectiveroutesparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_gatewaycustombgpipaddressipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_getinboundroutesparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_getoutboundroutesparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_getvpnsitesconfigurationrequest.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_hubipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_hubipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_hubroute.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_hubroutetable.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_hubroutetableproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_hubvirtualnetworkconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_hubvirtualnetworkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkvirtualapplianceconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_networkvirtualapplianceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_o365breakoutcategorypolicies.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_o365policyproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_p2sconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_p2sconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_p2svpngateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_p2svpngatewayproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_parameter.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_peerroute.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_propagatedroutetablenfv.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_radiusserver.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_route.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routemap.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routemapproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routemaprule.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routingconfigurationnfv.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routingconfigurationnfvsubresource.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routingintent.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routingintentproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_routingpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_staticroute.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_trafficselectorpolicy.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualhub.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualhubeffectiveroute.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualhubeffectiveroutelist.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualhubproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualhubroute.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetable.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetablev2.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetablev2properties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutev2.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualrouterautoscaleconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualwan.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualwanproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualwansecurityprovider.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualwansecurityproviders.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_virtualwanvpnprofileparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vnetroute.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnclientconnectionhealth.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionpacketcapturestartparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionpacketcapturestopparameters.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpngateway.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpngatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpngatewaynatrule.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpngatewaynatruleproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpngatewayproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnlinkbgpsettings.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnlinkproviderproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnnatrulemapping.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnprofileresponse.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigradiusclientrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigradiusserverrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroup.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroupmember.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationsresponse.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigvpnclientrevokedcertificate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigvpnclientrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnsite.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnsitelink.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkconnection.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/model_vpnsiteproperties.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/predicates.go delete mode 100644 resource-manager/network/2022-11-01/virtualwans/version.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/README.md delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/client.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/constants.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/id_virtualmachinescaleset.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/id_virtualmachinescaleset_test.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetpublicipaddresses.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetvmpublicipaddresses.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_route.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/predicates.go delete mode 100644 resource-manager/network/2022-11-01/vmsspublicipaddresses/version.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/README.md delete mode 100644 resource-manager/network/2022-11-01/vpngateways/client.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/constants.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/id_vpngateway.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/id_vpngateway_test.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/method_reset.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/method_startpacketcapture.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/method_stoppacketcapture.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_gatewaycustombgpipaddressipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_staticroute.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_trafficselectorpolicy.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vnetroute.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpnconnection.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpnconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpngateway.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpngatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpngatewaynatrule.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpngatewaynatruleproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpngatewaypacketcapturestartparameters.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpngatewaypacketcapturestopparameters.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpngatewayproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpnnatrulemapping.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpnsitelinkconnection.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/model_vpnsitelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpngateways/version.go delete mode 100644 resource-manager/network/2022-11-01/vpnlinkconnections/client.go delete mode 100644 resource-manager/network/2022-11-01/vpnlinkconnections/id_vpnlinkconnection.go delete mode 100644 resource-manager/network/2022-11-01/vpnlinkconnections/id_vpnlinkconnection_test.go delete mode 100644 resource-manager/network/2022-11-01/vpnlinkconnections/method_resetconnection.go delete mode 100644 resource-manager/network/2022-11-01/vpnlinkconnections/version.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/README.md delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/client.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/constants.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/id_vpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/id_vpnserverconfiguration_test.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_aadauthenticationparameters.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_addressspace.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_ipsecpolicy.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2sconnectionconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2sconnectionconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2svpngateway.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2svpngatewayproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_propagatedroutetable.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_radiusserver.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_routingconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_staticroute.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_staticroutesconfig.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vnetroute.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnclientconnectionhealth.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigradiusclientrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigradiusserverrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroup.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupmember.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrevokedcertificate.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/vpnserverconfigurations/version.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/README.md delete mode 100644 resource-manager/network/2022-11-01/vpnsites/client.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/constants.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/id_vpnsite.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/id_vpnsite_test.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/method_updatetags.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_addressspace.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_bgpsettings.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_deviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_ipconfigurationbgppeeringaddress.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_o365breakoutcategorypolicies.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_o365policyproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_tagsobject.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_vpnlinkbgpsettings.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_vpnlinkproviderproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_vpnsite.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_vpnsitelink.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_vpnsitelinkproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/model_vpnsiteproperties.go delete mode 100644 resource-manager/network/2022-11-01/vpnsites/version.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/README.md delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/client.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/constants.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy_test.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_createorupdate.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_delete.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_get.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_list.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_listall.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgateway.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificate.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayautoscaleconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettings.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettingspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettings.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettingspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayclientauthconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayconnectiondraining.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaycustomerror.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfirewalldisabledrulegroup.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfirewallexclusion.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendport.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendportpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayglobalconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayheaderconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistener.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistenerpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaylistener.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaylistenerpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicy.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontarget.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontargetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypathrule.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypathrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobe.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobehealthresponsematch.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrule.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterule.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleactionset.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulecondition.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleset.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulesetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrule.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificate.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslpolicy.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofile.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificate.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificate.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificatepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmap.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaywebapplicationfirewallconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationsecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationsecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_backendaddresspool.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_backendaddresspoolpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_customdnsconfigpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ddossettings.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_delegation.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedrule.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedrulegroup.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedruleset.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlog.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlogformatparameters.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlogpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_frontendipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_frontendipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_gatewayloadbalancertunnelinterface.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_groupbyusersession.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_groupbyvariable.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_inboundnatrule.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_inboundnatrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationprofile.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationprofilepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_iptag.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddress.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedruleoverride.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedrulesdefinition.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedruleset.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_matchcondition.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_matchvariable.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgateway.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgatewaypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgatewaysku.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natruleportmapping.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterface.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacednssettings.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacetapconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacetapconfigurationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networksecuritygroup.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networksecuritygrouppropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_owaspcrsexclusionentry.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_policysettings.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_policysettingslogscrubbing.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpoint.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointconnection.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkservice.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnection.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionstate.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfiguration.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddress.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddressdnssettings.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddresspropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddresssku.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourcenavigationlink.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourcenavigationlinkformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourceset.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_retentionpolicyparameters.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_route.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routetable.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routetablepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_securityrule.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_securityrulepropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceassociationlink.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceassociationlinkpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_servicedelegationpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicy.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinition.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subnet.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subnetpropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subresource.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_trafficanalyticsconfigurationproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_trafficanalyticsproperties.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_virtualnetworktap.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_virtualnetworktappropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallcustomrule.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicy.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallscrubbingrules.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/predicates.go delete mode 100644 resource-manager/network/2022-11-01/webapplicationfirewallpolicies/version.go delete mode 100644 resource-manager/network/2022-11-01/webcategories/README.md delete mode 100644 resource-manager/network/2022-11-01/webcategories/client.go delete mode 100644 resource-manager/network/2022-11-01/webcategories/id_azurewebcategory.go delete mode 100644 resource-manager/network/2022-11-01/webcategories/id_azurewebcategory_test.go delete mode 100644 resource-manager/network/2022-11-01/webcategories/method_get.go delete mode 100644 resource-manager/network/2022-11-01/webcategories/method_listbysubscription.go delete mode 100644 resource-manager/network/2022-11-01/webcategories/model_azurewebcategory.go delete mode 100644 resource-manager/network/2022-11-01/webcategories/model_azurewebcategorypropertiesformat.go delete mode 100644 resource-manager/network/2022-11-01/webcategories/predicates.go delete mode 100644 resource-manager/network/2022-11-01/webcategories/version.go diff --git a/resource-manager/network/2022-09-01/adminrulecollections/README.md b/resource-manager/network/2022-09-01/adminrulecollections/README.md deleted file mode 100644 index caff6907069..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/adminrulecollections` Documentation - -The `adminrulecollections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/adminrulecollections" -``` - - -### Client Initialization - -```go -client := adminrulecollections.NewAdminRuleCollectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AdminRuleCollectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := adminrulecollections.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - -payload := adminrulecollections.AdminRuleCollection{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AdminRuleCollectionsClient.Delete` - -```go -ctx := context.TODO() -id := adminrulecollections.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - -if err := client.DeleteThenPoll(ctx, id, adminrulecollections.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `AdminRuleCollectionsClient.Get` - -```go -ctx := context.TODO() -id := adminrulecollections.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AdminRuleCollectionsClient.List` - -```go -ctx := context.TODO() -id := adminrulecollections.NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - -// alternatively `client.List(ctx, id, adminrulecollections.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, adminrulecollections.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/adminrulecollections/client.go b/resource-manager/network/2022-09-01/adminrulecollections/client.go deleted file mode 100644 index 8178e8ff455..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package adminrulecollections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRuleCollectionsClient struct { - Client *resourcemanager.Client -} - -func NewAdminRuleCollectionsClientWithBaseURI(api environments.Api) (*AdminRuleCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "adminrulecollections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AdminRuleCollectionsClient: %+v", err) - } - - return &AdminRuleCollectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/constants.go b/resource-manager/network/2022-09-01/adminrulecollections/constants.go deleted file mode 100644 index d3e735bf0f1..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package adminrulecollections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/id_rulecollection.go b/resource-manager/network/2022-09-01/adminrulecollections/id_rulecollection.go deleted file mode 100644 index 49cb86529fd..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/id_rulecollection.go +++ /dev/null @@ -1,153 +0,0 @@ -package adminrulecollections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionId{} - -// RuleCollectionId is a struct representing the Resource ID for a Rule Collection -type RuleCollectionId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string - RuleCollectionName string -} - -// NewRuleCollectionID returns a new RuleCollectionId struct -func NewRuleCollectionID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string, ruleCollectionName string) RuleCollectionId { - return RuleCollectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - RuleCollectionName: ruleCollectionName, - } -} - -// ParseRuleCollectionID parses 'input' into a RuleCollectionId -func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - return &id, nil -} - -// ParseRuleCollectionIDInsensitively parses 'input' case-insensitively into a RuleCollectionId -// note: this method should only be used for API response data and not user input -func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - return &id, nil -} - -// ValidateRuleCollectionID checks that 'input' can be parsed as a Rule Collection ID -func ValidateRuleCollectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRuleCollectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Rule Collection ID -func (id RuleCollectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s/ruleCollections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName, id.RuleCollectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Rule Collection ID -func (id RuleCollectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - resourceids.StaticSegment("staticRuleCollections", "ruleCollections", "ruleCollections"), - resourceids.UserSpecifiedSegment("ruleCollectionName", "ruleCollectionValue"), - } -} - -// String returns a human-readable description of this Rule Collection ID -func (id RuleCollectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - fmt.Sprintf("Rule Collection Name: %q", id.RuleCollectionName), - } - return fmt.Sprintf("Rule Collection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/id_rulecollection_test.go b/resource-manager/network/2022-09-01/adminrulecollections/id_rulecollection_test.go deleted file mode 100644 index 20f37dd74b2..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/id_rulecollection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package adminrulecollections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionId{} - -func TestNewRuleCollectionID(t *testing.T) { - id := NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } - - if id.RuleCollectionName != "ruleCollectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleCollectionName'", id.RuleCollectionName, "ruleCollectionValue") - } -} - -func TestFormatRuleCollectionID(t *testing.T) { - actual := NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRuleCollectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - } -} - -func TestParseRuleCollectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - RuleCollectionName: "rUlEcOlLeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - } -} - -func TestSegmentsForRuleCollectionId(t *testing.T) { - segments := RuleCollectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RuleCollectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/id_securityadminconfiguration.go b/resource-manager/network/2022-09-01/adminrulecollections/id_securityadminconfiguration.go deleted file mode 100644 index 6e36b78776a..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/id_securityadminconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package adminrulecollections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityAdminConfigurationId{} - -// SecurityAdminConfigurationId is a struct representing the Resource ID for a Security Admin Configuration -type SecurityAdminConfigurationId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string -} - -// NewSecurityAdminConfigurationID returns a new SecurityAdminConfigurationId struct -func NewSecurityAdminConfigurationID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string) SecurityAdminConfigurationId { - return SecurityAdminConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - } -} - -// ParseSecurityAdminConfigurationID parses 'input' into a SecurityAdminConfigurationId -func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityAdminConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseSecurityAdminConfigurationIDInsensitively parses 'input' case-insensitively into a SecurityAdminConfigurationId -// note: this method should only be used for API response data and not user input -func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdminConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityAdminConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateSecurityAdminConfigurationID checks that 'input' can be parsed as a Security Admin Configuration ID -func ValidateSecurityAdminConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseSecurityAdminConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Security Admin Configuration ID -func (id SecurityAdminConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Security Admin Configuration ID -func (id SecurityAdminConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - } -} - -// String returns a human-readable description of this Security Admin Configuration ID -func (id SecurityAdminConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - } - return fmt.Sprintf("Security Admin Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/id_securityadminconfiguration_test.go b/resource-manager/network/2022-09-01/adminrulecollections/id_securityadminconfiguration_test.go deleted file mode 100644 index 42b1fad13cd..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/id_securityadminconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package adminrulecollections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityAdminConfigurationId{} - -func TestNewSecurityAdminConfigurationID(t *testing.T) { - id := NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } -} - -func TestFormatSecurityAdminConfigurationID(t *testing.T) { - actual := NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseSecurityAdminConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityAdminConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityAdminConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - } -} - -func TestParseSecurityAdminConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityAdminConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityAdminConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - } -} - -func TestSegmentsForSecurityAdminConfigurationId(t *testing.T) { - segments := SecurityAdminConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("SecurityAdminConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/method_createorupdate.go b/resource-manager/network/2022-09-01/adminrulecollections/method_createorupdate.go deleted file mode 100644 index ac366ae086f..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package adminrulecollections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AdminRuleCollection -} - -// CreateOrUpdate ... -func (c AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, id RuleCollectionId, input AdminRuleCollection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/method_delete.go b/resource-manager/network/2022-09-01/adminrulecollections/method_delete.go deleted file mode 100644 index 2a158c78562..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package adminrulecollections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c AdminRuleCollectionsClient) Delete(ctx context.Context, id RuleCollectionId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c AdminRuleCollectionsClient) DeleteThenPoll(ctx context.Context, id RuleCollectionId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/method_get.go b/resource-manager/network/2022-09-01/adminrulecollections/method_get.go deleted file mode 100644 index a1b5a99ad4e..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package adminrulecollections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AdminRuleCollection -} - -// Get ... -func (c AdminRuleCollectionsClient) Get(ctx context.Context, id RuleCollectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/method_list.go b/resource-manager/network/2022-09-01/adminrulecollections/method_list.go deleted file mode 100644 index 2297f469162..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package adminrulecollections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AdminRuleCollection -} - -type ListCompleteResult struct { - Items []AdminRuleCollection -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c AdminRuleCollectionsClient) List(ctx context.Context, id SecurityAdminConfigurationId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ruleCollections", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AdminRuleCollection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c AdminRuleCollectionsClient) ListComplete(ctx context.Context, id SecurityAdminConfigurationId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, AdminRuleCollectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AdminRuleCollectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id SecurityAdminConfigurationId, options ListOperationOptions, predicate AdminRuleCollectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]AdminRuleCollection, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/model_adminrulecollection.go b/resource-manager/network/2022-09-01/adminrulecollections/model_adminrulecollection.go deleted file mode 100644 index aea91d2ba70..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/model_adminrulecollection.go +++ /dev/null @@ -1,17 +0,0 @@ -package adminrulecollections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRuleCollection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AdminRuleCollectionPropertiesFormat `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/model_adminrulecollectionpropertiesformat.go b/resource-manager/network/2022-09-01/adminrulecollections/model_adminrulecollectionpropertiesformat.go deleted file mode 100644 index 864de2165bf..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/model_adminrulecollectionpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package adminrulecollections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRuleCollectionPropertiesFormat struct { - AppliesToGroups []NetworkManagerSecurityGroupItem `json:"appliesToGroups"` - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/model_networkmanagersecuritygroupitem.go b/resource-manager/network/2022-09-01/adminrulecollections/model_networkmanagersecuritygroupitem.go deleted file mode 100644 index ce59c38f4fd..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/model_networkmanagersecuritygroupitem.go +++ /dev/null @@ -1,8 +0,0 @@ -package adminrulecollections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerSecurityGroupItem struct { - NetworkGroupId string `json:"networkGroupId"` -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/predicates.go b/resource-manager/network/2022-09-01/adminrulecollections/predicates.go deleted file mode 100644 index 67b37b95643..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package adminrulecollections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRuleCollectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p AdminRuleCollectionOperationPredicate) Matches(input AdminRuleCollection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/adminrulecollections/version.go b/resource-manager/network/2022-09-01/adminrulecollections/version.go deleted file mode 100644 index 644c13c1a0e..00000000000 --- a/resource-manager/network/2022-09-01/adminrulecollections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package adminrulecollections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrulecollections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/adminrules/README.md b/resource-manager/network/2022-09-01/adminrules/README.md deleted file mode 100644 index a7de737affd..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/adminrules` Documentation - -The `adminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/adminrules" -``` - - -### Client Initialization - -```go -client := adminrules.NewAdminRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AdminRulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := adminrules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue") - -payload := adminrules.BaseAdminRule{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AdminRulesClient.Delete` - -```go -ctx := context.TODO() -id := adminrules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue") - -if err := client.DeleteThenPoll(ctx, id, adminrules.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `AdminRulesClient.Get` - -```go -ctx := context.TODO() -id := adminrules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AdminRulesClient.List` - -```go -ctx := context.TODO() -id := adminrules.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/adminrules/client.go b/resource-manager/network/2022-09-01/adminrules/client.go deleted file mode 100644 index 30ee4dc30a9..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package adminrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRulesClient struct { - Client *resourcemanager.Client -} - -func NewAdminRulesClientWithBaseURI(api environments.Api) (*AdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "adminrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AdminRulesClient: %+v", err) - } - - return &AdminRulesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/adminrules/constants.go b/resource-manager/network/2022-09-01/adminrules/constants.go deleted file mode 100644 index fbaa03c5543..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/constants.go +++ /dev/null @@ -1,277 +0,0 @@ -package adminrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixType string - -const ( - AddressPrefixTypeIPPrefix AddressPrefixType = "IPPrefix" - AddressPrefixTypeServiceTag AddressPrefixType = "ServiceTag" -) - -func PossibleValuesForAddressPrefixType() []string { - return []string{ - string(AddressPrefixTypeIPPrefix), - string(AddressPrefixTypeServiceTag), - } -} - -func (s *AddressPrefixType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAddressPrefixType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAddressPrefixType(input string) (*AddressPrefixType, error) { - vals := map[string]AddressPrefixType{ - "ipprefix": AddressPrefixTypeIPPrefix, - "servicetag": AddressPrefixTypeServiceTag, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AddressPrefixType(input) - return &out, nil -} - -type AdminRuleKind string - -const ( - AdminRuleKindCustom AdminRuleKind = "Custom" - AdminRuleKindDefault AdminRuleKind = "Default" -) - -func PossibleValuesForAdminRuleKind() []string { - return []string{ - string(AdminRuleKindCustom), - string(AdminRuleKindDefault), - } -} - -func (s *AdminRuleKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAdminRuleKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAdminRuleKind(input string) (*AdminRuleKind, error) { - vals := map[string]AdminRuleKind{ - "custom": AdminRuleKindCustom, - "default": AdminRuleKindDefault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AdminRuleKind(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityConfigurationRuleAccess string - -const ( - SecurityConfigurationRuleAccessAllow SecurityConfigurationRuleAccess = "Allow" - SecurityConfigurationRuleAccessAlwaysAllow SecurityConfigurationRuleAccess = "AlwaysAllow" - SecurityConfigurationRuleAccessDeny SecurityConfigurationRuleAccess = "Deny" -) - -func PossibleValuesForSecurityConfigurationRuleAccess() []string { - return []string{ - string(SecurityConfigurationRuleAccessAllow), - string(SecurityConfigurationRuleAccessAlwaysAllow), - string(SecurityConfigurationRuleAccessDeny), - } -} - -func (s *SecurityConfigurationRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleAccess(input string) (*SecurityConfigurationRuleAccess, error) { - vals := map[string]SecurityConfigurationRuleAccess{ - "allow": SecurityConfigurationRuleAccessAllow, - "alwaysallow": SecurityConfigurationRuleAccessAlwaysAllow, - "deny": SecurityConfigurationRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleAccess(input) - return &out, nil -} - -type SecurityConfigurationRuleDirection string - -const ( - SecurityConfigurationRuleDirectionInbound SecurityConfigurationRuleDirection = "Inbound" - SecurityConfigurationRuleDirectionOutbound SecurityConfigurationRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityConfigurationRuleDirection() []string { - return []string{ - string(SecurityConfigurationRuleDirectionInbound), - string(SecurityConfigurationRuleDirectionOutbound), - } -} - -func (s *SecurityConfigurationRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleDirection(input string) (*SecurityConfigurationRuleDirection, error) { - vals := map[string]SecurityConfigurationRuleDirection{ - "inbound": SecurityConfigurationRuleDirectionInbound, - "outbound": SecurityConfigurationRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleDirection(input) - return &out, nil -} - -type SecurityConfigurationRuleProtocol string - -const ( - SecurityConfigurationRuleProtocolAh SecurityConfigurationRuleProtocol = "Ah" - SecurityConfigurationRuleProtocolAny SecurityConfigurationRuleProtocol = "Any" - SecurityConfigurationRuleProtocolEsp SecurityConfigurationRuleProtocol = "Esp" - SecurityConfigurationRuleProtocolIcmp SecurityConfigurationRuleProtocol = "Icmp" - SecurityConfigurationRuleProtocolTcp SecurityConfigurationRuleProtocol = "Tcp" - SecurityConfigurationRuleProtocolUdp SecurityConfigurationRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityConfigurationRuleProtocol() []string { - return []string{ - string(SecurityConfigurationRuleProtocolAh), - string(SecurityConfigurationRuleProtocolAny), - string(SecurityConfigurationRuleProtocolEsp), - string(SecurityConfigurationRuleProtocolIcmp), - string(SecurityConfigurationRuleProtocolTcp), - string(SecurityConfigurationRuleProtocolUdp), - } -} - -func (s *SecurityConfigurationRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleProtocol(input string) (*SecurityConfigurationRuleProtocol, error) { - vals := map[string]SecurityConfigurationRuleProtocol{ - "ah": SecurityConfigurationRuleProtocolAh, - "any": SecurityConfigurationRuleProtocolAny, - "esp": SecurityConfigurationRuleProtocolEsp, - "icmp": SecurityConfigurationRuleProtocolIcmp, - "tcp": SecurityConfigurationRuleProtocolTcp, - "udp": SecurityConfigurationRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleProtocol(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/adminrules/id_rule.go b/resource-manager/network/2022-09-01/adminrules/id_rule.go deleted file mode 100644 index d93cbce740e..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/id_rule.go +++ /dev/null @@ -1,166 +0,0 @@ -package adminrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleId{} - -// RuleId is a struct representing the Resource ID for a Rule -type RuleId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string - RuleCollectionName string - RuleName string -} - -// NewRuleID returns a new RuleId struct -func NewRuleID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string, ruleCollectionName string, ruleName string) RuleId { - return RuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - RuleCollectionName: ruleCollectionName, - RuleName: ruleName, - } -} - -// ParseRuleID parses 'input' into a RuleId -func ParseRuleID(input string) (*RuleId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) - } - - return &id, nil -} - -// ParseRuleIDInsensitively parses 'input' case-insensitively into a RuleId -// note: this method should only be used for API response data and not user input -func ParseRuleIDInsensitively(input string) (*RuleId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) - } - - return &id, nil -} - -// ValidateRuleID checks that 'input' can be parsed as a Rule ID -func ValidateRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Rule ID -func (id RuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s/ruleCollections/%s/rules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName, id.RuleCollectionName, id.RuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Rule ID -func (id RuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - resourceids.StaticSegment("staticRuleCollections", "ruleCollections", "ruleCollections"), - resourceids.UserSpecifiedSegment("ruleCollectionName", "ruleCollectionValue"), - resourceids.StaticSegment("staticRules", "rules", "rules"), - resourceids.UserSpecifiedSegment("ruleName", "ruleValue"), - } -} - -// String returns a human-readable description of this Rule ID -func (id RuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - fmt.Sprintf("Rule Collection Name: %q", id.RuleCollectionName), - fmt.Sprintf("Rule Name: %q", id.RuleName), - } - return fmt.Sprintf("Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/adminrules/id_rule_test.go b/resource-manager/network/2022-09-01/adminrules/id_rule_test.go deleted file mode 100644 index e263320ba6d..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/id_rule_test.go +++ /dev/null @@ -1,417 +0,0 @@ -package adminrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleId{} - -func TestNewRuleID(t *testing.T) { - id := NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } - - if id.RuleCollectionName != "ruleCollectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleCollectionName'", id.RuleCollectionName, "ruleCollectionValue") - } - - if id.RuleName != "ruleValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleName'", id.RuleName, "ruleValue") - } -} - -func TestFormatRuleID(t *testing.T) { - actual := NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue", - Expected: &RuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - RuleName: "ruleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - if actual.RuleName != v.Expected.RuleName { - t.Fatalf("Expected %q but got %q for RuleName", v.Expected.RuleName, actual.RuleName) - } - - } -} - -func TestParseRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/rUlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue", - Expected: &RuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - RuleName: "ruleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/rUlEs/rUlEvAlUe", - Expected: &RuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - RuleCollectionName: "rUlEcOlLeCtIoNvAlUe", - RuleName: "rUlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/rUlEs/rUlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - if actual.RuleName != v.Expected.RuleName { - t.Fatalf("Expected %q but got %q for RuleName", v.Expected.RuleName, actual.RuleName) - } - - } -} - -func TestSegmentsForRuleId(t *testing.T) { - segments := RuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/adminrules/id_rulecollection.go b/resource-manager/network/2022-09-01/adminrules/id_rulecollection.go deleted file mode 100644 index 1cdbb320880..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/id_rulecollection.go +++ /dev/null @@ -1,153 +0,0 @@ -package adminrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionId{} - -// RuleCollectionId is a struct representing the Resource ID for a Rule Collection -type RuleCollectionId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string - RuleCollectionName string -} - -// NewRuleCollectionID returns a new RuleCollectionId struct -func NewRuleCollectionID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string, ruleCollectionName string) RuleCollectionId { - return RuleCollectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - RuleCollectionName: ruleCollectionName, - } -} - -// ParseRuleCollectionID parses 'input' into a RuleCollectionId -func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - return &id, nil -} - -// ParseRuleCollectionIDInsensitively parses 'input' case-insensitively into a RuleCollectionId -// note: this method should only be used for API response data and not user input -func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - return &id, nil -} - -// ValidateRuleCollectionID checks that 'input' can be parsed as a Rule Collection ID -func ValidateRuleCollectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRuleCollectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Rule Collection ID -func (id RuleCollectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s/ruleCollections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName, id.RuleCollectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Rule Collection ID -func (id RuleCollectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - resourceids.StaticSegment("staticRuleCollections", "ruleCollections", "ruleCollections"), - resourceids.UserSpecifiedSegment("ruleCollectionName", "ruleCollectionValue"), - } -} - -// String returns a human-readable description of this Rule Collection ID -func (id RuleCollectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - fmt.Sprintf("Rule Collection Name: %q", id.RuleCollectionName), - } - return fmt.Sprintf("Rule Collection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/adminrules/id_rulecollection_test.go b/resource-manager/network/2022-09-01/adminrules/id_rulecollection_test.go deleted file mode 100644 index 36b3eacf798..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/id_rulecollection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package adminrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionId{} - -func TestNewRuleCollectionID(t *testing.T) { - id := NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } - - if id.RuleCollectionName != "ruleCollectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleCollectionName'", id.RuleCollectionName, "ruleCollectionValue") - } -} - -func TestFormatRuleCollectionID(t *testing.T) { - actual := NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRuleCollectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - } -} - -func TestParseRuleCollectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - RuleCollectionName: "rUlEcOlLeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - } -} - -func TestSegmentsForRuleCollectionId(t *testing.T) { - segments := RuleCollectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RuleCollectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/adminrules/method_createorupdate.go b/resource-manager/network/2022-09-01/adminrules/method_createorupdate.go deleted file mode 100644 index d936a5666f1..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/method_createorupdate.go +++ /dev/null @@ -1,63 +0,0 @@ -package adminrules - -import ( - "context" - "encoding/json" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BaseAdminRule -} - -// CreateOrUpdate ... -func (c AdminRulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input BaseAdminRule) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var respObj json.RawMessage - if err = resp.Unmarshal(&respObj); err != nil { - return - } - model, err := unmarshalBaseAdminRuleImplementation(respObj) - if err != nil { - return - } - result.Model = &model - - return -} diff --git a/resource-manager/network/2022-09-01/adminrules/method_delete.go b/resource-manager/network/2022-09-01/adminrules/method_delete.go deleted file mode 100644 index 6d7b0f948b8..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package adminrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c AdminRulesClient) Delete(ctx context.Context, id RuleId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c AdminRulesClient) DeleteThenPoll(ctx context.Context, id RuleId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/adminrules/method_get.go b/resource-manager/network/2022-09-01/adminrules/method_get.go deleted file mode 100644 index 94337a0e139..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/method_get.go +++ /dev/null @@ -1,58 +0,0 @@ -package adminrules - -import ( - "context" - "encoding/json" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BaseAdminRule -} - -// Get ... -func (c AdminRulesClient) Get(ctx context.Context, id RuleId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var respObj json.RawMessage - if err = resp.Unmarshal(&respObj); err != nil { - return - } - model, err := unmarshalBaseAdminRuleImplementation(respObj) - if err != nil { - return - } - result.Model = &model - - return -} diff --git a/resource-manager/network/2022-09-01/adminrules/method_list.go b/resource-manager/network/2022-09-01/adminrules/method_list.go deleted file mode 100644 index d4c3de156b2..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package adminrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BaseAdminRule -} - -type ListCompleteResult struct { - Items []BaseAdminRule -} - -// List ... -func (c AdminRulesClient) List(ctx context.Context, id RuleCollectionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/rules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BaseAdminRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c AdminRulesClient) ListComplete(ctx context.Context, id RuleCollectionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, BaseAdminRuleOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AdminRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id RuleCollectionId, predicate BaseAdminRuleOperationPredicate) (result ListCompleteResult, err error) { - items := make([]BaseAdminRule, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/adminrules/model_addressprefixitem.go b/resource-manager/network/2022-09-01/adminrules/model_addressprefixitem.go deleted file mode 100644 index 223aec22448..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/model_addressprefixitem.go +++ /dev/null @@ -1,9 +0,0 @@ -package adminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixItem struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixType *AddressPrefixType `json:"addressPrefixType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/adminrules/model_adminpropertiesformat.go b/resource-manager/network/2022-09-01/adminrules/model_adminpropertiesformat.go deleted file mode 100644 index 94884de7b5a..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/model_adminpropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package adminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminPropertiesFormat struct { - Access SecurityConfigurationRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction SecurityConfigurationRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityConfigurationRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/adminrules/model_adminrule.go b/resource-manager/network/2022-09-01/adminrules/model_adminrule.go deleted file mode 100644 index 8544cf3cd71..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/model_adminrule.go +++ /dev/null @@ -1,48 +0,0 @@ -package adminrules - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ BaseAdminRule = AdminRule{} - -type AdminRule struct { - Properties *AdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from BaseAdminRule - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AdminRule{} - -func (s AdminRule) MarshalJSON() ([]byte, error) { - type wrapper AdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AdminRule: %+v", err) - } - decoded["kind"] = "Custom" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-09-01/adminrules/model_baseadminrule.go b/resource-manager/network/2022-09-01/adminrules/model_baseadminrule.go deleted file mode 100644 index 3472014d9a8..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/model_baseadminrule.go +++ /dev/null @@ -1,56 +0,0 @@ -package adminrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BaseAdminRule interface { -} - -func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling BaseAdminRule into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Custom") { - var out AdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AdminRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Default") { - var out DefaultAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into DefaultAdminRule: %+v", err) - } - return out, nil - } - - type RawBaseAdminRuleImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawBaseAdminRuleImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-09-01/adminrules/model_defaultadminpropertiesformat.go b/resource-manager/network/2022-09-01/adminrules/model_defaultadminpropertiesformat.go deleted file mode 100644 index e2236833f23..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/model_defaultadminpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package adminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultAdminPropertiesFormat struct { - Access *SecurityConfigurationRuleAccess `json:"access,omitempty"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction *SecurityConfigurationRuleDirection `json:"direction,omitempty"` - Flag *string `json:"flag,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *SecurityConfigurationRuleProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/adminrules/model_defaultadminrule.go b/resource-manager/network/2022-09-01/adminrules/model_defaultadminrule.go deleted file mode 100644 index 7a93ae7edc9..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/model_defaultadminrule.go +++ /dev/null @@ -1,48 +0,0 @@ -package adminrules - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ BaseAdminRule = DefaultAdminRule{} - -type DefaultAdminRule struct { - Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from BaseAdminRule - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = DefaultAdminRule{} - -func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { - type wrapper DefaultAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling DefaultAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling DefaultAdminRule: %+v", err) - } - decoded["kind"] = "Default" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling DefaultAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-09-01/adminrules/predicates.go b/resource-manager/network/2022-09-01/adminrules/predicates.go deleted file mode 100644 index f594b9ac1be..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/predicates.go +++ /dev/null @@ -1,12 +0,0 @@ -package adminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BaseAdminRuleOperationPredicate struct { -} - -func (p BaseAdminRuleOperationPredicate) Matches(input BaseAdminRule) bool { - - return true -} diff --git a/resource-manager/network/2022-09-01/adminrules/version.go b/resource-manager/network/2022-09-01/adminrules/version.go deleted file mode 100644 index 59d913ccc84..00000000000 --- a/resource-manager/network/2022-09-01/adminrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package adminrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrules/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/README.md b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/README.md deleted file mode 100644 index 02dab48a479..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections` Documentation - -The `applicationgatewayprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections" -``` - - -### Client Initialization - -```go -client := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationGatewayPrivateEndpointConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewayPrivateEndpointConnectionsClient.Get` - -```go -ctx := context.TODO() -id := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewayPrivateEndpointConnectionsClient.List` - -```go -ctx := context.TODO() -id := applicationgatewayprivateendpointconnections.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewayPrivateEndpointConnectionsClient.Update` - -```go -ctx := context.TODO() -id := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue") - -payload := applicationgatewayprivateendpointconnections.ApplicationGatewayPrivateEndpointConnection{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/client.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/client.go deleted file mode 100644 index 82e12c872f2..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(api environments.Api) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationgatewayprivateendpointconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateEndpointConnectionsClient: %+v", err) - } - - return &ApplicationGatewayPrivateEndpointConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/constants.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/constants.go deleted file mode 100644 index 962f6cce88e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go deleted file mode 100644 index 58498d25a2c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -// ApplicationGatewayId is a struct representing the Resource ID for a Application Gateway -type ApplicationGatewayId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayName string -} - -// NewApplicationGatewayID returns a new ApplicationGatewayId struct -func NewApplicationGatewayID(subscriptionId string, resourceGroupName string, applicationGatewayName string) ApplicationGatewayId { - return ApplicationGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayName: applicationGatewayName, - } -} - -// ParseApplicationGatewayID parses 'input' into a ApplicationGatewayId -func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID -func ValidateApplicationGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway ID -func (id ApplicationGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway ID -func (id ApplicationGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGateways", "applicationGateways", "applicationGateways"), - resourceids.UserSpecifiedSegment("applicationGatewayName", "applicationGatewayValue"), - } -} - -// String returns a human-readable description of this Application Gateway ID -func (id ApplicationGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Name: %q", id.ApplicationGatewayName), - } - return fmt.Sprintf("Application Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway_test.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway_test.go deleted file mode 100644 index e8baf7e3bed..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -func TestNewApplicationGatewayID(t *testing.T) { - id := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayName != "applicationGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayName'", id.ApplicationGatewayName, "applicationGatewayValue") - } -} - -func TestFormatApplicationGatewayID(t *testing.T) { - actual := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestParseApplicationGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayName: "aPpLiCaTiOnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestSegmentsForApplicationGatewayId(t *testing.T) { - segments := ApplicationGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go deleted file mode 100644 index 16e2175839e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayPrivateEndpointConnectionId{} - -// ApplicationGatewayPrivateEndpointConnectionId is a struct representing the Resource ID for a Application Gateway Private Endpoint Connection -type ApplicationGatewayPrivateEndpointConnectionId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayName string - PrivateEndpointConnectionName string -} - -// NewApplicationGatewayPrivateEndpointConnectionID returns a new ApplicationGatewayPrivateEndpointConnectionId struct -func NewApplicationGatewayPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, applicationGatewayName string, privateEndpointConnectionName string) ApplicationGatewayPrivateEndpointConnectionId { - return ApplicationGatewayPrivateEndpointConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayName: applicationGatewayName, - PrivateEndpointConnectionName: privateEndpointConnectionName, - } -} - -// ParseApplicationGatewayPrivateEndpointConnectionID parses 'input' into a ApplicationGatewayPrivateEndpointConnectionId -func ParseApplicationGatewayPrivateEndpointConnectionID(input string) (*ApplicationGatewayPrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayPrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayPrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayPrivateEndpointConnectionId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(input string) (*ApplicationGatewayPrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayPrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayPrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayPrivateEndpointConnectionID checks that 'input' can be parsed as a Application Gateway Private Endpoint Connection ID -func ValidateApplicationGatewayPrivateEndpointConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayPrivateEndpointConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway Private Endpoint Connection ID -func (id ApplicationGatewayPrivateEndpointConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGateways/%s/privateEndpointConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayName, id.PrivateEndpointConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway Private Endpoint Connection ID -func (id ApplicationGatewayPrivateEndpointConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGateways", "applicationGateways", "applicationGateways"), - resourceids.UserSpecifiedSegment("applicationGatewayName", "applicationGatewayValue"), - resourceids.StaticSegment("staticPrivateEndpointConnections", "privateEndpointConnections", "privateEndpointConnections"), - resourceids.UserSpecifiedSegment("privateEndpointConnectionName", "privateEndpointConnectionValue"), - } -} - -// String returns a human-readable description of this Application Gateway Private Endpoint Connection ID -func (id ApplicationGatewayPrivateEndpointConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Name: %q", id.ApplicationGatewayName), - fmt.Sprintf("Private Endpoint Connection Name: %q", id.PrivateEndpointConnectionName), - } - return fmt.Sprintf("Application Gateway Private Endpoint Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection_test.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection_test.go deleted file mode 100644 index e6562f722ae..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayPrivateEndpointConnectionId{} - -func TestNewApplicationGatewayPrivateEndpointConnectionID(t *testing.T) { - id := NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayName != "applicationGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayName'", id.ApplicationGatewayName, "applicationGatewayValue") - } - - if id.PrivateEndpointConnectionName != "privateEndpointConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointConnectionName'", id.PrivateEndpointConnectionName, "privateEndpointConnectionValue") - } -} - -func TestFormatApplicationGatewayPrivateEndpointConnectionID(t *testing.T) { - actual := NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayPrivateEndpointConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayPrivateEndpointConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue", - Expected: &ApplicationGatewayPrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - PrivateEndpointConnectionName: "privateEndpointConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayPrivateEndpointConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { - t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) - } - - } -} - -func TestParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayPrivateEndpointConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue", - Expected: &ApplicationGatewayPrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - PrivateEndpointConnectionName: "privateEndpointConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", - Expected: &ApplicationGatewayPrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayName: "aPpLiCaTiOnGaTeWaYvAlUe", - PrivateEndpointConnectionName: "pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { - t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) - } - - } -} - -func TestSegmentsForApplicationGatewayPrivateEndpointConnectionId(t *testing.T) { - segments := ApplicationGatewayPrivateEndpointConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayPrivateEndpointConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_delete.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_delete.go deleted file mode 100644 index 8a25d1654cc..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ApplicationGatewayPrivateEndpointConnectionsClient) Delete(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ApplicationGatewayPrivateEndpointConnectionsClient) DeleteThenPoll(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_get.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_get.go deleted file mode 100644 index c31c10b3d01..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayPrivateEndpointConnection -} - -// Get ... -func (c ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_list.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_list.go deleted file mode 100644 index 13311f9760f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGatewayPrivateEndpointConnection -} - -type ListCompleteResult struct { - Items []ApplicationGatewayPrivateEndpointConnection -} - -// List ... -func (c ApplicationGatewayPrivateEndpointConnectionsClient) List(ctx context.Context, id ApplicationGatewayId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateEndpointConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGatewayPrivateEndpointConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ApplicationGatewayPrivateEndpointConnectionsClient) ListComplete(ctx context.Context, id ApplicationGatewayId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationGatewayPrivateEndpointConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewayPrivateEndpointConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationGatewayId, predicate ApplicationGatewayPrivateEndpointConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ApplicationGatewayPrivateEndpointConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_update.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_update.go deleted file mode 100644 index 09429f50bf3..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/method_update.go +++ /dev/null @@ -1,74 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Update ... -func (c ApplicationGatewayPrivateEndpointConnectionsClient) Update(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId, input ApplicationGatewayPrivateEndpointConnection) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c ApplicationGatewayPrivateEndpointConnectionsClient) UpdateThenPoll(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId, input ApplicationGatewayPrivateEndpointConnection) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 19262bd584a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 049337217fe..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 508dc9994b4..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 89d75010a65..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 5d46fc4d14d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnection.go deleted file mode 100644 index 899ea09f853..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnectionproperties.go deleted file mode 100644 index 19f24417e8b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygroup.go deleted file mode 100644 index 6cfad393dcc..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index f494b4f811b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_backendaddresspool.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_backendaddresspool.go deleted file mode 100644 index f5906c781bd..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 3877d225eb8..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 0e7c2876d57..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ddossettings.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ddossettings.go deleted file mode 100644 index 84bb3713a5f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_delegation.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_delegation.go deleted file mode 100644 index db8d3269de6..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlog.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlog.go deleted file mode 100644 index b3f068af815..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlogformatparameters.go deleted file mode 100644 index 0b6831f6fa6..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlogpropertiesformat.go deleted file mode 100644 index 922ced2b2f1..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_frontendipconfiguration.go deleted file mode 100644 index 5d4f44391e7..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index f8184b617b0..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index d1d69ce0587..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_inboundnatrule.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_inboundnatrule.go deleted file mode 100644 index a9b0e096bd3..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 30f69829656..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfiguration.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfiguration.go deleted file mode 100644 index 38591b7aaa2..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofile.go deleted file mode 100644 index a118ebdd4e1..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 75728fa1ebe..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index b2f70477897..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_iptag.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_iptag.go deleted file mode 100644 index c1aef66c21f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddress.go deleted file mode 100644 index 7c55794d5db..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 786682fa462..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgateway.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgateway.go deleted file mode 100644 index f7258d97962..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgatewaypropertiesformat.go deleted file mode 100644 index 7384cd2e1a6..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgatewaysku.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgatewaysku.go deleted file mode 100644 index 17af8527640..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natruleportmapping.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natruleportmapping.go deleted file mode 100644 index d1f6b522fcc..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterface.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterface.go deleted file mode 100644 index 27dd4a4a08a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacednssettings.go deleted file mode 100644 index 6b7723bb374..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 5b9d0f918bf..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index fc79de05a6f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 96eeeb31d67..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacepropertiesformat.go deleted file mode 100644 index e3f6c6dfd56..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 54a119f8358..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 2812f9ea959..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networksecuritygroup.go deleted file mode 100644 index cb2c6128022..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 2ec03e22f7c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpoint.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpoint.go deleted file mode 100644 index c59c28f78d1..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointconnection.go deleted file mode 100644 index ad89494737c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointconnectionproperties.go deleted file mode 100644 index 5c399fe2ef5..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfiguration.go deleted file mode 100644 index bd3c50f01ac..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index f3ec0dcc86e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointproperties.go deleted file mode 100644 index d7be5354bcd..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkservice.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkservice.go deleted file mode 100644 index 78a6c7ebba8..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnection.go deleted file mode 100644 index 5cc8a8e4dbf..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 461fb1081a9..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 6be96efd9df..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 3c19c2d4de4..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index c81dae99663..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceproperties.go deleted file mode 100644 index dc3f962814c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddress.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddress.go deleted file mode 100644 index e89345d55bc..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddressdnssettings.go deleted file mode 100644 index fc9ec96f106..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddresspropertiesformat.go deleted file mode 100644 index f699284c895..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddresssku.go deleted file mode 100644 index b74d0311a75..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlink.go deleted file mode 100644 index 0274f951e3c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlinkformat.go deleted file mode 100644 index 4182988a892..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourceset.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourceset.go deleted file mode 100644 index 075d9853046..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_retentionpolicyparameters.go deleted file mode 100644 index 2b030c17554..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_route.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_route.go deleted file mode 100644 index 939f9379822..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routepropertiesformat.go deleted file mode 100644 index 4afa3c6bed4..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routetable.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routetable.go deleted file mode 100644 index 8a1cf00052b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routetablepropertiesformat.go deleted file mode 100644 index c3a2020ea09..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_securityrule.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_securityrule.go deleted file mode 100644 index e892509d682..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_securityrulepropertiesformat.go deleted file mode 100644 index ad268f42e3d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceassociationlink.go deleted file mode 100644 index 208a786f7a0..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index eaf8e403c15..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_servicedelegationpropertiesformat.go deleted file mode 100644 index a8da5cf7bca..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicy.go deleted file mode 100644 index 0871d765423..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 9051f5afd03..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index c8f3720498a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 27a0c5e36ce..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpropertiesformat.go deleted file mode 100644 index fa1f92d606a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subnet.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subnet.go deleted file mode 100644 index 315bdbd9d59..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subnetpropertiesformat.go deleted file mode 100644 index 7d4289b8ec2..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subresource.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subresource.go deleted file mode 100644 index 7cea1d49c02..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 860948a52b3..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsproperties.go deleted file mode 100644 index 92e4c14749f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_virtualnetworktap.go deleted file mode 100644 index 7c49436256c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 131405acb48..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/predicates.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/predicates.go deleted file mode 100644 index 46757c5239b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ApplicationGatewayPrivateEndpointConnectionOperationPredicate) Matches(input ApplicationGatewayPrivateEndpointConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/version.go b/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/version.go deleted file mode 100644 index 242cf006b4a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/README.md b/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/README.md deleted file mode 100644 index fb40a71b26f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources` Documentation - -The `applicationgatewayprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources" -``` - - -### Client Initialization - -```go -client := applicationgatewayprivatelinkresources.NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationGatewayPrivateLinkResourcesClient.List` - -```go -ctx := context.TODO() -id := applicationgatewayprivatelinkresources.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/client.go b/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/client.go deleted file mode 100644 index 6e8b9365411..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgatewayprivatelinkresources - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkResourcesClient struct { - Client *resourcemanager.Client -} - -func NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(api environments.Api) (*ApplicationGatewayPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationgatewayprivatelinkresources", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateLinkResourcesClient: %+v", err) - } - - return &ApplicationGatewayPrivateLinkResourcesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/id_applicationgateway.go b/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/id_applicationgateway.go deleted file mode 100644 index 6a994cbbf56..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/id_applicationgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package applicationgatewayprivatelinkresources - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -// ApplicationGatewayId is a struct representing the Resource ID for a Application Gateway -type ApplicationGatewayId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayName string -} - -// NewApplicationGatewayID returns a new ApplicationGatewayId struct -func NewApplicationGatewayID(subscriptionId string, resourceGroupName string, applicationGatewayName string) ApplicationGatewayId { - return ApplicationGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayName: applicationGatewayName, - } -} - -// ParseApplicationGatewayID parses 'input' into a ApplicationGatewayId -func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID -func ValidateApplicationGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway ID -func (id ApplicationGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway ID -func (id ApplicationGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGateways", "applicationGateways", "applicationGateways"), - resourceids.UserSpecifiedSegment("applicationGatewayName", "applicationGatewayValue"), - } -} - -// String returns a human-readable description of this Application Gateway ID -func (id ApplicationGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Name: %q", id.ApplicationGatewayName), - } - return fmt.Sprintf("Application Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/id_applicationgateway_test.go b/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/id_applicationgateway_test.go deleted file mode 100644 index 78a1ddf3e53..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/id_applicationgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package applicationgatewayprivatelinkresources - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -func TestNewApplicationGatewayID(t *testing.T) { - id := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayName != "applicationGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayName'", id.ApplicationGatewayName, "applicationGatewayValue") - } -} - -func TestFormatApplicationGatewayID(t *testing.T) { - actual := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestParseApplicationGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayName: "aPpLiCaTiOnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestSegmentsForApplicationGatewayId(t *testing.T) { - segments := ApplicationGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/method_list.go b/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/method_list.go deleted file mode 100644 index 25fbc771c8a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package applicationgatewayprivatelinkresources - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGatewayPrivateLinkResource -} - -type ListCompleteResult struct { - Items []ApplicationGatewayPrivateLinkResource -} - -// List ... -func (c ApplicationGatewayPrivateLinkResourcesClient) List(ctx context.Context, id ApplicationGatewayId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateLinkResources", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGatewayPrivateLinkResource `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ApplicationGatewayPrivateLinkResourcesClient) ListComplete(ctx context.Context, id ApplicationGatewayId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationGatewayPrivateLinkResourceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewayPrivateLinkResourcesClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationGatewayId, predicate ApplicationGatewayPrivateLinkResourceOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ApplicationGatewayPrivateLinkResource, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresource.go b/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresource.go deleted file mode 100644 index c3c4b5afa06..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresource.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivatelinkresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkResource struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkResourceProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresourceproperties.go b/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresourceproperties.go deleted file mode 100644 index 0f4b9748324..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresourceproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivatelinkresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkResourceProperties struct { - GroupId *string `json:"groupId,omitempty"` - RequiredMembers *[]string `json:"requiredMembers,omitempty"` - RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/predicates.go b/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/predicates.go deleted file mode 100644 index e93c21bb751..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package applicationgatewayprivatelinkresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkResourceOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ApplicationGatewayPrivateLinkResourceOperationPredicate) Matches(input ApplicationGatewayPrivateLinkResource) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/version.go b/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/version.go deleted file mode 100644 index c47df2f3862..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivatelinkresources - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/README.md b/resource-manager/network/2022-09-01/applicationgateways/README.md deleted file mode 100644 index 24867cd7a54..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/README.md +++ /dev/null @@ -1,286 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgateways` Documentation - -The `applicationgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgateways" -``` - - -### Client Initialization - -```go -client := applicationgateways.NewApplicationGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationGatewaysClient.BackendHealth` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.BackendHealthThenPoll(ctx, id, applicationgateways.DefaultBackendHealthOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.BackendHealthOnDemand` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -payload := applicationgateways.ApplicationGatewayOnDemandProbe{ - // ... -} - - -if err := client.BackendHealthOnDemandThenPoll(ctx, id, payload, applicationgateways.DefaultBackendHealthOnDemandOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -payload := applicationgateways.ApplicationGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Get` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.GetSslPredefinedPolicy` - -```go -ctx := context.TODO() -id := applicationgateways.NewPredefinedPolicyID("12345678-1234-9876-4563-123456789012", "predefinedPolicyValue") - -read, err := client.GetSslPredefinedPolicy(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.List` - -```go -ctx := context.TODO() -id := applicationgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAll` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableRequestHeaders` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableRequestHeaders(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableResponseHeaders` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableResponseHeaders(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableServerVariables` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableServerVariables(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableSslOptions` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableSslOptions(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAvailableSslPredefinedPolicies(ctx, id)` can be used to do batched pagination -items, err := client.ListAvailableSslPredefinedPoliciesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableWafRuleSets` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableWafRuleSets(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Start` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Stop` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -payload := applicationgateways.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/applicationgateways/client.go b/resource-manager/network/2022-09-01/applicationgateways/client.go deleted file mode 100644 index eeadef05934..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewApplicationGatewaysClientWithBaseURI(api environments.Api) (*ApplicationGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationgateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationGatewaysClient: %+v", err) - } - - return &ApplicationGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/constants.go b/resource-manager/network/2022-09-01/applicationgateways/constants.go deleted file mode 100644 index 6e79eb63eba..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/constants.go +++ /dev/null @@ -1,1978 +0,0 @@ -package applicationgateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthServerHealth string - -const ( - ApplicationGatewayBackendHealthServerHealthDown ApplicationGatewayBackendHealthServerHealth = "Down" - ApplicationGatewayBackendHealthServerHealthDraining ApplicationGatewayBackendHealthServerHealth = "Draining" - ApplicationGatewayBackendHealthServerHealthPartial ApplicationGatewayBackendHealthServerHealth = "Partial" - ApplicationGatewayBackendHealthServerHealthUnknown ApplicationGatewayBackendHealthServerHealth = "Unknown" - ApplicationGatewayBackendHealthServerHealthUp ApplicationGatewayBackendHealthServerHealth = "Up" -) - -func PossibleValuesForApplicationGatewayBackendHealthServerHealth() []string { - return []string{ - string(ApplicationGatewayBackendHealthServerHealthDown), - string(ApplicationGatewayBackendHealthServerHealthDraining), - string(ApplicationGatewayBackendHealthServerHealthPartial), - string(ApplicationGatewayBackendHealthServerHealthUnknown), - string(ApplicationGatewayBackendHealthServerHealthUp), - } -} - -func (s *ApplicationGatewayBackendHealthServerHealth) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayBackendHealthServerHealth(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayBackendHealthServerHealth(input string) (*ApplicationGatewayBackendHealthServerHealth, error) { - vals := map[string]ApplicationGatewayBackendHealthServerHealth{ - "down": ApplicationGatewayBackendHealthServerHealthDown, - "draining": ApplicationGatewayBackendHealthServerHealthDraining, - "partial": ApplicationGatewayBackendHealthServerHealthPartial, - "unknown": ApplicationGatewayBackendHealthServerHealthUnknown, - "up": ApplicationGatewayBackendHealthServerHealthUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayBackendHealthServerHealth(input) - return &out, nil -} - -type ApplicationGatewayClientRevocationOptions string - -const ( - ApplicationGatewayClientRevocationOptionsNone ApplicationGatewayClientRevocationOptions = "None" - ApplicationGatewayClientRevocationOptionsOCSP ApplicationGatewayClientRevocationOptions = "OCSP" -) - -func PossibleValuesForApplicationGatewayClientRevocationOptions() []string { - return []string{ - string(ApplicationGatewayClientRevocationOptionsNone), - string(ApplicationGatewayClientRevocationOptionsOCSP), - } -} - -func (s *ApplicationGatewayClientRevocationOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayClientRevocationOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayClientRevocationOptions(input string) (*ApplicationGatewayClientRevocationOptions, error) { - vals := map[string]ApplicationGatewayClientRevocationOptions{ - "none": ApplicationGatewayClientRevocationOptionsNone, - "ocsp": ApplicationGatewayClientRevocationOptionsOCSP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayClientRevocationOptions(input) - return &out, nil -} - -type ApplicationGatewayCookieBasedAffinity string - -const ( - ApplicationGatewayCookieBasedAffinityDisabled ApplicationGatewayCookieBasedAffinity = "Disabled" - ApplicationGatewayCookieBasedAffinityEnabled ApplicationGatewayCookieBasedAffinity = "Enabled" -) - -func PossibleValuesForApplicationGatewayCookieBasedAffinity() []string { - return []string{ - string(ApplicationGatewayCookieBasedAffinityDisabled), - string(ApplicationGatewayCookieBasedAffinityEnabled), - } -} - -func (s *ApplicationGatewayCookieBasedAffinity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCookieBasedAffinity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCookieBasedAffinity(input string) (*ApplicationGatewayCookieBasedAffinity, error) { - vals := map[string]ApplicationGatewayCookieBasedAffinity{ - "disabled": ApplicationGatewayCookieBasedAffinityDisabled, - "enabled": ApplicationGatewayCookieBasedAffinityEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCookieBasedAffinity(input) - return &out, nil -} - -type ApplicationGatewayCustomErrorStatusCode string - -const ( - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred ApplicationGatewayCustomErrorStatusCode = "HttpStatus500" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour ApplicationGatewayCustomErrorStatusCode = "HttpStatus504" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree ApplicationGatewayCustomErrorStatusCode = "HttpStatus503" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred ApplicationGatewayCustomErrorStatusCode = "HttpStatus400" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine ApplicationGatewayCustomErrorStatusCode = "HttpStatus499" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight ApplicationGatewayCustomErrorStatusCode = "HttpStatus408" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive ApplicationGatewayCustomErrorStatusCode = "HttpStatus405" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour ApplicationGatewayCustomErrorStatusCode = "HttpStatus404" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" -) - -func PossibleValuesForApplicationGatewayCustomErrorStatusCode() []string { - return []string{ - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree), - } -} - -func (s *ApplicationGatewayCustomErrorStatusCode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCustomErrorStatusCode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCustomErrorStatusCode(input string) (*ApplicationGatewayCustomErrorStatusCode, error) { - vals := map[string]ApplicationGatewayCustomErrorStatusCode{ - "httpstatus500": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred, - "httpstatus504": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour, - "httpstatus503": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree, - "httpstatus502": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo, - "httpstatus400": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred, - "httpstatus499": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine, - "httpstatus408": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight, - "httpstatus405": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive, - "httpstatus404": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour, - "httpstatus403": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCustomErrorStatusCode(input) - return &out, nil -} - -type ApplicationGatewayFirewallMode string - -const ( - ApplicationGatewayFirewallModeDetection ApplicationGatewayFirewallMode = "Detection" - ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = "Prevention" -) - -func PossibleValuesForApplicationGatewayFirewallMode() []string { - return []string{ - string(ApplicationGatewayFirewallModeDetection), - string(ApplicationGatewayFirewallModePrevention), - } -} - -func (s *ApplicationGatewayFirewallMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayFirewallMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayFirewallMode(input string) (*ApplicationGatewayFirewallMode, error) { - vals := map[string]ApplicationGatewayFirewallMode{ - "detection": ApplicationGatewayFirewallModeDetection, - "prevention": ApplicationGatewayFirewallModePrevention, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayFirewallMode(input) - return &out, nil -} - -type ApplicationGatewayLoadDistributionAlgorithm string - -const ( - ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = "IpHash" - ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = "LeastConnections" - ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = "RoundRobin" -) - -func PossibleValuesForApplicationGatewayLoadDistributionAlgorithm() []string { - return []string{ - string(ApplicationGatewayLoadDistributionAlgorithmIPHash), - string(ApplicationGatewayLoadDistributionAlgorithmLeastConnections), - string(ApplicationGatewayLoadDistributionAlgorithmRoundRobin), - } -} - -func (s *ApplicationGatewayLoadDistributionAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayLoadDistributionAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayLoadDistributionAlgorithm(input string) (*ApplicationGatewayLoadDistributionAlgorithm, error) { - vals := map[string]ApplicationGatewayLoadDistributionAlgorithm{ - "iphash": ApplicationGatewayLoadDistributionAlgorithmIPHash, - "leastconnections": ApplicationGatewayLoadDistributionAlgorithmLeastConnections, - "roundrobin": ApplicationGatewayLoadDistributionAlgorithmRoundRobin, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayLoadDistributionAlgorithm(input) - return &out, nil -} - -type ApplicationGatewayOperationalState string - -const ( - ApplicationGatewayOperationalStateRunning ApplicationGatewayOperationalState = "Running" - ApplicationGatewayOperationalStateStarting ApplicationGatewayOperationalState = "Starting" - ApplicationGatewayOperationalStateStopped ApplicationGatewayOperationalState = "Stopped" - ApplicationGatewayOperationalStateStopping ApplicationGatewayOperationalState = "Stopping" -) - -func PossibleValuesForApplicationGatewayOperationalState() []string { - return []string{ - string(ApplicationGatewayOperationalStateRunning), - string(ApplicationGatewayOperationalStateStarting), - string(ApplicationGatewayOperationalStateStopped), - string(ApplicationGatewayOperationalStateStopping), - } -} - -func (s *ApplicationGatewayOperationalState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayOperationalState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayOperationalState(input string) (*ApplicationGatewayOperationalState, error) { - vals := map[string]ApplicationGatewayOperationalState{ - "running": ApplicationGatewayOperationalStateRunning, - "starting": ApplicationGatewayOperationalStateStarting, - "stopped": ApplicationGatewayOperationalStateStopped, - "stopping": ApplicationGatewayOperationalStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayOperationalState(input) - return &out, nil -} - -type ApplicationGatewayProtocol string - -const ( - ApplicationGatewayProtocolHTTP ApplicationGatewayProtocol = "Http" - ApplicationGatewayProtocolHTTPS ApplicationGatewayProtocol = "Https" - ApplicationGatewayProtocolTcp ApplicationGatewayProtocol = "Tcp" - ApplicationGatewayProtocolTls ApplicationGatewayProtocol = "Tls" -) - -func PossibleValuesForApplicationGatewayProtocol() []string { - return []string{ - string(ApplicationGatewayProtocolHTTP), - string(ApplicationGatewayProtocolHTTPS), - string(ApplicationGatewayProtocolTcp), - string(ApplicationGatewayProtocolTls), - } -} - -func (s *ApplicationGatewayProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayProtocol(input string) (*ApplicationGatewayProtocol, error) { - vals := map[string]ApplicationGatewayProtocol{ - "http": ApplicationGatewayProtocolHTTP, - "https": ApplicationGatewayProtocolHTTPS, - "tcp": ApplicationGatewayProtocolTcp, - "tls": ApplicationGatewayProtocolTls, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayProtocol(input) - return &out, nil -} - -type ApplicationGatewayRedirectType string - -const ( - ApplicationGatewayRedirectTypeFound ApplicationGatewayRedirectType = "Found" - ApplicationGatewayRedirectTypePermanent ApplicationGatewayRedirectType = "Permanent" - ApplicationGatewayRedirectTypeSeeOther ApplicationGatewayRedirectType = "SeeOther" - ApplicationGatewayRedirectTypeTemporary ApplicationGatewayRedirectType = "Temporary" -) - -func PossibleValuesForApplicationGatewayRedirectType() []string { - return []string{ - string(ApplicationGatewayRedirectTypeFound), - string(ApplicationGatewayRedirectTypePermanent), - string(ApplicationGatewayRedirectTypeSeeOther), - string(ApplicationGatewayRedirectTypeTemporary), - } -} - -func (s *ApplicationGatewayRedirectType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRedirectType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRedirectType(input string) (*ApplicationGatewayRedirectType, error) { - vals := map[string]ApplicationGatewayRedirectType{ - "found": ApplicationGatewayRedirectTypeFound, - "permanent": ApplicationGatewayRedirectTypePermanent, - "seeother": ApplicationGatewayRedirectTypeSeeOther, - "temporary": ApplicationGatewayRedirectTypeTemporary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRedirectType(input) - return &out, nil -} - -type ApplicationGatewayRequestRoutingRuleType string - -const ( - ApplicationGatewayRequestRoutingRuleTypeBasic ApplicationGatewayRequestRoutingRuleType = "Basic" - ApplicationGatewayRequestRoutingRuleTypePathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" -) - -func PossibleValuesForApplicationGatewayRequestRoutingRuleType() []string { - return []string{ - string(ApplicationGatewayRequestRoutingRuleTypeBasic), - string(ApplicationGatewayRequestRoutingRuleTypePathBasedRouting), - } -} - -func (s *ApplicationGatewayRequestRoutingRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRequestRoutingRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRequestRoutingRuleType(input string) (*ApplicationGatewayRequestRoutingRuleType, error) { - vals := map[string]ApplicationGatewayRequestRoutingRuleType{ - "basic": ApplicationGatewayRequestRoutingRuleTypeBasic, - "pathbasedrouting": ApplicationGatewayRequestRoutingRuleTypePathBasedRouting, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRequestRoutingRuleType(input) - return &out, nil -} - -type ApplicationGatewaySkuName string - -const ( - ApplicationGatewaySkuNameStandardLarge ApplicationGatewaySkuName = "Standard_Large" - ApplicationGatewaySkuNameStandardMedium ApplicationGatewaySkuName = "Standard_Medium" - ApplicationGatewaySkuNameStandardSmall ApplicationGatewaySkuName = "Standard_Small" - ApplicationGatewaySkuNameStandardVTwo ApplicationGatewaySkuName = "Standard_v2" - ApplicationGatewaySkuNameWAFLarge ApplicationGatewaySkuName = "WAF_Large" - ApplicationGatewaySkuNameWAFMedium ApplicationGatewaySkuName = "WAF_Medium" - ApplicationGatewaySkuNameWAFVTwo ApplicationGatewaySkuName = "WAF_v2" -) - -func PossibleValuesForApplicationGatewaySkuName() []string { - return []string{ - string(ApplicationGatewaySkuNameStandardLarge), - string(ApplicationGatewaySkuNameStandardMedium), - string(ApplicationGatewaySkuNameStandardSmall), - string(ApplicationGatewaySkuNameStandardVTwo), - string(ApplicationGatewaySkuNameWAFLarge), - string(ApplicationGatewaySkuNameWAFMedium), - string(ApplicationGatewaySkuNameWAFVTwo), - } -} - -func (s *ApplicationGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySkuName(input string) (*ApplicationGatewaySkuName, error) { - vals := map[string]ApplicationGatewaySkuName{ - "standard_large": ApplicationGatewaySkuNameStandardLarge, - "standard_medium": ApplicationGatewaySkuNameStandardMedium, - "standard_small": ApplicationGatewaySkuNameStandardSmall, - "standard_v2": ApplicationGatewaySkuNameStandardVTwo, - "waf_large": ApplicationGatewaySkuNameWAFLarge, - "waf_medium": ApplicationGatewaySkuNameWAFMedium, - "waf_v2": ApplicationGatewaySkuNameWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySkuName(input) - return &out, nil -} - -type ApplicationGatewaySslCipherSuite string - -const ( - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" -) - -func PossibleValuesForApplicationGatewaySslCipherSuite() []string { - return []string{ - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA), - } -} - -func (s *ApplicationGatewaySslCipherSuite) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslCipherSuite(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslCipherSuite(input string) (*ApplicationGatewaySslCipherSuite, error) { - vals := map[string]ApplicationGatewaySslCipherSuite{ - "tls_dhe_dss_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA, - "tls_dhe_dss_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_dhe_dss_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA, - "tls_dhe_dss_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_dhe_dss_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA, - "tls_dhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA, - "tls_dhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_dhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_dhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_rsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA, - "tls_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA, - "tls_rsa_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslCipherSuite(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyName string - -const ( - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101S" -) - -func PossibleValuesForApplicationGatewaySslPolicyName() []string { - return []string{ - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS), - } -} - -func (s *ApplicationGatewaySslPolicyName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyName(input string) (*ApplicationGatewaySslPolicyName, error) { - vals := map[string]ApplicationGatewaySslPolicyName{ - "appgwsslpolicy20150501": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne, - "appgwsslpolicy20170401": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne, - "appgwsslpolicy20170401s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS, - "appgwsslpolicy20220101": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne, - "appgwsslpolicy20220101s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyName(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyType string - -const ( - ApplicationGatewaySslPolicyTypeCustom ApplicationGatewaySslPolicyType = "Custom" - ApplicationGatewaySslPolicyTypeCustomVTwo ApplicationGatewaySslPolicyType = "CustomV2" - ApplicationGatewaySslPolicyTypePredefined ApplicationGatewaySslPolicyType = "Predefined" -) - -func PossibleValuesForApplicationGatewaySslPolicyType() []string { - return []string{ - string(ApplicationGatewaySslPolicyTypeCustom), - string(ApplicationGatewaySslPolicyTypeCustomVTwo), - string(ApplicationGatewaySslPolicyTypePredefined), - } -} - -func (s *ApplicationGatewaySslPolicyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyType(input string) (*ApplicationGatewaySslPolicyType, error) { - vals := map[string]ApplicationGatewaySslPolicyType{ - "custom": ApplicationGatewaySslPolicyTypeCustom, - "customv2": ApplicationGatewaySslPolicyTypeCustomVTwo, - "predefined": ApplicationGatewaySslPolicyTypePredefined, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyType(input) - return &out, nil -} - -type ApplicationGatewaySslProtocol string - -const ( - ApplicationGatewaySslProtocolTLSvOneOne ApplicationGatewaySslProtocol = "TLSv1_1" - ApplicationGatewaySslProtocolTLSvOneThree ApplicationGatewaySslProtocol = "TLSv1_3" - ApplicationGatewaySslProtocolTLSvOneTwo ApplicationGatewaySslProtocol = "TLSv1_2" - ApplicationGatewaySslProtocolTLSvOneZero ApplicationGatewaySslProtocol = "TLSv1_0" -) - -func PossibleValuesForApplicationGatewaySslProtocol() []string { - return []string{ - string(ApplicationGatewaySslProtocolTLSvOneOne), - string(ApplicationGatewaySslProtocolTLSvOneThree), - string(ApplicationGatewaySslProtocolTLSvOneTwo), - string(ApplicationGatewaySslProtocolTLSvOneZero), - } -} - -func (s *ApplicationGatewaySslProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslProtocol(input string) (*ApplicationGatewaySslProtocol, error) { - vals := map[string]ApplicationGatewaySslProtocol{ - "tlsv1_1": ApplicationGatewaySslProtocolTLSvOneOne, - "tlsv1_3": ApplicationGatewaySslProtocolTLSvOneThree, - "tlsv1_2": ApplicationGatewaySslProtocolTLSvOneTwo, - "tlsv1_0": ApplicationGatewaySslProtocolTLSvOneZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslProtocol(input) - return &out, nil -} - -type ApplicationGatewayTier string - -const ( - ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" - ApplicationGatewayTierStandardVTwo ApplicationGatewayTier = "Standard_v2" - ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" - ApplicationGatewayTierWAFVTwo ApplicationGatewayTier = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTier() []string { - return []string{ - string(ApplicationGatewayTierStandard), - string(ApplicationGatewayTierStandardVTwo), - string(ApplicationGatewayTierWAF), - string(ApplicationGatewayTierWAFVTwo), - } -} - -func (s *ApplicationGatewayTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTier(input string) (*ApplicationGatewayTier, error) { - vals := map[string]ApplicationGatewayTier{ - "standard": ApplicationGatewayTierStandard, - "standard_v2": ApplicationGatewayTierStandardVTwo, - "waf": ApplicationGatewayTierWAF, - "waf_v2": ApplicationGatewayTierWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTier(input) - return &out, nil -} - -type ApplicationGatewayTierTypes string - -const ( - ApplicationGatewayTierTypesStandard ApplicationGatewayTierTypes = "Standard" - ApplicationGatewayTierTypesStandardVTwo ApplicationGatewayTierTypes = "Standard_v2" - ApplicationGatewayTierTypesWAF ApplicationGatewayTierTypes = "WAF" - ApplicationGatewayTierTypesWAFVTwo ApplicationGatewayTierTypes = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTierTypes() []string { - return []string{ - string(ApplicationGatewayTierTypesStandard), - string(ApplicationGatewayTierTypesStandardVTwo), - string(ApplicationGatewayTierTypesWAF), - string(ApplicationGatewayTierTypesWAFVTwo), - } -} - -func (s *ApplicationGatewayTierTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTierTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTierTypes(input string) (*ApplicationGatewayTierTypes, error) { - vals := map[string]ApplicationGatewayTierTypes{ - "standard": ApplicationGatewayTierTypesStandard, - "standard_v2": ApplicationGatewayTierTypesStandardVTwo, - "waf": ApplicationGatewayTierTypesWAF, - "waf_v2": ApplicationGatewayTierTypesWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTierTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleActionTypes string - -const ( - ApplicationGatewayWafRuleActionTypesAllow ApplicationGatewayWafRuleActionTypes = "Allow" - ApplicationGatewayWafRuleActionTypesAnomalyScoring ApplicationGatewayWafRuleActionTypes = "AnomalyScoring" - ApplicationGatewayWafRuleActionTypesBlock ApplicationGatewayWafRuleActionTypes = "Block" - ApplicationGatewayWafRuleActionTypesLog ApplicationGatewayWafRuleActionTypes = "Log" - ApplicationGatewayWafRuleActionTypesNone ApplicationGatewayWafRuleActionTypes = "None" -) - -func PossibleValuesForApplicationGatewayWafRuleActionTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleActionTypesAllow), - string(ApplicationGatewayWafRuleActionTypesAnomalyScoring), - string(ApplicationGatewayWafRuleActionTypesBlock), - string(ApplicationGatewayWafRuleActionTypesLog), - string(ApplicationGatewayWafRuleActionTypesNone), - } -} - -func (s *ApplicationGatewayWafRuleActionTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleActionTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleActionTypes(input string) (*ApplicationGatewayWafRuleActionTypes, error) { - vals := map[string]ApplicationGatewayWafRuleActionTypes{ - "allow": ApplicationGatewayWafRuleActionTypesAllow, - "anomalyscoring": ApplicationGatewayWafRuleActionTypesAnomalyScoring, - "block": ApplicationGatewayWafRuleActionTypesBlock, - "log": ApplicationGatewayWafRuleActionTypesLog, - "none": ApplicationGatewayWafRuleActionTypesNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleActionTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleStateTypes string - -const ( - ApplicationGatewayWafRuleStateTypesDisabled ApplicationGatewayWafRuleStateTypes = "Disabled" - ApplicationGatewayWafRuleStateTypesEnabled ApplicationGatewayWafRuleStateTypes = "Enabled" -) - -func PossibleValuesForApplicationGatewayWafRuleStateTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleStateTypesDisabled), - string(ApplicationGatewayWafRuleStateTypesEnabled), - } -} - -func (s *ApplicationGatewayWafRuleStateTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleStateTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleStateTypes(input string) (*ApplicationGatewayWafRuleStateTypes, error) { - vals := map[string]ApplicationGatewayWafRuleStateTypes{ - "disabled": ApplicationGatewayWafRuleStateTypesDisabled, - "enabled": ApplicationGatewayWafRuleStateTypesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleStateTypes(input) - return &out, nil -} - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/id_applicationgateway.go b/resource-manager/network/2022-09-01/applicationgateways/id_applicationgateway.go deleted file mode 100644 index c9e4b9d3cbb..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/id_applicationgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package applicationgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -// ApplicationGatewayId is a struct representing the Resource ID for a Application Gateway -type ApplicationGatewayId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayName string -} - -// NewApplicationGatewayID returns a new ApplicationGatewayId struct -func NewApplicationGatewayID(subscriptionId string, resourceGroupName string, applicationGatewayName string) ApplicationGatewayId { - return ApplicationGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayName: applicationGatewayName, - } -} - -// ParseApplicationGatewayID parses 'input' into a ApplicationGatewayId -func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID -func ValidateApplicationGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway ID -func (id ApplicationGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway ID -func (id ApplicationGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGateways", "applicationGateways", "applicationGateways"), - resourceids.UserSpecifiedSegment("applicationGatewayName", "applicationGatewayValue"), - } -} - -// String returns a human-readable description of this Application Gateway ID -func (id ApplicationGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Name: %q", id.ApplicationGatewayName), - } - return fmt.Sprintf("Application Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/id_applicationgateway_test.go b/resource-manager/network/2022-09-01/applicationgateways/id_applicationgateway_test.go deleted file mode 100644 index 0fb00834ec5..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/id_applicationgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package applicationgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -func TestNewApplicationGatewayID(t *testing.T) { - id := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayName != "applicationGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayName'", id.ApplicationGatewayName, "applicationGatewayValue") - } -} - -func TestFormatApplicationGatewayID(t *testing.T) { - actual := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestParseApplicationGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayName: "aPpLiCaTiOnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestSegmentsForApplicationGatewayId(t *testing.T) { - segments := ApplicationGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/id_predefinedpolicy.go b/resource-manager/network/2022-09-01/applicationgateways/id_predefinedpolicy.go deleted file mode 100644 index b49384e166d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/id_predefinedpolicy.go +++ /dev/null @@ -1,116 +0,0 @@ -package applicationgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PredefinedPolicyId{} - -// PredefinedPolicyId is a struct representing the Resource ID for a Predefined Policy -type PredefinedPolicyId struct { - SubscriptionId string - PredefinedPolicyName string -} - -// NewPredefinedPolicyID returns a new PredefinedPolicyId struct -func NewPredefinedPolicyID(subscriptionId string, predefinedPolicyName string) PredefinedPolicyId { - return PredefinedPolicyId{ - SubscriptionId: subscriptionId, - PredefinedPolicyName: predefinedPolicyName, - } -} - -// ParsePredefinedPolicyID parses 'input' into a PredefinedPolicyId -func ParsePredefinedPolicyID(input string) (*PredefinedPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(PredefinedPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PredefinedPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.PredefinedPolicyName, ok = parsed.Parsed["predefinedPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "predefinedPolicyName", *parsed) - } - - return &id, nil -} - -// ParsePredefinedPolicyIDInsensitively parses 'input' case-insensitively into a PredefinedPolicyId -// note: this method should only be used for API response data and not user input -func ParsePredefinedPolicyIDInsensitively(input string) (*PredefinedPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(PredefinedPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PredefinedPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.PredefinedPolicyName, ok = parsed.Parsed["predefinedPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "predefinedPolicyName", *parsed) - } - - return &id, nil -} - -// ValidatePredefinedPolicyID checks that 'input' can be parsed as a Predefined Policy ID -func ValidatePredefinedPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePredefinedPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Predefined Policy ID -func (id PredefinedPolicyId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.PredefinedPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Predefined Policy ID -func (id PredefinedPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGatewayAvailableSslOptions", "applicationGatewayAvailableSslOptions", "applicationGatewayAvailableSslOptions"), - resourceids.StaticSegment("staticDefault", "default", "default"), - resourceids.StaticSegment("staticPredefinedPolicies", "predefinedPolicies", "predefinedPolicies"), - resourceids.UserSpecifiedSegment("predefinedPolicyName", "predefinedPolicyValue"), - } -} - -// String returns a human-readable description of this Predefined Policy ID -func (id PredefinedPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Predefined Policy Name: %q", id.PredefinedPolicyName), - } - return fmt.Sprintf("Predefined Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/id_predefinedpolicy_test.go b/resource-manager/network/2022-09-01/applicationgateways/id_predefinedpolicy_test.go deleted file mode 100644 index 02a81b1d676..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/id_predefinedpolicy_test.go +++ /dev/null @@ -1,267 +0,0 @@ -package applicationgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PredefinedPolicyId{} - -func TestNewPredefinedPolicyID(t *testing.T) { - id := NewPredefinedPolicyID("12345678-1234-9876-4563-123456789012", "predefinedPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.PredefinedPolicyName != "predefinedPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'PredefinedPolicyName'", id.PredefinedPolicyName, "predefinedPolicyValue") - } -} - -func TestFormatPredefinedPolicyID(t *testing.T) { - actual := NewPredefinedPolicyID("12345678-1234-9876-4563-123456789012", "predefinedPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePredefinedPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PredefinedPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue", - Expected: &PredefinedPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - PredefinedPolicyName: "predefinedPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePredefinedPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.PredefinedPolicyName != v.Expected.PredefinedPolicyName { - t.Fatalf("Expected %q but got %q for PredefinedPolicyName", v.Expected.PredefinedPolicyName, actual.PredefinedPolicyName) - } - - } -} - -func TestParsePredefinedPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PredefinedPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs/dEfAuLt", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs/dEfAuLt/pReDeFiNeDpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue", - Expected: &PredefinedPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - PredefinedPolicyName: "predefinedPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs/dEfAuLt/pReDeFiNeDpOlIcIeS/pReDeFiNeDpOlIcYvAlUe", - Expected: &PredefinedPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - PredefinedPolicyName: "pReDeFiNeDpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs/dEfAuLt/pReDeFiNeDpOlIcIeS/pReDeFiNeDpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePredefinedPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.PredefinedPolicyName != v.Expected.PredefinedPolicyName { - t.Fatalf("Expected %q but got %q for PredefinedPolicyName", v.Expected.PredefinedPolicyName, actual.PredefinedPolicyName) - } - - } -} - -func TestSegmentsForPredefinedPolicyId(t *testing.T) { - segments := PredefinedPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PredefinedPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_backendhealth.go b/resource-manager/network/2022-09-01/applicationgateways/method_backendhealth.go deleted file mode 100644 index b3584e3464d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_backendhealth.go +++ /dev/null @@ -1,98 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendHealthOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type BackendHealthOperationOptions struct { - Expand *string -} - -func DefaultBackendHealthOperationOptions() BackendHealthOperationOptions { - return BackendHealthOperationOptions{} -} - -func (o BackendHealthOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o BackendHealthOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o BackendHealthOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// BackendHealth ... -func (c ApplicationGatewaysClient) BackendHealth(ctx context.Context, id ApplicationGatewayId, options BackendHealthOperationOptions) (result BackendHealthOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/backendhealth", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// BackendHealthThenPoll performs BackendHealth then polls until it's completed -func (c ApplicationGatewaysClient) BackendHealthThenPoll(ctx context.Context, id ApplicationGatewayId, options BackendHealthOperationOptions) error { - result, err := c.BackendHealth(ctx, id, options) - if err != nil { - return fmt.Errorf("performing BackendHealth: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after BackendHealth: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_backendhealthondemand.go b/resource-manager/network/2022-09-01/applicationgateways/method_backendhealthondemand.go deleted file mode 100644 index 864bdfc8f53..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_backendhealthondemand.go +++ /dev/null @@ -1,102 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendHealthOnDemandOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type BackendHealthOnDemandOperationOptions struct { - Expand *string -} - -func DefaultBackendHealthOnDemandOperationOptions() BackendHealthOnDemandOperationOptions { - return BackendHealthOnDemandOperationOptions{} -} - -func (o BackendHealthOnDemandOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o BackendHealthOnDemandOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o BackendHealthOnDemandOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// BackendHealthOnDemand ... -func (c ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Context, id ApplicationGatewayId, input ApplicationGatewayOnDemandProbe, options BackendHealthOnDemandOperationOptions) (result BackendHealthOnDemandOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getBackendHealthOnDemand", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// BackendHealthOnDemandThenPoll performs BackendHealthOnDemand then polls until it's completed -func (c ApplicationGatewaysClient) BackendHealthOnDemandThenPoll(ctx context.Context, id ApplicationGatewayId, input ApplicationGatewayOnDemandProbe, options BackendHealthOnDemandOperationOptions) error { - result, err := c.BackendHealthOnDemand(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing BackendHealthOnDemand: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after BackendHealthOnDemand: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_createorupdate.go b/resource-manager/network/2022-09-01/applicationgateways/method_createorupdate.go deleted file mode 100644 index 6b4a2af987b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, id ApplicationGatewayId, input ApplicationGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ApplicationGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id ApplicationGatewayId, input ApplicationGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_delete.go b/resource-manager/network/2022-09-01/applicationgateways/method_delete.go deleted file mode 100644 index 6769fa69c24..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ApplicationGatewaysClient) Delete(ctx context.Context, id ApplicationGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ApplicationGatewaysClient) DeleteThenPoll(ctx context.Context, id ApplicationGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_get.go b/resource-manager/network/2022-09-01/applicationgateways/method_get.go deleted file mode 100644 index b76ab4abb95..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package applicationgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGateway -} - -// Get ... -func (c ApplicationGatewaysClient) Get(ctx context.Context, id ApplicationGatewayId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_getsslpredefinedpolicy.go b/resource-manager/network/2022-09-01/applicationgateways/method_getsslpredefinedpolicy.go deleted file mode 100644 index b4867c9088b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_getsslpredefinedpolicy.go +++ /dev/null @@ -1,51 +0,0 @@ -package applicationgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetSslPredefinedPolicyOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewaySslPredefinedPolicy -} - -// GetSslPredefinedPolicy ... -func (c ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, id PredefinedPolicyId) (result GetSslPredefinedPolicyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_list.go b/resource-manager/network/2022-09-01/applicationgateways/method_list.go deleted file mode 100644 index c31250db3d1..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGateway -} - -type ListCompleteResult struct { - Items []ApplicationGateway -} - -// List ... -func (c ApplicationGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ApplicationGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationGatewayOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ApplicationGatewayOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ApplicationGateway, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_listall.go b/resource-manager/network/2022-09-01/applicationgateways/method_listall.go deleted file mode 100644 index 23020a8a7c5..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGateway -} - -type ListAllCompleteResult struct { - Items []ApplicationGateway -} - -// ListAll ... -func (c ApplicationGatewaysClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c ApplicationGatewaysClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, ApplicationGatewayOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewaysClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApplicationGatewayOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]ApplicationGateway, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_listavailablerequestheaders.go b/resource-manager/network/2022-09-01/applicationgateways/method_listavailablerequestheaders.go deleted file mode 100644 index 08d2f919615..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_listavailablerequestheaders.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableRequestHeadersOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]string -} - -// ListAvailableRequestHeaders ... -func (c ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableRequestHeadersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_listavailableresponseheaders.go b/resource-manager/network/2022-09-01/applicationgateways/method_listavailableresponseheaders.go deleted file mode 100644 index 6c96972a7a7..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_listavailableresponseheaders.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableResponseHeadersOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]string -} - -// ListAvailableResponseHeaders ... -func (c ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableResponseHeadersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_listavailableservervariables.go b/resource-manager/network/2022-09-01/applicationgateways/method_listavailableservervariables.go deleted file mode 100644 index 3065ffaa0de..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_listavailableservervariables.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableServerVariablesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]string -} - -// ListAvailableServerVariables ... -func (c ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableServerVariablesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableServerVariables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_listavailablessloptions.go b/resource-manager/network/2022-09-01/applicationgateways/method_listavailablessloptions.go deleted file mode 100644 index 3b290246c2c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_listavailablessloptions.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableSslOptionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayAvailableSslOptions -} - -// ListAvailableSslOptions ... -func (c ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableSslOptionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_listavailablesslpredefinedpolicies.go b/resource-manager/network/2022-09-01/applicationgateways/method_listavailablesslpredefinedpolicies.go deleted file mode 100644 index e3b6f96e447..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_listavailablesslpredefinedpolicies.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableSslPredefinedPoliciesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGatewaySslPredefinedPolicy -} - -type ListAvailableSslPredefinedPoliciesCompleteResult struct { - Items []ApplicationGatewaySslPredefinedPolicy -} - -// ListAvailableSslPredefinedPolicies ... -func (c ApplicationGatewaysClient) ListAvailableSslPredefinedPolicies(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableSslPredefinedPoliciesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGatewaySslPredefinedPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAvailableSslPredefinedPoliciesComplete retrieves all the results into a single object -func (c ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesComplete(ctx context.Context, id commonids.SubscriptionId) (ListAvailableSslPredefinedPoliciesCompleteResult, error) { - return c.ListAvailableSslPredefinedPoliciesCompleteMatchingPredicate(ctx, id, ApplicationGatewaySslPredefinedPolicyOperationPredicate{}) -} - -// ListAvailableSslPredefinedPoliciesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApplicationGatewaySslPredefinedPolicyOperationPredicate) (result ListAvailableSslPredefinedPoliciesCompleteResult, err error) { - items := make([]ApplicationGatewaySslPredefinedPolicy, 0) - - resp, err := c.ListAvailableSslPredefinedPolicies(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAvailableSslPredefinedPoliciesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_listavailablewafrulesets.go b/resource-manager/network/2022-09-01/applicationgateways/method_listavailablewafrulesets.go deleted file mode 100644 index e16574838a3..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_listavailablewafrulesets.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableWafRuleSetsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayAvailableWafRuleSetsResult -} - -// ListAvailableWafRuleSets ... -func (c ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableWafRuleSetsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_start.go b/resource-manager/network/2022-09-01/applicationgateways/method_start.go deleted file mode 100644 index 828fc60cb3c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c ApplicationGatewaysClient) Start(ctx context.Context, id ApplicationGatewayId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c ApplicationGatewaysClient) StartThenPoll(ctx context.Context, id ApplicationGatewayId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_stop.go b/resource-manager/network/2022-09-01/applicationgateways/method_stop.go deleted file mode 100644 index 75b68cdf697..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_stop.go +++ /dev/null @@ -1,70 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c ApplicationGatewaysClient) Stop(ctx context.Context, id ApplicationGatewayId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c ApplicationGatewaysClient) StopThenPoll(ctx context.Context, id ApplicationGatewayId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/method_updatetags.go b/resource-manager/network/2022-09-01/applicationgateways/method_updatetags.go deleted file mode 100644 index d371aa3c27b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package applicationgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGateway -} - -// UpdateTags ... -func (c ApplicationGatewaysClient) UpdateTags(ctx context.Context, id ApplicationGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgateway.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgateway.go deleted file mode 100644 index 26c26a88927..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgateway.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go deleted file mode 100644 index 21a1fec007f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go deleted file mode 100644 index 37f5189d68a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go deleted file mode 100644 index e8f13521e07..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAutoscaleConfiguration struct { - MaxCapacity *int64 `json:"maxCapacity,omitempty"` - MinCapacity int64 `json:"minCapacity"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablessloptions.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablessloptions.go deleted file mode 100644 index 18677bfa9ad..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablessloptions.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAvailableSslOptions struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go deleted file mode 100644 index 552b956629b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct { - AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"` - AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"` - DefaultPolicy *ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"` - PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go deleted file mode 100644 index b960a888077..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAvailableWafRuleSetsResult struct { - Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 9245b4581ff..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index e62cc5f5a6a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 92e4b6fcae0..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealth.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealth.go deleted file mode 100644 index b8439220957..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealth.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealth struct { - BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go deleted file mode 100644 index 00f4c87c142..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthHTTPSettings struct { - BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` - Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go deleted file mode 100644 index 3bf6d17e80c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthOnDemand struct { - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthpool.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthpool.go deleted file mode 100644 index b32fffdf614..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthpool.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthPool struct { - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthserver.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthserver.go deleted file mode 100644 index c11aed154b2..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhealthserver.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthServer struct { - Address *string `json:"address,omitempty"` - Health *ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` - HealthProbeLog *string `json:"healthProbeLog,omitempty"` - IPConfiguration *NetworkInterfaceIPConfiguration `json:"ipConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go deleted file mode 100644 index 7cfbecd3506..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go deleted file mode 100644 index 68ccfd35301..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { - AffinityCookieName *string `json:"affinityCookieName,omitempty"` - AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` - ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` - CookieBasedAffinity *ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` - HostName *string `json:"hostName,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - ProbeEnabled *bool `json:"probeEnabled,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestTimeout *int64 `json:"requestTimeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendsettings.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendsettings.go deleted file mode 100644 index 435626e7296..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go deleted file mode 100644 index 5d5c1275f2e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettingsPropertiesFormat struct { - HostName *string `json:"hostName,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go deleted file mode 100644 index 7be179f89f0..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayClientAuthConfiguration struct { - VerifyClientCertIssuerDN *bool `json:"verifyClientCertIssuerDN,omitempty"` - VerifyClientRevocation *ApplicationGatewayClientRevocationOptions `json:"verifyClientRevocation,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayconnectiondraining.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayconnectiondraining.go deleted file mode 100644 index f40777a88f8..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayconnectiondraining.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayConnectionDraining struct { - DrainTimeoutInSec int64 `json:"drainTimeoutInSec"` - Enabled bool `json:"enabled"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaycustomerror.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaycustomerror.go deleted file mode 100644 index 532de5a8e93..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaycustomerror.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayCustomError struct { - CustomErrorPageUrl *string `json:"customErrorPageUrl,omitempty"` - StatusCode *ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go deleted file mode 100644 index 30534c50f52..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallDisabledRuleGroup struct { - RuleGroupName string `json:"ruleGroupName"` - Rules *[]int64 `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallexclusion.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallexclusion.go deleted file mode 100644 index 77bfe2cf65c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallexclusion.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallExclusion struct { - MatchVariable string `json:"matchVariable"` - Selector string `json:"selector"` - SelectorMatchOperator string `json:"selectorMatchOperator"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrule.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrule.go deleted file mode 100644 index c9a89bac633..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRule struct { - Action *ApplicationGatewayWafRuleActionTypes `json:"action,omitempty"` - Description *string `json:"description,omitempty"` - RuleId int64 `json:"ruleId"` - RuleIdString *string `json:"ruleIdString,omitempty"` - State *ApplicationGatewayWafRuleStateTypes `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go deleted file mode 100644 index 06c7cbffb38..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleGroup struct { - Description *string `json:"description,omitempty"` - RuleGroupName string `json:"ruleGroupName"` - Rules []ApplicationGatewayFirewallRule `json:"rules"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallruleset.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallruleset.go deleted file mode 100644 index 3eb74351624..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallruleset.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleSet struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go deleted file mode 100644 index f0bd967c325..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleGroups []ApplicationGatewayFirewallRuleGroup `json:"ruleGroups"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` - Tiers *[]ApplicationGatewayTierTypes `json:"tiers,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go deleted file mode 100644 index 16f3a44fe68..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go deleted file mode 100644 index 45f83bbaa11..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendport.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendport.go deleted file mode 100644 index 9b3c8763e01..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendport.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPort struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go deleted file mode 100644 index a9399610b8b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPortPropertiesFormat struct { - Port *int64 `json:"port,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayglobalconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayglobalconfiguration.go deleted file mode 100644 index 8f031b6ad38..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayglobalconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayGlobalConfiguration struct { - EnableRequestBuffering *bool `json:"enableRequestBuffering,omitempty"` - EnableResponseBuffering *bool `json:"enableResponseBuffering,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayheaderconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayheaderconfiguration.go deleted file mode 100644 index cf7e02d4617..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayheaderconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHeaderConfiguration struct { - HeaderName *string `json:"headerName,omitempty"` - HeaderValue *string `json:"headerValue,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayhttplistener.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayhttplistener.go deleted file mode 100644 index 457c3af7d7b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayhttplistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go deleted file mode 100644 index 7d3436f6186..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListenerPropertiesFormat struct { - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - HostName *string `json:"hostName,omitempty"` - HostNames *[]string `json:"hostNames,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 7b513c56359..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 67b2b22486e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaylistener.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaylistener.go deleted file mode 100644 index eb251dad173..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaylistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go deleted file mode 100644 index fc21e21099b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListenerPropertiesFormat struct { - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go deleted file mode 100644 index 9c07ad54259..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionPolicyPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go deleted file mode 100644 index 9ae762454d0..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { - LoadDistributionAlgorithm *ApplicationGatewayLoadDistributionAlgorithm `json:"loadDistributionAlgorithm,omitempty"` - LoadDistributionTargets *[]ApplicationGatewayLoadDistributionTarget `json:"loadDistributionTargets,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go deleted file mode 100644 index 5db29bd27a5..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTarget struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionTargetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go deleted file mode 100644 index cd785c4126e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTargetPropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - WeightPerServer *int64 `json:"weightPerServer,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayondemandprobe.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayondemandprobe.go deleted file mode 100644 index 6ee19e174e2..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayondemandprobe.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayOnDemandProbe struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - Host *string `json:"host,omitempty"` - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypathrule.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypathrule.go deleted file mode 100644 index ae684eb5860..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypathrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go deleted file mode 100644 index c0586444c85..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Paths *[]string `json:"paths,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go deleted file mode 100644 index 8099219aff4..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go deleted file mode 100644 index 400c841d704..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go deleted file mode 100644 index 1997234fb4d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go deleted file mode 100644 index b86b3f17014..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfigurationProperties struct { - IPConfigurations *[]ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go deleted file mode 100644 index ad8bfa28be7..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go deleted file mode 100644 index b2d2b2af23a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobe.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobe.go deleted file mode 100644 index 9b27b4f7133..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobe.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbe struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go deleted file mode 100644 index 68ccf1eaaaf..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbeHealthResponseMatch struct { - Body *string `json:"body,omitempty"` - StatusCodes *[]string `json:"statusCodes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go deleted file mode 100644 index dab5ee7ae23..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbePropertiesFormat struct { - Host *string `json:"host,omitempty"` - Interval *int64 `json:"interval,omitempty"` - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - MinServers *int64 `json:"minServers,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - PickHostNameFromBackendSettings *bool `json:"pickHostNameFromBackendSettings,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - UnhealthyThreshold *int64 `json:"unhealthyThreshold,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypropertiesformat.go deleted file mode 100644 index 8f57d0c043f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaypropertiesformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPropertiesFormat struct { - AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` - AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` - BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` - BackendSettingsCollection *[]ApplicationGatewayBackendSettings `json:"backendSettingsCollection,omitempty"` - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - EnableFips *bool `json:"enableFips,omitempty"` - EnableHTTP2 *bool `json:"enableHttp2,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"` - FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` - GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` - GlobalConfiguration *ApplicationGatewayGlobalConfiguration `json:"globalConfiguration,omitempty"` - HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` - Listeners *[]ApplicationGatewayListener `json:"listeners,omitempty"` - LoadDistributionPolicies *[]ApplicationGatewayLoadDistributionPolicy `json:"loadDistributionPolicies,omitempty"` - OperationalState *ApplicationGatewayOperationalState `json:"operationalState,omitempty"` - PrivateEndpointConnections *[]ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - PrivateLinkConfigurations *[]ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"` - Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` - RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` - RoutingRules *[]ApplicationGatewayRoutingRule `json:"routingRules,omitempty"` - Sku *ApplicationGatewaySku `json:"sku,omitempty"` - SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - SslProfiles *[]ApplicationGatewaySslProfile `json:"sslProfiles,omitempty"` - TrustedClientCertificates *[]ApplicationGatewayTrustedClientCertificate `json:"trustedClientCertificates,omitempty"` - TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` - UrlPathMaps *[]ApplicationGatewayUrlPathMap `json:"urlPathMaps,omitempty"` - WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayredirectconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayredirectconfiguration.go deleted file mode 100644 index 99a2df5f0de..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayredirectconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go deleted file mode 100644 index 07b97214f7f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { - IncludePath *bool `json:"includePath,omitempty"` - IncludeQueryString *bool `json:"includeQueryString,omitempty"` - PathRules *[]SubResource `json:"pathRules,omitempty"` - RedirectType *ApplicationGatewayRedirectType `json:"redirectType,omitempty"` - RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` - TargetListener *SubResource `json:"targetListener,omitempty"` - TargetUrl *string `json:"targetUrl,omitempty"` - UrlPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrequestroutingrule.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrequestroutingrule.go deleted file mode 100644 index 8968674820d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrequestroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go deleted file mode 100644 index d7ab0f3f4d9..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - HTTPListener *SubResource `json:"httpListener,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` - UrlPathMap *SubResource `json:"urlPathMap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterule.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterule.go deleted file mode 100644 index 6ce3b9a1f5d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterule.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRule struct { - ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"` - Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"` - Name *string `json:"name,omitempty"` - RuleSequence *int64 `json:"ruleSequence,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go deleted file mode 100644 index 02be2e1f37b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleActionSet struct { - RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"` - ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"` - UrlConfiguration *ApplicationGatewayUrlConfiguration `json:"urlConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterulecondition.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterulecondition.go deleted file mode 100644 index c7e6af3b85a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterulecondition.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleCondition struct { - IgnoreCase *bool `json:"ignoreCase,omitempty"` - Negate *bool `json:"negate,omitempty"` - Pattern *string `json:"pattern,omitempty"` - Variable *string `json:"variable,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriteruleset.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriteruleset.go deleted file mode 100644 index 571e9038508..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriteruleset.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go deleted file mode 100644 index 031206c13ce..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayroutingrule.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayroutingrule.go deleted file mode 100644 index 448709de6b4..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go deleted file mode 100644 index 5be00552534..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendSettings *SubResource `json:"backendSettings,omitempty"` - Listener *SubResource `json:"listener,omitempty"` - Priority int64 `json:"priority"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysku.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysku.go deleted file mode 100644 index 99350cf8ec7..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysku.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *ApplicationGatewaySkuName `json:"name,omitempty"` - Tier *ApplicationGatewayTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslcertificate.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslcertificate.go deleted file mode 100644 index 1f589867862..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go deleted file mode 100644 index 1c92efb93bd..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - Password *string `json:"password,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpolicy.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpolicy.go deleted file mode 100644 index be42ac49a18..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPolicy struct { - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` - MinProtocolVersion *ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` - PolicyName *ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` - PolicyType *ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go deleted file mode 100644 index a7932dc66db..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPredefinedPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go deleted file mode 100644 index 15702750dea..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct { - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - MinProtocolVersion *ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslprofile.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslprofile.go deleted file mode 100644 index 609877668f8..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go deleted file mode 100644 index a7c5ae2c883..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfilePropertiesFormat struct { - ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration `json:"clientAuthConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - TrustedClientCertificates *[]SubResource `json:"trustedClientCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go deleted file mode 100644 index 731b46860d7..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedClientCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go deleted file mode 100644 index 67b5d91461d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct { - ClientCertIssuerDN *string `json:"clientCertIssuerDN,omitempty"` - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ValidatedCertData *string `json:"validatedCertData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go deleted file mode 100644 index 12343718b35..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go deleted file mode 100644 index 7aeb8e0a84e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlconfiguration.go deleted file mode 100644 index 18491c35f12..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlConfiguration struct { - ModifiedPath *string `json:"modifiedPath,omitempty"` - ModifiedQueryString *string `json:"modifiedQueryString,omitempty"` - Reroute *bool `json:"reroute,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlpathmap.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlpathmap.go deleted file mode 100644 index 5fc06877578..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlpathmap.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayUrlPathMapPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go deleted file mode 100644 index ef8e7e8e02f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMapPropertiesFormat struct { - DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` - DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` - DefaultLoadDistributionPolicy *SubResource `json:"defaultLoadDistributionPolicy,omitempty"` - DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` - DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` - PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go deleted file mode 100644 index 561512df449..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWebApplicationFirewallConfiguration struct { - DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` - Enabled bool `json:"enabled"` - Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"` - FileUploadLimitInMb *int64 `json:"fileUploadLimitInMb,omitempty"` - FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode"` - MaxRequestBodySize *int64 `json:"maxRequestBodySize,omitempty"` - MaxRequestBodySizeInKb *int64 `json:"maxRequestBodySizeInKb,omitempty"` - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationsecuritygroup.go deleted file mode 100644 index 71e4f60a5a0..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index c8593cff776..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_backendaddresspool.go b/resource-manager/network/2022-09-01/applicationgateways/model_backendaddresspool.go deleted file mode 100644 index 1a7d2037c67..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 7dc8222f453..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 821207ea54b..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_ddossettings.go b/resource-manager/network/2022-09-01/applicationgateways/model_ddossettings.go deleted file mode 100644 index afe28edd8fc..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_delegation.go b/resource-manager/network/2022-09-01/applicationgateways/model_delegation.go deleted file mode 100644 index dde48e048ee..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_flowlog.go b/resource-manager/network/2022-09-01/applicationgateways/model_flowlog.go deleted file mode 100644 index 8d1c520da14..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/applicationgateways/model_flowlogformatparameters.go deleted file mode 100644 index 79d541b9318..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_flowlogpropertiesformat.go deleted file mode 100644 index 666f7fd230f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_frontendipconfiguration.go deleted file mode 100644 index 6af1ef34991..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index dfcbf3e5aca..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 81f73592309..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_inboundnatrule.go b/resource-manager/network/2022-09-01/applicationgateways/model_inboundnatrule.go deleted file mode 100644 index e8326d63cdd..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index e68b37342b3..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_ipconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_ipconfiguration.go deleted file mode 100644 index 3035f84c596..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationprofile.go deleted file mode 100644 index edb884d2718..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1c6df0dcda2..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 5de8de82f9e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_iptag.go b/resource-manager/network/2022-09-01/applicationgateways/model_iptag.go deleted file mode 100644 index e423a8c0593..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/applicationgateways/model_loadbalancerbackendaddress.go deleted file mode 100644 index a4bb848daa5..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index ab1822cd6b6..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_natgateway.go b/resource-manager/network/2022-09-01/applicationgateways/model_natgateway.go deleted file mode 100644 index eb51b102cad..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_natgatewaypropertiesformat.go deleted file mode 100644 index 21ac8a2eca2..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_natgatewaysku.go b/resource-manager/network/2022-09-01/applicationgateways/model_natgatewaysku.go deleted file mode 100644 index 54ee08d2498..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_natruleportmapping.go b/resource-manager/network/2022-09-01/applicationgateways/model_natruleportmapping.go deleted file mode 100644 index 1ca2ef21443..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterface.go b/resource-manager/network/2022-09-01/applicationgateways/model_networkinterface.go deleted file mode 100644 index 73b1cb41a52..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacednssettings.go deleted file mode 100644 index 92961ce7d04..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 1be55bfe469..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index fed49bbe9de..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 70234aeb42f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 5b015dee73f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 8dc17186426..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 199c278ace0..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/applicationgateways/model_networksecuritygroup.go deleted file mode 100644 index 14268c44ed0..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index e16fb5f6fb3..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpoint.go b/resource-manager/network/2022-09-01/applicationgateways/model_privateendpoint.go deleted file mode 100644 index 4ec26559664..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointconnection.go deleted file mode 100644 index 72911c666f8..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointconnectionproperties.go deleted file mode 100644 index 4413bd3db27..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointipconfiguration.go deleted file mode 100644 index 7cae9c3cf71..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index f1f5adead63..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointproperties.go deleted file mode 100644 index 832b7f18a5d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkservice.go b/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkservice.go deleted file mode 100644 index 238c6ee31c6..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnection.go deleted file mode 100644 index ee88d81eb06..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 26b1b21ad32..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 2d2970905b0..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 18d6fcdf24d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 02fc04bab97..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceproperties.go deleted file mode 100644 index eb543330122..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddress.go b/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddress.go deleted file mode 100644 index c17efae3e57..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddressdnssettings.go deleted file mode 100644 index bb716274972..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddresspropertiesformat.go deleted file mode 100644 index d714bdf3daa..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddresssku.go deleted file mode 100644 index 976ba6d175a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/applicationgateways/model_resourcenavigationlink.go deleted file mode 100644 index 0aeedfe5241..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_resourcenavigationlinkformat.go deleted file mode 100644 index 540e9b96c41..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_resourceset.go b/resource-manager/network/2022-09-01/applicationgateways/model_resourceset.go deleted file mode 100644 index 05c6f87a097..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/applicationgateways/model_retentionpolicyparameters.go deleted file mode 100644 index aed6889cbab..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_route.go b/resource-manager/network/2022-09-01/applicationgateways/model_route.go deleted file mode 100644 index 8b16e63b0d4..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_routepropertiesformat.go deleted file mode 100644 index e5c5f698874..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_routetable.go b/resource-manager/network/2022-09-01/applicationgateways/model_routetable.go deleted file mode 100644 index 6b3d63e8b6c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_routetablepropertiesformat.go deleted file mode 100644 index af2c694b5db..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_securityrule.go b/resource-manager/network/2022-09-01/applicationgateways/model_securityrule.go deleted file mode 100644 index ef187da7432..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_securityrulepropertiesformat.go deleted file mode 100644 index c96607c5d20..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/applicationgateways/model_serviceassociationlink.go deleted file mode 100644 index fcd770e8b43..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 74146988caf..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 508b02893d3..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicy.go deleted file mode 100644 index 3c9d04af717..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 3c52f56e9ea..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 0ccd3a839f3..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index edd49bd36a4..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5cae7444005..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_subnet.go b/resource-manager/network/2022-09-01/applicationgateways/model_subnet.go deleted file mode 100644 index 9bad3a3150c..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_subnetpropertiesformat.go deleted file mode 100644 index 3ff5721db4e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_subresource.go b/resource-manager/network/2022-09-01/applicationgateways/model_subresource.go deleted file mode 100644 index 5e7297f22b2..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_tagsobject.go b/resource-manager/network/2022-09-01/applicationgateways/model_tagsobject.go deleted file mode 100644 index d5962ed5647..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 65767115778..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/applicationgateways/model_trafficanalyticsproperties.go deleted file mode 100644 index b9b39e7b346..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/applicationgateways/model_virtualnetworktap.go deleted file mode 100644 index 610065f3a8a..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/applicationgateways/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index a7db53f1629..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/predicates.go b/resource-manager/network/2022-09-01/applicationgateways/predicates.go deleted file mode 100644 index c51e6f7b000..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/predicates.go +++ /dev/null @@ -1,55 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ApplicationGatewayOperationPredicate) Matches(input ApplicationGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type ApplicationGatewaySslPredefinedPolicyOperationPredicate struct { - Id *string - Name *string -} - -func (p ApplicationGatewaySslPredefinedPolicyOperationPredicate) Matches(input ApplicationGatewaySslPredefinedPolicy) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/applicationgateways/version.go b/resource-manager/network/2022-09-01/applicationgateways/version.go deleted file mode 100644 index f7f2780edc2..00000000000 --- a/resource-manager/network/2022-09-01/applicationgateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/README.md b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/README.md deleted file mode 100644 index 0ea117d80a8..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests` Documentation - -The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests" -``` - - -### Client Initialization - -```go -client := applicationgatewaywafdynamicmanifests.NewApplicationGatewayWafDynamicManifestsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationGatewayWafDynamicManifestsClient.ApplicationGatewayWafDynamicManifestsDefaultGet` - -```go -ctx := context.TODO() -id := applicationgatewaywafdynamicmanifests.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -read, err := client.ApplicationGatewayWafDynamicManifestsDefaultGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewayWafDynamicManifestsClient.ApplicationGatewayWafDynamicManifestsGet` - -```go -ctx := context.TODO() -id := applicationgatewaywafdynamicmanifests.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.ApplicationGatewayWafDynamicManifestsGet(ctx, id)` can be used to do batched pagination -items, err := client.ApplicationGatewayWafDynamicManifestsGetComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/client.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/client.go deleted file mode 100644 index 9f40236f2da..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestsClient struct { - Client *resourcemanager.Client -} - -func NewApplicationGatewayWafDynamicManifestsClientWithBaseURI(api environments.Api) (*ApplicationGatewayWafDynamicManifestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationgatewaywafdynamicmanifests", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationGatewayWafDynamicManifestsClient: %+v", err) - } - - return &ApplicationGatewayWafDynamicManifestsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/constants.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/constants.go deleted file mode 100644 index 0d7db7ea47d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/constants.go +++ /dev/null @@ -1,195 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRuleSetStatusOptions string - -const ( - ApplicationGatewayRuleSetStatusOptionsDeprecated ApplicationGatewayRuleSetStatusOptions = "Deprecated" - ApplicationGatewayRuleSetStatusOptionsGA ApplicationGatewayRuleSetStatusOptions = "GA" - ApplicationGatewayRuleSetStatusOptionsPreview ApplicationGatewayRuleSetStatusOptions = "Preview" - ApplicationGatewayRuleSetStatusOptionsSupported ApplicationGatewayRuleSetStatusOptions = "Supported" -) - -func PossibleValuesForApplicationGatewayRuleSetStatusOptions() []string { - return []string{ - string(ApplicationGatewayRuleSetStatusOptionsDeprecated), - string(ApplicationGatewayRuleSetStatusOptionsGA), - string(ApplicationGatewayRuleSetStatusOptionsPreview), - string(ApplicationGatewayRuleSetStatusOptionsSupported), - } -} - -func (s *ApplicationGatewayRuleSetStatusOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRuleSetStatusOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRuleSetStatusOptions(input string) (*ApplicationGatewayRuleSetStatusOptions, error) { - vals := map[string]ApplicationGatewayRuleSetStatusOptions{ - "deprecated": ApplicationGatewayRuleSetStatusOptionsDeprecated, - "ga": ApplicationGatewayRuleSetStatusOptionsGA, - "preview": ApplicationGatewayRuleSetStatusOptionsPreview, - "supported": ApplicationGatewayRuleSetStatusOptionsSupported, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRuleSetStatusOptions(input) - return &out, nil -} - -type ApplicationGatewayTierTypes string - -const ( - ApplicationGatewayTierTypesStandard ApplicationGatewayTierTypes = "Standard" - ApplicationGatewayTierTypesStandardVTwo ApplicationGatewayTierTypes = "Standard_v2" - ApplicationGatewayTierTypesWAF ApplicationGatewayTierTypes = "WAF" - ApplicationGatewayTierTypesWAFVTwo ApplicationGatewayTierTypes = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTierTypes() []string { - return []string{ - string(ApplicationGatewayTierTypesStandard), - string(ApplicationGatewayTierTypesStandardVTwo), - string(ApplicationGatewayTierTypesWAF), - string(ApplicationGatewayTierTypesWAFVTwo), - } -} - -func (s *ApplicationGatewayTierTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTierTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTierTypes(input string) (*ApplicationGatewayTierTypes, error) { - vals := map[string]ApplicationGatewayTierTypes{ - "standard": ApplicationGatewayTierTypesStandard, - "standard_v2": ApplicationGatewayTierTypesStandardVTwo, - "waf": ApplicationGatewayTierTypesWAF, - "waf_v2": ApplicationGatewayTierTypesWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTierTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleActionTypes string - -const ( - ApplicationGatewayWafRuleActionTypesAllow ApplicationGatewayWafRuleActionTypes = "Allow" - ApplicationGatewayWafRuleActionTypesAnomalyScoring ApplicationGatewayWafRuleActionTypes = "AnomalyScoring" - ApplicationGatewayWafRuleActionTypesBlock ApplicationGatewayWafRuleActionTypes = "Block" - ApplicationGatewayWafRuleActionTypesLog ApplicationGatewayWafRuleActionTypes = "Log" - ApplicationGatewayWafRuleActionTypesNone ApplicationGatewayWafRuleActionTypes = "None" -) - -func PossibleValuesForApplicationGatewayWafRuleActionTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleActionTypesAllow), - string(ApplicationGatewayWafRuleActionTypesAnomalyScoring), - string(ApplicationGatewayWafRuleActionTypesBlock), - string(ApplicationGatewayWafRuleActionTypesLog), - string(ApplicationGatewayWafRuleActionTypesNone), - } -} - -func (s *ApplicationGatewayWafRuleActionTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleActionTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleActionTypes(input string) (*ApplicationGatewayWafRuleActionTypes, error) { - vals := map[string]ApplicationGatewayWafRuleActionTypes{ - "allow": ApplicationGatewayWafRuleActionTypesAllow, - "anomalyscoring": ApplicationGatewayWafRuleActionTypesAnomalyScoring, - "block": ApplicationGatewayWafRuleActionTypesBlock, - "log": ApplicationGatewayWafRuleActionTypesLog, - "none": ApplicationGatewayWafRuleActionTypesNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleActionTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleStateTypes string - -const ( - ApplicationGatewayWafRuleStateTypesDisabled ApplicationGatewayWafRuleStateTypes = "Disabled" - ApplicationGatewayWafRuleStateTypesEnabled ApplicationGatewayWafRuleStateTypes = "Enabled" -) - -func PossibleValuesForApplicationGatewayWafRuleStateTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleStateTypesDisabled), - string(ApplicationGatewayWafRuleStateTypesEnabled), - } -} - -func (s *ApplicationGatewayWafRuleStateTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleStateTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleStateTypes(input string) (*ApplicationGatewayWafRuleStateTypes, error) { - vals := map[string]ApplicationGatewayWafRuleStateTypes{ - "disabled": ApplicationGatewayWafRuleStateTypesDisabled, - "enabled": ApplicationGatewayWafRuleStateTypesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleStateTypes(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/id_location.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/id_location.go deleted file mode 100644 index d3b01a8cfce..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/id_location_test.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/id_location_test.go deleted file mode 100644 index 276af30c32d..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsdefaultget.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsdefaultget.go deleted file mode 100644 index e9251c3e225..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsdefaultget.go +++ /dev/null @@ -1,52 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestsDefaultGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayWafDynamicManifestResult -} - -// ApplicationGatewayWafDynamicManifestsDefaultGet ... -func (c ApplicationGatewayWafDynamicManifestsClient) ApplicationGatewayWafDynamicManifestsDefaultGet(ctx context.Context, id LocationId) (result ApplicationGatewayWafDynamicManifestsDefaultGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/applicationGatewayWafDynamicManifests/dafault", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsget.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsget.go deleted file mode 100644 index b66cd668d1f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsget.go +++ /dev/null @@ -1,89 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGatewayWafDynamicManifestResult -} - -type ApplicationGatewayWafDynamicManifestsGetCompleteResult struct { - Items []ApplicationGatewayWafDynamicManifestResult -} - -// ApplicationGatewayWafDynamicManifestsGet ... -func (c ApplicationGatewayWafDynamicManifestsClient) ApplicationGatewayWafDynamicManifestsGet(ctx context.Context, id LocationId) (result ApplicationGatewayWafDynamicManifestsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/applicationGatewayWafDynamicManifests", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGatewayWafDynamicManifestResult `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ApplicationGatewayWafDynamicManifestsGetComplete retrieves all the results into a single object -func (c ApplicationGatewayWafDynamicManifestsClient) ApplicationGatewayWafDynamicManifestsGetComplete(ctx context.Context, id LocationId) (ApplicationGatewayWafDynamicManifestsGetCompleteResult, error) { - return c.ApplicationGatewayWafDynamicManifestsGetCompleteMatchingPredicate(ctx, id, ApplicationGatewayWafDynamicManifestResultOperationPredicate{}) -} - -// ApplicationGatewayWafDynamicManifestsGetCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewayWafDynamicManifestsClient) ApplicationGatewayWafDynamicManifestsGetCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate ApplicationGatewayWafDynamicManifestResultOperationPredicate) (result ApplicationGatewayWafDynamicManifestsGetCompleteResult, err error) { - items := make([]ApplicationGatewayWafDynamicManifestResult, 0) - - resp, err := c.ApplicationGatewayWafDynamicManifestsGet(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ApplicationGatewayWafDynamicManifestsGetCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallmanifestruleset.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallmanifestruleset.go deleted file mode 100644 index 401a87a86a8..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallmanifestruleset.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallManifestRuleSet struct { - RuleGroups []ApplicationGatewayFirewallRuleGroup `json:"ruleGroups"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` - Status *ApplicationGatewayRuleSetStatusOptions `json:"status,omitempty"` - Tiers *[]ApplicationGatewayTierTypes `json:"tiers,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrule.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrule.go deleted file mode 100644 index 723193ddc36..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRule struct { - Action *ApplicationGatewayWafRuleActionTypes `json:"action,omitempty"` - Description *string `json:"description,omitempty"` - RuleId int64 `json:"ruleId"` - RuleIdString *string `json:"ruleIdString,omitempty"` - State *ApplicationGatewayWafRuleStateTypes `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrulegroup.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrulegroup.go deleted file mode 100644 index f9aefdfc147..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrulegroup.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleGroup struct { - Description *string `json:"description,omitempty"` - RuleGroupName string `json:"ruleGroupName"` - Rules []ApplicationGatewayFirewallRule `json:"rules"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestpropertiesresult.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestpropertiesresult.go deleted file mode 100644 index d68d61add58..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestpropertiesresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestPropertiesResult struct { - AvailableRuleSets *[]ApplicationGatewayFirewallManifestRuleSet `json:"availableRuleSets,omitempty"` - DefaultRuleSet *DefaultRuleSetPropertyFormat `json:"defaultRuleSet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestresult.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestresult.go deleted file mode 100644 index 763ec4aad23..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestResult struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayWafDynamicManifestPropertiesResult `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_defaultrulesetpropertyformat.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_defaultrulesetpropertyformat.go deleted file mode 100644 index b69c307217f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/model_defaultrulesetpropertyformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultRuleSetPropertyFormat struct { - RuleSetType *string `json:"ruleSetType,omitempty"` - RuleSetVersion *string `json:"ruleSetVersion,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/predicates.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/predicates.go deleted file mode 100644 index 9714d21637e..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestResultOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ApplicationGatewayWafDynamicManifestResultOperationPredicate) Matches(input ApplicationGatewayWafDynamicManifestResult) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/version.go b/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/version.go deleted file mode 100644 index 24afda7fa7f..00000000000 --- a/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/README.md b/resource-manager/network/2022-09-01/applicationsecuritygroups/README.md deleted file mode 100644 index 6a4308e9aa0..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationsecuritygroups` Documentation - -The `applicationsecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationsecuritygroups" -``` - - -### Client Initialization - -```go -client := applicationsecuritygroups.NewApplicationSecurityGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - -payload := applicationsecuritygroups.ApplicationSecurityGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.Delete` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.Get` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.List` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.ListAll` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.UpdateTags` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - -payload := applicationsecuritygroups.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/client.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/client.go deleted file mode 100644 index dd9e39290e5..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationsecuritygroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupsClient struct { - Client *resourcemanager.Client -} - -func NewApplicationSecurityGroupsClientWithBaseURI(api environments.Api) (*ApplicationSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationsecuritygroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationSecurityGroupsClient: %+v", err) - } - - return &ApplicationSecurityGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/constants.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/constants.go deleted file mode 100644 index a226eb6274e..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package applicationsecuritygroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/id_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/id_applicationsecuritygroup.go deleted file mode 100644 index 34de777e09e..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/id_applicationsecuritygroup.go +++ /dev/null @@ -1,127 +0,0 @@ -package applicationsecuritygroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationSecurityGroupId{} - -// ApplicationSecurityGroupId is a struct representing the Resource ID for a Application Security Group -type ApplicationSecurityGroupId struct { - SubscriptionId string - ResourceGroupName string - ApplicationSecurityGroupName string -} - -// NewApplicationSecurityGroupID returns a new ApplicationSecurityGroupId struct -func NewApplicationSecurityGroupID(subscriptionId string, resourceGroupName string, applicationSecurityGroupName string) ApplicationSecurityGroupId { - return ApplicationSecurityGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationSecurityGroupName: applicationSecurityGroupName, - } -} - -// ParseApplicationSecurityGroupID parses 'input' into a ApplicationSecurityGroupId -func ParseApplicationSecurityGroupID(input string) (*ApplicationSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationSecurityGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationSecurityGroupName, ok = parsed.Parsed["applicationSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ParseApplicationSecurityGroupIDInsensitively parses 'input' case-insensitively into a ApplicationSecurityGroupId -// note: this method should only be used for API response data and not user input -func ParseApplicationSecurityGroupIDInsensitively(input string) (*ApplicationSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationSecurityGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationSecurityGroupName, ok = parsed.Parsed["applicationSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationSecurityGroupID checks that 'input' can be parsed as a Application Security Group ID -func ValidateApplicationSecurityGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationSecurityGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Security Group ID -func (id ApplicationSecurityGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationSecurityGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationSecurityGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Security Group ID -func (id ApplicationSecurityGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationSecurityGroups", "applicationSecurityGroups", "applicationSecurityGroups"), - resourceids.UserSpecifiedSegment("applicationSecurityGroupName", "applicationSecurityGroupValue"), - } -} - -// String returns a human-readable description of this Application Security Group ID -func (id ApplicationSecurityGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Security Group Name: %q", id.ApplicationSecurityGroupName), - } - return fmt.Sprintf("Application Security Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/id_applicationsecuritygroup_test.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/id_applicationsecuritygroup_test.go deleted file mode 100644 index ebc46257074..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/id_applicationsecuritygroup_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package applicationsecuritygroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationSecurityGroupId{} - -func TestNewApplicationSecurityGroupID(t *testing.T) { - id := NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationSecurityGroupName != "applicationSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationSecurityGroupName'", id.ApplicationSecurityGroupName, "applicationSecurityGroupValue") - } -} - -func TestFormatApplicationSecurityGroupID(t *testing.T) { - actual := NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationSecurityGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue", - Expected: &ApplicationSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationSecurityGroupName: "applicationSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationSecurityGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationSecurityGroupName != v.Expected.ApplicationSecurityGroupName { - t.Fatalf("Expected %q but got %q for ApplicationSecurityGroupName", v.Expected.ApplicationSecurityGroupName, actual.ApplicationSecurityGroupName) - } - - } -} - -func TestParseApplicationSecurityGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnSeCuRiTyGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue", - Expected: &ApplicationSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationSecurityGroupName: "applicationSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnSeCuRiTyGrOuPs/aPpLiCaTiOnSeCuRiTyGrOuPvAlUe", - Expected: &ApplicationSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationSecurityGroupName: "aPpLiCaTiOnSeCuRiTyGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnSeCuRiTyGrOuPs/aPpLiCaTiOnSeCuRiTyGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationSecurityGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationSecurityGroupName != v.Expected.ApplicationSecurityGroupName { - t.Fatalf("Expected %q but got %q for ApplicationSecurityGroupName", v.Expected.ApplicationSecurityGroupName, actual.ApplicationSecurityGroupName) - } - - } -} - -func TestSegmentsForApplicationSecurityGroupId(t *testing.T) { - segments := ApplicationSecurityGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationSecurityGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_createorupdate.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/method_createorupdate.go deleted file mode 100644 index 51dcdb4cbf6..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context, id ApplicationSecurityGroupId, input ApplicationSecurityGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ApplicationSecurityGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id ApplicationSecurityGroupId, input ApplicationSecurityGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_delete.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/method_delete.go deleted file mode 100644 index 6d16cb628e3..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ApplicationSecurityGroupsClient) Delete(ctx context.Context, id ApplicationSecurityGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ApplicationSecurityGroupsClient) DeleteThenPoll(ctx context.Context, id ApplicationSecurityGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_get.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/method_get.go deleted file mode 100644 index a81313eb113..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationSecurityGroup -} - -// Get ... -func (c ApplicationSecurityGroupsClient) Get(ctx context.Context, id ApplicationSecurityGroupId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_list.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/method_list.go deleted file mode 100644 index e51ea3e4de4..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationSecurityGroup -} - -type ListCompleteResult struct { - Items []ApplicationSecurityGroup -} - -// List ... -func (c ApplicationSecurityGroupsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationSecurityGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ApplicationSecurityGroupsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationSecurityGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationSecurityGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ApplicationSecurityGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ApplicationSecurityGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_listall.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/method_listall.go deleted file mode 100644 index 5e4e6a5c78e..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationSecurityGroup -} - -type ListAllCompleteResult struct { - Items []ApplicationSecurityGroup -} - -// ListAll ... -func (c ApplicationSecurityGroupsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationSecurityGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c ApplicationSecurityGroupsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, ApplicationSecurityGroupOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationSecurityGroupsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApplicationSecurityGroupOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]ApplicationSecurityGroup, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_updatetags.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/method_updatetags.go deleted file mode 100644 index 028c5bdca55..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationSecurityGroup -} - -// UpdateTags ... -func (c ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, id ApplicationSecurityGroupId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/model_applicationsecuritygroup.go deleted file mode 100644 index 56c89e2151e..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationsecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index c54772935da..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationsecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/model_tagsobject.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/model_tagsobject.go deleted file mode 100644 index b945e6c9cdf..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationsecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/predicates.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/predicates.go deleted file mode 100644 index 6ea534ecd89..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package applicationsecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ApplicationSecurityGroupOperationPredicate) Matches(input ApplicationSecurityGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/applicationsecuritygroups/version.go b/resource-manager/network/2022-09-01/applicationsecuritygroups/version.go deleted file mode 100644 index 74271e91bc0..00000000000 --- a/resource-manager/network/2022-09-01/applicationsecuritygroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationsecuritygroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationsecuritygroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/README.md b/resource-manager/network/2022-09-01/availabledelegations/README.md deleted file mode 100644 index 4fdcebda6e5..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/availabledelegations` Documentation - -The `availabledelegations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/availabledelegations" -``` - - -### Client Initialization - -```go -client := availabledelegations.NewAvailableDelegationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AvailableDelegationsClient.AvailableDelegationsList` - -```go -ctx := context.TODO() -id := availabledelegations.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailableDelegationsList(ctx, id)` can be used to do batched pagination -items, err := client.AvailableDelegationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AvailableDelegationsClient.AvailableResourceGroupDelegationsList` - -```go -ctx := context.TODO() -id := availabledelegations.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -// alternatively `client.AvailableResourceGroupDelegationsList(ctx, id)` can be used to do batched pagination -items, err := client.AvailableResourceGroupDelegationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/availabledelegations/client.go b/resource-manager/network/2022-09-01/availabledelegations/client.go deleted file mode 100644 index 89733dd49b8..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package availabledelegations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableDelegationsClient struct { - Client *resourcemanager.Client -} - -func NewAvailableDelegationsClientWithBaseURI(api environments.Api) (*AvailableDelegationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "availabledelegations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AvailableDelegationsClient: %+v", err) - } - - return &AvailableDelegationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/id_location.go b/resource-manager/network/2022-09-01/availabledelegations/id_location.go deleted file mode 100644 index a6a158e88e6..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package availabledelegations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/id_location_test.go b/resource-manager/network/2022-09-01/availabledelegations/id_location_test.go deleted file mode 100644 index a854fb044de..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package availabledelegations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/id_providerlocation.go b/resource-manager/network/2022-09-01/availabledelegations/id_providerlocation.go deleted file mode 100644 index a5f5134b65c..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/id_providerlocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package availabledelegations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -// ProviderLocationId is a struct representing the Resource ID for a Provider Location -type ProviderLocationId struct { - SubscriptionId string - ResourceGroupName string - LocationName string -} - -// NewProviderLocationID returns a new ProviderLocationId struct -func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { - return ProviderLocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocationName: locationName, - } -} - -// ParseProviderLocationID parses 'input' into a ProviderLocationId -func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId -// note: this method should only be used for API response data and not user input -func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID -func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Location ID -func (id ProviderLocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID -func (id ProviderLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Provider Location ID -func (id ProviderLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/id_providerlocation_test.go b/resource-manager/network/2022-09-01/availabledelegations/id_providerlocation_test.go deleted file mode 100644 index b985368704f..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/id_providerlocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package availabledelegations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -func TestNewProviderLocationID(t *testing.T) { - id := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatProviderLocationID(t *testing.T) { - actual := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseProviderLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForProviderLocationId(t *testing.T) { - segments := ProviderLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/method_availabledelegationslist.go b/resource-manager/network/2022-09-01/availabledelegations/method_availabledelegationslist.go deleted file mode 100644 index 599360cc21d..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/method_availabledelegationslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package availabledelegations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableDelegationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailableDelegation -} - -type AvailableDelegationsListCompleteResult struct { - Items []AvailableDelegation -} - -// AvailableDelegationsList ... -func (c AvailableDelegationsClient) AvailableDelegationsList(ctx context.Context, id LocationId) (result AvailableDelegationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableDelegations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailableDelegation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableDelegationsListComplete retrieves all the results into a single object -func (c AvailableDelegationsClient) AvailableDelegationsListComplete(ctx context.Context, id LocationId) (AvailableDelegationsListCompleteResult, error) { - return c.AvailableDelegationsListCompleteMatchingPredicate(ctx, id, AvailableDelegationOperationPredicate{}) -} - -// AvailableDelegationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AvailableDelegationsClient) AvailableDelegationsListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AvailableDelegationOperationPredicate) (result AvailableDelegationsListCompleteResult, err error) { - items := make([]AvailableDelegation, 0) - - resp, err := c.AvailableDelegationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableDelegationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/method_availableresourcegroupdelegationslist.go b/resource-manager/network/2022-09-01/availabledelegations/method_availableresourcegroupdelegationslist.go deleted file mode 100644 index a7d442c92c9..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/method_availableresourcegroupdelegationslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package availabledelegations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableResourceGroupDelegationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailableDelegation -} - -type AvailableResourceGroupDelegationsListCompleteResult struct { - Items []AvailableDelegation -} - -// AvailableResourceGroupDelegationsList ... -func (c AvailableDelegationsClient) AvailableResourceGroupDelegationsList(ctx context.Context, id ProviderLocationId) (result AvailableResourceGroupDelegationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableDelegations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailableDelegation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableResourceGroupDelegationsListComplete retrieves all the results into a single object -func (c AvailableDelegationsClient) AvailableResourceGroupDelegationsListComplete(ctx context.Context, id ProviderLocationId) (AvailableResourceGroupDelegationsListCompleteResult, error) { - return c.AvailableResourceGroupDelegationsListCompleteMatchingPredicate(ctx, id, AvailableDelegationOperationPredicate{}) -} - -// AvailableResourceGroupDelegationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AvailableDelegationsClient) AvailableResourceGroupDelegationsListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AvailableDelegationOperationPredicate) (result AvailableResourceGroupDelegationsListCompleteResult, err error) { - items := make([]AvailableDelegation, 0) - - resp, err := c.AvailableResourceGroupDelegationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableResourceGroupDelegationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/model_availabledelegation.go b/resource-manager/network/2022-09-01/availabledelegations/model_availabledelegation.go deleted file mode 100644 index 0fa5dba60d1..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/model_availabledelegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package availabledelegations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableDelegation struct { - Actions *[]string `json:"actions,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/predicates.go b/resource-manager/network/2022-09-01/availabledelegations/predicates.go deleted file mode 100644 index caf6b904077..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package availabledelegations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableDelegationOperationPredicate struct { - Id *string - Name *string - ServiceName *string - Type *string -} - -func (p AvailableDelegationOperationPredicate) Matches(input AvailableDelegation) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.ServiceName != nil && (input.ServiceName == nil || *p.ServiceName != *input.ServiceName) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/availabledelegations/version.go b/resource-manager/network/2022-09-01/availabledelegations/version.go deleted file mode 100644 index 99dd54932b3..00000000000 --- a/resource-manager/network/2022-09-01/availabledelegations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package availabledelegations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabledelegations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/README.md b/resource-manager/network/2022-09-01/availableservicealiases/README.md deleted file mode 100644 index 5766a7103a4..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/availableservicealiases` Documentation - -The `availableservicealiases` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/availableservicealiases" -``` - - -### Client Initialization - -```go -client := availableservicealiases.NewAvailableServiceAliasesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AvailableServiceAliasesClient.AvailableServiceAliasesList` - -```go -ctx := context.TODO() -id := availableservicealiases.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailableServiceAliasesList(ctx, id)` can be used to do batched pagination -items, err := client.AvailableServiceAliasesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AvailableServiceAliasesClient.AvailableServiceAliasesListByResourceGroup` - -```go -ctx := context.TODO() -id := availableservicealiases.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -// alternatively `client.AvailableServiceAliasesListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.AvailableServiceAliasesListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/availableservicealiases/client.go b/resource-manager/network/2022-09-01/availableservicealiases/client.go deleted file mode 100644 index d4e19363f94..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package availableservicealiases - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAliasesClient struct { - Client *resourcemanager.Client -} - -func NewAvailableServiceAliasesClientWithBaseURI(api environments.Api) (*AvailableServiceAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "availableservicealiases", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AvailableServiceAliasesClient: %+v", err) - } - - return &AvailableServiceAliasesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/id_location.go b/resource-manager/network/2022-09-01/availableservicealiases/id_location.go deleted file mode 100644 index 7d25a1ec759..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package availableservicealiases - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/id_location_test.go b/resource-manager/network/2022-09-01/availableservicealiases/id_location_test.go deleted file mode 100644 index b9a374cf8e2..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package availableservicealiases - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/id_providerlocation.go b/resource-manager/network/2022-09-01/availableservicealiases/id_providerlocation.go deleted file mode 100644 index 0eb12f2b132..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/id_providerlocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package availableservicealiases - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -// ProviderLocationId is a struct representing the Resource ID for a Provider Location -type ProviderLocationId struct { - SubscriptionId string - ResourceGroupName string - LocationName string -} - -// NewProviderLocationID returns a new ProviderLocationId struct -func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { - return ProviderLocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocationName: locationName, - } -} - -// ParseProviderLocationID parses 'input' into a ProviderLocationId -func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId -// note: this method should only be used for API response data and not user input -func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID -func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Location ID -func (id ProviderLocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID -func (id ProviderLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Provider Location ID -func (id ProviderLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/id_providerlocation_test.go b/resource-manager/network/2022-09-01/availableservicealiases/id_providerlocation_test.go deleted file mode 100644 index 84a80aa5845..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/id_providerlocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package availableservicealiases - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -func TestNewProviderLocationID(t *testing.T) { - id := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatProviderLocationID(t *testing.T) { - actual := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseProviderLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForProviderLocationId(t *testing.T) { - segments := ProviderLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/method_availableservicealiaseslist.go b/resource-manager/network/2022-09-01/availableservicealiases/method_availableservicealiaseslist.go deleted file mode 100644 index 3643de63000..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/method_availableservicealiaseslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package availableservicealiases - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAliasesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailableServiceAlias -} - -type AvailableServiceAliasesListCompleteResult struct { - Items []AvailableServiceAlias -} - -// AvailableServiceAliasesList ... -func (c AvailableServiceAliasesClient) AvailableServiceAliasesList(ctx context.Context, id LocationId) (result AvailableServiceAliasesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableServiceAliases", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailableServiceAlias `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableServiceAliasesListComplete retrieves all the results into a single object -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListComplete(ctx context.Context, id LocationId) (AvailableServiceAliasesListCompleteResult, error) { - return c.AvailableServiceAliasesListCompleteMatchingPredicate(ctx, id, AvailableServiceAliasOperationPredicate{}) -} - -// AvailableServiceAliasesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AvailableServiceAliasOperationPredicate) (result AvailableServiceAliasesListCompleteResult, err error) { - items := make([]AvailableServiceAlias, 0) - - resp, err := c.AvailableServiceAliasesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableServiceAliasesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/method_availableservicealiaseslistbyresourcegroup.go b/resource-manager/network/2022-09-01/availableservicealiases/method_availableservicealiaseslistbyresourcegroup.go deleted file mode 100644 index a6ef5ba7a97..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/method_availableservicealiaseslistbyresourcegroup.go +++ /dev/null @@ -1,89 +0,0 @@ -package availableservicealiases - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAliasesListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailableServiceAlias -} - -type AvailableServiceAliasesListByResourceGroupCompleteResult struct { - Items []AvailableServiceAlias -} - -// AvailableServiceAliasesListByResourceGroup ... -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListByResourceGroup(ctx context.Context, id ProviderLocationId) (result AvailableServiceAliasesListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableServiceAliases", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailableServiceAlias `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableServiceAliasesListByResourceGroupComplete retrieves all the results into a single object -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListByResourceGroupComplete(ctx context.Context, id ProviderLocationId) (AvailableServiceAliasesListByResourceGroupCompleteResult, error) { - return c.AvailableServiceAliasesListByResourceGroupCompleteMatchingPredicate(ctx, id, AvailableServiceAliasOperationPredicate{}) -} - -// AvailableServiceAliasesListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AvailableServiceAliasOperationPredicate) (result AvailableServiceAliasesListByResourceGroupCompleteResult, err error) { - items := make([]AvailableServiceAlias, 0) - - resp, err := c.AvailableServiceAliasesListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableServiceAliasesListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/model_availableservicealias.go b/resource-manager/network/2022-09-01/availableservicealiases/model_availableservicealias.go deleted file mode 100644 index b5f6cfd263b..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/model_availableservicealias.go +++ /dev/null @@ -1,11 +0,0 @@ -package availableservicealiases - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAlias struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ResourceName *string `json:"resourceName,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/predicates.go b/resource-manager/network/2022-09-01/availableservicealiases/predicates.go deleted file mode 100644 index afe2abff9ab..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package availableservicealiases - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAliasOperationPredicate struct { - Id *string - Name *string - ResourceName *string - Type *string -} - -func (p AvailableServiceAliasOperationPredicate) Matches(input AvailableServiceAlias) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.ResourceName != nil && (input.ResourceName == nil || *p.ResourceName != *input.ResourceName) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/availableservicealiases/version.go b/resource-manager/network/2022-09-01/availableservicealiases/version.go deleted file mode 100644 index d1e5f40a7af..00000000000 --- a/resource-manager/network/2022-09-01/availableservicealiases/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package availableservicealiases - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableservicealiases/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/README.md b/resource-manager/network/2022-09-01/azurefirewalls/README.md deleted file mode 100644 index ca32919dbf9..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/README.md +++ /dev/null @@ -1,128 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/azurefirewalls` Documentation - -The `azurefirewalls` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/azurefirewalls" -``` - - -### Client Initialization - -```go -client := azurefirewalls.NewAzureFirewallsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AzureFirewallsClient.AzureFirewallsListLearnedPrefixes` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -if err := client.AzureFirewallsListLearnedPrefixesThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `AzureFirewallsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -payload := azurefirewalls.AzureFirewall{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AzureFirewallsClient.Delete` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `AzureFirewallsClient.Get` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AzureFirewallsClient.List` - -```go -ctx := context.TODO() -id := azurefirewalls.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AzureFirewallsClient.ListAll` - -```go -ctx := context.TODO() -id := azurefirewalls.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AzureFirewallsClient.UpdateTags` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -payload := azurefirewalls.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/azurefirewalls/client.go b/resource-manager/network/2022-09-01/azurefirewalls/client.go deleted file mode 100644 index 3ea45e69959..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package azurefirewalls - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallsClient struct { - Client *resourcemanager.Client -} - -func NewAzureFirewallsClientWithBaseURI(api environments.Api) (*AzureFirewallsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "azurefirewalls", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AzureFirewallsClient: %+v", err) - } - - return &AzureFirewallsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/constants.go b/resource-manager/network/2022-09-01/azurefirewalls/constants.go deleted file mode 100644 index b8e1a119bde..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/constants.go +++ /dev/null @@ -1,359 +0,0 @@ -package azurefirewalls - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRuleProtocolType string - -const ( - AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http" - AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https" - AzureFirewallApplicationRuleProtocolTypeMssql AzureFirewallApplicationRuleProtocolType = "Mssql" -) - -func PossibleValuesForAzureFirewallApplicationRuleProtocolType() []string { - return []string{ - string(AzureFirewallApplicationRuleProtocolTypeHTTP), - string(AzureFirewallApplicationRuleProtocolTypeHTTPS), - string(AzureFirewallApplicationRuleProtocolTypeMssql), - } -} - -func (s *AzureFirewallApplicationRuleProtocolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallApplicationRuleProtocolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallApplicationRuleProtocolType(input string) (*AzureFirewallApplicationRuleProtocolType, error) { - vals := map[string]AzureFirewallApplicationRuleProtocolType{ - "http": AzureFirewallApplicationRuleProtocolTypeHTTP, - "https": AzureFirewallApplicationRuleProtocolTypeHTTPS, - "mssql": AzureFirewallApplicationRuleProtocolTypeMssql, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallApplicationRuleProtocolType(input) - return &out, nil -} - -type AzureFirewallNatRCActionType string - -const ( - AzureFirewallNatRCActionTypeDnat AzureFirewallNatRCActionType = "Dnat" - AzureFirewallNatRCActionTypeSnat AzureFirewallNatRCActionType = "Snat" -) - -func PossibleValuesForAzureFirewallNatRCActionType() []string { - return []string{ - string(AzureFirewallNatRCActionTypeDnat), - string(AzureFirewallNatRCActionTypeSnat), - } -} - -func (s *AzureFirewallNatRCActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallNatRCActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallNatRCActionType(input string) (*AzureFirewallNatRCActionType, error) { - vals := map[string]AzureFirewallNatRCActionType{ - "dnat": AzureFirewallNatRCActionTypeDnat, - "snat": AzureFirewallNatRCActionTypeSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallNatRCActionType(input) - return &out, nil -} - -type AzureFirewallNetworkRuleProtocol string - -const ( - AzureFirewallNetworkRuleProtocolAny AzureFirewallNetworkRuleProtocol = "Any" - AzureFirewallNetworkRuleProtocolICMP AzureFirewallNetworkRuleProtocol = "ICMP" - AzureFirewallNetworkRuleProtocolTCP AzureFirewallNetworkRuleProtocol = "TCP" - AzureFirewallNetworkRuleProtocolUDP AzureFirewallNetworkRuleProtocol = "UDP" -) - -func PossibleValuesForAzureFirewallNetworkRuleProtocol() []string { - return []string{ - string(AzureFirewallNetworkRuleProtocolAny), - string(AzureFirewallNetworkRuleProtocolICMP), - string(AzureFirewallNetworkRuleProtocolTCP), - string(AzureFirewallNetworkRuleProtocolUDP), - } -} - -func (s *AzureFirewallNetworkRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallNetworkRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallNetworkRuleProtocol(input string) (*AzureFirewallNetworkRuleProtocol, error) { - vals := map[string]AzureFirewallNetworkRuleProtocol{ - "any": AzureFirewallNetworkRuleProtocolAny, - "icmp": AzureFirewallNetworkRuleProtocolICMP, - "tcp": AzureFirewallNetworkRuleProtocolTCP, - "udp": AzureFirewallNetworkRuleProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallNetworkRuleProtocol(input) - return &out, nil -} - -type AzureFirewallRCActionType string - -const ( - AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow" - AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny" -) - -func PossibleValuesForAzureFirewallRCActionType() []string { - return []string{ - string(AzureFirewallRCActionTypeAllow), - string(AzureFirewallRCActionTypeDeny), - } -} - -func (s *AzureFirewallRCActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallRCActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallRCActionType(input string) (*AzureFirewallRCActionType, error) { - vals := map[string]AzureFirewallRCActionType{ - "allow": AzureFirewallRCActionTypeAllow, - "deny": AzureFirewallRCActionTypeDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallRCActionType(input) - return &out, nil -} - -type AzureFirewallSkuName string - -const ( - AzureFirewallSkuNameAZFWHub AzureFirewallSkuName = "AZFW_Hub" - AzureFirewallSkuNameAZFWVNet AzureFirewallSkuName = "AZFW_VNet" -) - -func PossibleValuesForAzureFirewallSkuName() []string { - return []string{ - string(AzureFirewallSkuNameAZFWHub), - string(AzureFirewallSkuNameAZFWVNet), - } -} - -func (s *AzureFirewallSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallSkuName(input string) (*AzureFirewallSkuName, error) { - vals := map[string]AzureFirewallSkuName{ - "azfw_hub": AzureFirewallSkuNameAZFWHub, - "azfw_vnet": AzureFirewallSkuNameAZFWVNet, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallSkuName(input) - return &out, nil -} - -type AzureFirewallSkuTier string - -const ( - AzureFirewallSkuTierBasic AzureFirewallSkuTier = "Basic" - AzureFirewallSkuTierPremium AzureFirewallSkuTier = "Premium" - AzureFirewallSkuTierStandard AzureFirewallSkuTier = "Standard" -) - -func PossibleValuesForAzureFirewallSkuTier() []string { - return []string{ - string(AzureFirewallSkuTierBasic), - string(AzureFirewallSkuTierPremium), - string(AzureFirewallSkuTierStandard), - } -} - -func (s *AzureFirewallSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallSkuTier(input string) (*AzureFirewallSkuTier, error) { - vals := map[string]AzureFirewallSkuTier{ - "basic": AzureFirewallSkuTierBasic, - "premium": AzureFirewallSkuTierPremium, - "standard": AzureFirewallSkuTierStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallSkuTier(input) - return &out, nil -} - -type AzureFirewallThreatIntelMode string - -const ( - AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" - AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" - AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" -) - -func PossibleValuesForAzureFirewallThreatIntelMode() []string { - return []string{ - string(AzureFirewallThreatIntelModeAlert), - string(AzureFirewallThreatIntelModeDeny), - string(AzureFirewallThreatIntelModeOff), - } -} - -func (s *AzureFirewallThreatIntelMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallThreatIntelMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallThreatIntelMode(input string) (*AzureFirewallThreatIntelMode, error) { - vals := map[string]AzureFirewallThreatIntelMode{ - "alert": AzureFirewallThreatIntelModeAlert, - "deny": AzureFirewallThreatIntelModeDeny, - "off": AzureFirewallThreatIntelModeOff, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallThreatIntelMode(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/id_azurefirewall.go b/resource-manager/network/2022-09-01/azurefirewalls/id_azurefirewall.go deleted file mode 100644 index 1c8e506ab97..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/id_azurefirewall.go +++ /dev/null @@ -1,127 +0,0 @@ -package azurefirewalls - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AzureFirewallId{} - -// AzureFirewallId is a struct representing the Resource ID for a Azure Firewall -type AzureFirewallId struct { - SubscriptionId string - ResourceGroupName string - AzureFirewallName string -} - -// NewAzureFirewallID returns a new AzureFirewallId struct -func NewAzureFirewallID(subscriptionId string, resourceGroupName string, azureFirewallName string) AzureFirewallId { - return AzureFirewallId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - AzureFirewallName: azureFirewallName, - } -} - -// ParseAzureFirewallID parses 'input' into a AzureFirewallId -func ParseAzureFirewallID(input string) (*AzureFirewallId, error) { - parser := resourceids.NewParserFromResourceIdType(AzureFirewallId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AzureFirewallId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AzureFirewallName, ok = parsed.Parsed["azureFirewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureFirewallName", *parsed) - } - - return &id, nil -} - -// ParseAzureFirewallIDInsensitively parses 'input' case-insensitively into a AzureFirewallId -// note: this method should only be used for API response data and not user input -func ParseAzureFirewallIDInsensitively(input string) (*AzureFirewallId, error) { - parser := resourceids.NewParserFromResourceIdType(AzureFirewallId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AzureFirewallId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AzureFirewallName, ok = parsed.Parsed["azureFirewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureFirewallName", *parsed) - } - - return &id, nil -} - -// ValidateAzureFirewallID checks that 'input' can be parsed as a Azure Firewall ID -func ValidateAzureFirewallID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAzureFirewallID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Azure Firewall ID -func (id AzureFirewallId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/azureFirewalls/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.AzureFirewallName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Azure Firewall ID -func (id AzureFirewallId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticAzureFirewalls", "azureFirewalls", "azureFirewalls"), - resourceids.UserSpecifiedSegment("azureFirewallName", "azureFirewallValue"), - } -} - -// String returns a human-readable description of this Azure Firewall ID -func (id AzureFirewallId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Azure Firewall Name: %q", id.AzureFirewallName), - } - return fmt.Sprintf("Azure Firewall (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/id_azurefirewall_test.go b/resource-manager/network/2022-09-01/azurefirewalls/id_azurefirewall_test.go deleted file mode 100644 index 0eff78a3fef..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/id_azurefirewall_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package azurefirewalls - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AzureFirewallId{} - -func TestNewAzureFirewallID(t *testing.T) { - id := NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.AzureFirewallName != "azureFirewallValue" { - t.Fatalf("Expected %q but got %q for Segment 'AzureFirewallName'", id.AzureFirewallName, "azureFirewallValue") - } -} - -func TestFormatAzureFirewallID(t *testing.T) { - actual := NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseAzureFirewallID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AzureFirewallId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue", - Expected: &AzureFirewallId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - AzureFirewallName: "azureFirewallValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAzureFirewallID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.AzureFirewallName != v.Expected.AzureFirewallName { - t.Fatalf("Expected %q but got %q for AzureFirewallName", v.Expected.AzureFirewallName, actual.AzureFirewallName) - } - - } -} - -func TestParseAzureFirewallIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AzureFirewallId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReFiReWaLlS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue", - Expected: &AzureFirewallId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - AzureFirewallName: "azureFirewallValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReFiReWaLlS/aZuReFiReWaLlVaLuE", - Expected: &AzureFirewallId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - AzureFirewallName: "aZuReFiReWaLlVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReFiReWaLlS/aZuReFiReWaLlVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAzureFirewallIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.AzureFirewallName != v.Expected.AzureFirewallName { - t.Fatalf("Expected %q but got %q for AzureFirewallName", v.Expected.AzureFirewallName, actual.AzureFirewallName) - } - - } -} - -func TestSegmentsForAzureFirewallId(t *testing.T) { - segments := AzureFirewallId{}.Segments() - if len(segments) == 0 { - t.Fatalf("AzureFirewallId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/method_azurefirewallslistlearnedprefixes.go b/resource-manager/network/2022-09-01/azurefirewalls/method_azurefirewallslistlearnedprefixes.go deleted file mode 100644 index 5485c572160..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/method_azurefirewallslistlearnedprefixes.go +++ /dev/null @@ -1,70 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallsListLearnedPrefixesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// AzureFirewallsListLearnedPrefixes ... -func (c AzureFirewallsClient) AzureFirewallsListLearnedPrefixes(ctx context.Context, id AzureFirewallId) (result AzureFirewallsListLearnedPrefixesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/learnedIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// AzureFirewallsListLearnedPrefixesThenPoll performs AzureFirewallsListLearnedPrefixes then polls until it's completed -func (c AzureFirewallsClient) AzureFirewallsListLearnedPrefixesThenPoll(ctx context.Context, id AzureFirewallId) error { - result, err := c.AzureFirewallsListLearnedPrefixes(ctx, id) - if err != nil { - return fmt.Errorf("performing AzureFirewallsListLearnedPrefixes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after AzureFirewallsListLearnedPrefixes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/method_createorupdate.go b/resource-manager/network/2022-09-01/azurefirewalls/method_createorupdate.go deleted file mode 100644 index 5c7f0b61baf..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c AzureFirewallsClient) CreateOrUpdate(ctx context.Context, id AzureFirewallId, input AzureFirewall) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c AzureFirewallsClient) CreateOrUpdateThenPoll(ctx context.Context, id AzureFirewallId, input AzureFirewall) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/method_delete.go b/resource-manager/network/2022-09-01/azurefirewalls/method_delete.go deleted file mode 100644 index 04fddc41723..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c AzureFirewallsClient) Delete(ctx context.Context, id AzureFirewallId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c AzureFirewallsClient) DeleteThenPoll(ctx context.Context, id AzureFirewallId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/method_get.go b/resource-manager/network/2022-09-01/azurefirewalls/method_get.go deleted file mode 100644 index 5644a20618e..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package azurefirewalls - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AzureFirewall -} - -// Get ... -func (c AzureFirewallsClient) Get(ctx context.Context, id AzureFirewallId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/method_list.go b/resource-manager/network/2022-09-01/azurefirewalls/method_list.go deleted file mode 100644 index 4ba29490304..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AzureFirewall -} - -type ListCompleteResult struct { - Items []AzureFirewall -} - -// List ... -func (c AzureFirewallsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/azureFirewalls", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AzureFirewall `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c AzureFirewallsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, AzureFirewallOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AzureFirewallsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AzureFirewallOperationPredicate) (result ListCompleteResult, err error) { - items := make([]AzureFirewall, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/method_listall.go b/resource-manager/network/2022-09-01/azurefirewalls/method_listall.go deleted file mode 100644 index a7b03da1fd5..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AzureFirewall -} - -type ListAllCompleteResult struct { - Items []AzureFirewall -} - -// ListAll ... -func (c AzureFirewallsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/azureFirewalls", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AzureFirewall `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c AzureFirewallsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, AzureFirewallOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AzureFirewallsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AzureFirewallOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]AzureFirewall, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/method_updatetags.go b/resource-manager/network/2022-09-01/azurefirewalls/method_updatetags.go deleted file mode 100644 index 6e0f39ddf3a..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c AzureFirewallsClient) UpdateTags(ctx context.Context, id AzureFirewallId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c AzureFirewallsClient) UpdateTagsThenPoll(ctx context.Context, id AzureFirewallId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewall.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewall.go deleted file mode 100644 index da4d4ccf5f7..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewall.go +++ /dev/null @@ -1,19 +0,0 @@ -package azurefirewalls - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewall struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrule.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrule.go deleted file mode 100644 index c74f6235d09..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrule.go +++ /dev/null @@ -1,14 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRule struct { - Description *string `json:"description,omitempty"` - FqdnTags *[]string `json:"fqdnTags,omitempty"` - Name *string `json:"name,omitempty"` - Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - TargetFqdns *[]string `json:"targetFqdns,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrulecollection.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrulecollection.go deleted file mode 100644 index 0307e6e7b33..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrulecollection.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRuleCollection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrulecollectionpropertiesformat.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrulecollectionpropertiesformat.go deleted file mode 100644 index bd5d09f330d..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationrulecollectionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { - Action *AzureFirewallRCAction `json:"action,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationruleprotocol.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationruleprotocol.go deleted file mode 100644 index 8ea63b2ef92..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallapplicationruleprotocol.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRuleProtocol struct { - Port *int64 `json:"port,omitempty"` - ProtocolType *AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipconfiguration.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipconfiguration.go deleted file mode 100644 index 3456ba0b1ad..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipconfigurationpropertiesformat.go deleted file mode 100644 index cca79069337..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipconfigurationpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipgroups.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipgroups.go deleted file mode 100644 index e26c8540a65..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallipgroups.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallIPGroups struct { - ChangeNumber *string `json:"changeNumber,omitempty"` - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrcaction.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrcaction.go deleted file mode 100644 index 9c9250aef39..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrcaction.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNatRCAction struct { - Type *AzureFirewallNatRCActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrule.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrule.go deleted file mode 100644 index 70c0d009eab..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrule.go +++ /dev/null @@ -1,17 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNatRule struct { - Description *string `json:"description,omitempty"` - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - Name *string `json:"name,omitempty"` - Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - TranslatedAddress *string `json:"translatedAddress,omitempty"` - TranslatedFqdn *string `json:"translatedFqdn,omitempty"` - TranslatedPort *string `json:"translatedPort,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrulecollection.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrulecollection.go deleted file mode 100644 index d06cf19e359..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrulecollection.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNatRuleCollection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrulecollectionproperties.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrulecollectionproperties.go deleted file mode 100644 index 774ac6902bc..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnatrulecollectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNatRuleCollectionProperties struct { - Action *AzureFirewallNatRCAction `json:"action,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]AzureFirewallNatRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrule.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrule.go deleted file mode 100644 index 6833c1f7509..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrule.go +++ /dev/null @@ -1,16 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNetworkRule struct { - Description *string `json:"description,omitempty"` - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationFqdns *[]string `json:"destinationFqdns,omitempty"` - DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - Name *string `json:"name,omitempty"` - Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrulecollection.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrulecollection.go deleted file mode 100644 index ea5f2ba0d2b..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrulecollection.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNetworkRuleCollection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrulecollectionpropertiesformat.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrulecollectionpropertiesformat.go deleted file mode 100644 index be71e063370..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallnetworkrulecollectionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { - Action *AzureFirewallRCAction `json:"action,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallpropertiesformat.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallpropertiesformat.go deleted file mode 100644 index 0e8c463423f..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallpropertiesformat.go +++ /dev/null @@ -1,20 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallPropertiesFormat struct { - AdditionalProperties *map[string]string `json:"additionalProperties,omitempty"` - ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - HubIPAddresses *HubIPAddresses `json:"hubIPAddresses,omitempty"` - IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"` - IPGroups *[]AzureFirewallIPGroups `json:"ipGroups,omitempty"` - ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"` - NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"` - NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Sku *AzureFirewallSku `json:"sku,omitempty"` - ThreatIntelMode *AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallpublicipaddress.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallpublicipaddress.go deleted file mode 100644 index c5dff4f3fff..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallpublicipaddress.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallPublicIPAddress struct { - Address *string `json:"address,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallrcaction.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallrcaction.go deleted file mode 100644 index 752c166b62b..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallrcaction.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallRCAction struct { - Type *AzureFirewallRCActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallsku.go b/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallsku.go deleted file mode 100644 index 46f81c15dbc..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_azurefirewallsku.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallSku struct { - Name *AzureFirewallSkuName `json:"name,omitempty"` - Tier *AzureFirewallSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_hubipaddresses.go b/resource-manager/network/2022-09-01/azurefirewalls/model_hubipaddresses.go deleted file mode 100644 index 2fa8e41de6b..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_hubipaddresses.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubIPAddresses struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PublicIPs *HubPublicIPAddresses `json:"publicIPs,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_hubpublicipaddresses.go b/resource-manager/network/2022-09-01/azurefirewalls/model_hubpublicipaddresses.go deleted file mode 100644 index 48ee3132846..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_hubpublicipaddresses.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubPublicIPAddresses struct { - Addresses *[]AzureFirewallPublicIPAddress `json:"addresses,omitempty"` - Count *int64 `json:"count,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_ipprefixeslist.go b/resource-manager/network/2022-09-01/azurefirewalls/model_ipprefixeslist.go deleted file mode 100644 index 3d2ea0d9a9e..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_ipprefixeslist.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPPrefixesList struct { - IPPrefixes *[]string `json:"ipPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_subresource.go b/resource-manager/network/2022-09-01/azurefirewalls/model_subresource.go deleted file mode 100644 index 3a39f2458c4..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/model_tagsobject.go b/resource-manager/network/2022-09-01/azurefirewalls/model_tagsobject.go deleted file mode 100644 index 3b70ce55bcd..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/predicates.go b/resource-manager/network/2022-09-01/azurefirewalls/predicates.go deleted file mode 100644 index 68ca8da5623..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p AzureFirewallOperationPredicate) Matches(input AzureFirewall) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/azurefirewalls/version.go b/resource-manager/network/2022-09-01/azurefirewalls/version.go deleted file mode 100644 index 84a4edec7e8..00000000000 --- a/resource-manager/network/2022-09-01/azurefirewalls/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package azurefirewalls - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurefirewalls/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/README.md b/resource-manager/network/2022-09-01/bastionhosts/README.md deleted file mode 100644 index 91f2838035c..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/README.md +++ /dev/null @@ -1,216 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/bastionhosts` Documentation - -The `bastionhosts` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/bastionhosts" -``` - - -### Client Initialization - -```go -client := bastionhosts.NewBastionHostsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BastionHostsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.BastionHost{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `BastionHostsClient.Delete` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `BastionHostsClient.DeleteBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.BastionShareableLinkListRequest{ - // ... -} - - -if err := client.DeleteBastionShareableLinkThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `BastionHostsClient.DisconnectActiveSessions` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.SessionIds{ - // ... -} - - -// alternatively `client.DisconnectActiveSessions(ctx, id, payload)` can be used to do batched pagination -items, err := client.DisconnectActiveSessionsComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.Get` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BastionHostsClient.GetActiveSessions` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -// alternatively `client.GetActiveSessions(ctx, id)` can be used to do batched pagination -items, err := client.GetActiveSessionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.GetBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.BastionShareableLinkListRequest{ - // ... -} - - -// alternatively `client.GetBastionShareableLink(ctx, id, payload)` can be used to do batched pagination -items, err := client.GetBastionShareableLinkComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.List` - -```go -ctx := context.TODO() -id := bastionhosts.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := bastionhosts.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.PutBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.BastionShareableLinkListRequest{ - // ... -} - - -// alternatively `client.PutBastionShareableLink(ctx, id, payload)` can be used to do batched pagination -items, err := client.PutBastionShareableLinkComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.UpdateTags` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/bastionhosts/client.go b/resource-manager/network/2022-09-01/bastionhosts/client.go deleted file mode 100644 index 1cea8c22bf7..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package bastionhosts - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHostsClient struct { - Client *resourcemanager.Client -} - -func NewBastionHostsClientWithBaseURI(api environments.Api) (*BastionHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "bastionhosts", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating BastionHostsClient: %+v", err) - } - - return &BastionHostsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/constants.go b/resource-manager/network/2022-09-01/bastionhosts/constants.go deleted file mode 100644 index d218831ec92..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/constants.go +++ /dev/null @@ -1,180 +0,0 @@ -package bastionhosts - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionConnectProtocol string - -const ( - BastionConnectProtocolRDP BastionConnectProtocol = "RDP" - BastionConnectProtocolSSH BastionConnectProtocol = "SSH" -) - -func PossibleValuesForBastionConnectProtocol() []string { - return []string{ - string(BastionConnectProtocolRDP), - string(BastionConnectProtocolSSH), - } -} - -func (s *BastionConnectProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBastionConnectProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBastionConnectProtocol(input string) (*BastionConnectProtocol, error) { - vals := map[string]BastionConnectProtocol{ - "rdp": BastionConnectProtocolRDP, - "ssh": BastionConnectProtocolSSH, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BastionConnectProtocol(input) - return &out, nil -} - -type BastionHostSkuName string - -const ( - BastionHostSkuNameBasic BastionHostSkuName = "Basic" - BastionHostSkuNameStandard BastionHostSkuName = "Standard" -) - -func PossibleValuesForBastionHostSkuName() []string { - return []string{ - string(BastionHostSkuNameBasic), - string(BastionHostSkuNameStandard), - } -} - -func (s *BastionHostSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBastionHostSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBastionHostSkuName(input string) (*BastionHostSkuName, error) { - vals := map[string]BastionHostSkuName{ - "basic": BastionHostSkuNameBasic, - "standard": BastionHostSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BastionHostSkuName(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/id_bastionhost.go b/resource-manager/network/2022-09-01/bastionhosts/id_bastionhost.go deleted file mode 100644 index deb83136787..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/id_bastionhost.go +++ /dev/null @@ -1,127 +0,0 @@ -package bastionhosts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BastionHostId{} - -// BastionHostId is a struct representing the Resource ID for a Bastion Host -type BastionHostId struct { - SubscriptionId string - ResourceGroupName string - BastionHostName string -} - -// NewBastionHostID returns a new BastionHostId struct -func NewBastionHostID(subscriptionId string, resourceGroupName string, bastionHostName string) BastionHostId { - return BastionHostId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - BastionHostName: bastionHostName, - } -} - -// ParseBastionHostID parses 'input' into a BastionHostId -func ParseBastionHostID(input string) (*BastionHostId, error) { - parser := resourceids.NewParserFromResourceIdType(BastionHostId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) - } - - return &id, nil -} - -// ParseBastionHostIDInsensitively parses 'input' case-insensitively into a BastionHostId -// note: this method should only be used for API response data and not user input -func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { - parser := resourceids.NewParserFromResourceIdType(BastionHostId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) - } - - return &id, nil -} - -// ValidateBastionHostID checks that 'input' can be parsed as a Bastion Host ID -func ValidateBastionHostID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseBastionHostID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Bastion Host ID -func (id BastionHostId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/bastionHosts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BastionHostName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Bastion Host ID -func (id BastionHostId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticBastionHosts", "bastionHosts", "bastionHosts"), - resourceids.UserSpecifiedSegment("bastionHostName", "bastionHostValue"), - } -} - -// String returns a human-readable description of this Bastion Host ID -func (id BastionHostId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Bastion Host Name: %q", id.BastionHostName), - } - return fmt.Sprintf("Bastion Host (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/id_bastionhost_test.go b/resource-manager/network/2022-09-01/bastionhosts/id_bastionhost_test.go deleted file mode 100644 index 7c17f9ad7d2..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/id_bastionhost_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package bastionhosts - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BastionHostId{} - -func TestNewBastionHostID(t *testing.T) { - id := NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.BastionHostName != "bastionHostValue" { - t.Fatalf("Expected %q but got %q for Segment 'BastionHostName'", id.BastionHostName, "bastionHostValue") - } -} - -func TestFormatBastionHostID(t *testing.T) { - actual := NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseBastionHostID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BastionHostId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BastionHostName: "bastionHostValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBastionHostID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BastionHostName != v.Expected.BastionHostName { - t.Fatalf("Expected %q but got %q for BastionHostName", v.Expected.BastionHostName, actual.BastionHostName) - } - - } -} - -func TestParseBastionHostIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BastionHostId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BastionHostName: "bastionHostValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS/bAsTiOnHoStVaLuE", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - BastionHostName: "bAsTiOnHoStVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS/bAsTiOnHoStVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBastionHostIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BastionHostName != v.Expected.BastionHostName { - t.Fatalf("Expected %q but got %q for BastionHostName", v.Expected.BastionHostName, actual.BastionHostName) - } - - } -} - -func TestSegmentsForBastionHostId(t *testing.T) { - segments := BastionHostId{}.Segments() - if len(segments) == 0 { - t.Fatalf("BastionHostId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_createorupdate.go b/resource-manager/network/2022-09-01/bastionhosts/method_createorupdate.go deleted file mode 100644 index 1e140a16a91..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c BastionHostsClient) CreateOrUpdate(ctx context.Context, id BastionHostId, input BastionHost) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c BastionHostsClient) CreateOrUpdateThenPoll(ctx context.Context, id BastionHostId, input BastionHost) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_delete.go b/resource-manager/network/2022-09-01/bastionhosts/method_delete.go deleted file mode 100644 index 5eebbeeeed3..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c BastionHostsClient) Delete(ctx context.Context, id BastionHostId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c BastionHostsClient) DeleteThenPoll(ctx context.Context, id BastionHostId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_deletebastionshareablelink.go b/resource-manager/network/2022-09-01/bastionhosts/method_deletebastionshareablelink.go deleted file mode 100644 index 24694223a11..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_deletebastionshareablelink.go +++ /dev/null @@ -1,74 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteBastionShareableLinkOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DeleteBastionShareableLink ... -func (c BastionHostsClient) DeleteBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result DeleteBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/deleteShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteBastionShareableLinkThenPoll performs DeleteBastionShareableLink then polls until it's completed -func (c BastionHostsClient) DeleteBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { - result, err := c.DeleteBastionShareableLink(ctx, id, input) - if err != nil { - return fmt.Errorf("performing DeleteBastionShareableLink: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DeleteBastionShareableLink: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_disconnectactivesessions.go b/resource-manager/network/2022-09-01/bastionhosts/method_disconnectactivesessions.go deleted file mode 100644 index 627d4aaa5d5..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_disconnectactivesessions.go +++ /dev/null @@ -1,89 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DisconnectActiveSessionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionSessionState -} - -type DisconnectActiveSessionsCompleteResult struct { - Items []BastionSessionState -} - -// DisconnectActiveSessions ... -func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id BastionHostId, input SessionIds) (result DisconnectActiveSessionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/disconnectActiveSessions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionSessionState `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// DisconnectActiveSessionsComplete retrieves all the results into a single object -func (c BastionHostsClient) DisconnectActiveSessionsComplete(ctx context.Context, id BastionHostId, input SessionIds) (DisconnectActiveSessionsCompleteResult, error) { - return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionStateOperationPredicate{}) -} - -// DisconnectActiveSessionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionStateOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { - items := make([]BastionSessionState, 0) - - resp, err := c.DisconnectActiveSessions(ctx, id, input) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = DisconnectActiveSessionsCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_get.go b/resource-manager/network/2022-09-01/bastionhosts/method_get.go deleted file mode 100644 index 0e5b36012f3..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package bastionhosts - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BastionHost -} - -// Get ... -func (c BastionHostsClient) Get(ctx context.Context, id BastionHostId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_getactivesessions.go b/resource-manager/network/2022-09-01/bastionhosts/method_getactivesessions.go deleted file mode 100644 index e56b6da8351..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_getactivesessions.go +++ /dev/null @@ -1,84 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetActiveSessionsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionActiveSession -} - -type GetActiveSessionsCompleteResult struct { - Items []BastionActiveSession -} - -// GetActiveSessions ... -func (c BastionHostsClient) GetActiveSessions(ctx context.Context, id BastionHostId) (result GetActiveSessionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getActiveSessions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionActiveSession `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetActiveSessionsThenPoll performs GetActiveSessions then polls until it's completed -func (c BastionHostsClient) GetActiveSessionsThenPoll(ctx context.Context, id BastionHostId) error { - result, err := c.GetActiveSessions(ctx, id) - if err != nil { - return fmt.Errorf("performing GetActiveSessions: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetActiveSessions: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_getbastionshareablelink.go b/resource-manager/network/2022-09-01/bastionhosts/method_getbastionshareablelink.go deleted file mode 100644 index 4599102aa78..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_getbastionshareablelink.go +++ /dev/null @@ -1,89 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetBastionShareableLinkOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionShareableLink -} - -type GetBastionShareableLinkCompleteResult struct { - Items []BastionShareableLink -} - -// GetBastionShareableLink ... -func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result GetBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionShareableLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// GetBastionShareableLinkComplete retrieves all the results into a single object -func (c BastionHostsClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) -} - -// GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLink, 0) - - resp, err := c.GetBastionShareableLink(ctx, id, input) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = GetBastionShareableLinkCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_list.go b/resource-manager/network/2022-09-01/bastionhosts/method_list.go deleted file mode 100644 index 82891884e31..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionHost -} - -type ListCompleteResult struct { - Items []BastionHost -} - -// List ... -func (c BastionHostsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/bastionHosts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionHost `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c BastionHostsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, BastionHostOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate BastionHostOperationPredicate) (result ListCompleteResult, err error) { - items := make([]BastionHost, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/bastionhosts/method_listbyresourcegroup.go deleted file mode 100644 index 4920998f509..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionHost -} - -type ListByResourceGroupCompleteResult struct { - Items []BastionHost -} - -// ListByResourceGroup ... -func (c BastionHostsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/bastionHosts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionHost `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c BastionHostsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, BastionHostOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate BastionHostOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]BastionHost, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_putbastionshareablelink.go b/resource-manager/network/2022-09-01/bastionhosts/method_putbastionshareablelink.go deleted file mode 100644 index 02212827290..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_putbastionshareablelink.go +++ /dev/null @@ -1,88 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PutBastionShareableLinkOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionShareableLink -} - -type PutBastionShareableLinkCompleteResult struct { - Items []BastionShareableLink -} - -// PutBastionShareableLink ... -func (c BastionHostsClient) PutBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result PutBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/createShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionShareableLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// PutBastionShareableLinkThenPoll performs PutBastionShareableLink then polls until it's completed -func (c BastionHostsClient) PutBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { - result, err := c.PutBastionShareableLink(ctx, id, input) - if err != nil { - return fmt.Errorf("performing PutBastionShareableLink: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after PutBastionShareableLink: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/method_updatetags.go b/resource-manager/network/2022-09-01/bastionhosts/method_updatetags.go deleted file mode 100644 index ce8661b54a8..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c BastionHostsClient) UpdateTags(ctx context.Context, id BastionHostId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c BastionHostsClient) UpdateTagsThenPoll(ctx context.Context, id BastionHostId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_bastionactivesession.go b/resource-manager/network/2022-09-01/bastionhosts/model_bastionactivesession.go deleted file mode 100644 index 4f5fe8c844e..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_bastionactivesession.go +++ /dev/null @@ -1,18 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionActiveSession struct { - Protocol *BastionConnectProtocol `json:"protocol,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` - SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"` - SessionId *string `json:"sessionId,omitempty"` - StartTime *interface{} `json:"startTime,omitempty"` - TargetHostName *string `json:"targetHostName,omitempty"` - TargetIPAddress *string `json:"targetIpAddress,omitempty"` - TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` - TargetResourceId *string `json:"targetResourceId,omitempty"` - TargetSubscriptionId *string `json:"targetSubscriptionId,omitempty"` - UserName *string `json:"userName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_bastionhost.go b/resource-manager/network/2022-09-01/bastionhosts/model_bastionhost.go deleted file mode 100644 index e9545c59424..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_bastionhost.go +++ /dev/null @@ -1,15 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHost struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BastionHostPropertiesFormat `json:"properties,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_bastionhostipconfiguration.go b/resource-manager/network/2022-09-01/bastionhosts/model_bastionhostipconfiguration.go deleted file mode 100644 index efda704773c..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_bastionhostipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHostIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go deleted file mode 100644 index 34d950723a1..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHostIPConfigurationPropertiesFormat struct { - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress SubResource `json:"publicIPAddress"` - Subnet SubResource `json:"subnet"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_bastionhostpropertiesformat.go b/resource-manager/network/2022-09-01/bastionhosts/model_bastionhostpropertiesformat.go deleted file mode 100644 index 4567093a391..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_bastionhostpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHostPropertiesFormat struct { - DisableCopyPaste *bool `json:"disableCopyPaste,omitempty"` - DnsName *string `json:"dnsName,omitempty"` - EnableFileCopy *bool `json:"enableFileCopy,omitempty"` - EnableIPConnect *bool `json:"enableIpConnect,omitempty"` - EnableShareableLink *bool `json:"enableShareableLink,omitempty"` - EnableTunneling *bool `json:"enableTunneling,omitempty"` - IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ScaleUnits *int64 `json:"scaleUnits,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_bastionsessionstate.go b/resource-manager/network/2022-09-01/bastionhosts/model_bastionsessionstate.go deleted file mode 100644 index f60a5f77620..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_bastionsessionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionSessionState struct { - Message *string `json:"message,omitempty"` - SessionId *string `json:"sessionId,omitempty"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_bastionshareablelink.go b/resource-manager/network/2022-09-01/bastionhosts/model_bastionshareablelink.go deleted file mode 100644 index 4da004b8f53..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_bastionshareablelink.go +++ /dev/null @@ -1,11 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLink struct { - Bsl *string `json:"bsl,omitempty"` - CreatedAt *string `json:"createdAt,omitempty"` - Message *string `json:"message,omitempty"` - VM Resource `json:"vm"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_bastionshareablelinklistrequest.go b/resource-manager/network/2022-09-01/bastionhosts/model_bastionshareablelinklistrequest.go deleted file mode 100644 index 925995fca64..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_bastionshareablelinklistrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListRequest struct { - VMs *[]BastionShareableLink `json:"vms,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_resource.go b/resource-manager/network/2022-09-01/bastionhosts/model_resource.go deleted file mode 100644 index 17e7756ce3c..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_resource.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Resource struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_sessionids.go b/resource-manager/network/2022-09-01/bastionhosts/model_sessionids.go deleted file mode 100644 index a74e44a3ebd..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_sessionids.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SessionIds struct { - SessionIds *[]string `json:"sessionIds,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_sku.go b/resource-manager/network/2022-09-01/bastionhosts/model_sku.go deleted file mode 100644 index 1a8a8749a46..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_sku.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Sku struct { - Name *BastionHostSkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_subresource.go b/resource-manager/network/2022-09-01/bastionhosts/model_subresource.go deleted file mode 100644 index 7a0a23a149a..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/model_tagsobject.go b/resource-manager/network/2022-09-01/bastionhosts/model_tagsobject.go deleted file mode 100644 index 73566b88f0b..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/predicates.go b/resource-manager/network/2022-09-01/bastionhosts/predicates.go deleted file mode 100644 index 3c3835a32d0..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/predicates.go +++ /dev/null @@ -1,141 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionActiveSessionOperationPredicate struct { - ResourceType *string - SessionDurationInMins *float64 - SessionId *string - StartTime *interface{} - TargetHostName *string - TargetIPAddress *string - TargetResourceGroup *string - TargetResourceId *string - TargetSubscriptionId *string - UserName *string -} - -func (p BastionActiveSessionOperationPredicate) Matches(input BastionActiveSession) bool { - - if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { - return false - } - - if p.SessionDurationInMins != nil && (input.SessionDurationInMins == nil || *p.SessionDurationInMins != *input.SessionDurationInMins) { - return false - } - - if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { - return false - } - - if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { - return false - } - - if p.TargetHostName != nil && (input.TargetHostName == nil || *p.TargetHostName != *input.TargetHostName) { - return false - } - - if p.TargetIPAddress != nil && (input.TargetIPAddress == nil || *p.TargetIPAddress != *input.TargetIPAddress) { - return false - } - - if p.TargetResourceGroup != nil && (input.TargetResourceGroup == nil || *p.TargetResourceGroup != *input.TargetResourceGroup) { - return false - } - - if p.TargetResourceId != nil && (input.TargetResourceId == nil || *p.TargetResourceId != *input.TargetResourceId) { - return false - } - - if p.TargetSubscriptionId != nil && (input.TargetSubscriptionId == nil || *p.TargetSubscriptionId != *input.TargetSubscriptionId) { - return false - } - - if p.UserName != nil && (input.UserName == nil || *p.UserName != *input.UserName) { - return false - } - - return true -} - -type BastionHostOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p BastionHostOperationPredicate) Matches(input BastionHost) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type BastionSessionStateOperationPredicate struct { - Message *string - SessionId *string - State *string -} - -func (p BastionSessionStateOperationPredicate) Matches(input BastionSessionState) bool { - - if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { - return false - } - - if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { - return false - } - - if p.State != nil && (input.State == nil || *p.State != *input.State) { - return false - } - - return true -} - -type BastionShareableLinkOperationPredicate struct { - Bsl *string - CreatedAt *string - Message *string -} - -func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { - - if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { - return false - } - - if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { - return false - } - - if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/bastionhosts/version.go b/resource-manager/network/2022-09-01/bastionhosts/version.go deleted file mode 100644 index 8b58e514826..00000000000 --- a/resource-manager/network/2022-09-01/bastionhosts/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionhosts - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionhosts/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/README.md b/resource-manager/network/2022-09-01/bastionshareablelink/README.md deleted file mode 100644 index 8555640368a..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/README.md +++ /dev/null @@ -1,81 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/bastionshareablelink` Documentation - -The `bastionshareablelink` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/bastionshareablelink" -``` - - -### Client Initialization - -```go -client := bastionshareablelink.NewBastionShareableLinkClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BastionShareableLinkClient.DeleteBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionshareablelink.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionshareablelink.BastionShareableLinkListRequest{ - // ... -} - - -if err := client.DeleteBastionShareableLinkThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `BastionShareableLinkClient.GetBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionshareablelink.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionshareablelink.BastionShareableLinkListRequest{ - // ... -} - - -// alternatively `client.GetBastionShareableLink(ctx, id, payload)` can be used to do batched pagination -items, err := client.GetBastionShareableLinkComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionShareableLinkClient.PutBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionshareablelink.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionshareablelink.BastionShareableLinkListRequest{ - // ... -} - - -// alternatively `client.PutBastionShareableLink(ctx, id, payload)` can be used to do batched pagination -items, err := client.PutBastionShareableLinkComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/client.go b/resource-manager/network/2022-09-01/bastionshareablelink/client.go deleted file mode 100644 index 6a702fa865f..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package bastionshareablelink - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkClient struct { - Client *resourcemanager.Client -} - -func NewBastionShareableLinkClientWithBaseURI(api environments.Api) (*BastionShareableLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "bastionshareablelink", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating BastionShareableLinkClient: %+v", err) - } - - return &BastionShareableLinkClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/id_bastionhost.go b/resource-manager/network/2022-09-01/bastionshareablelink/id_bastionhost.go deleted file mode 100644 index 28c97854f8d..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/id_bastionhost.go +++ /dev/null @@ -1,127 +0,0 @@ -package bastionshareablelink - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BastionHostId{} - -// BastionHostId is a struct representing the Resource ID for a Bastion Host -type BastionHostId struct { - SubscriptionId string - ResourceGroupName string - BastionHostName string -} - -// NewBastionHostID returns a new BastionHostId struct -func NewBastionHostID(subscriptionId string, resourceGroupName string, bastionHostName string) BastionHostId { - return BastionHostId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - BastionHostName: bastionHostName, - } -} - -// ParseBastionHostID parses 'input' into a BastionHostId -func ParseBastionHostID(input string) (*BastionHostId, error) { - parser := resourceids.NewParserFromResourceIdType(BastionHostId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) - } - - return &id, nil -} - -// ParseBastionHostIDInsensitively parses 'input' case-insensitively into a BastionHostId -// note: this method should only be used for API response data and not user input -func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { - parser := resourceids.NewParserFromResourceIdType(BastionHostId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) - } - - return &id, nil -} - -// ValidateBastionHostID checks that 'input' can be parsed as a Bastion Host ID -func ValidateBastionHostID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseBastionHostID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Bastion Host ID -func (id BastionHostId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/bastionHosts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BastionHostName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Bastion Host ID -func (id BastionHostId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticBastionHosts", "bastionHosts", "bastionHosts"), - resourceids.UserSpecifiedSegment("bastionHostName", "bastionHostValue"), - } -} - -// String returns a human-readable description of this Bastion Host ID -func (id BastionHostId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Bastion Host Name: %q", id.BastionHostName), - } - return fmt.Sprintf("Bastion Host (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/id_bastionhost_test.go b/resource-manager/network/2022-09-01/bastionshareablelink/id_bastionhost_test.go deleted file mode 100644 index 2cfc4709d36..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/id_bastionhost_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package bastionshareablelink - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BastionHostId{} - -func TestNewBastionHostID(t *testing.T) { - id := NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.BastionHostName != "bastionHostValue" { - t.Fatalf("Expected %q but got %q for Segment 'BastionHostName'", id.BastionHostName, "bastionHostValue") - } -} - -func TestFormatBastionHostID(t *testing.T) { - actual := NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseBastionHostID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BastionHostId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BastionHostName: "bastionHostValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBastionHostID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BastionHostName != v.Expected.BastionHostName { - t.Fatalf("Expected %q but got %q for BastionHostName", v.Expected.BastionHostName, actual.BastionHostName) - } - - } -} - -func TestParseBastionHostIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BastionHostId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BastionHostName: "bastionHostValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS/bAsTiOnHoStVaLuE", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - BastionHostName: "bAsTiOnHoStVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS/bAsTiOnHoStVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBastionHostIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BastionHostName != v.Expected.BastionHostName { - t.Fatalf("Expected %q but got %q for BastionHostName", v.Expected.BastionHostName, actual.BastionHostName) - } - - } -} - -func TestSegmentsForBastionHostId(t *testing.T) { - segments := BastionHostId{}.Segments() - if len(segments) == 0 { - t.Fatalf("BastionHostId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/method_deletebastionshareablelink.go b/resource-manager/network/2022-09-01/bastionshareablelink/method_deletebastionshareablelink.go deleted file mode 100644 index 6b46bbc5fea..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/method_deletebastionshareablelink.go +++ /dev/null @@ -1,74 +0,0 @@ -package bastionshareablelink - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteBastionShareableLinkOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DeleteBastionShareableLink ... -func (c BastionShareableLinkClient) DeleteBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result DeleteBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/deleteShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteBastionShareableLinkThenPoll performs DeleteBastionShareableLink then polls until it's completed -func (c BastionShareableLinkClient) DeleteBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { - result, err := c.DeleteBastionShareableLink(ctx, id, input) - if err != nil { - return fmt.Errorf("performing DeleteBastionShareableLink: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DeleteBastionShareableLink: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/method_getbastionshareablelink.go b/resource-manager/network/2022-09-01/bastionshareablelink/method_getbastionshareablelink.go deleted file mode 100644 index 2dcc0422fc6..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/method_getbastionshareablelink.go +++ /dev/null @@ -1,89 +0,0 @@ -package bastionshareablelink - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetBastionShareableLinkOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionShareableLink -} - -type GetBastionShareableLinkCompleteResult struct { - Items []BastionShareableLink -} - -// GetBastionShareableLink ... -func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result GetBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionShareableLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// GetBastionShareableLinkComplete retrieves all the results into a single object -func (c BastionShareableLinkClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) -} - -// GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLink, 0) - - resp, err := c.GetBastionShareableLink(ctx, id, input) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = GetBastionShareableLinkCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/method_putbastionshareablelink.go b/resource-manager/network/2022-09-01/bastionshareablelink/method_putbastionshareablelink.go deleted file mode 100644 index acca80488fd..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/method_putbastionshareablelink.go +++ /dev/null @@ -1,88 +0,0 @@ -package bastionshareablelink - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PutBastionShareableLinkOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionShareableLink -} - -type PutBastionShareableLinkCompleteResult struct { - Items []BastionShareableLink -} - -// PutBastionShareableLink ... -func (c BastionShareableLinkClient) PutBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result PutBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/createShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionShareableLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// PutBastionShareableLinkThenPoll performs PutBastionShareableLink then polls until it's completed -func (c BastionShareableLinkClient) PutBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { - result, err := c.PutBastionShareableLink(ctx, id, input) - if err != nil { - return fmt.Errorf("performing PutBastionShareableLink: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after PutBastionShareableLink: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/model_bastionshareablelink.go b/resource-manager/network/2022-09-01/bastionshareablelink/model_bastionshareablelink.go deleted file mode 100644 index a0bc0647825..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/model_bastionshareablelink.go +++ /dev/null @@ -1,11 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLink struct { - Bsl *string `json:"bsl,omitempty"` - CreatedAt *string `json:"createdAt,omitempty"` - Message *string `json:"message,omitempty"` - VM Resource `json:"vm"` -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/model_bastionshareablelinklistrequest.go b/resource-manager/network/2022-09-01/bastionshareablelink/model_bastionshareablelinklistrequest.go deleted file mode 100644 index e41fcb083d8..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/model_bastionshareablelinklistrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListRequest struct { - VMs *[]BastionShareableLink `json:"vms,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/model_resource.go b/resource-manager/network/2022-09-01/bastionshareablelink/model_resource.go deleted file mode 100644 index 31d5ef85703..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/model_resource.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Resource struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/predicates.go b/resource-manager/network/2022-09-01/bastionshareablelink/predicates.go deleted file mode 100644 index 15f07095262..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkOperationPredicate struct { - Bsl *string - CreatedAt *string - Message *string -} - -func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { - - if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { - return false - } - - if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { - return false - } - - if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/bastionshareablelink/version.go b/resource-manager/network/2022-09-01/bastionshareablelink/version.go deleted file mode 100644 index ba5ffbbc183..00000000000 --- a/resource-manager/network/2022-09-01/bastionshareablelink/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionshareablelink - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionshareablelink/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/bgpservicecommunities/README.md b/resource-manager/network/2022-09-01/bgpservicecommunities/README.md deleted file mode 100644 index a886da76c32..00000000000 --- a/resource-manager/network/2022-09-01/bgpservicecommunities/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/bgpservicecommunities` Documentation - -The `bgpservicecommunities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/bgpservicecommunities" -``` - - -### Client Initialization - -```go -client := bgpservicecommunities.NewBgpServiceCommunitiesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BgpServiceCommunitiesClient.List` - -```go -ctx := context.TODO() -id := bgpservicecommunities.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/bgpservicecommunities/client.go b/resource-manager/network/2022-09-01/bgpservicecommunities/client.go deleted file mode 100644 index 8b4af98886b..00000000000 --- a/resource-manager/network/2022-09-01/bgpservicecommunities/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package bgpservicecommunities - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpServiceCommunitiesClient struct { - Client *resourcemanager.Client -} - -func NewBgpServiceCommunitiesClientWithBaseURI(api environments.Api) (*BgpServiceCommunitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "bgpservicecommunities", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating BgpServiceCommunitiesClient: %+v", err) - } - - return &BgpServiceCommunitiesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/bgpservicecommunities/method_list.go b/resource-manager/network/2022-09-01/bgpservicecommunities/method_list.go deleted file mode 100644 index 8dd2a05cc17..00000000000 --- a/resource-manager/network/2022-09-01/bgpservicecommunities/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package bgpservicecommunities - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BgpServiceCommunity -} - -type ListCompleteResult struct { - Items []BgpServiceCommunity -} - -// List ... -func (c BgpServiceCommunitiesClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/bgpServiceCommunities", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BgpServiceCommunity `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c BgpServiceCommunitiesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, BgpServiceCommunityOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BgpServiceCommunitiesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate BgpServiceCommunityOperationPredicate) (result ListCompleteResult, err error) { - items := make([]BgpServiceCommunity, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpcommunity.go b/resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpcommunity.go deleted file mode 100644 index 87cd63647eb..00000000000 --- a/resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpcommunity.go +++ /dev/null @@ -1,13 +0,0 @@ -package bgpservicecommunities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BGPCommunity struct { - CommunityName *string `json:"communityName,omitempty"` - CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` - CommunityValue *string `json:"communityValue,omitempty"` - IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` - ServiceGroup *string `json:"serviceGroup,omitempty"` - ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpservicecommunity.go b/resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpservicecommunity.go deleted file mode 100644 index 0fad9ca63e5..00000000000 --- a/resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpservicecommunity.go +++ /dev/null @@ -1,13 +0,0 @@ -package bgpservicecommunities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpServiceCommunity struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpservicecommunitypropertiesformat.go b/resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpservicecommunitypropertiesformat.go deleted file mode 100644 index 5bf2c270ecc..00000000000 --- a/resource-manager/network/2022-09-01/bgpservicecommunities/model_bgpservicecommunitypropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package bgpservicecommunities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpServiceCommunityPropertiesFormat struct { - BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/bgpservicecommunities/predicates.go b/resource-manager/network/2022-09-01/bgpservicecommunities/predicates.go deleted file mode 100644 index 2e90f55ae55..00000000000 --- a/resource-manager/network/2022-09-01/bgpservicecommunities/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package bgpservicecommunities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpServiceCommunityOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p BgpServiceCommunityOperationPredicate) Matches(input BgpServiceCommunity) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/bgpservicecommunities/version.go b/resource-manager/network/2022-09-01/bgpservicecommunities/version.go deleted file mode 100644 index 94f66664f24..00000000000 --- a/resource-manager/network/2022-09-01/bgpservicecommunities/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package bgpservicecommunities - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bgpservicecommunities/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/checkdnsavailabilities/README.md b/resource-manager/network/2022-09-01/checkdnsavailabilities/README.md deleted file mode 100644 index e0c08750195..00000000000 --- a/resource-manager/network/2022-09-01/checkdnsavailabilities/README.md +++ /dev/null @@ -1,36 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/checkdnsavailabilities` Documentation - -The `checkdnsavailabilities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/checkdnsavailabilities" -``` - - -### Client Initialization - -```go -client := checkdnsavailabilities.NewCheckDnsAvailabilitiesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CheckDnsAvailabilitiesClient.CheckDnsNameAvailability` - -```go -ctx := context.TODO() -id := checkdnsavailabilities.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -read, err := client.CheckDnsNameAvailability(ctx, id, checkdnsavailabilities.DefaultCheckDnsNameAvailabilityOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/checkdnsavailabilities/client.go b/resource-manager/network/2022-09-01/checkdnsavailabilities/client.go deleted file mode 100644 index 9e9e5e81b3f..00000000000 --- a/resource-manager/network/2022-09-01/checkdnsavailabilities/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package checkdnsavailabilities - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckDnsAvailabilitiesClient struct { - Client *resourcemanager.Client -} - -func NewCheckDnsAvailabilitiesClientWithBaseURI(api environments.Api) (*CheckDnsAvailabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "checkdnsavailabilities", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CheckDnsAvailabilitiesClient: %+v", err) - } - - return &CheckDnsAvailabilitiesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/checkdnsavailabilities/id_location.go b/resource-manager/network/2022-09-01/checkdnsavailabilities/id_location.go deleted file mode 100644 index 474bff1709b..00000000000 --- a/resource-manager/network/2022-09-01/checkdnsavailabilities/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package checkdnsavailabilities - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/checkdnsavailabilities/id_location_test.go b/resource-manager/network/2022-09-01/checkdnsavailabilities/id_location_test.go deleted file mode 100644 index 04b275adb48..00000000000 --- a/resource-manager/network/2022-09-01/checkdnsavailabilities/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package checkdnsavailabilities - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/checkdnsavailabilities/method_checkdnsnameavailability.go b/resource-manager/network/2022-09-01/checkdnsavailabilities/method_checkdnsnameavailability.go deleted file mode 100644 index 25886646fd3..00000000000 --- a/resource-manager/network/2022-09-01/checkdnsavailabilities/method_checkdnsnameavailability.go +++ /dev/null @@ -1,80 +0,0 @@ -package checkdnsavailabilities - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckDnsNameAvailabilityOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DnsNameAvailabilityResult -} - -type CheckDnsNameAvailabilityOperationOptions struct { - DomainNameLabel *string -} - -func DefaultCheckDnsNameAvailabilityOperationOptions() CheckDnsNameAvailabilityOperationOptions { - return CheckDnsNameAvailabilityOperationOptions{} -} - -func (o CheckDnsNameAvailabilityOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CheckDnsNameAvailabilityOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CheckDnsNameAvailabilityOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.DomainNameLabel != nil { - out.Append("domainNameLabel", fmt.Sprintf("%v", *o.DomainNameLabel)) - } - return &out -} - -// CheckDnsNameAvailability ... -func (c CheckDnsAvailabilitiesClient) CheckDnsNameAvailability(ctx context.Context, id LocationId, options CheckDnsNameAvailabilityOperationOptions) (result CheckDnsNameAvailabilityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/checkDnsNameAvailability", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/checkdnsavailabilities/model_dnsnameavailabilityresult.go b/resource-manager/network/2022-09-01/checkdnsavailabilities/model_dnsnameavailabilityresult.go deleted file mode 100644 index e12398a149f..00000000000 --- a/resource-manager/network/2022-09-01/checkdnsavailabilities/model_dnsnameavailabilityresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package checkdnsavailabilities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DnsNameAvailabilityResult struct { - Available *bool `json:"available,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/checkdnsavailabilities/version.go b/resource-manager/network/2022-09-01/checkdnsavailabilities/version.go deleted file mode 100644 index 39919491dce..00000000000 --- a/resource-manager/network/2022-09-01/checkdnsavailabilities/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package checkdnsavailabilities - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkdnsavailabilities/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/client.go b/resource-manager/network/2022-09-01/client.go deleted file mode 100644 index 3c93728e6d1..00000000000 --- a/resource-manager/network/2022-09-01/client.go +++ /dev/null @@ -1,982 +0,0 @@ -package v2022_09_01 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/adminrulecollections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/adminrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgatewayprivateendpointconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgatewayprivatelinkresources" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationgatewaywafdynamicmanifests" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/applicationsecuritygroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/availabledelegations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/availableservicealiases" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/azurefirewalls" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/bastionhosts" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/bastionshareablelink" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/bgpservicecommunities" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/checkdnsavailabilities" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/cloudservicepublicipaddresses" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/connectionmonitors" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/connectivityconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/customipprefixes" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ddoscustompolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ddosprotectionplans" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/dscpconfiguration" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/dscpconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/endpointservices" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitarptable" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitauthorizations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitpeerings" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitroutestable" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuits" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitstats" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutegateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutelinks" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteportauthorizations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteports" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteportslocations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteproviderports" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteserviceproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/firewallpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/flowlogs" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ipallocations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ipgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/loadbalancers" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/localnetworkgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/natgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkinterfaces" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanageractiveconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagerconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagers" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkprofiles" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networksecuritygroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkvirtualappliances" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkwatchers" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/p2svpngateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/packetcaptures" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privatednszonegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privateendpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privatelinkservice" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privatelinkservices" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/publicipaddresses" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/publicipprefixes" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routefilterrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routefilters" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routes" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routetables" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/scopeconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/securityadminconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/securitypartnerproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/securityrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/serviceendpointpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/servicetags" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/staticmembers" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/subnets" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/trafficanalytics" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/usages" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vipswap" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualappliancesites" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualapplianceskus" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworkgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworkpeerings" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworks" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworktap" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworktaps" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualrouterpeerings" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualrouters" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualwans" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vmsspublicipaddresses" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpngateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpnlinkconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpnserverconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpnsites" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/webapplicationfirewallpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/webcategories" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - AdminRuleCollections *adminrulecollections.AdminRuleCollectionsClient - AdminRules *adminrules.AdminRulesClient - ApplicationGatewayPrivateEndpointConnections *applicationgatewayprivateendpointconnections.ApplicationGatewayPrivateEndpointConnectionsClient - ApplicationGatewayPrivateLinkResources *applicationgatewayprivatelinkresources.ApplicationGatewayPrivateLinkResourcesClient - ApplicationGatewayWafDynamicManifests *applicationgatewaywafdynamicmanifests.ApplicationGatewayWafDynamicManifestsClient - ApplicationGateways *applicationgateways.ApplicationGatewaysClient - ApplicationSecurityGroups *applicationsecuritygroups.ApplicationSecurityGroupsClient - AvailableDelegations *availabledelegations.AvailableDelegationsClient - AvailableServiceAliases *availableservicealiases.AvailableServiceAliasesClient - AzureFirewalls *azurefirewalls.AzureFirewallsClient - BastionHosts *bastionhosts.BastionHostsClient - BastionShareableLink *bastionshareablelink.BastionShareableLinkClient - BgpServiceCommunities *bgpservicecommunities.BgpServiceCommunitiesClient - CheckDnsAvailabilities *checkdnsavailabilities.CheckDnsAvailabilitiesClient - CloudServicePublicIPAddresses *cloudservicepublicipaddresses.CloudServicePublicIPAddressesClient - ConnectionMonitors *connectionmonitors.ConnectionMonitorsClient - ConnectivityConfigurations *connectivityconfigurations.ConnectivityConfigurationsClient - CustomIPPrefixes *customipprefixes.CustomIPPrefixesClient - DdosCustomPolicies *ddoscustompolicies.DdosCustomPoliciesClient - DdosProtectionPlans *ddosprotectionplans.DdosProtectionPlansClient - DscpConfiguration *dscpconfiguration.DscpConfigurationClient - DscpConfigurations *dscpconfigurations.DscpConfigurationsClient - EndpointServices *endpointservices.EndpointServicesClient - ExpressRouteCircuitArpTable *expressroutecircuitarptable.ExpressRouteCircuitArpTableClient - ExpressRouteCircuitAuthorizations *expressroutecircuitauthorizations.ExpressRouteCircuitAuthorizationsClient - ExpressRouteCircuitConnections *expressroutecircuitconnections.ExpressRouteCircuitConnectionsClient - ExpressRouteCircuitPeerings *expressroutecircuitpeerings.ExpressRouteCircuitPeeringsClient - ExpressRouteCircuitRoutesTable *expressroutecircuitroutestable.ExpressRouteCircuitRoutesTableClient - ExpressRouteCircuitRoutesTableSummary *expressroutecircuitroutestablesummary.ExpressRouteCircuitRoutesTableSummaryClient - ExpressRouteCircuitStats *expressroutecircuitstats.ExpressRouteCircuitStatsClient - ExpressRouteCircuits *expressroutecircuits.ExpressRouteCircuitsClient - ExpressRouteConnections *expressrouteconnections.ExpressRouteConnectionsClient - ExpressRouteCrossConnectionArpTable *expressroutecrossconnectionarptable.ExpressRouteCrossConnectionArpTableClient - ExpressRouteCrossConnectionPeerings *expressroutecrossconnectionpeerings.ExpressRouteCrossConnectionPeeringsClient - ExpressRouteCrossConnectionRouteTable *expressroutecrossconnectionroutetable.ExpressRouteCrossConnectionRouteTableClient - ExpressRouteCrossConnectionRouteTableSummary *expressroutecrossconnectionroutetablesummary.ExpressRouteCrossConnectionRouteTableSummaryClient - ExpressRouteCrossConnections *expressroutecrossconnections.ExpressRouteCrossConnectionsClient - ExpressRouteGateways *expressroutegateways.ExpressRouteGatewaysClient - ExpressRouteLinks *expressroutelinks.ExpressRouteLinksClient - ExpressRoutePortAuthorizations *expressrouteportauthorizations.ExpressRoutePortAuthorizationsClient - ExpressRoutePorts *expressrouteports.ExpressRoutePortsClient - ExpressRoutePortsLocations *expressrouteportslocations.ExpressRoutePortsLocationsClient - ExpressRouteProviderPorts *expressrouteproviderports.ExpressRouteProviderPortsClient - ExpressRouteServiceProviders *expressrouteserviceproviders.ExpressRouteServiceProvidersClient - FirewallPolicies *firewallpolicies.FirewallPoliciesClient - FirewallPolicyRuleCollectionGroups *firewallpolicyrulecollectiongroups.FirewallPolicyRuleCollectionGroupsClient - FlowLogs *flowlogs.FlowLogsClient - IPAllocations *ipallocations.IPAllocationsClient - IPGroups *ipgroups.IPGroupsClient - LoadBalancers *loadbalancers.LoadBalancersClient - LocalNetworkGateways *localnetworkgateways.LocalNetworkGatewaysClient - NatGateways *natgateways.NatGatewaysClient - NetworkGroups *networkgroups.NetworkGroupsClient - NetworkInterfaces *networkinterfaces.NetworkInterfacesClient - NetworkManagerActiveConfigurations *networkmanageractiveconfigurations.NetworkManagerActiveConfigurationsClient - NetworkManagerActiveConnectivityConfigurations *networkmanageractiveconnectivityconfigurations.NetworkManagerActiveConnectivityConfigurationsClient - NetworkManagerConnections *networkmanagerconnections.NetworkManagerConnectionsClient - NetworkManagerEffectiveConnectivityConfiguration *networkmanagereffectiveconnectivityconfiguration.NetworkManagerEffectiveConnectivityConfigurationClient - NetworkManagerEffectiveSecurityAdminRules *networkmanagereffectivesecurityadminrules.NetworkManagerEffectiveSecurityAdminRulesClient - NetworkManagers *networkmanagers.NetworkManagersClient - NetworkProfiles *networkprofiles.NetworkProfilesClient - NetworkSecurityGroups *networksecuritygroups.NetworkSecurityGroupsClient - NetworkVirtualAppliances *networkvirtualappliances.NetworkVirtualAppliancesClient - NetworkWatchers *networkwatchers.NetworkWatchersClient - P2sVpnGateways *p2svpngateways.P2sVpnGatewaysClient - PacketCaptures *packetcaptures.PacketCapturesClient - PeerExpressRouteCircuitConnections *peerexpressroutecircuitconnections.PeerExpressRouteCircuitConnectionsClient - PrivateDnsZoneGroups *privatednszonegroups.PrivateDnsZoneGroupsClient - PrivateEndpoints *privateendpoints.PrivateEndpointsClient - PrivateLinkService *privatelinkservice.PrivateLinkServiceClient - PrivateLinkServices *privatelinkservices.PrivateLinkServicesClient - PublicIPAddresses *publicipaddresses.PublicIPAddressesClient - PublicIPPrefixes *publicipprefixes.PublicIPPrefixesClient - RouteFilterRules *routefilterrules.RouteFilterRulesClient - RouteFilters *routefilters.RouteFiltersClient - RouteTables *routetables.RouteTablesClient - Routes *routes.RoutesClient - ScopeConnections *scopeconnections.ScopeConnectionsClient - SecurityAdminConfigurations *securityadminconfigurations.SecurityAdminConfigurationsClient - SecurityPartnerProviders *securitypartnerproviders.SecurityPartnerProvidersClient - SecurityRules *securityrules.SecurityRulesClient - ServiceEndpointPolicies *serviceendpointpolicies.ServiceEndpointPoliciesClient - ServiceEndpointPolicyDefinitions *serviceendpointpolicydefinitions.ServiceEndpointPolicyDefinitionsClient - ServiceTags *servicetags.ServiceTagsClient - StaticMembers *staticmembers.StaticMembersClient - Subnets *subnets.SubnetsClient - TrafficAnalytics *trafficanalytics.TrafficAnalyticsClient - Usages *usages.UsagesClient - VMSSPublicIPAddresses *vmsspublicipaddresses.VMSSPublicIPAddressesClient - VipSwap *vipswap.VipSwapClient - VirtualApplianceSites *virtualappliancesites.VirtualApplianceSitesClient - VirtualApplianceSkus *virtualapplianceskus.VirtualApplianceSkusClient - VirtualNetworkGatewayConnections *virtualnetworkgatewayconnections.VirtualNetworkGatewayConnectionsClient - VirtualNetworkGateways *virtualnetworkgateways.VirtualNetworkGatewaysClient - VirtualNetworkPeerings *virtualnetworkpeerings.VirtualNetworkPeeringsClient - VirtualNetworkTap *virtualnetworktap.VirtualNetworkTapClient - VirtualNetworkTaps *virtualnetworktaps.VirtualNetworkTapsClient - VirtualNetworks *virtualnetworks.VirtualNetworksClient - VirtualRouterPeerings *virtualrouterpeerings.VirtualRouterPeeringsClient - VirtualRouters *virtualrouters.VirtualRoutersClient - VirtualWANs *virtualwans.VirtualWANsClient - VpnGateways *vpngateways.VpnGatewaysClient - VpnLinkConnections *vpnlinkconnections.VpnLinkConnectionsClient - VpnServerConfigurations *vpnserverconfigurations.VpnServerConfigurationsClient - VpnSites *vpnsites.VpnSitesClient - WebApplicationFirewallPolicies *webapplicationfirewallpolicies.WebApplicationFirewallPoliciesClient - WebCategories *webcategories.WebCategoriesClient -} - -func NewClientWithBaseURI(api environments.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - adminRuleCollectionsClient, err := adminrulecollections.NewAdminRuleCollectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AdminRuleCollections client: %+v", err) - } - configureFunc(adminRuleCollectionsClient.Client) - - adminRulesClient, err := adminrules.NewAdminRulesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AdminRules client: %+v", err) - } - configureFunc(adminRulesClient.Client) - - applicationGatewayPrivateEndpointConnectionsClient, err := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationGatewayPrivateEndpointConnections client: %+v", err) - } - configureFunc(applicationGatewayPrivateEndpointConnectionsClient.Client) - - applicationGatewayPrivateLinkResourcesClient, err := applicationgatewayprivatelinkresources.NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationGatewayPrivateLinkResources client: %+v", err) - } - configureFunc(applicationGatewayPrivateLinkResourcesClient.Client) - - applicationGatewayWafDynamicManifestsClient, err := applicationgatewaywafdynamicmanifests.NewApplicationGatewayWafDynamicManifestsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationGatewayWafDynamicManifests client: %+v", err) - } - configureFunc(applicationGatewayWafDynamicManifestsClient.Client) - - applicationGatewaysClient, err := applicationgateways.NewApplicationGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationGateways client: %+v", err) - } - configureFunc(applicationGatewaysClient.Client) - - applicationSecurityGroupsClient, err := applicationsecuritygroups.NewApplicationSecurityGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationSecurityGroups client: %+v", err) - } - configureFunc(applicationSecurityGroupsClient.Client) - - availableDelegationsClient, err := availabledelegations.NewAvailableDelegationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AvailableDelegations client: %+v", err) - } - configureFunc(availableDelegationsClient.Client) - - availableServiceAliasesClient, err := availableservicealiases.NewAvailableServiceAliasesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AvailableServiceAliases client: %+v", err) - } - configureFunc(availableServiceAliasesClient.Client) - - azureFirewallsClient, err := azurefirewalls.NewAzureFirewallsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AzureFirewalls client: %+v", err) - } - configureFunc(azureFirewallsClient.Client) - - bastionHostsClient, err := bastionhosts.NewBastionHostsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building BastionHosts client: %+v", err) - } - configureFunc(bastionHostsClient.Client) - - bastionShareableLinkClient, err := bastionshareablelink.NewBastionShareableLinkClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building BastionShareableLink client: %+v", err) - } - configureFunc(bastionShareableLinkClient.Client) - - bgpServiceCommunitiesClient, err := bgpservicecommunities.NewBgpServiceCommunitiesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building BgpServiceCommunities client: %+v", err) - } - configureFunc(bgpServiceCommunitiesClient.Client) - - checkDnsAvailabilitiesClient, err := checkdnsavailabilities.NewCheckDnsAvailabilitiesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building CheckDnsAvailabilities client: %+v", err) - } - configureFunc(checkDnsAvailabilitiesClient.Client) - - cloudServicePublicIPAddressesClient, err := cloudservicepublicipaddresses.NewCloudServicePublicIPAddressesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building CloudServicePublicIPAddresses client: %+v", err) - } - configureFunc(cloudServicePublicIPAddressesClient.Client) - - connectionMonitorsClient, err := connectionmonitors.NewConnectionMonitorsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ConnectionMonitors client: %+v", err) - } - configureFunc(connectionMonitorsClient.Client) - - connectivityConfigurationsClient, err := connectivityconfigurations.NewConnectivityConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ConnectivityConfigurations client: %+v", err) - } - configureFunc(connectivityConfigurationsClient.Client) - - customIPPrefixesClient, err := customipprefixes.NewCustomIPPrefixesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building CustomIPPrefixes client: %+v", err) - } - configureFunc(customIPPrefixesClient.Client) - - ddosCustomPoliciesClient, err := ddoscustompolicies.NewDdosCustomPoliciesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building DdosCustomPolicies client: %+v", err) - } - configureFunc(ddosCustomPoliciesClient.Client) - - ddosProtectionPlansClient, err := ddosprotectionplans.NewDdosProtectionPlansClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building DdosProtectionPlans client: %+v", err) - } - configureFunc(ddosProtectionPlansClient.Client) - - dscpConfigurationClient, err := dscpconfiguration.NewDscpConfigurationClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building DscpConfiguration client: %+v", err) - } - configureFunc(dscpConfigurationClient.Client) - - dscpConfigurationsClient, err := dscpconfigurations.NewDscpConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building DscpConfigurations client: %+v", err) - } - configureFunc(dscpConfigurationsClient.Client) - - endpointServicesClient, err := endpointservices.NewEndpointServicesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building EndpointServices client: %+v", err) - } - configureFunc(endpointServicesClient.Client) - - expressRouteCircuitArpTableClient, err := expressroutecircuitarptable.NewExpressRouteCircuitArpTableClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitArpTable client: %+v", err) - } - configureFunc(expressRouteCircuitArpTableClient.Client) - - expressRouteCircuitAuthorizationsClient, err := expressroutecircuitauthorizations.NewExpressRouteCircuitAuthorizationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitAuthorizations client: %+v", err) - } - configureFunc(expressRouteCircuitAuthorizationsClient.Client) - - expressRouteCircuitConnectionsClient, err := expressroutecircuitconnections.NewExpressRouteCircuitConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitConnections client: %+v", err) - } - configureFunc(expressRouteCircuitConnectionsClient.Client) - - expressRouteCircuitPeeringsClient, err := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitPeerings client: %+v", err) - } - configureFunc(expressRouteCircuitPeeringsClient.Client) - - expressRouteCircuitRoutesTableClient, err := expressroutecircuitroutestable.NewExpressRouteCircuitRoutesTableClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitRoutesTable client: %+v", err) - } - configureFunc(expressRouteCircuitRoutesTableClient.Client) - - expressRouteCircuitRoutesTableSummaryClient, err := expressroutecircuitroutestablesummary.NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitRoutesTableSummary client: %+v", err) - } - configureFunc(expressRouteCircuitRoutesTableSummaryClient.Client) - - expressRouteCircuitStatsClient, err := expressroutecircuitstats.NewExpressRouteCircuitStatsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitStats client: %+v", err) - } - configureFunc(expressRouteCircuitStatsClient.Client) - - expressRouteCircuitsClient, err := expressroutecircuits.NewExpressRouteCircuitsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuits client: %+v", err) - } - configureFunc(expressRouteCircuitsClient.Client) - - expressRouteConnectionsClient, err := expressrouteconnections.NewExpressRouteConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteConnections client: %+v", err) - } - configureFunc(expressRouteConnectionsClient.Client) - - expressRouteCrossConnectionArpTableClient, err := expressroutecrossconnectionarptable.NewExpressRouteCrossConnectionArpTableClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnectionArpTable client: %+v", err) - } - configureFunc(expressRouteCrossConnectionArpTableClient.Client) - - expressRouteCrossConnectionPeeringsClient, err := expressroutecrossconnectionpeerings.NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnectionPeerings client: %+v", err) - } - configureFunc(expressRouteCrossConnectionPeeringsClient.Client) - - expressRouteCrossConnectionRouteTableClient, err := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionRouteTableClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnectionRouteTable client: %+v", err) - } - configureFunc(expressRouteCrossConnectionRouteTableClient.Client) - - expressRouteCrossConnectionRouteTableSummaryClient, err := expressroutecrossconnectionroutetablesummary.NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnectionRouteTableSummary client: %+v", err) - } - configureFunc(expressRouteCrossConnectionRouteTableSummaryClient.Client) - - expressRouteCrossConnectionsClient, err := expressroutecrossconnections.NewExpressRouteCrossConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnections client: %+v", err) - } - configureFunc(expressRouteCrossConnectionsClient.Client) - - expressRouteGatewaysClient, err := expressroutegateways.NewExpressRouteGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteGateways client: %+v", err) - } - configureFunc(expressRouteGatewaysClient.Client) - - expressRouteLinksClient, err := expressroutelinks.NewExpressRouteLinksClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteLinks client: %+v", err) - } - configureFunc(expressRouteLinksClient.Client) - - expressRoutePortAuthorizationsClient, err := expressrouteportauthorizations.NewExpressRoutePortAuthorizationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRoutePortAuthorizations client: %+v", err) - } - configureFunc(expressRoutePortAuthorizationsClient.Client) - - expressRoutePortsClient, err := expressrouteports.NewExpressRoutePortsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRoutePorts client: %+v", err) - } - configureFunc(expressRoutePortsClient.Client) - - expressRoutePortsLocationsClient, err := expressrouteportslocations.NewExpressRoutePortsLocationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRoutePortsLocations client: %+v", err) - } - configureFunc(expressRoutePortsLocationsClient.Client) - - expressRouteProviderPortsClient, err := expressrouteproviderports.NewExpressRouteProviderPortsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteProviderPorts client: %+v", err) - } - configureFunc(expressRouteProviderPortsClient.Client) - - expressRouteServiceProvidersClient, err := expressrouteserviceproviders.NewExpressRouteServiceProvidersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteServiceProviders client: %+v", err) - } - configureFunc(expressRouteServiceProvidersClient.Client) - - firewallPoliciesClient, err := firewallpolicies.NewFirewallPoliciesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building FirewallPolicies client: %+v", err) - } - configureFunc(firewallPoliciesClient.Client) - - firewallPolicyRuleCollectionGroupsClient, err := firewallpolicyrulecollectiongroups.NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building FirewallPolicyRuleCollectionGroups client: %+v", err) - } - configureFunc(firewallPolicyRuleCollectionGroupsClient.Client) - - flowLogsClient, err := flowlogs.NewFlowLogsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building FlowLogs client: %+v", err) - } - configureFunc(flowLogsClient.Client) - - iPAllocationsClient, err := ipallocations.NewIPAllocationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building IPAllocations client: %+v", err) - } - configureFunc(iPAllocationsClient.Client) - - iPGroupsClient, err := ipgroups.NewIPGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building IPGroups client: %+v", err) - } - configureFunc(iPGroupsClient.Client) - - loadBalancersClient, err := loadbalancers.NewLoadBalancersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building LoadBalancers client: %+v", err) - } - configureFunc(loadBalancersClient.Client) - - localNetworkGatewaysClient, err := localnetworkgateways.NewLocalNetworkGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building LocalNetworkGateways client: %+v", err) - } - configureFunc(localNetworkGatewaysClient.Client) - - natGatewaysClient, err := natgateways.NewNatGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NatGateways client: %+v", err) - } - configureFunc(natGatewaysClient.Client) - - networkGroupsClient, err := networkgroups.NewNetworkGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkGroups client: %+v", err) - } - configureFunc(networkGroupsClient.Client) - - networkInterfacesClient, err := networkinterfaces.NewNetworkInterfacesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkInterfaces client: %+v", err) - } - configureFunc(networkInterfacesClient.Client) - - networkManagerActiveConfigurationsClient, err := networkmanageractiveconfigurations.NewNetworkManagerActiveConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerActiveConfigurations client: %+v", err) - } - configureFunc(networkManagerActiveConfigurationsClient.Client) - - networkManagerActiveConnectivityConfigurationsClient, err := networkmanageractiveconnectivityconfigurations.NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerActiveConnectivityConfigurations client: %+v", err) - } - configureFunc(networkManagerActiveConnectivityConfigurationsClient.Client) - - networkManagerConnectionsClient, err := networkmanagerconnections.NewNetworkManagerConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerConnections client: %+v", err) - } - configureFunc(networkManagerConnectionsClient.Client) - - networkManagerEffectiveConnectivityConfigurationClient, err := networkmanagereffectiveconnectivityconfiguration.NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerEffectiveConnectivityConfiguration client: %+v", err) - } - configureFunc(networkManagerEffectiveConnectivityConfigurationClient.Client) - - networkManagerEffectiveSecurityAdminRulesClient, err := networkmanagereffectivesecurityadminrules.NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerEffectiveSecurityAdminRules client: %+v", err) - } - configureFunc(networkManagerEffectiveSecurityAdminRulesClient.Client) - - networkManagersClient, err := networkmanagers.NewNetworkManagersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagers client: %+v", err) - } - configureFunc(networkManagersClient.Client) - - networkProfilesClient, err := networkprofiles.NewNetworkProfilesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkProfiles client: %+v", err) - } - configureFunc(networkProfilesClient.Client) - - networkSecurityGroupsClient, err := networksecuritygroups.NewNetworkSecurityGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkSecurityGroups client: %+v", err) - } - configureFunc(networkSecurityGroupsClient.Client) - - networkVirtualAppliancesClient, err := networkvirtualappliances.NewNetworkVirtualAppliancesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkVirtualAppliances client: %+v", err) - } - configureFunc(networkVirtualAppliancesClient.Client) - - networkWatchersClient, err := networkwatchers.NewNetworkWatchersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkWatchers client: %+v", err) - } - configureFunc(networkWatchersClient.Client) - - p2sVpnGatewaysClient, err := p2svpngateways.NewP2sVpnGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building P2sVpnGateways client: %+v", err) - } - configureFunc(p2sVpnGatewaysClient.Client) - - packetCapturesClient, err := packetcaptures.NewPacketCapturesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PacketCaptures client: %+v", err) - } - configureFunc(packetCapturesClient.Client) - - peerExpressRouteCircuitConnectionsClient, err := peerexpressroutecircuitconnections.NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PeerExpressRouteCircuitConnections client: %+v", err) - } - configureFunc(peerExpressRouteCircuitConnectionsClient.Client) - - privateDnsZoneGroupsClient, err := privatednszonegroups.NewPrivateDnsZoneGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PrivateDnsZoneGroups client: %+v", err) - } - configureFunc(privateDnsZoneGroupsClient.Client) - - privateEndpointsClient, err := privateendpoints.NewPrivateEndpointsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PrivateEndpoints client: %+v", err) - } - configureFunc(privateEndpointsClient.Client) - - privateLinkServiceClient, err := privatelinkservice.NewPrivateLinkServiceClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PrivateLinkService client: %+v", err) - } - configureFunc(privateLinkServiceClient.Client) - - privateLinkServicesClient, err := privatelinkservices.NewPrivateLinkServicesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PrivateLinkServices client: %+v", err) - } - configureFunc(privateLinkServicesClient.Client) - - publicIPAddressesClient, err := publicipaddresses.NewPublicIPAddressesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PublicIPAddresses client: %+v", err) - } - configureFunc(publicIPAddressesClient.Client) - - publicIPPrefixesClient, err := publicipprefixes.NewPublicIPPrefixesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PublicIPPrefixes client: %+v", err) - } - configureFunc(publicIPPrefixesClient.Client) - - routeFilterRulesClient, err := routefilterrules.NewRouteFilterRulesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building RouteFilterRules client: %+v", err) - } - configureFunc(routeFilterRulesClient.Client) - - routeFiltersClient, err := routefilters.NewRouteFiltersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building RouteFilters client: %+v", err) - } - configureFunc(routeFiltersClient.Client) - - routeTablesClient, err := routetables.NewRouteTablesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building RouteTables client: %+v", err) - } - configureFunc(routeTablesClient.Client) - - routesClient, err := routes.NewRoutesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building Routes client: %+v", err) - } - configureFunc(routesClient.Client) - - scopeConnectionsClient, err := scopeconnections.NewScopeConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ScopeConnections client: %+v", err) - } - configureFunc(scopeConnectionsClient.Client) - - securityAdminConfigurationsClient, err := securityadminconfigurations.NewSecurityAdminConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building SecurityAdminConfigurations client: %+v", err) - } - configureFunc(securityAdminConfigurationsClient.Client) - - securityPartnerProvidersClient, err := securitypartnerproviders.NewSecurityPartnerProvidersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building SecurityPartnerProviders client: %+v", err) - } - configureFunc(securityPartnerProvidersClient.Client) - - securityRulesClient, err := securityrules.NewSecurityRulesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building SecurityRules client: %+v", err) - } - configureFunc(securityRulesClient.Client) - - serviceEndpointPoliciesClient, err := serviceendpointpolicies.NewServiceEndpointPoliciesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ServiceEndpointPolicies client: %+v", err) - } - configureFunc(serviceEndpointPoliciesClient.Client) - - serviceEndpointPolicyDefinitionsClient, err := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ServiceEndpointPolicyDefinitions client: %+v", err) - } - configureFunc(serviceEndpointPolicyDefinitionsClient.Client) - - serviceTagsClient, err := servicetags.NewServiceTagsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ServiceTags client: %+v", err) - } - configureFunc(serviceTagsClient.Client) - - staticMembersClient, err := staticmembers.NewStaticMembersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building StaticMembers client: %+v", err) - } - configureFunc(staticMembersClient.Client) - - subnetsClient, err := subnets.NewSubnetsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building Subnets client: %+v", err) - } - configureFunc(subnetsClient.Client) - - trafficAnalyticsClient, err := trafficanalytics.NewTrafficAnalyticsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building TrafficAnalytics client: %+v", err) - } - configureFunc(trafficAnalyticsClient.Client) - - usagesClient, err := usages.NewUsagesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building Usages client: %+v", err) - } - configureFunc(usagesClient.Client) - - vMSSPublicIPAddressesClient, err := vmsspublicipaddresses.NewVMSSPublicIPAddressesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VMSSPublicIPAddresses client: %+v", err) - } - configureFunc(vMSSPublicIPAddressesClient.Client) - - vipSwapClient, err := vipswap.NewVipSwapClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VipSwap client: %+v", err) - } - configureFunc(vipSwapClient.Client) - - virtualApplianceSitesClient, err := virtualappliancesites.NewVirtualApplianceSitesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualApplianceSites client: %+v", err) - } - configureFunc(virtualApplianceSitesClient.Client) - - virtualApplianceSkusClient, err := virtualapplianceskus.NewVirtualApplianceSkusClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualApplianceSkus client: %+v", err) - } - configureFunc(virtualApplianceSkusClient.Client) - - virtualNetworkGatewayConnectionsClient, err := virtualnetworkgatewayconnections.NewVirtualNetworkGatewayConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkGatewayConnections client: %+v", err) - } - configureFunc(virtualNetworkGatewayConnectionsClient.Client) - - virtualNetworkGatewaysClient, err := virtualnetworkgateways.NewVirtualNetworkGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkGateways client: %+v", err) - } - configureFunc(virtualNetworkGatewaysClient.Client) - - virtualNetworkPeeringsClient, err := virtualnetworkpeerings.NewVirtualNetworkPeeringsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkPeerings client: %+v", err) - } - configureFunc(virtualNetworkPeeringsClient.Client) - - virtualNetworkTapClient, err := virtualnetworktap.NewVirtualNetworkTapClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkTap client: %+v", err) - } - configureFunc(virtualNetworkTapClient.Client) - - virtualNetworkTapsClient, err := virtualnetworktaps.NewVirtualNetworkTapsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkTaps client: %+v", err) - } - configureFunc(virtualNetworkTapsClient.Client) - - virtualNetworksClient, err := virtualnetworks.NewVirtualNetworksClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworks client: %+v", err) - } - configureFunc(virtualNetworksClient.Client) - - virtualRouterPeeringsClient, err := virtualrouterpeerings.NewVirtualRouterPeeringsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualRouterPeerings client: %+v", err) - } - configureFunc(virtualRouterPeeringsClient.Client) - - virtualRoutersClient, err := virtualrouters.NewVirtualRoutersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualRouters client: %+v", err) - } - configureFunc(virtualRoutersClient.Client) - - virtualWANsClient, err := virtualwans.NewVirtualWANsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualWANs client: %+v", err) - } - configureFunc(virtualWANsClient.Client) - - vpnGatewaysClient, err := vpngateways.NewVpnGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VpnGateways client: %+v", err) - } - configureFunc(vpnGatewaysClient.Client) - - vpnLinkConnectionsClient, err := vpnlinkconnections.NewVpnLinkConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VpnLinkConnections client: %+v", err) - } - configureFunc(vpnLinkConnectionsClient.Client) - - vpnServerConfigurationsClient, err := vpnserverconfigurations.NewVpnServerConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VpnServerConfigurations client: %+v", err) - } - configureFunc(vpnServerConfigurationsClient.Client) - - vpnSitesClient, err := vpnsites.NewVpnSitesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VpnSites client: %+v", err) - } - configureFunc(vpnSitesClient.Client) - - webApplicationFirewallPoliciesClient, err := webapplicationfirewallpolicies.NewWebApplicationFirewallPoliciesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building WebApplicationFirewallPolicies client: %+v", err) - } - configureFunc(webApplicationFirewallPoliciesClient.Client) - - webCategoriesClient, err := webcategories.NewWebCategoriesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building WebCategories client: %+v", err) - } - configureFunc(webCategoriesClient.Client) - - return &Client{ - AdminRuleCollections: adminRuleCollectionsClient, - AdminRules: adminRulesClient, - ApplicationGatewayPrivateEndpointConnections: applicationGatewayPrivateEndpointConnectionsClient, - ApplicationGatewayPrivateLinkResources: applicationGatewayPrivateLinkResourcesClient, - ApplicationGatewayWafDynamicManifests: applicationGatewayWafDynamicManifestsClient, - ApplicationGateways: applicationGatewaysClient, - ApplicationSecurityGroups: applicationSecurityGroupsClient, - AvailableDelegations: availableDelegationsClient, - AvailableServiceAliases: availableServiceAliasesClient, - AzureFirewalls: azureFirewallsClient, - BastionHosts: bastionHostsClient, - BastionShareableLink: bastionShareableLinkClient, - BgpServiceCommunities: bgpServiceCommunitiesClient, - CheckDnsAvailabilities: checkDnsAvailabilitiesClient, - CloudServicePublicIPAddresses: cloudServicePublicIPAddressesClient, - ConnectionMonitors: connectionMonitorsClient, - ConnectivityConfigurations: connectivityConfigurationsClient, - CustomIPPrefixes: customIPPrefixesClient, - DdosCustomPolicies: ddosCustomPoliciesClient, - DdosProtectionPlans: ddosProtectionPlansClient, - DscpConfiguration: dscpConfigurationClient, - DscpConfigurations: dscpConfigurationsClient, - EndpointServices: endpointServicesClient, - ExpressRouteCircuitArpTable: expressRouteCircuitArpTableClient, - ExpressRouteCircuitAuthorizations: expressRouteCircuitAuthorizationsClient, - ExpressRouteCircuitConnections: expressRouteCircuitConnectionsClient, - ExpressRouteCircuitPeerings: expressRouteCircuitPeeringsClient, - ExpressRouteCircuitRoutesTable: expressRouteCircuitRoutesTableClient, - ExpressRouteCircuitRoutesTableSummary: expressRouteCircuitRoutesTableSummaryClient, - ExpressRouteCircuitStats: expressRouteCircuitStatsClient, - ExpressRouteCircuits: expressRouteCircuitsClient, - ExpressRouteConnections: expressRouteConnectionsClient, - ExpressRouteCrossConnectionArpTable: expressRouteCrossConnectionArpTableClient, - ExpressRouteCrossConnectionPeerings: expressRouteCrossConnectionPeeringsClient, - ExpressRouteCrossConnectionRouteTable: expressRouteCrossConnectionRouteTableClient, - ExpressRouteCrossConnectionRouteTableSummary: expressRouteCrossConnectionRouteTableSummaryClient, - ExpressRouteCrossConnections: expressRouteCrossConnectionsClient, - ExpressRouteGateways: expressRouteGatewaysClient, - ExpressRouteLinks: expressRouteLinksClient, - ExpressRoutePortAuthorizations: expressRoutePortAuthorizationsClient, - ExpressRoutePorts: expressRoutePortsClient, - ExpressRoutePortsLocations: expressRoutePortsLocationsClient, - ExpressRouteProviderPorts: expressRouteProviderPortsClient, - ExpressRouteServiceProviders: expressRouteServiceProvidersClient, - FirewallPolicies: firewallPoliciesClient, - FirewallPolicyRuleCollectionGroups: firewallPolicyRuleCollectionGroupsClient, - FlowLogs: flowLogsClient, - IPAllocations: iPAllocationsClient, - IPGroups: iPGroupsClient, - LoadBalancers: loadBalancersClient, - LocalNetworkGateways: localNetworkGatewaysClient, - NatGateways: natGatewaysClient, - NetworkGroups: networkGroupsClient, - NetworkInterfaces: networkInterfacesClient, - NetworkManagerActiveConfigurations: networkManagerActiveConfigurationsClient, - NetworkManagerActiveConnectivityConfigurations: networkManagerActiveConnectivityConfigurationsClient, - NetworkManagerConnections: networkManagerConnectionsClient, - NetworkManagerEffectiveConnectivityConfiguration: networkManagerEffectiveConnectivityConfigurationClient, - NetworkManagerEffectiveSecurityAdminRules: networkManagerEffectiveSecurityAdminRulesClient, - NetworkManagers: networkManagersClient, - NetworkProfiles: networkProfilesClient, - NetworkSecurityGroups: networkSecurityGroupsClient, - NetworkVirtualAppliances: networkVirtualAppliancesClient, - NetworkWatchers: networkWatchersClient, - P2sVpnGateways: p2sVpnGatewaysClient, - PacketCaptures: packetCapturesClient, - PeerExpressRouteCircuitConnections: peerExpressRouteCircuitConnectionsClient, - PrivateDnsZoneGroups: privateDnsZoneGroupsClient, - PrivateEndpoints: privateEndpointsClient, - PrivateLinkService: privateLinkServiceClient, - PrivateLinkServices: privateLinkServicesClient, - PublicIPAddresses: publicIPAddressesClient, - PublicIPPrefixes: publicIPPrefixesClient, - RouteFilterRules: routeFilterRulesClient, - RouteFilters: routeFiltersClient, - RouteTables: routeTablesClient, - Routes: routesClient, - ScopeConnections: scopeConnectionsClient, - SecurityAdminConfigurations: securityAdminConfigurationsClient, - SecurityPartnerProviders: securityPartnerProvidersClient, - SecurityRules: securityRulesClient, - ServiceEndpointPolicies: serviceEndpointPoliciesClient, - ServiceEndpointPolicyDefinitions: serviceEndpointPolicyDefinitionsClient, - ServiceTags: serviceTagsClient, - StaticMembers: staticMembersClient, - Subnets: subnetsClient, - TrafficAnalytics: trafficAnalyticsClient, - Usages: usagesClient, - VMSSPublicIPAddresses: vMSSPublicIPAddressesClient, - VipSwap: vipSwapClient, - VirtualApplianceSites: virtualApplianceSitesClient, - VirtualApplianceSkus: virtualApplianceSkusClient, - VirtualNetworkGatewayConnections: virtualNetworkGatewayConnectionsClient, - VirtualNetworkGateways: virtualNetworkGatewaysClient, - VirtualNetworkPeerings: virtualNetworkPeeringsClient, - VirtualNetworkTap: virtualNetworkTapClient, - VirtualNetworkTaps: virtualNetworkTapsClient, - VirtualNetworks: virtualNetworksClient, - VirtualRouterPeerings: virtualRouterPeeringsClient, - VirtualRouters: virtualRoutersClient, - VirtualWANs: virtualWANsClient, - VpnGateways: vpnGatewaysClient, - VpnLinkConnections: vpnLinkConnectionsClient, - VpnServerConfigurations: vpnServerConfigurationsClient, - VpnSites: vpnSitesClient, - WebApplicationFirewallPolicies: webApplicationFirewallPoliciesClient, - WebCategories: webCategoriesClient, - }, nil -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/README.md b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/README.md deleted file mode 100644 index b6b5c39f890..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/README.md +++ /dev/null @@ -1,70 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/cloudservicepublicipaddresses` Documentation - -The `cloudservicepublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/cloudservicepublicipaddresses" -``` - - -### Client Initialization - -```go -client := cloudservicepublicipaddresses.NewCloudServicePublicIPAddressesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CloudServicePublicIPAddressesClient.PublicIPAddressesGetCloudServicePublicIPAddress` - -```go -ctx := context.TODO() -id := cloudservicepublicipaddresses.NewCloudServicesPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue", "ipConfigurationValue", "publicIPAddressValue") - -read, err := client.PublicIPAddressesGetCloudServicePublicIPAddress(ctx, id, cloudservicepublicipaddresses.DefaultPublicIPAddressesGetCloudServicePublicIPAddressOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `CloudServicePublicIPAddressesClient.PublicIPAddressesListCloudServicePublicIPAddresses` - -```go -ctx := context.TODO() -id := cloudservicepublicipaddresses.NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue") - -// alternatively `client.PublicIPAddressesListCloudServicePublicIPAddresses(ctx, id)` can be used to do batched pagination -items, err := client.PublicIPAddressesListCloudServicePublicIPAddressesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `CloudServicePublicIPAddressesClient.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses` - -```go -ctx := context.TODO() -id := cloudservicepublicipaddresses.NewCloudServicesIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue", "ipConfigurationValue") - -// alternatively `client.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses(ctx, id)` can be used to do batched pagination -items, err := client.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/client.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/client.go deleted file mode 100644 index 621129e8737..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CloudServicePublicIPAddressesClient struct { - Client *resourcemanager.Client -} - -func NewCloudServicePublicIPAddressesClientWithBaseURI(api environments.Api) (*CloudServicePublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "cloudservicepublicipaddresses", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CloudServicePublicIPAddressesClient: %+v", err) - } - - return &CloudServicePublicIPAddressesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/constants.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/constants.go deleted file mode 100644 index 7d5aefa24ec..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/id_providercloudservice.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/id_providercloudservice.go deleted file mode 100644 index 0a86336f5d8..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/id_providercloudservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderCloudServiceId{} - -// ProviderCloudServiceId is a struct representing the Resource ID for a Provider Cloud Service -type ProviderCloudServiceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string -} - -// NewProviderCloudServiceID returns a new ProviderCloudServiceId struct -func NewProviderCloudServiceID(subscriptionId string, resourceGroupName string, cloudServiceName string) ProviderCloudServiceId { - return ProviderCloudServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - } -} - -// ParseProviderCloudServiceID parses 'input' into a ProviderCloudServiceId -func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderCloudServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ParseProviderCloudServiceIDInsensitively parses 'input' case-insensitively into a ProviderCloudServiceId -// note: this method should only be used for API response data and not user input -func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderCloudServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ValidateProviderCloudServiceID checks that 'input' can be parsed as a Provider Cloud Service ID -func ValidateProviderCloudServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderCloudServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Cloud Service ID -func (id ProviderCloudServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Cloud Service ID -func (id ProviderCloudServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - } -} - -// String returns a human-readable description of this Provider Cloud Service ID -func (id ProviderCloudServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - } - return fmt.Sprintf("Provider Cloud Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/id_providercloudservice_test.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/id_providercloudservice_test.go deleted file mode 100644 index 8d3c42ae6e0..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/id_providercloudservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderCloudServiceId{} - -func TestNewProviderCloudServiceID(t *testing.T) { - id := NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } -} - -func TestFormatProviderCloudServiceID(t *testing.T) { - actual := NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderCloudServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderCloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderCloudServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestParseProviderCloudServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderCloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderCloudServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestSegmentsForProviderCloudServiceId(t *testing.T) { - segments := ProviderCloudServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderCloudServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go deleted file mode 100644 index 5ee69f5501a..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go +++ /dev/null @@ -1,81 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesGetCloudServicePublicIPAddressOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPAddress -} - -type PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions struct { - Expand *string -} - -func DefaultPublicIPAddressesGetCloudServicePublicIPAddressOperationOptions() PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions { - return PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions{} -} - -func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// PublicIPAddressesGetCloudServicePublicIPAddress ... -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesGetCloudServicePublicIPAddress(ctx context.Context, id commonids.CloudServicesPublicIPAddressId, options PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) (result PublicIPAddressesGetCloudServicePublicIPAddressOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudservicepublicipaddresses.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudservicepublicipaddresses.go deleted file mode 100644 index 08be57dc021..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudservicepublicipaddresses.go +++ /dev/null @@ -1,89 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesListCloudServicePublicIPAddressesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type PublicIPAddressesListCloudServicePublicIPAddressesCompleteResult struct { - Items []PublicIPAddress -} - -// PublicIPAddressesListCloudServicePublicIPAddresses ... -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServicePublicIPAddresses(ctx context.Context, id ProviderCloudServiceId) (result PublicIPAddressesListCloudServicePublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// PublicIPAddressesListCloudServicePublicIPAddressesComplete retrieves all the results into a single object -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServicePublicIPAddressesComplete(ctx context.Context, id ProviderCloudServiceId) (PublicIPAddressesListCloudServicePublicIPAddressesCompleteResult, error) { - return c.PublicIPAddressesListCloudServicePublicIPAddressesCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// PublicIPAddressesListCloudServicePublicIPAddressesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServicePublicIPAddressesCompleteMatchingPredicate(ctx context.Context, id ProviderCloudServiceId, predicate PublicIPAddressOperationPredicate) (result PublicIPAddressesListCloudServicePublicIPAddressesCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.PublicIPAddressesListCloudServicePublicIPAddresses(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = PublicIPAddressesListCloudServicePublicIPAddressesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudserviceroleinstancepublicipaddresses.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudserviceroleinstancepublicipaddresses.go deleted file mode 100644 index a8cfda96bda..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudserviceroleinstancepublicipaddresses.go +++ /dev/null @@ -1,90 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteResult struct { - Items []PublicIPAddress -} - -// PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses ... -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses(ctx context.Context, id commonids.CloudServicesIPConfigurationId) (result PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesComplete retrieves all the results into a single object -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesComplete(ctx context.Context, id commonids.CloudServicesIPConfigurationId) (PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteResult, error) { - return c.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteMatchingPredicate(ctx context.Context, id commonids.CloudServicesIPConfigurationId, predicate PublicIPAddressOperationPredicate) (result PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddress.go deleted file mode 100644 index da0843dfe84..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 0752ac86606..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index c5e25b3ac40..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 3301a914b9a..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index d142ad28f06..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationsecuritygroup.go deleted file mode 100644 index db43b3a90d7..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 26c6e3c6d63..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_backendaddresspool.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_backendaddresspool.go deleted file mode 100644 index 11a0db48c3e..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index b0cb1d74343..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 852fda62a32..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ddossettings.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ddossettings.go deleted file mode 100644 index e76df1830ad..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_delegation.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_delegation.go deleted file mode 100644 index 37ba2738f03..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlog.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlog.go deleted file mode 100644 index b5951b65269..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlogformatparameters.go deleted file mode 100644 index 22cce73755f..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlogpropertiesformat.go deleted file mode 100644 index 81d0d4ee738..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_frontendipconfiguration.go deleted file mode 100644 index 6ef8b18a318..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index d76b004d004..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 623add5b390..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_inboundnatrule.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_inboundnatrule.go deleted file mode 100644 index 2bf55038c2e..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 9e9fd000882..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfiguration.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfiguration.go deleted file mode 100644 index 7aa8cbae351..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationprofile.go deleted file mode 100644 index cae99b1bc9d..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index d32ff6abc99..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index f1c212d87d9..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_iptag.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_iptag.go deleted file mode 100644 index 9cd0c420107..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddress.go deleted file mode 100644 index e95c784d170..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index f2cc5fa6b36..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgateway.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgateway.go deleted file mode 100644 index d2e737891d0..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgatewaypropertiesformat.go deleted file mode 100644 index 6e1be1ad8f0..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgatewaysku.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgatewaysku.go deleted file mode 100644 index 0e1a31e6f56..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natruleportmapping.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natruleportmapping.go deleted file mode 100644 index 9f648ba378f..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterface.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterface.go deleted file mode 100644 index 8fa35f5b27b..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacednssettings.go deleted file mode 100644 index 7841bbdaa74..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 2060396975d..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 331b8b4a8b7..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index e933a3bcc7e..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 3d716d52cb5..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 417528f526c..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 800ba33402b..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networksecuritygroup.go deleted file mode 100644 index 4a17b77a5f7..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 75b57179c0e..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpoint.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpoint.go deleted file mode 100644 index 092678d20e9..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointconnection.go deleted file mode 100644 index 390ed6a1a9e..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointconnectionproperties.go deleted file mode 100644 index bc8a1f66b67..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointipconfiguration.go deleted file mode 100644 index f4475d0d46b..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index cd3b594722d..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointproperties.go deleted file mode 100644 index b6fab9bddb7..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkservice.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkservice.go deleted file mode 100644 index 47d7bc6cfba..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnection.go deleted file mode 100644 index c2e1ed2f2bb..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 12d313e2c8e..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 9c295f72e4e..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 2293fa06105..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index f0b249690b3..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceproperties.go deleted file mode 100644 index fea2fefdf6d..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddress.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddress.go deleted file mode 100644 index 0d91d1ce77a..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddressdnssettings.go deleted file mode 100644 index c76bfdfbfaa..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 5a1a9082ad9..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddresssku.go deleted file mode 100644 index 0d24d3ce3e2..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourcenavigationlink.go deleted file mode 100644 index a374b51e3ce..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourcenavigationlinkformat.go deleted file mode 100644 index bb8074b7c24..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourceset.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourceset.go deleted file mode 100644 index ea408a54b5a..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_retentionpolicyparameters.go deleted file mode 100644 index a92e570a340..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_route.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_route.go deleted file mode 100644 index ca309e6a8db..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routepropertiesformat.go deleted file mode 100644 index e981b239ff0..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routetable.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routetable.go deleted file mode 100644 index cfe4b1aaec3..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routetablepropertiesformat.go deleted file mode 100644 index 14537e9f6ea..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_securityrule.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_securityrule.go deleted file mode 100644 index 68880b23db6..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_securityrulepropertiesformat.go deleted file mode 100644 index 3918c59b2ce..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceassociationlink.go deleted file mode 100644 index 18402efabea..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 283dae7d051..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_servicedelegationpropertiesformat.go deleted file mode 100644 index cb30d331149..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicy.go deleted file mode 100644 index 51af3fd8470..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 84bd144ecd4..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 723f9f28975..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index de8c74ebf8a..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 63759ece07d..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subnet.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subnet.go deleted file mode 100644 index 4ae7149a7a9..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subnetpropertiesformat.go deleted file mode 100644 index 7ab10544095..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subresource.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subresource.go deleted file mode 100644 index ee542355418..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 6e884100df3..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_trafficanalyticsproperties.go deleted file mode 100644 index e38b924bdf6..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_virtualnetworktap.go deleted file mode 100644 index 9dc686dd12f..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index c0dae0b7388..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/predicates.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/predicates.go deleted file mode 100644 index f27f03144ee..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PublicIPAddressOperationPredicate) Matches(input PublicIPAddress) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/version.go b/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/version.go deleted file mode 100644 index 054db26aabe..00000000000 --- a/resource-manager/network/2022-09-01/cloudservicepublicipaddresses/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudservicepublicipaddresses/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/README.md b/resource-manager/network/2022-09-01/connectionmonitors/README.md deleted file mode 100644 index 9e352904224..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/README.md +++ /dev/null @@ -1,138 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/connectionmonitors` Documentation - -The `connectionmonitors` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/connectionmonitors" -``` - - -### Client Initialization - -```go -client := connectionmonitors.NewConnectionMonitorsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ConnectionMonitorsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -payload := connectionmonitors.ConnectionMonitor{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload, connectionmonitors.DefaultCreateOrUpdateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Delete` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Get` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConnectionMonitorsClient.List` - -```go -ctx := context.TODO() -id := connectionmonitors.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Query` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -if err := client.QueryThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Start` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Stop` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.UpdateTags` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -payload := connectionmonitors.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/connectionmonitors/client.go b/resource-manager/network/2022-09-01/connectionmonitors/client.go deleted file mode 100644 index 75b9acef7e8..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connectionmonitors - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorsClient struct { - Client *resourcemanager.Client -} - -func NewConnectionMonitorsClientWithBaseURI(api environments.Api) (*ConnectionMonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "connectionmonitors", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectionMonitorsClient: %+v", err) - } - - return &ConnectionMonitorsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/constants.go b/resource-manager/network/2022-09-01/connectionmonitors/constants.go deleted file mode 100644 index 7747a3a8316..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/constants.go +++ /dev/null @@ -1,770 +0,0 @@ -package connectionmonitors - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointFilterItemType string - -const ( - ConnectionMonitorEndpointFilterItemTypeAgentAddress ConnectionMonitorEndpointFilterItemType = "AgentAddress" -) - -func PossibleValuesForConnectionMonitorEndpointFilterItemType() []string { - return []string{ - string(ConnectionMonitorEndpointFilterItemTypeAgentAddress), - } -} - -func (s *ConnectionMonitorEndpointFilterItemType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorEndpointFilterItemType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorEndpointFilterItemType(input string) (*ConnectionMonitorEndpointFilterItemType, error) { - vals := map[string]ConnectionMonitorEndpointFilterItemType{ - "agentaddress": ConnectionMonitorEndpointFilterItemTypeAgentAddress, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorEndpointFilterItemType(input) - return &out, nil -} - -type ConnectionMonitorEndpointFilterType string - -const ( - ConnectionMonitorEndpointFilterTypeInclude ConnectionMonitorEndpointFilterType = "Include" -) - -func PossibleValuesForConnectionMonitorEndpointFilterType() []string { - return []string{ - string(ConnectionMonitorEndpointFilterTypeInclude), - } -} - -func (s *ConnectionMonitorEndpointFilterType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorEndpointFilterType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorEndpointFilterType(input string) (*ConnectionMonitorEndpointFilterType, error) { - vals := map[string]ConnectionMonitorEndpointFilterType{ - "include": ConnectionMonitorEndpointFilterTypeInclude, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorEndpointFilterType(input) - return &out, nil -} - -type ConnectionMonitorSourceStatus string - -const ( - ConnectionMonitorSourceStatusActive ConnectionMonitorSourceStatus = "Active" - ConnectionMonitorSourceStatusInactive ConnectionMonitorSourceStatus = "Inactive" - ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = "Unknown" -) - -func PossibleValuesForConnectionMonitorSourceStatus() []string { - return []string{ - string(ConnectionMonitorSourceStatusActive), - string(ConnectionMonitorSourceStatusInactive), - string(ConnectionMonitorSourceStatusUnknown), - } -} - -func (s *ConnectionMonitorSourceStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorSourceStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorSourceStatus(input string) (*ConnectionMonitorSourceStatus, error) { - vals := map[string]ConnectionMonitorSourceStatus{ - "active": ConnectionMonitorSourceStatusActive, - "inactive": ConnectionMonitorSourceStatusInactive, - "unknown": ConnectionMonitorSourceStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorSourceStatus(input) - return &out, nil -} - -type ConnectionMonitorTestConfigurationProtocol string - -const ( - ConnectionMonitorTestConfigurationProtocolHTTP ConnectionMonitorTestConfigurationProtocol = "Http" - ConnectionMonitorTestConfigurationProtocolIcmp ConnectionMonitorTestConfigurationProtocol = "Icmp" - ConnectionMonitorTestConfigurationProtocolTcp ConnectionMonitorTestConfigurationProtocol = "Tcp" -) - -func PossibleValuesForConnectionMonitorTestConfigurationProtocol() []string { - return []string{ - string(ConnectionMonitorTestConfigurationProtocolHTTP), - string(ConnectionMonitorTestConfigurationProtocolIcmp), - string(ConnectionMonitorTestConfigurationProtocolTcp), - } -} - -func (s *ConnectionMonitorTestConfigurationProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorTestConfigurationProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorTestConfigurationProtocol(input string) (*ConnectionMonitorTestConfigurationProtocol, error) { - vals := map[string]ConnectionMonitorTestConfigurationProtocol{ - "http": ConnectionMonitorTestConfigurationProtocolHTTP, - "icmp": ConnectionMonitorTestConfigurationProtocolIcmp, - "tcp": ConnectionMonitorTestConfigurationProtocolTcp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorTestConfigurationProtocol(input) - return &out, nil -} - -type ConnectionMonitorType string - -const ( - ConnectionMonitorTypeMultiEndpoint ConnectionMonitorType = "MultiEndpoint" - ConnectionMonitorTypeSingleSourceDestination ConnectionMonitorType = "SingleSourceDestination" -) - -func PossibleValuesForConnectionMonitorType() []string { - return []string{ - string(ConnectionMonitorTypeMultiEndpoint), - string(ConnectionMonitorTypeSingleSourceDestination), - } -} - -func (s *ConnectionMonitorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorType(input string) (*ConnectionMonitorType, error) { - vals := map[string]ConnectionMonitorType{ - "multiendpoint": ConnectionMonitorTypeMultiEndpoint, - "singlesourcedestination": ConnectionMonitorTypeSingleSourceDestination, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorType(input) - return &out, nil -} - -type ConnectionState string - -const ( - ConnectionStateReachable ConnectionState = "Reachable" - ConnectionStateUnknown ConnectionState = "Unknown" - ConnectionStateUnreachable ConnectionState = "Unreachable" -) - -func PossibleValuesForConnectionState() []string { - return []string{ - string(ConnectionStateReachable), - string(ConnectionStateUnknown), - string(ConnectionStateUnreachable), - } -} - -func (s *ConnectionState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionState(input string) (*ConnectionState, error) { - vals := map[string]ConnectionState{ - "reachable": ConnectionStateReachable, - "unknown": ConnectionStateUnknown, - "unreachable": ConnectionStateUnreachable, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionState(input) - return &out, nil -} - -type CoverageLevel string - -const ( - CoverageLevelAboveAverage CoverageLevel = "AboveAverage" - CoverageLevelAverage CoverageLevel = "Average" - CoverageLevelBelowAverage CoverageLevel = "BelowAverage" - CoverageLevelDefault CoverageLevel = "Default" - CoverageLevelFull CoverageLevel = "Full" - CoverageLevelLow CoverageLevel = "Low" -) - -func PossibleValuesForCoverageLevel() []string { - return []string{ - string(CoverageLevelAboveAverage), - string(CoverageLevelAverage), - string(CoverageLevelBelowAverage), - string(CoverageLevelDefault), - string(CoverageLevelFull), - string(CoverageLevelLow), - } -} - -func (s *CoverageLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCoverageLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCoverageLevel(input string) (*CoverageLevel, error) { - vals := map[string]CoverageLevel{ - "aboveaverage": CoverageLevelAboveAverage, - "average": CoverageLevelAverage, - "belowaverage": CoverageLevelBelowAverage, - "default": CoverageLevelDefault, - "full": CoverageLevelFull, - "low": CoverageLevelLow, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CoverageLevel(input) - return &out, nil -} - -type DestinationPortBehavior string - -const ( - DestinationPortBehaviorListenIfAvailable DestinationPortBehavior = "ListenIfAvailable" - DestinationPortBehaviorNone DestinationPortBehavior = "None" -) - -func PossibleValuesForDestinationPortBehavior() []string { - return []string{ - string(DestinationPortBehaviorListenIfAvailable), - string(DestinationPortBehaviorNone), - } -} - -func (s *DestinationPortBehavior) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDestinationPortBehavior(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDestinationPortBehavior(input string) (*DestinationPortBehavior, error) { - vals := map[string]DestinationPortBehavior{ - "listenifavailable": DestinationPortBehaviorListenIfAvailable, - "none": DestinationPortBehaviorNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DestinationPortBehavior(input) - return &out, nil -} - -type EndpointType string - -const ( - EndpointTypeAzureArcVM EndpointType = "AzureArcVM" - EndpointTypeAzureSubnet EndpointType = "AzureSubnet" - EndpointTypeAzureVM EndpointType = "AzureVM" - EndpointTypeAzureVMSS EndpointType = "AzureVMSS" - EndpointTypeAzureVNet EndpointType = "AzureVNet" - EndpointTypeExternalAddress EndpointType = "ExternalAddress" - EndpointTypeMMAWorkspaceMachine EndpointType = "MMAWorkspaceMachine" - EndpointTypeMMAWorkspaceNetwork EndpointType = "MMAWorkspaceNetwork" -) - -func PossibleValuesForEndpointType() []string { - return []string{ - string(EndpointTypeAzureArcVM), - string(EndpointTypeAzureSubnet), - string(EndpointTypeAzureVM), - string(EndpointTypeAzureVMSS), - string(EndpointTypeAzureVNet), - string(EndpointTypeExternalAddress), - string(EndpointTypeMMAWorkspaceMachine), - string(EndpointTypeMMAWorkspaceNetwork), - } -} - -func (s *EndpointType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEndpointType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEndpointType(input string) (*EndpointType, error) { - vals := map[string]EndpointType{ - "azurearcvm": EndpointTypeAzureArcVM, - "azuresubnet": EndpointTypeAzureSubnet, - "azurevm": EndpointTypeAzureVM, - "azurevmss": EndpointTypeAzureVMSS, - "azurevnet": EndpointTypeAzureVNet, - "externaladdress": EndpointTypeExternalAddress, - "mmaworkspacemachine": EndpointTypeMMAWorkspaceMachine, - "mmaworkspacenetwork": EndpointTypeMMAWorkspaceNetwork, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EndpointType(input) - return &out, nil -} - -type EvaluationState string - -const ( - EvaluationStateCompleted EvaluationState = "Completed" - EvaluationStateInProgress EvaluationState = "InProgress" - EvaluationStateNotStarted EvaluationState = "NotStarted" -) - -func PossibleValuesForEvaluationState() []string { - return []string{ - string(EvaluationStateCompleted), - string(EvaluationStateInProgress), - string(EvaluationStateNotStarted), - } -} - -func (s *EvaluationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEvaluationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEvaluationState(input string) (*EvaluationState, error) { - vals := map[string]EvaluationState{ - "completed": EvaluationStateCompleted, - "inprogress": EvaluationStateInProgress, - "notstarted": EvaluationStateNotStarted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EvaluationState(input) - return &out, nil -} - -type HTTPConfigurationMethod string - -const ( - HTTPConfigurationMethodGet HTTPConfigurationMethod = "Get" - HTTPConfigurationMethodPost HTTPConfigurationMethod = "Post" -) - -func PossibleValuesForHTTPConfigurationMethod() []string { - return []string{ - string(HTTPConfigurationMethodGet), - string(HTTPConfigurationMethodPost), - } -} - -func (s *HTTPConfigurationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHTTPConfigurationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHTTPConfigurationMethod(input string) (*HTTPConfigurationMethod, error) { - vals := map[string]HTTPConfigurationMethod{ - "get": HTTPConfigurationMethodGet, - "post": HTTPConfigurationMethodPost, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HTTPConfigurationMethod(input) - return &out, nil -} - -type IssueType string - -const ( - IssueTypeAgentStopped IssueType = "AgentStopped" - IssueTypeDnsResolution IssueType = "DnsResolution" - IssueTypeGuestFirewall IssueType = "GuestFirewall" - IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" - IssueTypePlatform IssueType = "Platform" - IssueTypePortThrottled IssueType = "PortThrottled" - IssueTypeSocketBind IssueType = "SocketBind" - IssueTypeUnknown IssueType = "Unknown" - IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" -) - -func PossibleValuesForIssueType() []string { - return []string{ - string(IssueTypeAgentStopped), - string(IssueTypeDnsResolution), - string(IssueTypeGuestFirewall), - string(IssueTypeNetworkSecurityRule), - string(IssueTypePlatform), - string(IssueTypePortThrottled), - string(IssueTypeSocketBind), - string(IssueTypeUnknown), - string(IssueTypeUserDefinedRoute), - } -} - -func (s *IssueType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIssueType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIssueType(input string) (*IssueType, error) { - vals := map[string]IssueType{ - "agentstopped": IssueTypeAgentStopped, - "dnsresolution": IssueTypeDnsResolution, - "guestfirewall": IssueTypeGuestFirewall, - "networksecurityrule": IssueTypeNetworkSecurityRule, - "platform": IssueTypePlatform, - "portthrottled": IssueTypePortThrottled, - "socketbind": IssueTypeSocketBind, - "unknown": IssueTypeUnknown, - "userdefinedroute": IssueTypeUserDefinedRoute, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IssueType(input) - return &out, nil -} - -type Origin string - -const ( - OriginInbound Origin = "Inbound" - OriginLocal Origin = "Local" - OriginOutbound Origin = "Outbound" -) - -func PossibleValuesForOrigin() []string { - return []string{ - string(OriginInbound), - string(OriginLocal), - string(OriginOutbound), - } -} - -func (s *Origin) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOrigin(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOrigin(input string) (*Origin, error) { - vals := map[string]Origin{ - "inbound": OriginInbound, - "local": OriginLocal, - "outbound": OriginOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Origin(input) - return &out, nil -} - -type OutputType string - -const ( - OutputTypeWorkspace OutputType = "Workspace" -) - -func PossibleValuesForOutputType() []string { - return []string{ - string(OutputTypeWorkspace), - } -} - -func (s *OutputType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOutputType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOutputType(input string) (*OutputType, error) { - vals := map[string]OutputType{ - "workspace": OutputTypeWorkspace, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OutputType(input) - return &out, nil -} - -type PreferredIPVersion string - -const ( - PreferredIPVersionIPvFour PreferredIPVersion = "IPv4" - PreferredIPVersionIPvSix PreferredIPVersion = "IPv6" -) - -func PossibleValuesForPreferredIPVersion() []string { - return []string{ - string(PreferredIPVersionIPvFour), - string(PreferredIPVersionIPvSix), - } -} - -func (s *PreferredIPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePreferredIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePreferredIPVersion(input string) (*PreferredIPVersion, error) { - vals := map[string]PreferredIPVersion{ - "ipv4": PreferredIPVersionIPvFour, - "ipv6": PreferredIPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PreferredIPVersion(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type Severity string - -const ( - SeverityError Severity = "Error" - SeverityWarning Severity = "Warning" -) - -func PossibleValuesForSeverity() []string { - return []string{ - string(SeverityError), - string(SeverityWarning), - } -} - -func (s *Severity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSeverity(input string) (*Severity, error) { - vals := map[string]Severity{ - "error": SeverityError, - "warning": SeverityWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Severity(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/id_connectionmonitor.go b/resource-manager/network/2022-09-01/connectionmonitors/id_connectionmonitor.go deleted file mode 100644 index a7922c2d666..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/id_connectionmonitor.go +++ /dev/null @@ -1,140 +0,0 @@ -package connectionmonitors - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionMonitorId{} - -// ConnectionMonitorId is a struct representing the Resource ID for a Connection Monitor -type ConnectionMonitorId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string - ConnectionMonitorName string -} - -// NewConnectionMonitorID returns a new ConnectionMonitorId struct -func NewConnectionMonitorID(subscriptionId string, resourceGroupName string, networkWatcherName string, connectionMonitorName string) ConnectionMonitorId { - return ConnectionMonitorId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - ConnectionMonitorName: connectionMonitorName, - } -} - -// ParseConnectionMonitorID parses 'input' into a ConnectionMonitorId -func ParseConnectionMonitorID(input string) (*ConnectionMonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionMonitorId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionMonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.ConnectionMonitorName, ok = parsed.Parsed["connectionMonitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionMonitorName", *parsed) - } - - return &id, nil -} - -// ParseConnectionMonitorIDInsensitively parses 'input' case-insensitively into a ConnectionMonitorId -// note: this method should only be used for API response data and not user input -func ParseConnectionMonitorIDInsensitively(input string) (*ConnectionMonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionMonitorId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionMonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.ConnectionMonitorName, ok = parsed.Parsed["connectionMonitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionMonitorName", *parsed) - } - - return &id, nil -} - -// ValidateConnectionMonitorID checks that 'input' can be parsed as a Connection Monitor ID -func ValidateConnectionMonitorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConnectionMonitorID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Connection Monitor ID -func (id ConnectionMonitorId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s/connectionMonitors/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName, id.ConnectionMonitorName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Connection Monitor ID -func (id ConnectionMonitorId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - resourceids.StaticSegment("staticConnectionMonitors", "connectionMonitors", "connectionMonitors"), - resourceids.UserSpecifiedSegment("connectionMonitorName", "connectionMonitorValue"), - } -} - -// String returns a human-readable description of this Connection Monitor ID -func (id ConnectionMonitorId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - fmt.Sprintf("Connection Monitor Name: %q", id.ConnectionMonitorName), - } - return fmt.Sprintf("Connection Monitor (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/id_connectionmonitor_test.go b/resource-manager/network/2022-09-01/connectionmonitors/id_connectionmonitor_test.go deleted file mode 100644 index 8a7f7a826f6..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/id_connectionmonitor_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package connectionmonitors - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionMonitorId{} - -func TestNewConnectionMonitorID(t *testing.T) { - id := NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } - - if id.ConnectionMonitorName != "connectionMonitorValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectionMonitorName'", id.ConnectionMonitorName, "connectionMonitorValue") - } -} - -func TestFormatConnectionMonitorID(t *testing.T) { - actual := NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConnectionMonitorID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionMonitorId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue", - Expected: &ConnectionMonitorId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - ConnectionMonitorName: "connectionMonitorValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionMonitorID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.ConnectionMonitorName != v.Expected.ConnectionMonitorName { - t.Fatalf("Expected %q but got %q for ConnectionMonitorName", v.Expected.ConnectionMonitorName, actual.ConnectionMonitorName) - } - - } -} - -func TestParseConnectionMonitorIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionMonitorId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/cOnNeCtIoNmOnItOrS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue", - Expected: &ConnectionMonitorId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - ConnectionMonitorName: "connectionMonitorValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/cOnNeCtIoNmOnItOrS/cOnNeCtIoNmOnItOrVaLuE", - Expected: &ConnectionMonitorId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - ConnectionMonitorName: "cOnNeCtIoNmOnItOrVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/cOnNeCtIoNmOnItOrS/cOnNeCtIoNmOnItOrVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionMonitorIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.ConnectionMonitorName != v.Expected.ConnectionMonitorName { - t.Fatalf("Expected %q but got %q for ConnectionMonitorName", v.Expected.ConnectionMonitorName, actual.ConnectionMonitorName) - } - - } -} - -func TestSegmentsForConnectionMonitorId(t *testing.T) { - segments := ConnectionMonitorId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConnectionMonitorId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/id_networkwatcher.go b/resource-manager/network/2022-09-01/connectionmonitors/id_networkwatcher.go deleted file mode 100644 index 9827216a58b..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package connectionmonitors - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/id_networkwatcher_test.go b/resource-manager/network/2022-09-01/connectionmonitors/id_networkwatcher_test.go deleted file mode 100644 index eb93638077e..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package connectionmonitors - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/method_createorupdate.go b/resource-manager/network/2022-09-01/connectionmonitors/method_createorupdate.go deleted file mode 100644 index 4130b4eb39e..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/method_createorupdate.go +++ /dev/null @@ -1,102 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type CreateOrUpdateOperationOptions struct { - Migrate *string -} - -func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions { - return CreateOrUpdateOperationOptions{} -} - -func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Migrate != nil { - out.Append("migrate", fmt.Sprintf("%v", *o.Migrate)) - } - return &out -} - -// CreateOrUpdate ... -func (c ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, id ConnectionMonitorId, input ConnectionMonitor, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ConnectionMonitorsClient) CreateOrUpdateThenPoll(ctx context.Context, id ConnectionMonitorId, input ConnectionMonitor, options CreateOrUpdateOperationOptions) error { - result, err := c.CreateOrUpdate(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/method_delete.go b/resource-manager/network/2022-09-01/connectionmonitors/method_delete.go deleted file mode 100644 index a0d6aebb3f1..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/method_delete.go +++ /dev/null @@ -1,70 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ConnectionMonitorsClient) Delete(ctx context.Context, id ConnectionMonitorId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ConnectionMonitorsClient) DeleteThenPoll(ctx context.Context, id ConnectionMonitorId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/method_get.go b/resource-manager/network/2022-09-01/connectionmonitors/method_get.go deleted file mode 100644 index 477def7af5b..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package connectionmonitors - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectionMonitorResult -} - -// Get ... -func (c ConnectionMonitorsClient) Get(ctx context.Context, id ConnectionMonitorId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/method_list.go b/resource-manager/network/2022-09-01/connectionmonitors/method_list.go deleted file mode 100644 index 685feebb9fa..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/method_list.go +++ /dev/null @@ -1,52 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectionMonitorListResult -} - -// List ... -func (c ConnectionMonitorsClient) List(ctx context.Context, id NetworkWatcherId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/connectionMonitors", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/method_query.go b/resource-manager/network/2022-09-01/connectionmonitors/method_query.go deleted file mode 100644 index 21ab620f1ae..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/method_query.go +++ /dev/null @@ -1,70 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Query ... -func (c ConnectionMonitorsClient) Query(ctx context.Context, id ConnectionMonitorId) (result QueryOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/query", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// QueryThenPoll performs Query then polls until it's completed -func (c ConnectionMonitorsClient) QueryThenPoll(ctx context.Context, id ConnectionMonitorId) error { - result, err := c.Query(ctx, id) - if err != nil { - return fmt.Errorf("performing Query: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Query: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/method_start.go b/resource-manager/network/2022-09-01/connectionmonitors/method_start.go deleted file mode 100644 index f5f3ef3ba4e..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c ConnectionMonitorsClient) Start(ctx context.Context, id ConnectionMonitorId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c ConnectionMonitorsClient) StartThenPoll(ctx context.Context, id ConnectionMonitorId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/method_stop.go b/resource-manager/network/2022-09-01/connectionmonitors/method_stop.go deleted file mode 100644 index 44a5d3c56a7..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/method_stop.go +++ /dev/null @@ -1,70 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c ConnectionMonitorsClient) Stop(ctx context.Context, id ConnectionMonitorId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c ConnectionMonitorsClient) StopThenPoll(ctx context.Context, id ConnectionMonitorId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/method_updatetags.go b/resource-manager/network/2022-09-01/connectionmonitors/method_updatetags.go deleted file mode 100644 index 71a655d6486..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package connectionmonitors - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectionMonitorResult -} - -// UpdateTags ... -func (c ConnectionMonitorsClient) UpdateTags(ctx context.Context, id ConnectionMonitorId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitor.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitor.go deleted file mode 100644 index 0257ef7bed9..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitor.go +++ /dev/null @@ -1,10 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitor struct { - Location *string `json:"location,omitempty"` - Properties ConnectionMonitorParameters `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitordestination.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitordestination.go deleted file mode 100644 index 2c1eaeadd69..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitordestination.go +++ /dev/null @@ -1,10 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorDestination struct { - Address *string `json:"address,omitempty"` - Port *int64 `json:"port,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpoint.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpoint.go deleted file mode 100644 index 570c394f371..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpoint.go +++ /dev/null @@ -1,14 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpoint struct { - Address *string `json:"address,omitempty"` - CoverageLevel *CoverageLevel `json:"coverageLevel,omitempty"` - Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"` - Name string `json:"name"` - ResourceId *string `json:"resourceId,omitempty"` - Scope *ConnectionMonitorEndpointScope `json:"scope,omitempty"` - Type *EndpointType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointfilter.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointfilter.go deleted file mode 100644 index f861681a10c..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointfilter.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointFilter struct { - Items *[]ConnectionMonitorEndpointFilterItem `json:"items,omitempty"` - Type *ConnectionMonitorEndpointFilterType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointfilteritem.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointfilteritem.go deleted file mode 100644 index 49a3320062d..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointfilteritem.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointFilterItem struct { - Address *string `json:"address,omitempty"` - Type *ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointscope.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointscope.go deleted file mode 100644 index 36bb68efcaa..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointscope.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointScope struct { - Exclude *[]ConnectionMonitorEndpointScopeItem `json:"exclude,omitempty"` - Include *[]ConnectionMonitorEndpointScopeItem `json:"include,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointscopeitem.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointscopeitem.go deleted file mode 100644 index e73b5e20b3b..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorendpointscopeitem.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointScopeItem struct { - Address *string `json:"address,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorhttpconfiguration.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorhttpconfiguration.go deleted file mode 100644 index 51af2309e94..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorhttpconfiguration.go +++ /dev/null @@ -1,13 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorHTTPConfiguration struct { - Method *HTTPConfigurationMethod `json:"method,omitempty"` - Path *string `json:"path,omitempty"` - Port *int64 `json:"port,omitempty"` - PreferHTTPS *bool `json:"preferHTTPS,omitempty"` - RequestHeaders *[]HTTPHeader `json:"requestHeaders,omitempty"` - ValidStatusCodeRanges *[]string `json:"validStatusCodeRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitoricmpconfiguration.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitoricmpconfiguration.go deleted file mode 100644 index 6468613d1af..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitoricmpconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorIcmpConfiguration struct { - DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorlistresult.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorlistresult.go deleted file mode 100644 index 2e3014360ae..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorlistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorListResult struct { - Value *[]ConnectionMonitorResult `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitoroutput.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitoroutput.go deleted file mode 100644 index fcacc064d79..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitoroutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorOutput struct { - Type *OutputType `json:"type,omitempty"` - WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorparameters.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorparameters.go deleted file mode 100644 index d529e518683..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorparameters.go +++ /dev/null @@ -1,16 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorParameters struct { - AutoStart *bool `json:"autoStart,omitempty"` - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"` - MonitoringIntervalInSeconds *int64 `json:"monitoringIntervalInSeconds,omitempty"` - Notes *string `json:"notes,omitempty"` - Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"` - Source *ConnectionMonitorSource `json:"source,omitempty"` - TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"` - TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorqueryresult.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorqueryresult.go deleted file mode 100644 index 455f34530d5..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorqueryresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorQueryResult struct { - SourceStatus *ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` - States *[]ConnectionStateSnapshot `json:"states,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorresult.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorresult.go deleted file mode 100644 index 439794014f7..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorresult.go +++ /dev/null @@ -1,14 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorResult struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ConnectionMonitorResultProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorresultproperties.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorresultproperties.go deleted file mode 100644 index 0299f7f69a7..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorresultproperties.go +++ /dev/null @@ -1,38 +0,0 @@ -package connectionmonitors - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorResultProperties struct { - AutoStart *bool `json:"autoStart,omitempty"` - ConnectionMonitorType *ConnectionMonitorType `json:"connectionMonitorType,omitempty"` - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"` - MonitoringIntervalInSeconds *int64 `json:"monitoringIntervalInSeconds,omitempty"` - MonitoringStatus *string `json:"monitoringStatus,omitempty"` - Notes *string `json:"notes,omitempty"` - Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Source *ConnectionMonitorSource `json:"source,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"` - TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"` -} - -func (o *ConnectionMonitorResultProperties) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ConnectionMonitorResultProperties) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorsource.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorsource.go deleted file mode 100644 index 39fa1ef2bdc..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorsource.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorSource struct { - Port *int64 `json:"port,omitempty"` - ResourceId string `json:"resourceId"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorsuccessthreshold.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorsuccessthreshold.go deleted file mode 100644 index 9f6ca6fac8b..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorsuccessthreshold.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorSuccessThreshold struct { - ChecksFailedPercent *int64 `json:"checksFailedPercent,omitempty"` - RoundTripTimeMs *float64 `json:"roundTripTimeMs,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortcpconfiguration.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortcpconfiguration.go deleted file mode 100644 index 99fdbf40239..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortcpconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorTcpConfiguration struct { - DestinationPortBehavior *DestinationPortBehavior `json:"destinationPortBehavior,omitempty"` - DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"` - Port *int64 `json:"port,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortestconfiguration.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortestconfiguration.go deleted file mode 100644 index c4aa04feaba..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortestconfiguration.go +++ /dev/null @@ -1,15 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorTestConfiguration struct { - HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"` - IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"` - Name string `json:"name"` - PreferredIPVersion *PreferredIPVersion `json:"preferredIPVersion,omitempty"` - Protocol ConnectionMonitorTestConfigurationProtocol `json:"protocol"` - SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"` - TcpConfiguration *ConnectionMonitorTcpConfiguration `json:"tcpConfiguration,omitempty"` - TestFrequencySec *int64 `json:"testFrequencySec,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortestgroup.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortestgroup.go deleted file mode 100644 index 6eaa922f55a..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitortestgroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorTestGroup struct { - Destinations []string `json:"destinations"` - Disable *bool `json:"disable,omitempty"` - Name string `json:"name"` - Sources []string `json:"sources"` - TestConfigurations []string `json:"testConfigurations"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorworkspacesettings.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorworkspacesettings.go deleted file mode 100644 index ae23c31662f..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionmonitorworkspacesettings.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorWorkspaceSettings struct { - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionstatesnapshot.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectionstatesnapshot.go deleted file mode 100644 index 060c3bece81..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectionstatesnapshot.go +++ /dev/null @@ -1,47 +0,0 @@ -package connectionmonitors - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionStateSnapshot struct { - AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty"` - ConnectionState *ConnectionState `json:"connectionState,omitempty"` - EndTime *string `json:"endTime,omitempty"` - EvaluationState *EvaluationState `json:"evaluationState,omitempty"` - Hops *[]ConnectivityHop `json:"hops,omitempty"` - MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty"` - MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty"` - ProbesFailed *int64 `json:"probesFailed,omitempty"` - ProbesSent *int64 `json:"probesSent,omitempty"` - StartTime *string `json:"startTime,omitempty"` -} - -func (o *ConnectionStateSnapshot) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ConnectionStateSnapshot) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *ConnectionStateSnapshot) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ConnectionStateSnapshot) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectivityhop.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectivityhop.go deleted file mode 100644 index b93b627ac70..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectivityhop.go +++ /dev/null @@ -1,16 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityHop struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` - Issues *[]ConnectivityIssue `json:"issues,omitempty"` - Links *[]HopLink `json:"links,omitempty"` - NextHopIds *[]string `json:"nextHopIds,omitempty"` - PreviousHopIds *[]string `json:"previousHopIds,omitempty"` - PreviousLinks *[]HopLink `json:"previousLinks,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_connectivityissue.go b/resource-manager/network/2022-09-01/connectionmonitors/model_connectivityissue.go deleted file mode 100644 index ff7c6cdaf11..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_connectivityissue.go +++ /dev/null @@ -1,11 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityIssue struct { - Context *[]map[string]string `json:"context,omitempty"` - Origin *Origin `json:"origin,omitempty"` - Severity *Severity `json:"severity,omitempty"` - Type *IssueType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_hoplink.go b/resource-manager/network/2022-09-01/connectionmonitors/model_hoplink.go deleted file mode 100644 index c2b18cd5be1..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_hoplink.go +++ /dev/null @@ -1,13 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HopLink struct { - Context *map[string]string `json:"context,omitempty"` - Issues *[]ConnectivityIssue `json:"issues,omitempty"` - LinkType *string `json:"linkType,omitempty"` - NextHopId *string `json:"nextHopId,omitempty"` - Properties *HopLinkProperties `json:"properties,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_hoplinkproperties.go b/resource-manager/network/2022-09-01/connectionmonitors/model_hoplinkproperties.go deleted file mode 100644 index d38f1875957..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_hoplinkproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HopLinkProperties struct { - RoundTripTimeAvg *int64 `json:"roundTripTimeAvg,omitempty"` - RoundTripTimeMax *int64 `json:"roundTripTimeMax,omitempty"` - RoundTripTimeMin *int64 `json:"roundTripTimeMin,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_httpheader.go b/resource-manager/network/2022-09-01/connectionmonitors/model_httpheader.go deleted file mode 100644 index 7cae34688aa..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_httpheader.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HTTPHeader struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/model_tagsobject.go b/resource-manager/network/2022-09-01/connectionmonitors/model_tagsobject.go deleted file mode 100644 index d9e7e6413ff..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectionmonitors/version.go b/resource-manager/network/2022-09-01/connectionmonitors/version.go deleted file mode 100644 index d55c73380ac..00000000000 --- a/resource-manager/network/2022-09-01/connectionmonitors/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connectionmonitors - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectionmonitors/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/README.md b/resource-manager/network/2022-09-01/connectivityconfigurations/README.md deleted file mode 100644 index 67d5548293b..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/connectivityconfigurations` Documentation - -The `connectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/connectivityconfigurations" -``` - - -### Client Initialization - -```go -client := connectivityconfigurations.NewConnectivityConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ConnectivityConfigurationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := connectivityconfigurations.NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue") - -payload := connectivityconfigurations.ConnectivityConfiguration{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConnectivityConfigurationsClient.Delete` - -```go -ctx := context.TODO() -id := connectivityconfigurations.NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue") - -if err := client.DeleteThenPoll(ctx, id, connectivityconfigurations.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectivityConfigurationsClient.Get` - -```go -ctx := context.TODO() -id := connectivityconfigurations.NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConnectivityConfigurationsClient.List` - -```go -ctx := context.TODO() -id := connectivityconfigurations.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -// alternatively `client.List(ctx, id, connectivityconfigurations.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, connectivityconfigurations.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/client.go b/resource-manager/network/2022-09-01/connectivityconfigurations/client.go deleted file mode 100644 index ff548b06d0f..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connectivityconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewConnectivityConfigurationsClientWithBaseURI(api environments.Api) (*ConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "connectivityconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectivityConfigurationsClient: %+v", err) - } - - return &ConnectivityConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/constants.go b/resource-manager/network/2022-09-01/connectivityconfigurations/constants.go deleted file mode 100644 index e9642441352..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/constants.go +++ /dev/null @@ -1,262 +0,0 @@ -package connectivityconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityTopology string - -const ( - ConnectivityTopologyHubAndSpoke ConnectivityTopology = "HubAndSpoke" - ConnectivityTopologyMesh ConnectivityTopology = "Mesh" -) - -func PossibleValuesForConnectivityTopology() []string { - return []string{ - string(ConnectivityTopologyHubAndSpoke), - string(ConnectivityTopologyMesh), - } -} - -func (s *ConnectivityTopology) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectivityTopology(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectivityTopology(input string) (*ConnectivityTopology, error) { - vals := map[string]ConnectivityTopology{ - "hubandspoke": ConnectivityTopologyHubAndSpoke, - "mesh": ConnectivityTopologyMesh, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectivityTopology(input) - return &out, nil -} - -type DeleteExistingPeering string - -const ( - DeleteExistingPeeringFalse DeleteExistingPeering = "False" - DeleteExistingPeeringTrue DeleteExistingPeering = "True" -) - -func PossibleValuesForDeleteExistingPeering() []string { - return []string{ - string(DeleteExistingPeeringFalse), - string(DeleteExistingPeeringTrue), - } -} - -func (s *DeleteExistingPeering) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteExistingPeering(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteExistingPeering(input string) (*DeleteExistingPeering, error) { - vals := map[string]DeleteExistingPeering{ - "false": DeleteExistingPeeringFalse, - "true": DeleteExistingPeeringTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteExistingPeering(input) - return &out, nil -} - -type GroupConnectivity string - -const ( - GroupConnectivityDirectlyConnected GroupConnectivity = "DirectlyConnected" - GroupConnectivityNone GroupConnectivity = "None" -) - -func PossibleValuesForGroupConnectivity() []string { - return []string{ - string(GroupConnectivityDirectlyConnected), - string(GroupConnectivityNone), - } -} - -func (s *GroupConnectivity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGroupConnectivity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGroupConnectivity(input string) (*GroupConnectivity, error) { - vals := map[string]GroupConnectivity{ - "directlyconnected": GroupConnectivityDirectlyConnected, - "none": GroupConnectivityNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GroupConnectivity(input) - return &out, nil -} - -type IsGlobal string - -const ( - IsGlobalFalse IsGlobal = "False" - IsGlobalTrue IsGlobal = "True" -) - -func PossibleValuesForIsGlobal() []string { - return []string{ - string(IsGlobalFalse), - string(IsGlobalTrue), - } -} - -func (s *IsGlobal) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsGlobal(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsGlobal(input string) (*IsGlobal, error) { - vals := map[string]IsGlobal{ - "false": IsGlobalFalse, - "true": IsGlobalTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsGlobal(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type UseHubGateway string - -const ( - UseHubGatewayFalse UseHubGateway = "False" - UseHubGatewayTrue UseHubGateway = "True" -) - -func PossibleValuesForUseHubGateway() []string { - return []string{ - string(UseHubGatewayFalse), - string(UseHubGatewayTrue), - } -} - -func (s *UseHubGateway) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUseHubGateway(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUseHubGateway(input string) (*UseHubGateway, error) { - vals := map[string]UseHubGateway{ - "false": UseHubGatewayFalse, - "true": UseHubGatewayTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UseHubGateway(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/id_connectivityconfiguration.go b/resource-manager/network/2022-09-01/connectivityconfigurations/id_connectivityconfiguration.go deleted file mode 100644 index 65487e1c102..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/id_connectivityconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package connectivityconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectivityConfigurationId{} - -// ConnectivityConfigurationId is a struct representing the Resource ID for a Connectivity Configuration -type ConnectivityConfigurationId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - ConnectivityConfigurationName string -} - -// NewConnectivityConfigurationID returns a new ConnectivityConfigurationId struct -func NewConnectivityConfigurationID(subscriptionId string, resourceGroupName string, networkManagerName string, connectivityConfigurationName string) ConnectivityConfigurationId { - return ConnectivityConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - ConnectivityConfigurationName: connectivityConfigurationName, - } -} - -// ParseConnectivityConfigurationID parses 'input' into a ConnectivityConfigurationId -func ParseConnectivityConfigurationID(input string) (*ConnectivityConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectivityConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectivityConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ConnectivityConfigurationName, ok = parsed.Parsed["connectivityConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectivityConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseConnectivityConfigurationIDInsensitively parses 'input' case-insensitively into a ConnectivityConfigurationId -// note: this method should only be used for API response data and not user input -func ParseConnectivityConfigurationIDInsensitively(input string) (*ConnectivityConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectivityConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectivityConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ConnectivityConfigurationName, ok = parsed.Parsed["connectivityConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectivityConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateConnectivityConfigurationID checks that 'input' can be parsed as a Connectivity Configuration ID -func ValidateConnectivityConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConnectivityConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Connectivity Configuration ID -func (id ConnectivityConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/connectivityConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.ConnectivityConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Connectivity Configuration ID -func (id ConnectivityConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticConnectivityConfigurations", "connectivityConfigurations", "connectivityConfigurations"), - resourceids.UserSpecifiedSegment("connectivityConfigurationName", "connectivityConfigurationValue"), - } -} - -// String returns a human-readable description of this Connectivity Configuration ID -func (id ConnectivityConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Connectivity Configuration Name: %q", id.ConnectivityConfigurationName), - } - return fmt.Sprintf("Connectivity Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/id_connectivityconfiguration_test.go b/resource-manager/network/2022-09-01/connectivityconfigurations/id_connectivityconfiguration_test.go deleted file mode 100644 index 0a8c1296cbd..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/id_connectivityconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package connectivityconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectivityConfigurationId{} - -func TestNewConnectivityConfigurationID(t *testing.T) { - id := NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.ConnectivityConfigurationName != "connectivityConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectivityConfigurationName'", id.ConnectivityConfigurationName, "connectivityConfigurationValue") - } -} - -func TestFormatConnectivityConfigurationID(t *testing.T) { - actual := NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConnectivityConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectivityConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue", - Expected: &ConnectivityConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - ConnectivityConfigurationName: "connectivityConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectivityConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.ConnectivityConfigurationName != v.Expected.ConnectivityConfigurationName { - t.Fatalf("Expected %q but got %q for ConnectivityConfigurationName", v.Expected.ConnectivityConfigurationName, actual.ConnectivityConfigurationName) - } - - } -} - -func TestParseConnectivityConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectivityConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/cOnNeCtIvItYcOnFiGuRaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue", - Expected: &ConnectivityConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - ConnectivityConfigurationName: "connectivityConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/cOnNeCtIvItYcOnFiGuRaTiOnS/cOnNeCtIvItYcOnFiGuRaTiOnVaLuE", - Expected: &ConnectivityConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - ConnectivityConfigurationName: "cOnNeCtIvItYcOnFiGuRaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/cOnNeCtIvItYcOnFiGuRaTiOnS/cOnNeCtIvItYcOnFiGuRaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectivityConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.ConnectivityConfigurationName != v.Expected.ConnectivityConfigurationName { - t.Fatalf("Expected %q but got %q for ConnectivityConfigurationName", v.Expected.ConnectivityConfigurationName, actual.ConnectivityConfigurationName) - } - - } -} - -func TestSegmentsForConnectivityConfigurationId(t *testing.T) { - segments := ConnectivityConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConnectivityConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/id_networkmanager.go b/resource-manager/network/2022-09-01/connectivityconfigurations/id_networkmanager.go deleted file mode 100644 index 087c284a6d4..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package connectivityconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/id_networkmanager_test.go b/resource-manager/network/2022-09-01/connectivityconfigurations/id_networkmanager_test.go deleted file mode 100644 index d38666765bd..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package connectivityconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/method_createorupdate.go b/resource-manager/network/2022-09-01/connectivityconfigurations/method_createorupdate.go deleted file mode 100644 index cd89fc849fc..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package connectivityconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectivityConfiguration -} - -// CreateOrUpdate ... -func (c ConnectivityConfigurationsClient) CreateOrUpdate(ctx context.Context, id ConnectivityConfigurationId, input ConnectivityConfiguration) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/method_delete.go b/resource-manager/network/2022-09-01/connectivityconfigurations/method_delete.go deleted file mode 100644 index 39d9c109838..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package connectivityconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c ConnectivityConfigurationsClient) Delete(ctx context.Context, id ConnectivityConfigurationId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ConnectivityConfigurationsClient) DeleteThenPoll(ctx context.Context, id ConnectivityConfigurationId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/method_get.go b/resource-manager/network/2022-09-01/connectivityconfigurations/method_get.go deleted file mode 100644 index 089d6865d51..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package connectivityconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectivityConfiguration -} - -// Get ... -func (c ConnectivityConfigurationsClient) Get(ctx context.Context, id ConnectivityConfigurationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/method_list.go b/resource-manager/network/2022-09-01/connectivityconfigurations/method_list.go deleted file mode 100644 index ca6616b1fb6..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package connectivityconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ConnectivityConfiguration -} - -type ListCompleteResult struct { - Items []ConnectivityConfiguration -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c ConnectivityConfigurationsClient) List(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/connectivityConfigurations", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ConnectivityConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ConnectivityConfigurationsClient) ListComplete(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, ConnectivityConfigurationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ConnectivityConfigurationsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate ConnectivityConfigurationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ConnectivityConfiguration, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivityconfiguration.go b/resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivityconfiguration.go deleted file mode 100644 index 7c6238540d1..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivityconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package connectivityconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ConnectivityConfigurationProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivityconfigurationproperties.go b/resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivityconfigurationproperties.go deleted file mode 100644 index ccdec2929c7..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivityconfigurationproperties.go +++ /dev/null @@ -1,14 +0,0 @@ -package connectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationProperties struct { - AppliesToGroups []ConnectivityGroupItem `json:"appliesToGroups"` - ConnectivityTopology ConnectivityTopology `json:"connectivityTopology"` - DeleteExistingPeering *DeleteExistingPeering `json:"deleteExistingPeering,omitempty"` - Description *string `json:"description,omitempty"` - Hubs *[]Hub `json:"hubs,omitempty"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivitygroupitem.go b/resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivitygroupitem.go deleted file mode 100644 index 0ac02d12f1a..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/model_connectivitygroupitem.go +++ /dev/null @@ -1,11 +0,0 @@ -package connectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityGroupItem struct { - GroupConnectivity GroupConnectivity `json:"groupConnectivity"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - NetworkGroupId string `json:"networkGroupId"` - UseHubGateway *UseHubGateway `json:"useHubGateway,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/model_hub.go b/resource-manager/network/2022-09-01/connectivityconfigurations/model_hub.go deleted file mode 100644 index 5e43da03fdd..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/model_hub.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Hub struct { - ResourceId *string `json:"resourceId,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/predicates.go b/resource-manager/network/2022-09-01/connectivityconfigurations/predicates.go deleted file mode 100644 index ecab73247f2..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package connectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ConnectivityConfigurationOperationPredicate) Matches(input ConnectivityConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/connectivityconfigurations/version.go b/resource-manager/network/2022-09-01/connectivityconfigurations/version.go deleted file mode 100644 index fdc408acaee..00000000000 --- a/resource-manager/network/2022-09-01/connectivityconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connectivityconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectivityconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/README.md b/resource-manager/network/2022-09-01/customipprefixes/README.md deleted file mode 100644 index af97c97ee06..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/customipprefixes` Documentation - -The `customipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/customipprefixes" -``` - - -### Client Initialization - -```go -client := customipprefixes.NewCustomIPPrefixesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CustomIPPrefixesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := customipprefixes.NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - -payload := customipprefixes.CustomIPPrefix{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `CustomIPPrefixesClient.Delete` - -```go -ctx := context.TODO() -id := customipprefixes.NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `CustomIPPrefixesClient.Get` - -```go -ctx := context.TODO() -id := customipprefixes.NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - -read, err := client.Get(ctx, id, customipprefixes.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `CustomIPPrefixesClient.List` - -```go -ctx := context.TODO() -id := customipprefixes.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `CustomIPPrefixesClient.ListAll` - -```go -ctx := context.TODO() -id := customipprefixes.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `CustomIPPrefixesClient.UpdateTags` - -```go -ctx := context.TODO() -id := customipprefixes.NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - -payload := customipprefixes.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/customipprefixes/client.go b/resource-manager/network/2022-09-01/customipprefixes/client.go deleted file mode 100644 index 31f10177172..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package customipprefixes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomIPPrefixesClient struct { - Client *resourcemanager.Client -} - -func NewCustomIPPrefixesClientWithBaseURI(api environments.Api) (*CustomIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "customipprefixes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CustomIPPrefixesClient: %+v", err) - } - - return &CustomIPPrefixesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/constants.go b/resource-manager/network/2022-09-01/customipprefixes/constants.go deleted file mode 100644 index 2c9a9f7c2e2..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/constants.go +++ /dev/null @@ -1,222 +0,0 @@ -package customipprefixes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommissionedState string - -const ( - CommissionedStateCommissioned CommissionedState = "Commissioned" - CommissionedStateCommissionedNoInternetAdvertise CommissionedState = "CommissionedNoInternetAdvertise" - CommissionedStateCommissioning CommissionedState = "Commissioning" - CommissionedStateDecommissioning CommissionedState = "Decommissioning" - CommissionedStateDeprovisioned CommissionedState = "Deprovisioned" - CommissionedStateDeprovisioning CommissionedState = "Deprovisioning" - CommissionedStateProvisioned CommissionedState = "Provisioned" - CommissionedStateProvisioning CommissionedState = "Provisioning" -) - -func PossibleValuesForCommissionedState() []string { - return []string{ - string(CommissionedStateCommissioned), - string(CommissionedStateCommissionedNoInternetAdvertise), - string(CommissionedStateCommissioning), - string(CommissionedStateDecommissioning), - string(CommissionedStateDeprovisioned), - string(CommissionedStateDeprovisioning), - string(CommissionedStateProvisioned), - string(CommissionedStateProvisioning), - } -} - -func (s *CommissionedState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommissionedState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommissionedState(input string) (*CommissionedState, error) { - vals := map[string]CommissionedState{ - "commissioned": CommissionedStateCommissioned, - "commissionednointernetadvertise": CommissionedStateCommissionedNoInternetAdvertise, - "commissioning": CommissionedStateCommissioning, - "decommissioning": CommissionedStateDecommissioning, - "deprovisioned": CommissionedStateDeprovisioned, - "deprovisioning": CommissionedStateDeprovisioning, - "provisioned": CommissionedStateProvisioned, - "provisioning": CommissionedStateProvisioning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommissionedState(input) - return &out, nil -} - -type CustomIPPrefixType string - -const ( - CustomIPPrefixTypeChild CustomIPPrefixType = "Child" - CustomIPPrefixTypeParent CustomIPPrefixType = "Parent" - CustomIPPrefixTypeSingular CustomIPPrefixType = "Singular" -) - -func PossibleValuesForCustomIPPrefixType() []string { - return []string{ - string(CustomIPPrefixTypeChild), - string(CustomIPPrefixTypeParent), - string(CustomIPPrefixTypeSingular), - } -} - -func (s *CustomIPPrefixType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCustomIPPrefixType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCustomIPPrefixType(input string) (*CustomIPPrefixType, error) { - vals := map[string]CustomIPPrefixType{ - "child": CustomIPPrefixTypeChild, - "parent": CustomIPPrefixTypeParent, - "singular": CustomIPPrefixTypeSingular, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CustomIPPrefixType(input) - return &out, nil -} - -type Geo string - -const ( - GeoAFRI Geo = "AFRI" - GeoAPAC Geo = "APAC" - GeoAQ Geo = "AQ" - GeoEURO Geo = "EURO" - GeoGLOBAL Geo = "GLOBAL" - GeoLATAM Geo = "LATAM" - GeoME Geo = "ME" - GeoNAM Geo = "NAM" - GeoOCEANIA Geo = "OCEANIA" -) - -func PossibleValuesForGeo() []string { - return []string{ - string(GeoAFRI), - string(GeoAPAC), - string(GeoAQ), - string(GeoEURO), - string(GeoGLOBAL), - string(GeoLATAM), - string(GeoME), - string(GeoNAM), - string(GeoOCEANIA), - } -} - -func (s *Geo) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGeo(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGeo(input string) (*Geo, error) { - vals := map[string]Geo{ - "afri": GeoAFRI, - "apac": GeoAPAC, - "aq": GeoAQ, - "euro": GeoEURO, - "global": GeoGLOBAL, - "latam": GeoLATAM, - "me": GeoME, - "nam": GeoNAM, - "oceania": GeoOCEANIA, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Geo(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/id_customipprefix.go b/resource-manager/network/2022-09-01/customipprefixes/id_customipprefix.go deleted file mode 100644 index 088e2b59a9a..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/id_customipprefix.go +++ /dev/null @@ -1,127 +0,0 @@ -package customipprefixes - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = CustomIPPrefixId{} - -// CustomIPPrefixId is a struct representing the Resource ID for a Custom I P Prefix -type CustomIPPrefixId struct { - SubscriptionId string - ResourceGroupName string - CustomIPPrefixName string -} - -// NewCustomIPPrefixID returns a new CustomIPPrefixId struct -func NewCustomIPPrefixID(subscriptionId string, resourceGroupName string, customIPPrefixName string) CustomIPPrefixId { - return CustomIPPrefixId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CustomIPPrefixName: customIPPrefixName, - } -} - -// ParseCustomIPPrefixID parses 'input' into a CustomIPPrefixId -func ParseCustomIPPrefixID(input string) (*CustomIPPrefixId, error) { - parser := resourceids.NewParserFromResourceIdType(CustomIPPrefixId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CustomIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CustomIPPrefixName, ok = parsed.Parsed["customIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customIPPrefixName", *parsed) - } - - return &id, nil -} - -// ParseCustomIPPrefixIDInsensitively parses 'input' case-insensitively into a CustomIPPrefixId -// note: this method should only be used for API response data and not user input -func ParseCustomIPPrefixIDInsensitively(input string) (*CustomIPPrefixId, error) { - parser := resourceids.NewParserFromResourceIdType(CustomIPPrefixId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CustomIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CustomIPPrefixName, ok = parsed.Parsed["customIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customIPPrefixName", *parsed) - } - - return &id, nil -} - -// ValidateCustomIPPrefixID checks that 'input' can be parsed as a Custom I P Prefix ID -func ValidateCustomIPPrefixID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseCustomIPPrefixID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Custom I P Prefix ID -func (id CustomIPPrefixId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/customIPPrefixes/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CustomIPPrefixName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Custom I P Prefix ID -func (id CustomIPPrefixId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticCustomIPPrefixes", "customIPPrefixes", "customIPPrefixes"), - resourceids.UserSpecifiedSegment("customIPPrefixName", "customIPPrefixValue"), - } -} - -// String returns a human-readable description of this Custom I P Prefix ID -func (id CustomIPPrefixId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Custom I P Prefix Name: %q", id.CustomIPPrefixName), - } - return fmt.Sprintf("Custom I P Prefix (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/id_customipprefix_test.go b/resource-manager/network/2022-09-01/customipprefixes/id_customipprefix_test.go deleted file mode 100644 index 7059a6cd0b3..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/id_customipprefix_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package customipprefixes - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = CustomIPPrefixId{} - -func TestNewCustomIPPrefixID(t *testing.T) { - id := NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CustomIPPrefixName != "customIPPrefixValue" { - t.Fatalf("Expected %q but got %q for Segment 'CustomIPPrefixName'", id.CustomIPPrefixName, "customIPPrefixValue") - } -} - -func TestFormatCustomIPPrefixID(t *testing.T) { - actual := NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseCustomIPPrefixID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *CustomIPPrefixId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue", - Expected: &CustomIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CustomIPPrefixName: "customIPPrefixValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseCustomIPPrefixID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CustomIPPrefixName != v.Expected.CustomIPPrefixName { - t.Fatalf("Expected %q but got %q for CustomIPPrefixName", v.Expected.CustomIPPrefixName, actual.CustomIPPrefixName) - } - - } -} - -func TestParseCustomIPPrefixIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *CustomIPPrefixId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cUsToMiPpReFiXeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue", - Expected: &CustomIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CustomIPPrefixName: "customIPPrefixValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cUsToMiPpReFiXeS/cUsToMiPpReFiXvAlUe", - Expected: &CustomIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CustomIPPrefixName: "cUsToMiPpReFiXvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cUsToMiPpReFiXeS/cUsToMiPpReFiXvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseCustomIPPrefixIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CustomIPPrefixName != v.Expected.CustomIPPrefixName { - t.Fatalf("Expected %q but got %q for CustomIPPrefixName", v.Expected.CustomIPPrefixName, actual.CustomIPPrefixName) - } - - } -} - -func TestSegmentsForCustomIPPrefixId(t *testing.T) { - segments := CustomIPPrefixId{}.Segments() - if len(segments) == 0 { - t.Fatalf("CustomIPPrefixId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/method_createorupdate.go b/resource-manager/network/2022-09-01/customipprefixes/method_createorupdate.go deleted file mode 100644 index f8a8154eb4e..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c CustomIPPrefixesClient) CreateOrUpdate(ctx context.Context, id CustomIPPrefixId, input CustomIPPrefix) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c CustomIPPrefixesClient) CreateOrUpdateThenPoll(ctx context.Context, id CustomIPPrefixId, input CustomIPPrefix) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/method_delete.go b/resource-manager/network/2022-09-01/customipprefixes/method_delete.go deleted file mode 100644 index 2233d70928d..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c CustomIPPrefixesClient) Delete(ctx context.Context, id CustomIPPrefixId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c CustomIPPrefixesClient) DeleteThenPoll(ctx context.Context, id CustomIPPrefixId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/method_get.go b/resource-manager/network/2022-09-01/customipprefixes/method_get.go deleted file mode 100644 index 507b06faa12..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *CustomIPPrefix -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c CustomIPPrefixesClient) Get(ctx context.Context, id CustomIPPrefixId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/method_list.go b/resource-manager/network/2022-09-01/customipprefixes/method_list.go deleted file mode 100644 index 566e12ef55f..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]CustomIPPrefix -} - -type ListCompleteResult struct { - Items []CustomIPPrefix -} - -// List ... -func (c CustomIPPrefixesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/customIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]CustomIPPrefix `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c CustomIPPrefixesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, CustomIPPrefixOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CustomIPPrefixesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CustomIPPrefixOperationPredicate) (result ListCompleteResult, err error) { - items := make([]CustomIPPrefix, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/method_listall.go b/resource-manager/network/2022-09-01/customipprefixes/method_listall.go deleted file mode 100644 index 8b2d2f67382..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]CustomIPPrefix -} - -type ListAllCompleteResult struct { - Items []CustomIPPrefix -} - -// ListAll ... -func (c CustomIPPrefixesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/customIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]CustomIPPrefix `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c CustomIPPrefixesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, CustomIPPrefixOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CustomIPPrefixesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate CustomIPPrefixOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]CustomIPPrefix, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/method_updatetags.go b/resource-manager/network/2022-09-01/customipprefixes/method_updatetags.go deleted file mode 100644 index 77f5b87dd8a..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package customipprefixes - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *CustomIPPrefix -} - -// UpdateTags ... -func (c CustomIPPrefixesClient) UpdateTags(ctx context.Context, id CustomIPPrefixId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/model_customipprefix.go b/resource-manager/network/2022-09-01/customipprefixes/model_customipprefix.go deleted file mode 100644 index fc3d26ef7a4..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/model_customipprefix.go +++ /dev/null @@ -1,21 +0,0 @@ -package customipprefixes - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomIPPrefix struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *CustomIPPrefixPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/model_customipprefixpropertiesformat.go b/resource-manager/network/2022-09-01/customipprefixes/model_customipprefixpropertiesformat.go deleted file mode 100644 index f26a83b6b83..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/model_customipprefixpropertiesformat.go +++ /dev/null @@ -1,22 +0,0 @@ -package customipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomIPPrefixPropertiesFormat struct { - Asn *string `json:"asn,omitempty"` - AuthorizationMessage *string `json:"authorizationMessage,omitempty"` - ChildCustomIPPrefixes *[]SubResource `json:"childCustomIpPrefixes,omitempty"` - Cidr *string `json:"cidr,omitempty"` - CommissionedState *CommissionedState `json:"commissionedState,omitempty"` - CustomIPPrefixParent *SubResource `json:"customIpPrefixParent,omitempty"` - ExpressRouteAdvertise *bool `json:"expressRouteAdvertise,omitempty"` - FailedReason *string `json:"failedReason,omitempty"` - Geo *Geo `json:"geo,omitempty"` - NoInternetAdvertise *bool `json:"noInternetAdvertise,omitempty"` - PrefixType *CustomIPPrefixType `json:"prefixType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SignedMessage *string `json:"signedMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/model_subresource.go b/resource-manager/network/2022-09-01/customipprefixes/model_subresource.go deleted file mode 100644 index 2428ad08fc0..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package customipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/model_tagsobject.go b/resource-manager/network/2022-09-01/customipprefixes/model_tagsobject.go deleted file mode 100644 index f1f3aea2b6e..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package customipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/predicates.go b/resource-manager/network/2022-09-01/customipprefixes/predicates.go deleted file mode 100644 index 288f9cfa042..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package customipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomIPPrefixOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p CustomIPPrefixOperationPredicate) Matches(input CustomIPPrefix) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/customipprefixes/version.go b/resource-manager/network/2022-09-01/customipprefixes/version.go deleted file mode 100644 index 5d6417768ee..00000000000 --- a/resource-manager/network/2022-09-01/customipprefixes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package customipprefixes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customipprefixes/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/README.md b/resource-manager/network/2022-09-01/ddoscustompolicies/README.md deleted file mode 100644 index dd861096962..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ddoscustompolicies` Documentation - -The `ddoscustompolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ddoscustompolicies" -``` - - -### Client Initialization - -```go -client := ddoscustompolicies.NewDdosCustomPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DdosCustomPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - -payload := ddoscustompolicies.DdosCustomPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DdosCustomPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DdosCustomPoliciesClient.Get` - -```go -ctx := context.TODO() -id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DdosCustomPoliciesClient.UpdateTags` - -```go -ctx := context.TODO() -id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - -payload := ddoscustompolicies.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/client.go b/resource-manager/network/2022-09-01/ddoscustompolicies/client.go deleted file mode 100644 index e9d35f8b060..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package ddoscustompolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosCustomPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewDdosCustomPoliciesClientWithBaseURI(api environments.Api) (*DdosCustomPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "ddoscustompolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DdosCustomPoliciesClient: %+v", err) - } - - return &DdosCustomPoliciesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/constants.go b/resource-manager/network/2022-09-01/ddoscustompolicies/constants.go deleted file mode 100644 index e62adb4c84b..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package ddoscustompolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/id_ddoscustompolicy.go b/resource-manager/network/2022-09-01/ddoscustompolicies/id_ddoscustompolicy.go deleted file mode 100644 index 311930ea740..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/id_ddoscustompolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package ddoscustompolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DdosCustomPolicyId{} - -// DdosCustomPolicyId is a struct representing the Resource ID for a Ddos Custom Policy -type DdosCustomPolicyId struct { - SubscriptionId string - ResourceGroupName string - DdosCustomPolicyName string -} - -// NewDdosCustomPolicyID returns a new DdosCustomPolicyId struct -func NewDdosCustomPolicyID(subscriptionId string, resourceGroupName string, ddosCustomPolicyName string) DdosCustomPolicyId { - return DdosCustomPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - DdosCustomPolicyName: ddosCustomPolicyName, - } -} - -// ParseDdosCustomPolicyID parses 'input' into a DdosCustomPolicyId -func ParseDdosCustomPolicyID(input string) (*DdosCustomPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(DdosCustomPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DdosCustomPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosCustomPolicyName, ok = parsed.Parsed["ddosCustomPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosCustomPolicyName", *parsed) - } - - return &id, nil -} - -// ParseDdosCustomPolicyIDInsensitively parses 'input' case-insensitively into a DdosCustomPolicyId -// note: this method should only be used for API response data and not user input -func ParseDdosCustomPolicyIDInsensitively(input string) (*DdosCustomPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(DdosCustomPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DdosCustomPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosCustomPolicyName, ok = parsed.Parsed["ddosCustomPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosCustomPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateDdosCustomPolicyID checks that 'input' can be parsed as a Ddos Custom Policy ID -func ValidateDdosCustomPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDdosCustomPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Ddos Custom Policy ID -func (id DdosCustomPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/ddosCustomPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DdosCustomPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Ddos Custom Policy ID -func (id DdosCustomPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticDdosCustomPolicies", "ddosCustomPolicies", "ddosCustomPolicies"), - resourceids.UserSpecifiedSegment("ddosCustomPolicyName", "ddosCustomPolicyValue"), - } -} - -// String returns a human-readable description of this Ddos Custom Policy ID -func (id DdosCustomPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Ddos Custom Policy Name: %q", id.DdosCustomPolicyName), - } - return fmt.Sprintf("Ddos Custom Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/id_ddoscustompolicy_test.go b/resource-manager/network/2022-09-01/ddoscustompolicies/id_ddoscustompolicy_test.go deleted file mode 100644 index 9db69710d31..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/id_ddoscustompolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package ddoscustompolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DdosCustomPolicyId{} - -func TestNewDdosCustomPolicyID(t *testing.T) { - id := NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.DdosCustomPolicyName != "ddosCustomPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'DdosCustomPolicyName'", id.DdosCustomPolicyName, "ddosCustomPolicyValue") - } -} - -func TestFormatDdosCustomPolicyID(t *testing.T) { - actual := NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseDdosCustomPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DdosCustomPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue", - Expected: &DdosCustomPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DdosCustomPolicyName: "ddosCustomPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDdosCustomPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DdosCustomPolicyName != v.Expected.DdosCustomPolicyName { - t.Fatalf("Expected %q but got %q for DdosCustomPolicyName", v.Expected.DdosCustomPolicyName, actual.DdosCustomPolicyName) - } - - } -} - -func TestParseDdosCustomPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DdosCustomPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoScUsToMpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue", - Expected: &DdosCustomPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DdosCustomPolicyName: "ddosCustomPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoScUsToMpOlIcIeS/dDoScUsToMpOlIcYvAlUe", - Expected: &DdosCustomPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - DdosCustomPolicyName: "dDoScUsToMpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoScUsToMpOlIcIeS/dDoScUsToMpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDdosCustomPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DdosCustomPolicyName != v.Expected.DdosCustomPolicyName { - t.Fatalf("Expected %q but got %q for DdosCustomPolicyName", v.Expected.DdosCustomPolicyName, actual.DdosCustomPolicyName) - } - - } -} - -func TestSegmentsForDdosCustomPolicyId(t *testing.T) { - segments := DdosCustomPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("DdosCustomPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/method_createorupdate.go b/resource-manager/network/2022-09-01/ddoscustompolicies/method_createorupdate.go deleted file mode 100644 index 6672d518a57..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package ddoscustompolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, id DdosCustomPolicyId, input DdosCustomPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c DdosCustomPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id DdosCustomPolicyId, input DdosCustomPolicy) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/method_delete.go b/resource-manager/network/2022-09-01/ddoscustompolicies/method_delete.go deleted file mode 100644 index 78624333195..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package ddoscustompolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c DdosCustomPoliciesClient) Delete(ctx context.Context, id DdosCustomPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c DdosCustomPoliciesClient) DeleteThenPoll(ctx context.Context, id DdosCustomPolicyId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/method_get.go b/resource-manager/network/2022-09-01/ddoscustompolicies/method_get.go deleted file mode 100644 index 7af9f8f0806..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package ddoscustompolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DdosCustomPolicy -} - -// Get ... -func (c DdosCustomPoliciesClient) Get(ctx context.Context, id DdosCustomPolicyId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/method_updatetags.go b/resource-manager/network/2022-09-01/ddoscustompolicies/method_updatetags.go deleted file mode 100644 index 287538aa3c8..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package ddoscustompolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DdosCustomPolicy -} - -// UpdateTags ... -func (c DdosCustomPoliciesClient) UpdateTags(ctx context.Context, id DdosCustomPolicyId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/model_ddoscustompolicy.go b/resource-manager/network/2022-09-01/ddoscustompolicies/model_ddoscustompolicy.go deleted file mode 100644 index 21c20585880..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/model_ddoscustompolicy.go +++ /dev/null @@ -1,14 +0,0 @@ -package ddoscustompolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosCustomPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/model_ddoscustompolicypropertiesformat.go b/resource-manager/network/2022-09-01/ddoscustompolicies/model_ddoscustompolicypropertiesformat.go deleted file mode 100644 index fad59051390..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/model_ddoscustompolicypropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package ddoscustompolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosCustomPolicyPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/model_tagsobject.go b/resource-manager/network/2022-09-01/ddoscustompolicies/model_tagsobject.go deleted file mode 100644 index 3b93ba90100..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package ddoscustompolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ddoscustompolicies/version.go b/resource-manager/network/2022-09-01/ddoscustompolicies/version.go deleted file mode 100644 index a166cae5202..00000000000 --- a/resource-manager/network/2022-09-01/ddoscustompolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package ddoscustompolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddoscustompolicies/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/README.md b/resource-manager/network/2022-09-01/ddosprotectionplans/README.md deleted file mode 100644 index 2d0505b5ac3..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ddosprotectionplans` Documentation - -The `ddosprotectionplans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ddosprotectionplans" -``` - - -### Client Initialization - -```go -client := ddosprotectionplans.NewDdosProtectionPlansClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DdosProtectionPlansClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - -payload := ddosprotectionplans.DdosProtectionPlan{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DdosProtectionPlansClient.Delete` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DdosProtectionPlansClient.Get` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DdosProtectionPlansClient.List` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DdosProtectionPlansClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DdosProtectionPlansClient.UpdateTags` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - -payload := ddosprotectionplans.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/client.go b/resource-manager/network/2022-09-01/ddosprotectionplans/client.go deleted file mode 100644 index df2917fd5cf..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package ddosprotectionplans - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionPlansClient struct { - Client *resourcemanager.Client -} - -func NewDdosProtectionPlansClientWithBaseURI(api environments.Api) (*DdosProtectionPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "ddosprotectionplans", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DdosProtectionPlansClient: %+v", err) - } - - return &DdosProtectionPlansClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/constants.go b/resource-manager/network/2022-09-01/ddosprotectionplans/constants.go deleted file mode 100644 index ec2a63ded59..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package ddosprotectionplans - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/id_ddosprotectionplan.go b/resource-manager/network/2022-09-01/ddosprotectionplans/id_ddosprotectionplan.go deleted file mode 100644 index 24d6a8f8f24..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/id_ddosprotectionplan.go +++ /dev/null @@ -1,127 +0,0 @@ -package ddosprotectionplans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DdosProtectionPlanId{} - -// DdosProtectionPlanId is a struct representing the Resource ID for a Ddos Protection Plan -type DdosProtectionPlanId struct { - SubscriptionId string - ResourceGroupName string - DdosProtectionPlanName string -} - -// NewDdosProtectionPlanID returns a new DdosProtectionPlanId struct -func NewDdosProtectionPlanID(subscriptionId string, resourceGroupName string, ddosProtectionPlanName string) DdosProtectionPlanId { - return DdosProtectionPlanId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - DdosProtectionPlanName: ddosProtectionPlanName, - } -} - -// ParseDdosProtectionPlanID parses 'input' into a DdosProtectionPlanId -func ParseDdosProtectionPlanID(input string) (*DdosProtectionPlanId, error) { - parser := resourceids.NewParserFromResourceIdType(DdosProtectionPlanId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DdosProtectionPlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosProtectionPlanName, ok = parsed.Parsed["ddosProtectionPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosProtectionPlanName", *parsed) - } - - return &id, nil -} - -// ParseDdosProtectionPlanIDInsensitively parses 'input' case-insensitively into a DdosProtectionPlanId -// note: this method should only be used for API response data and not user input -func ParseDdosProtectionPlanIDInsensitively(input string) (*DdosProtectionPlanId, error) { - parser := resourceids.NewParserFromResourceIdType(DdosProtectionPlanId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DdosProtectionPlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosProtectionPlanName, ok = parsed.Parsed["ddosProtectionPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosProtectionPlanName", *parsed) - } - - return &id, nil -} - -// ValidateDdosProtectionPlanID checks that 'input' can be parsed as a Ddos Protection Plan ID -func ValidateDdosProtectionPlanID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDdosProtectionPlanID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Ddos Protection Plan ID -func (id DdosProtectionPlanId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/ddosProtectionPlans/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DdosProtectionPlanName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Ddos Protection Plan ID -func (id DdosProtectionPlanId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticDdosProtectionPlans", "ddosProtectionPlans", "ddosProtectionPlans"), - resourceids.UserSpecifiedSegment("ddosProtectionPlanName", "ddosProtectionPlanValue"), - } -} - -// String returns a human-readable description of this Ddos Protection Plan ID -func (id DdosProtectionPlanId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Ddos Protection Plan Name: %q", id.DdosProtectionPlanName), - } - return fmt.Sprintf("Ddos Protection Plan (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/id_ddosprotectionplan_test.go b/resource-manager/network/2022-09-01/ddosprotectionplans/id_ddosprotectionplan_test.go deleted file mode 100644 index 061b10bc0fa..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/id_ddosprotectionplan_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package ddosprotectionplans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DdosProtectionPlanId{} - -func TestNewDdosProtectionPlanID(t *testing.T) { - id := NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.DdosProtectionPlanName != "ddosProtectionPlanValue" { - t.Fatalf("Expected %q but got %q for Segment 'DdosProtectionPlanName'", id.DdosProtectionPlanName, "ddosProtectionPlanValue") - } -} - -func TestFormatDdosProtectionPlanID(t *testing.T) { - actual := NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseDdosProtectionPlanID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DdosProtectionPlanId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue", - Expected: &DdosProtectionPlanId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DdosProtectionPlanName: "ddosProtectionPlanValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDdosProtectionPlanID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DdosProtectionPlanName != v.Expected.DdosProtectionPlanName { - t.Fatalf("Expected %q but got %q for DdosProtectionPlanName", v.Expected.DdosProtectionPlanName, actual.DdosProtectionPlanName) - } - - } -} - -func TestParseDdosProtectionPlanIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DdosProtectionPlanId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoSpRoTeCtIoNpLaNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue", - Expected: &DdosProtectionPlanId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DdosProtectionPlanName: "ddosProtectionPlanValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoSpRoTeCtIoNpLaNs/dDoSpRoTeCtIoNpLaNvAlUe", - Expected: &DdosProtectionPlanId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - DdosProtectionPlanName: "dDoSpRoTeCtIoNpLaNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoSpRoTeCtIoNpLaNs/dDoSpRoTeCtIoNpLaNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDdosProtectionPlanIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DdosProtectionPlanName != v.Expected.DdosProtectionPlanName { - t.Fatalf("Expected %q but got %q for DdosProtectionPlanName", v.Expected.DdosProtectionPlanName, actual.DdosProtectionPlanName) - } - - } -} - -func TestSegmentsForDdosProtectionPlanId(t *testing.T) { - segments := DdosProtectionPlanId{}.Segments() - if len(segments) == 0 { - t.Fatalf("DdosProtectionPlanId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/method_createorupdate.go b/resource-manager/network/2022-09-01/ddosprotectionplans/method_createorupdate.go deleted file mode 100644 index 9bf1d6b0a4a..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, id DdosProtectionPlanId, input DdosProtectionPlan) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c DdosProtectionPlansClient) CreateOrUpdateThenPoll(ctx context.Context, id DdosProtectionPlanId, input DdosProtectionPlan) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/method_delete.go b/resource-manager/network/2022-09-01/ddosprotectionplans/method_delete.go deleted file mode 100644 index 43d058cf8b8..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c DdosProtectionPlansClient) Delete(ctx context.Context, id DdosProtectionPlanId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c DdosProtectionPlansClient) DeleteThenPoll(ctx context.Context, id DdosProtectionPlanId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/method_get.go b/resource-manager/network/2022-09-01/ddosprotectionplans/method_get.go deleted file mode 100644 index 41e842df975..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DdosProtectionPlan -} - -// Get ... -func (c DdosProtectionPlansClient) Get(ctx context.Context, id DdosProtectionPlanId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/method_list.go b/resource-manager/network/2022-09-01/ddosprotectionplans/method_list.go deleted file mode 100644 index 25e4384d481..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DdosProtectionPlan -} - -type ListCompleteResult struct { - Items []DdosProtectionPlan -} - -// List ... -func (c DdosProtectionPlansClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ddosProtectionPlans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DdosProtectionPlan `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c DdosProtectionPlansClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, DdosProtectionPlanOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DdosProtectionPlansClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DdosProtectionPlanOperationPredicate) (result ListCompleteResult, err error) { - items := make([]DdosProtectionPlan, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/ddosprotectionplans/method_listbyresourcegroup.go deleted file mode 100644 index 8d293a4a99e..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DdosProtectionPlan -} - -type ListByResourceGroupCompleteResult struct { - Items []DdosProtectionPlan -} - -// ListByResourceGroup ... -func (c DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ddosProtectionPlans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DdosProtectionPlan `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DdosProtectionPlanOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DdosProtectionPlansClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DdosProtectionPlanOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]DdosProtectionPlan, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/method_updatetags.go b/resource-manager/network/2022-09-01/ddosprotectionplans/method_updatetags.go deleted file mode 100644 index 1426567ca75..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DdosProtectionPlan -} - -// UpdateTags ... -func (c DdosProtectionPlansClient) UpdateTags(ctx context.Context, id DdosProtectionPlanId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/model_ddosprotectionplan.go b/resource-manager/network/2022-09-01/ddosprotectionplans/model_ddosprotectionplan.go deleted file mode 100644 index 3313192e51b..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/model_ddosprotectionplan.go +++ /dev/null @@ -1,14 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionPlan struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/model_ddosprotectionplanpropertiesformat.go b/resource-manager/network/2022-09-01/ddosprotectionplans/model_ddosprotectionplanpropertiesformat.go deleted file mode 100644 index b1f0f51665d..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/model_ddosprotectionplanpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionPlanPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/model_subresource.go b/resource-manager/network/2022-09-01/ddosprotectionplans/model_subresource.go deleted file mode 100644 index 066803386d8..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/model_tagsobject.go b/resource-manager/network/2022-09-01/ddosprotectionplans/model_tagsobject.go deleted file mode 100644 index 99bf4d851b5..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/predicates.go b/resource-manager/network/2022-09-01/ddosprotectionplans/predicates.go deleted file mode 100644 index 6ad9bbf5374..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionPlanOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p DdosProtectionPlanOperationPredicate) Matches(input DdosProtectionPlan) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/ddosprotectionplans/version.go b/resource-manager/network/2022-09-01/ddosprotectionplans/version.go deleted file mode 100644 index 4019b2de21f..00000000000 --- a/resource-manager/network/2022-09-01/ddosprotectionplans/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package ddosprotectionplans - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddosprotectionplans/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/README.md b/resource-manager/network/2022-09-01/dscpconfiguration/README.md deleted file mode 100644 index 1bed0abf95a..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/README.md +++ /dev/null @@ -1,65 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/dscpconfiguration` Documentation - -The `dscpconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/dscpconfiguration" -``` - - -### Client Initialization - -```go -client := dscpconfiguration.NewDscpConfigurationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DscpConfigurationClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := dscpconfiguration.NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue") - -payload := dscpconfiguration.DscpConfiguration{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DscpConfigurationClient.Delete` - -```go -ctx := context.TODO() -id := dscpconfiguration.NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DscpConfigurationClient.Get` - -```go -ctx := context.TODO() -id := dscpconfiguration.NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/client.go b/resource-manager/network/2022-09-01/dscpconfiguration/client.go deleted file mode 100644 index dd1ba400a66..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package dscpconfiguration - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationClient struct { - Client *resourcemanager.Client -} - -func NewDscpConfigurationClientWithBaseURI(api environments.Api) (*DscpConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "dscpconfiguration", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DscpConfigurationClient: %+v", err) - } - - return &DscpConfigurationClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/constants.go b/resource-manager/network/2022-09-01/dscpconfiguration/constants.go deleted file mode 100644 index ef9b17da642..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/constants.go +++ /dev/null @@ -1,1075 +0,0 @@ -package dscpconfiguration - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProtocolType string - -const ( - ProtocolTypeAh ProtocolType = "Ah" - ProtocolTypeAll ProtocolType = "All" - ProtocolTypeDoNotUse ProtocolType = "DoNotUse" - ProtocolTypeEsp ProtocolType = "Esp" - ProtocolTypeGre ProtocolType = "Gre" - ProtocolTypeIcmp ProtocolType = "Icmp" - ProtocolTypeTcp ProtocolType = "Tcp" - ProtocolTypeUdp ProtocolType = "Udp" - ProtocolTypeVxlan ProtocolType = "Vxlan" -) - -func PossibleValuesForProtocolType() []string { - return []string{ - string(ProtocolTypeAh), - string(ProtocolTypeAll), - string(ProtocolTypeDoNotUse), - string(ProtocolTypeEsp), - string(ProtocolTypeGre), - string(ProtocolTypeIcmp), - string(ProtocolTypeTcp), - string(ProtocolTypeUdp), - string(ProtocolTypeVxlan), - } -} - -func (s *ProtocolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProtocolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProtocolType(input string) (*ProtocolType, error) { - vals := map[string]ProtocolType{ - "ah": ProtocolTypeAh, - "all": ProtocolTypeAll, - "donotuse": ProtocolTypeDoNotUse, - "esp": ProtocolTypeEsp, - "gre": ProtocolTypeGre, - "icmp": ProtocolTypeIcmp, - "tcp": ProtocolTypeTcp, - "udp": ProtocolTypeUdp, - "vxlan": ProtocolTypeVxlan, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProtocolType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/id_dscpconfiguration.go b/resource-manager/network/2022-09-01/dscpconfiguration/id_dscpconfiguration.go deleted file mode 100644 index 4f0d024833c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/id_dscpconfiguration.go +++ /dev/null @@ -1,127 +0,0 @@ -package dscpconfiguration - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DscpConfigurationId{} - -// DscpConfigurationId is a struct representing the Resource ID for a Dscp Configuration -type DscpConfigurationId struct { - SubscriptionId string - ResourceGroupName string - DscpConfigurationName string -} - -// NewDscpConfigurationID returns a new DscpConfigurationId struct -func NewDscpConfigurationID(subscriptionId string, resourceGroupName string, dscpConfigurationName string) DscpConfigurationId { - return DscpConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - DscpConfigurationName: dscpConfigurationName, - } -} - -// ParseDscpConfigurationID parses 'input' into a DscpConfigurationId -func ParseDscpConfigurationID(input string) (*DscpConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(DscpConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DscpConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DscpConfigurationName, ok = parsed.Parsed["dscpConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dscpConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseDscpConfigurationIDInsensitively parses 'input' case-insensitively into a DscpConfigurationId -// note: this method should only be used for API response data and not user input -func ParseDscpConfigurationIDInsensitively(input string) (*DscpConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(DscpConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DscpConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DscpConfigurationName, ok = parsed.Parsed["dscpConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dscpConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateDscpConfigurationID checks that 'input' can be parsed as a Dscp Configuration ID -func ValidateDscpConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDscpConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Dscp Configuration ID -func (id DscpConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/dscpConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DscpConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Dscp Configuration ID -func (id DscpConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticDscpConfigurations", "dscpConfigurations", "dscpConfigurations"), - resourceids.UserSpecifiedSegment("dscpConfigurationName", "dscpConfigurationValue"), - } -} - -// String returns a human-readable description of this Dscp Configuration ID -func (id DscpConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Dscp Configuration Name: %q", id.DscpConfigurationName), - } - return fmt.Sprintf("Dscp Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/id_dscpconfiguration_test.go b/resource-manager/network/2022-09-01/dscpconfiguration/id_dscpconfiguration_test.go deleted file mode 100644 index d5bb2d22a28..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/id_dscpconfiguration_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package dscpconfiguration - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DscpConfigurationId{} - -func TestNewDscpConfigurationID(t *testing.T) { - id := NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.DscpConfigurationName != "dscpConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'DscpConfigurationName'", id.DscpConfigurationName, "dscpConfigurationValue") - } -} - -func TestFormatDscpConfigurationID(t *testing.T) { - actual := NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseDscpConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DscpConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue", - Expected: &DscpConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DscpConfigurationName: "dscpConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDscpConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DscpConfigurationName != v.Expected.DscpConfigurationName { - t.Fatalf("Expected %q but got %q for DscpConfigurationName", v.Expected.DscpConfigurationName, actual.DscpConfigurationName) - } - - } -} - -func TestParseDscpConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DscpConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dScPcOnFiGuRaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue", - Expected: &DscpConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DscpConfigurationName: "dscpConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dScPcOnFiGuRaTiOnS/dScPcOnFiGuRaTiOnVaLuE", - Expected: &DscpConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - DscpConfigurationName: "dScPcOnFiGuRaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dScPcOnFiGuRaTiOnS/dScPcOnFiGuRaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDscpConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DscpConfigurationName != v.Expected.DscpConfigurationName { - t.Fatalf("Expected %q but got %q for DscpConfigurationName", v.Expected.DscpConfigurationName, actual.DscpConfigurationName) - } - - } -} - -func TestSegmentsForDscpConfigurationId(t *testing.T) { - segments := DscpConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("DscpConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/method_createorupdate.go b/resource-manager/network/2022-09-01/dscpconfiguration/method_createorupdate.go deleted file mode 100644 index 541feca6849..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package dscpconfiguration - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c DscpConfigurationClient) CreateOrUpdate(ctx context.Context, id DscpConfigurationId, input DscpConfiguration) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c DscpConfigurationClient) CreateOrUpdateThenPoll(ctx context.Context, id DscpConfigurationId, input DscpConfiguration) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/method_delete.go b/resource-manager/network/2022-09-01/dscpconfiguration/method_delete.go deleted file mode 100644 index 85639c01f9b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package dscpconfiguration - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c DscpConfigurationClient) Delete(ctx context.Context, id DscpConfigurationId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c DscpConfigurationClient) DeleteThenPoll(ctx context.Context, id DscpConfigurationId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/method_get.go b/resource-manager/network/2022-09-01/dscpconfiguration/method_get.go deleted file mode 100644 index 2749ede127e..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package dscpconfiguration - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DscpConfiguration -} - -// Get ... -func (c DscpConfigurationClient) Get(ctx context.Context, id DscpConfigurationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 440846baae7..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 663b98879ff..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 5070a712a0c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewayipconfiguration.go deleted file mode 100644 index a3ca72a1804..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 2072ac671c8..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationsecuritygroup.go deleted file mode 100644 index 067b344a691..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 4a7009c2a6b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_backendaddresspool.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_backendaddresspool.go deleted file mode 100644 index fdc704e5a94..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 3e973574814..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 2a2e974962b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_ddossettings.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_ddossettings.go deleted file mode 100644 index dca2e7cd55f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_delegation.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_delegation.go deleted file mode 100644 index 8c1fa9b43c0..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_dscpconfiguration.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_dscpconfiguration.go deleted file mode 100644 index 04e403de3a4..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_dscpconfiguration.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *DscpConfigurationPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_dscpconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_dscpconfigurationpropertiesformat.go deleted file mode 100644 index 97130781ef7..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_dscpconfigurationpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationPropertiesFormat struct { - AssociatedNetworkInterfaces *[]NetworkInterface `json:"associatedNetworkInterfaces,omitempty"` - DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` - DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` - Markings *[]int64 `json:"markings,omitempty"` - Protocol *ProtocolType `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - QosCollectionId *string `json:"qosCollectionId,omitempty"` - QosDefinitionCollection *[]QosDefinition `json:"qosDefinitionCollection,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` - SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_flowlog.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_flowlog.go deleted file mode 100644 index f4d7ea329fc..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_flowlogformatparameters.go deleted file mode 100644 index f759162156c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_flowlogpropertiesformat.go deleted file mode 100644 index 71ebfa45fde..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_frontendipconfiguration.go deleted file mode 100644 index e5b91931aa4..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index cc67d340130..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index c498ae3b999..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_inboundnatrule.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_inboundnatrule.go deleted file mode 100644 index cae42b6f078..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 6ee4c243e27..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfiguration.go deleted file mode 100644 index b79aa52af20..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationprofile.go deleted file mode 100644 index 51858f8645f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1a288ffd425..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 1c2988eec98..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_iptag.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_iptag.go deleted file mode 100644 index f54e708d614..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_loadbalancerbackendaddress.go deleted file mode 100644 index cf9e4a0b97f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index f1b9e0732ac..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_natgateway.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_natgateway.go deleted file mode 100644 index bd2135c7219..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_natgatewaypropertiesformat.go deleted file mode 100644 index a748c883e51..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_natgatewaysku.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_natgatewaysku.go deleted file mode 100644 index 38065785ee7..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_natruleportmapping.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_natruleportmapping.go deleted file mode 100644 index 4f0a40c3c84..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterface.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterface.go deleted file mode 100644 index 2c8dff0b372..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacednssettings.go deleted file mode 100644 index db01e0a6931..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfiguration.go deleted file mode 100644 index cbe1f2ef1bc..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 1901cc2fecb..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 235a6d0bfc4..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 9cdc00b2066..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 9141e163666..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index b1504509e4c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networksecuritygroup.go deleted file mode 100644 index 79ddb5537a1..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 76177bde258..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpoint.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpoint.go deleted file mode 100644 index b8b7f950b24..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointconnection.go deleted file mode 100644 index f374ac95239..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointconnectionproperties.go deleted file mode 100644 index ca624354be3..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointipconfiguration.go deleted file mode 100644 index d15e9404362..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index fbd74e39c9c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointproperties.go deleted file mode 100644 index 9bddc7a4349..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkservice.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkservice.go deleted file mode 100644 index 3f4dea0d52f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnection.go deleted file mode 100644 index ca5cf780e20..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 7fa3b795937..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 003e73140c9..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 1a98c978c4e..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 298e27cde46..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceproperties.go deleted file mode 100644 index 1852ce3fa31..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddress.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddress.go deleted file mode 100644 index d57ce42d098..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddressdnssettings.go deleted file mode 100644 index a36b23f31ae..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 2745ba7952e..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddresssku.go deleted file mode 100644 index 184f29e9bf9..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_qosdefinition.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_qosdefinition.go deleted file mode 100644 index ad3c5e88a17..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_qosdefinition.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosDefinition struct { - DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` - DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` - Markings *[]int64 `json:"markings,omitempty"` - Protocol *ProtocolType `json:"protocol,omitempty"` - SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` - SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_qosiprange.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_qosiprange.go deleted file mode 100644 index 9de17d31fd5..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_qosiprange.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosIPRange struct { - EndIP *string `json:"endIP,omitempty"` - StartIP *string `json:"startIP,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_qosportrange.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_qosportrange.go deleted file mode 100644 index fec0d277115..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_qosportrange.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosPortRange struct { - End *int64 `json:"end,omitempty"` - Start *int64 `json:"start,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_resourcenavigationlink.go deleted file mode 100644 index e5b6bc9921c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_resourcenavigationlinkformat.go deleted file mode 100644 index 7119a8ad8fd..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_resourceset.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_resourceset.go deleted file mode 100644 index eb8146e0601..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_retentionpolicyparameters.go deleted file mode 100644 index 73bc84cb5f0..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_route.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_route.go deleted file mode 100644 index 43d479a10b9..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_routepropertiesformat.go deleted file mode 100644 index f0ba5752c84..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_routetable.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_routetable.go deleted file mode 100644 index ffa38a33f5c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_routetablepropertiesformat.go deleted file mode 100644 index f2d7db2da04..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_securityrule.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_securityrule.go deleted file mode 100644 index 670a04f125b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_securityrulepropertiesformat.go deleted file mode 100644 index 313bad92221..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceassociationlink.go deleted file mode 100644 index 51b7b88b0b4..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index e74136ad481..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_servicedelegationpropertiesformat.go deleted file mode 100644 index ee33b9b67db..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicy.go deleted file mode 100644 index a4c7c550a6c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicydefinition.go deleted file mode 100644 index d902694b0cc..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index acf884117e3..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 94a2649c90d..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 638a6d73f52..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_subnet.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_subnet.go deleted file mode 100644 index 0c94d71385f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_subnetpropertiesformat.go deleted file mode 100644 index 2321b7e8d12..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_subresource.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_subresource.go deleted file mode 100644 index 16bee506d8d..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 84d2f9e07a1..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_trafficanalyticsproperties.go deleted file mode 100644 index a1e61262ce4..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_virtualnetworktap.go deleted file mode 100644 index 6b0b8a746c6..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfiguration/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index cbbb01641bc..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfiguration/version.go b/resource-manager/network/2022-09-01/dscpconfiguration/version.go deleted file mode 100644 index 454a29c973e..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfiguration/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfiguration/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/README.md b/resource-manager/network/2022-09-01/dscpconfigurations/README.md deleted file mode 100644 index f2632447bc3..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/dscpconfigurations` Documentation - -The `dscpconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/dscpconfigurations" -``` - - -### Client Initialization - -```go -client := dscpconfigurations.NewDscpConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DscpConfigurationsClient.DscpConfigurationList` - -```go -ctx := context.TODO() -id := dscpconfigurations.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.DscpConfigurationList(ctx, id)` can be used to do batched pagination -items, err := client.DscpConfigurationListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DscpConfigurationsClient.DscpConfigurationListAll` - -```go -ctx := context.TODO() -id := dscpconfigurations.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.DscpConfigurationListAll(ctx, id)` can be used to do batched pagination -items, err := client.DscpConfigurationListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/client.go b/resource-manager/network/2022-09-01/dscpconfigurations/client.go deleted file mode 100644 index 23c3e89b48f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package dscpconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewDscpConfigurationsClientWithBaseURI(api environments.Api) (*DscpConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "dscpconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DscpConfigurationsClient: %+v", err) - } - - return &DscpConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/constants.go b/resource-manager/network/2022-09-01/dscpconfigurations/constants.go deleted file mode 100644 index cf6addd5672..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/constants.go +++ /dev/null @@ -1,1075 +0,0 @@ -package dscpconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProtocolType string - -const ( - ProtocolTypeAh ProtocolType = "Ah" - ProtocolTypeAll ProtocolType = "All" - ProtocolTypeDoNotUse ProtocolType = "DoNotUse" - ProtocolTypeEsp ProtocolType = "Esp" - ProtocolTypeGre ProtocolType = "Gre" - ProtocolTypeIcmp ProtocolType = "Icmp" - ProtocolTypeTcp ProtocolType = "Tcp" - ProtocolTypeUdp ProtocolType = "Udp" - ProtocolTypeVxlan ProtocolType = "Vxlan" -) - -func PossibleValuesForProtocolType() []string { - return []string{ - string(ProtocolTypeAh), - string(ProtocolTypeAll), - string(ProtocolTypeDoNotUse), - string(ProtocolTypeEsp), - string(ProtocolTypeGre), - string(ProtocolTypeIcmp), - string(ProtocolTypeTcp), - string(ProtocolTypeUdp), - string(ProtocolTypeVxlan), - } -} - -func (s *ProtocolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProtocolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProtocolType(input string) (*ProtocolType, error) { - vals := map[string]ProtocolType{ - "ah": ProtocolTypeAh, - "all": ProtocolTypeAll, - "donotuse": ProtocolTypeDoNotUse, - "esp": ProtocolTypeEsp, - "gre": ProtocolTypeGre, - "icmp": ProtocolTypeIcmp, - "tcp": ProtocolTypeTcp, - "udp": ProtocolTypeUdp, - "vxlan": ProtocolTypeVxlan, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProtocolType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/method_dscpconfigurationlist.go b/resource-manager/network/2022-09-01/dscpconfigurations/method_dscpconfigurationlist.go deleted file mode 100644 index 853bbcc22f3..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/method_dscpconfigurationlist.go +++ /dev/null @@ -1,90 +0,0 @@ -package dscpconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DscpConfiguration -} - -type DscpConfigurationListCompleteResult struct { - Items []DscpConfiguration -} - -// DscpConfigurationList ... -func (c DscpConfigurationsClient) DscpConfigurationList(ctx context.Context, id commonids.ResourceGroupId) (result DscpConfigurationListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/dscpConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DscpConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// DscpConfigurationListComplete retrieves all the results into a single object -func (c DscpConfigurationsClient) DscpConfigurationListComplete(ctx context.Context, id commonids.ResourceGroupId) (DscpConfigurationListCompleteResult, error) { - return c.DscpConfigurationListCompleteMatchingPredicate(ctx, id, DscpConfigurationOperationPredicate{}) -} - -// DscpConfigurationListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DscpConfigurationsClient) DscpConfigurationListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DscpConfigurationOperationPredicate) (result DscpConfigurationListCompleteResult, err error) { - items := make([]DscpConfiguration, 0) - - resp, err := c.DscpConfigurationList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = DscpConfigurationListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/method_dscpconfigurationlistall.go b/resource-manager/network/2022-09-01/dscpconfigurations/method_dscpconfigurationlistall.go deleted file mode 100644 index bff5d5a2a9b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/method_dscpconfigurationlistall.go +++ /dev/null @@ -1,90 +0,0 @@ -package dscpconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DscpConfiguration -} - -type DscpConfigurationListAllCompleteResult struct { - Items []DscpConfiguration -} - -// DscpConfigurationListAll ... -func (c DscpConfigurationsClient) DscpConfigurationListAll(ctx context.Context, id commonids.SubscriptionId) (result DscpConfigurationListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/dscpConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DscpConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// DscpConfigurationListAllComplete retrieves all the results into a single object -func (c DscpConfigurationsClient) DscpConfigurationListAllComplete(ctx context.Context, id commonids.SubscriptionId) (DscpConfigurationListAllCompleteResult, error) { - return c.DscpConfigurationListAllCompleteMatchingPredicate(ctx, id, DscpConfigurationOperationPredicate{}) -} - -// DscpConfigurationListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DscpConfigurationsClient) DscpConfigurationListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DscpConfigurationOperationPredicate) (result DscpConfigurationListAllCompleteResult, err error) { - items := make([]DscpConfiguration, 0) - - resp, err := c.DscpConfigurationListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = DscpConfigurationListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddress.go deleted file mode 100644 index b7b1e084f2c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 2ee5c1c3577..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index e420a9bdc67..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 1c532c8b751..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 461f708325f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationsecuritygroup.go deleted file mode 100644 index 7c885418df4..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 06db97d0e6f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_backendaddresspool.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_backendaddresspool.go deleted file mode 100644 index 9063fe9528b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index b2db6065b70..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 29791c2c31f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_ddossettings.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_ddossettings.go deleted file mode 100644 index 0a6ba1cc0f5..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_delegation.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_delegation.go deleted file mode 100644 index 3db69c6181a..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_dscpconfiguration.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_dscpconfiguration.go deleted file mode 100644 index addfd61ed3c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_dscpconfiguration.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *DscpConfigurationPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_dscpconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_dscpconfigurationpropertiesformat.go deleted file mode 100644 index 3de3861ee9e..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_dscpconfigurationpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationPropertiesFormat struct { - AssociatedNetworkInterfaces *[]NetworkInterface `json:"associatedNetworkInterfaces,omitempty"` - DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` - DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` - Markings *[]int64 `json:"markings,omitempty"` - Protocol *ProtocolType `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - QosCollectionId *string `json:"qosCollectionId,omitempty"` - QosDefinitionCollection *[]QosDefinition `json:"qosDefinitionCollection,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` - SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_flowlog.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_flowlog.go deleted file mode 100644 index b06c467c3bc..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_flowlogformatparameters.go deleted file mode 100644 index c2ca6492542..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_flowlogpropertiesformat.go deleted file mode 100644 index 70fecb2d852..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_frontendipconfiguration.go deleted file mode 100644 index 55b02b251ca..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 04b3e1aafc3..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index fba1a411047..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_inboundnatrule.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_inboundnatrule.go deleted file mode 100644 index b60bfcd7088..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 598cd5d43a5..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfiguration.go deleted file mode 100644 index 2532732b5b2..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationprofile.go deleted file mode 100644 index ce6d532c39b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index afde579aaa3..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index c5919fd2db3..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_iptag.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_iptag.go deleted file mode 100644 index f38ed9d8c65..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_loadbalancerbackendaddress.go deleted file mode 100644 index 7ad5779c262..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 313080c155c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_natgateway.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_natgateway.go deleted file mode 100644 index 64ee487573f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_natgatewaypropertiesformat.go deleted file mode 100644 index d6a3124790e..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_natgatewaysku.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_natgatewaysku.go deleted file mode 100644 index f13dbd3d8fa..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_natruleportmapping.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_natruleportmapping.go deleted file mode 100644 index 4f09709144d..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterface.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterface.go deleted file mode 100644 index 0b5454d16ca..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacednssettings.go deleted file mode 100644 index 11f9a45a307..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfiguration.go deleted file mode 100644 index d4cb1b886b6..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 0b175cf4025..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 483630c9a12..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 9e602b5b837..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 134cf5c3661..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index f77ecd6167d..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networksecuritygroup.go deleted file mode 100644 index f9ea08d3a85..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 0cac57de47f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpoint.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpoint.go deleted file mode 100644 index 0e5fb891d8c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointconnection.go deleted file mode 100644 index 64a8a54e559..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointconnectionproperties.go deleted file mode 100644 index 85fd55f5a6b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointipconfiguration.go deleted file mode 100644 index cee431f3b19..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 8ffd50d3002..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointproperties.go deleted file mode 100644 index b098e9d6023..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkservice.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkservice.go deleted file mode 100644 index 60b183ef94a..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnection.go deleted file mode 100644 index 963c255ab64..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 9f2e27f4720..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 3662d04a08f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index d0932cbb597..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index b471f35042f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceproperties.go deleted file mode 100644 index 0054e8840ee..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddress.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddress.go deleted file mode 100644 index 4fc95713929..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddressdnssettings.go deleted file mode 100644 index 744f8e15385..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddresspropertiesformat.go deleted file mode 100644 index b1758ec95ac..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddresssku.go deleted file mode 100644 index a429ae17ad7..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_qosdefinition.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_qosdefinition.go deleted file mode 100644 index c578549b24d..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_qosdefinition.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosDefinition struct { - DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` - DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` - Markings *[]int64 `json:"markings,omitempty"` - Protocol *ProtocolType `json:"protocol,omitempty"` - SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` - SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_qosiprange.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_qosiprange.go deleted file mode 100644 index a7109f45e97..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_qosiprange.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosIPRange struct { - EndIP *string `json:"endIP,omitempty"` - StartIP *string `json:"startIP,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_qosportrange.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_qosportrange.go deleted file mode 100644 index 1c241e416d6..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_qosportrange.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosPortRange struct { - End *int64 `json:"end,omitempty"` - Start *int64 `json:"start,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_resourcenavigationlink.go deleted file mode 100644 index a441a261d0b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_resourcenavigationlinkformat.go deleted file mode 100644 index 42c361f9ff9..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_resourceset.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_resourceset.go deleted file mode 100644 index 36c2929fe5c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_retentionpolicyparameters.go deleted file mode 100644 index 6cb1197a4d8..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_route.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_route.go deleted file mode 100644 index 58b9462885c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_routepropertiesformat.go deleted file mode 100644 index 57d611a55aa..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_routetable.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_routetable.go deleted file mode 100644 index 3c19f2937d7..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_routetablepropertiesformat.go deleted file mode 100644 index 8d9f9c65d1c..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_securityrule.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_securityrule.go deleted file mode 100644 index eefb302d3d0..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_securityrulepropertiesformat.go deleted file mode 100644 index d43f1f5f3b1..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceassociationlink.go deleted file mode 100644 index e968a6667b0..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 3756e4aca2b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 4576bcc01d0..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicy.go deleted file mode 100644 index e1bf0604459..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 9693e4de6b7..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index c277cb3ff86..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 31009213cca..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpropertiesformat.go deleted file mode 100644 index a134bda64bd..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_subnet.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_subnet.go deleted file mode 100644 index 6c58caf5de4..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_subnetpropertiesformat.go deleted file mode 100644 index 6fc0633d4d9..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_subresource.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_subresource.go deleted file mode 100644 index f4f23a8234b..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index f9dd4dab77f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_trafficanalyticsproperties.go deleted file mode 100644 index 6e509b308b5..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_virtualnetworktap.go deleted file mode 100644 index ae0f9ad6412..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/dscpconfigurations/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index bc1c19bd39f..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/predicates.go b/resource-manager/network/2022-09-01/dscpconfigurations/predicates.go deleted file mode 100644 index 7628df6beb6..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p DscpConfigurationOperationPredicate) Matches(input DscpConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/dscpconfigurations/version.go b/resource-manager/network/2022-09-01/dscpconfigurations/version.go deleted file mode 100644 index 0f6850a1b3d..00000000000 --- a/resource-manager/network/2022-09-01/dscpconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/endpointservices/README.md b/resource-manager/network/2022-09-01/endpointservices/README.md deleted file mode 100644 index 090fc14dc37..00000000000 --- a/resource-manager/network/2022-09-01/endpointservices/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/endpointservices` Documentation - -The `endpointservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/endpointservices" -``` - - -### Client Initialization - -```go -client := endpointservices.NewEndpointServicesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `EndpointServicesClient.AvailableEndpointServicesList` - -```go -ctx := context.TODO() -id := endpointservices.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailableEndpointServicesList(ctx, id)` can be used to do batched pagination -items, err := client.AvailableEndpointServicesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/endpointservices/client.go b/resource-manager/network/2022-09-01/endpointservices/client.go deleted file mode 100644 index 2cf01f43cdd..00000000000 --- a/resource-manager/network/2022-09-01/endpointservices/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package endpointservices - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EndpointServicesClient struct { - Client *resourcemanager.Client -} - -func NewEndpointServicesClientWithBaseURI(api environments.Api) (*EndpointServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "endpointservices", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EndpointServicesClient: %+v", err) - } - - return &EndpointServicesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/endpointservices/id_location.go b/resource-manager/network/2022-09-01/endpointservices/id_location.go deleted file mode 100644 index cb3d2ffd4c8..00000000000 --- a/resource-manager/network/2022-09-01/endpointservices/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package endpointservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/endpointservices/id_location_test.go b/resource-manager/network/2022-09-01/endpointservices/id_location_test.go deleted file mode 100644 index 5bb6cb407b3..00000000000 --- a/resource-manager/network/2022-09-01/endpointservices/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package endpointservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/endpointservices/method_availableendpointserviceslist.go b/resource-manager/network/2022-09-01/endpointservices/method_availableendpointserviceslist.go deleted file mode 100644 index 42469b04dfc..00000000000 --- a/resource-manager/network/2022-09-01/endpointservices/method_availableendpointserviceslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package endpointservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableEndpointServicesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]EndpointServiceResult -} - -type AvailableEndpointServicesListCompleteResult struct { - Items []EndpointServiceResult -} - -// AvailableEndpointServicesList ... -func (c EndpointServicesClient) AvailableEndpointServicesList(ctx context.Context, id LocationId) (result AvailableEndpointServicesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/virtualNetworkAvailableEndpointServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]EndpointServiceResult `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableEndpointServicesListComplete retrieves all the results into a single object -func (c EndpointServicesClient) AvailableEndpointServicesListComplete(ctx context.Context, id LocationId) (AvailableEndpointServicesListCompleteResult, error) { - return c.AvailableEndpointServicesListCompleteMatchingPredicate(ctx, id, EndpointServiceResultOperationPredicate{}) -} - -// AvailableEndpointServicesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EndpointServicesClient) AvailableEndpointServicesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate EndpointServiceResultOperationPredicate) (result AvailableEndpointServicesListCompleteResult, err error) { - items := make([]EndpointServiceResult, 0) - - resp, err := c.AvailableEndpointServicesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableEndpointServicesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/endpointservices/model_endpointserviceresult.go b/resource-manager/network/2022-09-01/endpointservices/model_endpointserviceresult.go deleted file mode 100644 index eae6c698d45..00000000000 --- a/resource-manager/network/2022-09-01/endpointservices/model_endpointserviceresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package endpointservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EndpointServiceResult struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/endpointservices/predicates.go b/resource-manager/network/2022-09-01/endpointservices/predicates.go deleted file mode 100644 index 9a5ec06a288..00000000000 --- a/resource-manager/network/2022-09-01/endpointservices/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package endpointservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EndpointServiceResultOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p EndpointServiceResultOperationPredicate) Matches(input EndpointServiceResult) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/endpointservices/version.go b/resource-manager/network/2022-09-01/endpointservices/version.go deleted file mode 100644 index 8ad6d1f5a51..00000000000 --- a/resource-manager/network/2022-09-01/endpointservices/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package endpointservices - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpointservices/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitarptable/README.md b/resource-manager/network/2022-09-01/expressroutecircuitarptable/README.md deleted file mode 100644 index 3c944f2c1b6..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitarptable/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitarptable` Documentation - -The `expressroutecircuitarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitarptable" -``` - - -### Client Initialization - -```go -client := expressroutecircuitarptable.NewExpressRouteCircuitArpTableClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitArpTableClient.ExpressRouteCircuitsListArpTable` - -```go -ctx := context.TODO() -id := expressroutecircuitarptable.NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue") - -if err := client.ExpressRouteCircuitsListArpTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecircuitarptable/client.go b/resource-manager/network/2022-09-01/expressroutecircuitarptable/client.go deleted file mode 100644 index daef3b62246..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitarptable/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitarptable - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitArpTableClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitArpTableClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitarptable", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitArpTableClient: %+v", err) - } - - return &ExpressRouteCircuitArpTableClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitarptable/id_arptable.go b/resource-manager/network/2022-09-01/expressroutecircuitarptable/id_arptable.go deleted file mode 100644 index 0771397d6bb..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitarptable/id_arptable.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecircuitarptable - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ArpTableId{} - -// ArpTableId is a struct representing the Resource ID for a Arp Table -type ArpTableId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - ArpTableName string -} - -// NewArpTableID returns a new ArpTableId struct -func NewArpTableID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, arpTableName string) ArpTableId { - return ArpTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - ArpTableName: arpTableName, - } -} - -// ParseArpTableID parses 'input' into a ArpTableId -func ParseArpTableID(input string) (*ArpTableId, error) { - parser := resourceids.NewParserFromResourceIdType(ArpTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) - } - - return &id, nil -} - -// ParseArpTableIDInsensitively parses 'input' case-insensitively into a ArpTableId -// note: this method should only be used for API response data and not user input -func ParseArpTableIDInsensitively(input string) (*ArpTableId, error) { - parser := resourceids.NewParserFromResourceIdType(ArpTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) - } - - return &id, nil -} - -// ValidateArpTableID checks that 'input' can be parsed as a Arp Table ID -func ValidateArpTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseArpTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Arp Table ID -func (id ArpTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/arpTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.ArpTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Arp Table ID -func (id ArpTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticArpTables", "arpTables", "arpTables"), - resourceids.UserSpecifiedSegment("arpTableName", "arpTableValue"), - } -} - -// String returns a human-readable description of this Arp Table ID -func (id ArpTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Arp Table Name: %q", id.ArpTableName), - } - return fmt.Sprintf("Arp Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitarptable/id_arptable_test.go b/resource-manager/network/2022-09-01/expressroutecircuitarptable/id_arptable_test.go deleted file mode 100644 index 7e3bd95ef27..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitarptable/id_arptable_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecircuitarptable - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ArpTableId{} - -func TestNewArpTableID(t *testing.T) { - id := NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.ArpTableName != "arpTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'ArpTableName'", id.ArpTableName, "arpTableValue") - } -} - -func TestFormatArpTableID(t *testing.T) { - actual := NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseArpTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ArpTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue", - Expected: &ArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - ArpTableName: "arpTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseArpTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ArpTableName != v.Expected.ArpTableName { - t.Fatalf("Expected %q but got %q for ArpTableName", v.Expected.ArpTableName, actual.ArpTableName) - } - - } -} - -func TestParseArpTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ArpTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue", - Expected: &ArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - ArpTableName: "arpTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs/aRpTaBlEvAlUe", - Expected: &ArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - ArpTableName: "aRpTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs/aRpTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseArpTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ArpTableName != v.Expected.ArpTableName { - t.Fatalf("Expected %q but got %q for ArpTableName", v.Expected.ArpTableName, actual.ArpTableName) - } - - } -} - -func TestSegmentsForArpTableId(t *testing.T) { - segments := ArpTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ArpTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go b/resource-manager/network/2022-09-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go deleted file mode 100644 index 54e09f740ce..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecircuitarptable - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsListArpTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCircuitsListArpTable ... -func (c ExpressRouteCircuitArpTableClient) ExpressRouteCircuitsListArpTable(ctx context.Context, id ArpTableId) (result ExpressRouteCircuitsListArpTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCircuitsListArpTableThenPoll performs ExpressRouteCircuitsListArpTable then polls until it's completed -func (c ExpressRouteCircuitArpTableClient) ExpressRouteCircuitsListArpTableThenPoll(ctx context.Context, id ArpTableId) error { - result, err := c.ExpressRouteCircuitsListArpTable(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCircuitsListArpTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCircuitsListArpTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitarptable/model_expressroutecircuitarptable.go b/resource-manager/network/2022-09-01/expressroutecircuitarptable/model_expressroutecircuitarptable.go deleted file mode 100644 index 8b4183dd49f..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitarptable/model_expressroutecircuitarptable.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecircuitarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitArpTable struct { - Age *int64 `json:"age,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - Interface *string `json:"interface,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2022-09-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index a6f3b3f86f5..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitarptable/version.go b/resource-manager/network/2022-09-01/expressroutecircuitarptable/version.go deleted file mode 100644 index 5e65aaff067..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitarptable/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitarptable - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitarptable/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/README.md b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/README.md deleted file mode 100644 index 3ce57b6f6c5..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitauthorizations` Documentation - -The `expressroutecircuitauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitauthorizations" -``` - - -### Client Initialization - -```go -client := expressroutecircuitauthorizations.NewExpressRouteCircuitAuthorizationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecircuitauthorizations.NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue") - -payload := expressroutecircuitauthorizations.ExpressRouteCircuitAuthorization{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitAuthorizationsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecircuitauthorizations.NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitAuthorizationsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecircuitauthorizations.NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitAuthorizationsClient.List` - -```go -ctx := context.TODO() -id := expressroutecircuitauthorizations.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/client.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/client.go deleted file mode 100644 index 8ee64242c49..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitAuthorizationsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitauthorizations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitAuthorizationsClient: %+v", err) - } - - return &ExpressRouteCircuitAuthorizationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/constants.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/constants.go deleted file mode 100644 index 052d235a64f..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthorizationUseStatus string - -const ( - AuthorizationUseStatusAvailable AuthorizationUseStatus = "Available" - AuthorizationUseStatusInUse AuthorizationUseStatus = "InUse" -) - -func PossibleValuesForAuthorizationUseStatus() []string { - return []string{ - string(AuthorizationUseStatusAvailable), - string(AuthorizationUseStatusInUse), - } -} - -func (s *AuthorizationUseStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthorizationUseStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthorizationUseStatus(input string) (*AuthorizationUseStatus, error) { - vals := map[string]AuthorizationUseStatus{ - "available": AuthorizationUseStatusAvailable, - "inuse": AuthorizationUseStatusInUse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthorizationUseStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_authorization.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_authorization.go deleted file mode 100644 index 614f1572fa7..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_authorization.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AuthorizationId{} - -// AuthorizationId is a struct representing the Resource ID for a Authorization -type AuthorizationId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - AuthorizationName string -} - -// NewAuthorizationID returns a new AuthorizationId struct -func NewAuthorizationID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, authorizationName string) AuthorizationId { - return AuthorizationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - AuthorizationName: authorizationName, - } -} - -// ParseAuthorizationID parses 'input' into a AuthorizationId -func ParseAuthorizationID(input string) (*AuthorizationId, error) { - parser := resourceids.NewParserFromResourceIdType(AuthorizationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) - } - - return &id, nil -} - -// ParseAuthorizationIDInsensitively parses 'input' case-insensitively into a AuthorizationId -// note: this method should only be used for API response data and not user input -func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { - parser := resourceids.NewParserFromResourceIdType(AuthorizationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) - } - - return &id, nil -} - -// ValidateAuthorizationID checks that 'input' can be parsed as a Authorization ID -func ValidateAuthorizationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAuthorizationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Authorization ID -func (id AuthorizationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/authorizations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.AuthorizationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Authorization ID -func (id AuthorizationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticAuthorizations", "authorizations", "authorizations"), - resourceids.UserSpecifiedSegment("authorizationName", "authorizationValue"), - } -} - -// String returns a human-readable description of this Authorization ID -func (id AuthorizationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Authorization Name: %q", id.AuthorizationName), - } - return fmt.Sprintf("Authorization (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_authorization_test.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_authorization_test.go deleted file mode 100644 index ce2bf236ad0..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_authorization_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AuthorizationId{} - -func TestNewAuthorizationID(t *testing.T) { - id := NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.AuthorizationName != "authorizationValue" { - t.Fatalf("Expected %q but got %q for Segment 'AuthorizationName'", id.AuthorizationName, "authorizationValue") - } -} - -func TestFormatAuthorizationID(t *testing.T) { - actual := NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseAuthorizationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AuthorizationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue", - Expected: &AuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - AuthorizationName: "authorizationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAuthorizationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.AuthorizationName != v.Expected.AuthorizationName { - t.Fatalf("Expected %q but got %q for AuthorizationName", v.Expected.AuthorizationName, actual.AuthorizationName) - } - - } -} - -func TestParseAuthorizationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AuthorizationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/aUtHoRiZaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue", - Expected: &AuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - AuthorizationName: "authorizationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/aUtHoRiZaTiOnS/aUtHoRiZaTiOnVaLuE", - Expected: &AuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - AuthorizationName: "aUtHoRiZaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/aUtHoRiZaTiOnS/aUtHoRiZaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAuthorizationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.AuthorizationName != v.Expected.AuthorizationName { - t.Fatalf("Expected %q but got %q for AuthorizationName", v.Expected.AuthorizationName, actual.AuthorizationName) - } - - } -} - -func TestSegmentsForAuthorizationId(t *testing.T) { - segments := AuthorizationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("AuthorizationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_expressroutecircuit.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_expressroutecircuit.go deleted file mode 100644 index 502b311d236..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_expressroutecircuit.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -// ExpressRouteCircuitId is a struct representing the Resource ID for a Express Route Circuit -type ExpressRouteCircuitId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string -} - -// NewExpressRouteCircuitID returns a new ExpressRouteCircuitId struct -func NewExpressRouteCircuitID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string) ExpressRouteCircuitId { - return ExpressRouteCircuitId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - } -} - -// ParseExpressRouteCircuitID parses 'input' into a ExpressRouteCircuitId -func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCircuitIDInsensitively parses 'input' case-insensitively into a ExpressRouteCircuitId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID -func ValidateExpressRouteCircuitID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCircuitID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Circuit ID -func (id ExpressRouteCircuitId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Circuit ID -func (id ExpressRouteCircuitId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - } -} - -// String returns a human-readable description of this Express Route Circuit ID -func (id ExpressRouteCircuitId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - } - return fmt.Sprintf("Express Route Circuit (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_expressroutecircuit_test.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_expressroutecircuit_test.go deleted file mode 100644 index cdb083b9f85..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/id_expressroutecircuit_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -func TestNewExpressRouteCircuitID(t *testing.T) { - id := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } -} - -func TestFormatExpressRouteCircuitID(t *testing.T) { - actual := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCircuitID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestParseExpressRouteCircuitIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestSegmentsForExpressRouteCircuitId(t *testing.T) { - segments := ExpressRouteCircuitId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCircuitId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_createorupdate.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_createorupdate.go deleted file mode 100644 index c92e38b0d99..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context.Context, id AuthorizationId, input ExpressRouteCircuitAuthorization) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateThenPoll(ctx context.Context, id AuthorizationId, input ExpressRouteCircuitAuthorization) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_delete.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_delete.go deleted file mode 100644 index b2c01bb7f11..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context, id AuthorizationId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCircuitAuthorizationsClient) DeleteThenPoll(ctx context.Context, id AuthorizationId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_get.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_get.go deleted file mode 100644 index eceb10caf72..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitAuthorization -} - -// Get ... -func (c ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, id AuthorizationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_list.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_list.go deleted file mode 100644 index 6c95caf99fb..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuitAuthorization -} - -type ListCompleteResult struct { - Items []ExpressRouteCircuitAuthorization -} - -// List ... -func (c ExpressRouteCircuitAuthorizationsClient) List(ctx context.Context, id ExpressRouteCircuitId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/authorizations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuitAuthorization `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCircuitAuthorizationsClient) ListComplete(ctx context.Context, id ExpressRouteCircuitId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitAuthorizationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitAuthorizationsClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRouteCircuitId, predicate ExpressRouteCircuitAuthorizationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCircuitAuthorization, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/model_authorizationpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/model_authorizationpropertiesformat.go deleted file mode 100644 index e3d3f2bdb8d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/model_authorizationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutecircuitauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthorizationPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - AuthorizationUseStatus *AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/model_expressroutecircuitauthorization.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/model_expressroutecircuitauthorization.go deleted file mode 100644 index b4b084362fc..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/model_expressroutecircuitauthorization.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitAuthorization struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AuthorizationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/predicates.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/predicates.go deleted file mode 100644 index 3533e80a13e..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressroutecircuitauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitAuthorizationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ExpressRouteCircuitAuthorizationOperationPredicate) Matches(input ExpressRouteCircuitAuthorization) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/version.go b/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/version.go deleted file mode 100644 index f1ba19c0c1c..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitauthorizations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitauthorizations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitauthorizations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/README.md b/resource-manager/network/2022-09-01/expressroutecircuitconnections/README.md deleted file mode 100644 index 6fbd5519d9a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitconnections` Documentation - -The `expressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitconnections" -``` - - -### Client Initialization - -```go -client := expressroutecircuitconnections.NewExpressRouteCircuitConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecircuitconnections.NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue") - -payload := expressroutecircuitconnections.ExpressRouteCircuitConnection{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecircuitconnections.NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitConnectionsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecircuitconnections.NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitConnectionsClient.List` - -```go -ctx := context.TODO() -id := expressroutecircuitconnections.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/client.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/client.go deleted file mode 100644 index 0fc743a7f46..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitConnectionsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitConnectionsClient: %+v", err) - } - - return &ExpressRouteCircuitConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/constants.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/constants.go deleted file mode 100644 index 8bfeb3344f9..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/constants.go +++ /dev/null @@ -1,101 +0,0 @@ -package expressroutecircuitconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/id_peeringconnection.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/id_peeringconnection.go deleted file mode 100644 index 4bdac2a095a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/id_peeringconnection.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecircuitconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringConnectionId{} - -// PeeringConnectionId is a struct representing the Resource ID for a Peering Connection -type PeeringConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - ConnectionName string -} - -// NewPeeringConnectionID returns a new PeeringConnectionId struct -func NewPeeringConnectionID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, connectionName string) PeeringConnectionId { - return PeeringConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - ConnectionName: connectionName, - } -} - -// ParsePeeringConnectionID parses 'input' into a PeeringConnectionId -func ParsePeeringConnectionID(input string) (*PeeringConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ParsePeeringConnectionIDInsensitively parses 'input' case-insensitively into a PeeringConnectionId -// note: this method should only be used for API response data and not user input -func ParsePeeringConnectionIDInsensitively(input string) (*PeeringConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringConnectionID checks that 'input' can be parsed as a Peering Connection ID -func ValidatePeeringConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering Connection ID -func (id PeeringConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/connections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.ConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering Connection ID -func (id PeeringConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticConnections", "connections", "connections"), - resourceids.UserSpecifiedSegment("connectionName", "connectionValue"), - } -} - -// String returns a human-readable description of this Peering Connection ID -func (id PeeringConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Connection Name: %q", id.ConnectionName), - } - return fmt.Sprintf("Peering Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/id_peeringconnection_test.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/id_peeringconnection_test.go deleted file mode 100644 index 478f263c359..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/id_peeringconnection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecircuitconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringConnectionId{} - -func TestNewPeeringConnectionID(t *testing.T) { - id := NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.ConnectionName != "connectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectionName'", id.ConnectionName, "connectionValue") - } -} - -func TestFormatPeeringConnectionID(t *testing.T) { - actual := NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue", - Expected: &PeeringConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestParsePeeringConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/cOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue", - Expected: &PeeringConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/cOnNeCtIoNs/cOnNeCtIoNvAlUe", - Expected: &PeeringConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - ConnectionName: "cOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/cOnNeCtIoNs/cOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestSegmentsForPeeringConnectionId(t *testing.T) { - segments := PeeringConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_createorupdate.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_createorupdate.go deleted file mode 100644 index b06791a5b4e..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutecircuitconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Context, id PeeringConnectionId, input ExpressRouteCircuitConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCircuitConnectionsClient) CreateOrUpdateThenPoll(ctx context.Context, id PeeringConnectionId, input ExpressRouteCircuitConnection) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_delete.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_delete.go deleted file mode 100644 index 1d813338ead..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutecircuitconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, id PeeringConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCircuitConnectionsClient) DeleteThenPoll(ctx context.Context, id PeeringConnectionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_get.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_get.go deleted file mode 100644 index daae7f42996..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecircuitconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitConnection -} - -// Get ... -func (c ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id PeeringConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_list.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_list.go deleted file mode 100644 index 53452b0dcdd..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecircuitconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuitConnection -} - -type ListCompleteResult struct { - Items []ExpressRouteCircuitConnection -} - -// List ... -func (c ExpressRouteCircuitConnectionsClient) List(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/connections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuitConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId, predicate ExpressRouteCircuitConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCircuitConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_expressroutecircuitconnection.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_expressroutecircuitconnection.go deleted file mode 100644 index 689bf9a8e12..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_expressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_expressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_expressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index a1bf981acf3..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_expressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_ipv6circuitconnectionconfig.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_ipv6circuitconnectionconfig.go deleted file mode 100644 index 580b8a8dcd7..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_ipv6circuitconnectionconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6CircuitConnectionConfig struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_subresource.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_subresource.go deleted file mode 100644 index d6673ed96dc..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/predicates.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/predicates.go deleted file mode 100644 index 6c65b4df05d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ExpressRouteCircuitConnectionOperationPredicate) Matches(input ExpressRouteCircuitConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitconnections/version.go b/resource-manager/network/2022-09-01/expressroutecircuitconnections/version.go deleted file mode 100644 index 3728a8cf771..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/README.md b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/README.md deleted file mode 100644 index c9b81eff66d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitpeerings` Documentation - -The `expressroutecircuitpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitpeerings" -``` - - -### Client Initialization - -```go -client := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitPeeringsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -payload := expressroutecircuitpeerings.ExpressRouteCircuitPeering{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitPeeringsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitPeeringsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitPeeringsClient.List` - -```go -ctx := context.TODO() -id := expressroutecircuitpeerings.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/client.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/client.go deleted file mode 100644 index 3d549f1e88d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitPeeringsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitpeerings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitPeeringsClient: %+v", err) - } - - return &ExpressRouteCircuitPeeringsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/constants.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/constants.go deleted file mode 100644 index 98d21da2c70..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/constants.go +++ /dev/null @@ -1,274 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/id_expressroutecircuit.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/id_expressroutecircuit.go deleted file mode 100644 index 80bd7e639d7..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/id_expressroutecircuit.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -// ExpressRouteCircuitId is a struct representing the Resource ID for a Express Route Circuit -type ExpressRouteCircuitId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string -} - -// NewExpressRouteCircuitID returns a new ExpressRouteCircuitId struct -func NewExpressRouteCircuitID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string) ExpressRouteCircuitId { - return ExpressRouteCircuitId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - } -} - -// ParseExpressRouteCircuitID parses 'input' into a ExpressRouteCircuitId -func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCircuitIDInsensitively parses 'input' case-insensitively into a ExpressRouteCircuitId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID -func ValidateExpressRouteCircuitID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCircuitID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Circuit ID -func (id ExpressRouteCircuitId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Circuit ID -func (id ExpressRouteCircuitId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - } -} - -// String returns a human-readable description of this Express Route Circuit ID -func (id ExpressRouteCircuitId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - } - return fmt.Sprintf("Express Route Circuit (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/id_expressroutecircuit_test.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/id_expressroutecircuit_test.go deleted file mode 100644 index a251772566c..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/id_expressroutecircuit_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -func TestNewExpressRouteCircuitID(t *testing.T) { - id := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } -} - -func TestFormatExpressRouteCircuitID(t *testing.T) { - actual := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCircuitID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestParseExpressRouteCircuitIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestSegmentsForExpressRouteCircuitId(t *testing.T) { - segments := ExpressRouteCircuitId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCircuitId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_createorupdate.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_createorupdate.go deleted file mode 100644 index 9fd584ff838..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId, input ExpressRouteCircuitPeering) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCircuitPeeringsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId, input ExpressRouteCircuitPeering) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_delete.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_delete.go deleted file mode 100644 index 241c45fa414..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCircuitPeeringsClient) DeleteThenPoll(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_get.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_get.go deleted file mode 100644 index 0a712bb204d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_get.go +++ /dev/null @@ -1,52 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitPeering -} - -// Get ... -func (c ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_list.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_list.go deleted file mode 100644 index 928c768cf49..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuitPeering -} - -type ListCompleteResult struct { - Items []ExpressRouteCircuitPeering -} - -// List ... -func (c ExpressRouteCircuitPeeringsClient) List(ctx context.Context, id ExpressRouteCircuitId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/peerings", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuitPeering `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCircuitPeeringsClient) ListComplete(ctx context.Context, id ExpressRouteCircuitId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitPeeringOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitPeeringsClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRouteCircuitId, predicate ExpressRouteCircuitPeeringOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCircuitPeering, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitconnection.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitconnection.go deleted file mode 100644 index f0bf62174ce..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index f89ab3b51e4..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeering.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeering.go deleted file mode 100644 index 5e47a7f0266..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 67b575213fe..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringpropertiesformat.go deleted file mode 100644 index a54ef389df4..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringpropertiesformat.go +++ /dev/null @@ -1,27 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringPropertiesFormat struct { - AzureASN *int64 `json:"azureASN,omitempty"` - Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` - ExpressRouteConnection *ExpressRouteConnectionId `json:"expressRouteConnection,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitstats.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitstats.go deleted file mode 100644 index 8239e6299db..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressroutecircuitstats.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStats struct { - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressrouteconnectionid.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressrouteconnectionid.go deleted file mode 100644 index f06a355d7fa..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_expressrouteconnectionid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_ipv6circuitconnectionconfig.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_ipv6circuitconnectionconfig.go deleted file mode 100644 index ae00db3c45c..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_ipv6circuitconnectionconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6CircuitConnectionConfig struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index 93ee020eec6..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnection.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnection.go deleted file mode 100644 index bc9218f9280..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index 72eba9f327f..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthResourceGuid *string `json:"authResourceGuid,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ConnectionName *string `json:"connectionName,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_subresource.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_subresource.go deleted file mode 100644 index 3143d87b0ee..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/predicates.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/predicates.go deleted file mode 100644 index 1e725c4e63a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ExpressRouteCircuitPeeringOperationPredicate) Matches(input ExpressRouteCircuitPeering) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/version.go b/resource-manager/network/2022-09-01/expressroutecircuitpeerings/version.go deleted file mode 100644 index 84e30637136..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitpeerings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitpeerings/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2022-09-01/expressroutecircuitroutestable/README.md deleted file mode 100644 index 543180375ff..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitroutestable` Documentation - -The `expressroutecircuitroutestable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitroutestable" -``` - - -### Client Initialization - -```go -client := expressroutecircuitroutestable.NewExpressRouteCircuitRoutesTableClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitRoutesTableClient.ExpressRouteCircuitsListRoutesTable` - -```go -ctx := context.TODO() -id := expressroutecircuitroutestable.NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue") - -if err := client.ExpressRouteCircuitsListRoutesTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/client.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestable/client.go deleted file mode 100644 index 4122036f496..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitroutestable - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTableClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitRoutesTableClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitRoutesTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitroutestable", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableClient: %+v", err) - } - - return &ExpressRouteCircuitRoutesTableClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/id_peeringroutetable.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestable/id_peeringroutetable.go deleted file mode 100644 index b383a1c57d2..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/id_peeringroutetable.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecircuitroutestable - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringRouteTableId{} - -// PeeringRouteTableId is a struct representing the Resource ID for a Peering Route Table -type PeeringRouteTableId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - RouteTableName string -} - -// NewPeeringRouteTableID returns a new PeeringRouteTableId struct -func NewPeeringRouteTableID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, routeTableName string) PeeringRouteTableId { - return PeeringRouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - RouteTableName: routeTableName, - } -} - -// ParsePeeringRouteTableID parses 'input' into a PeeringRouteTableId -func ParsePeeringRouteTableID(input string) (*PeeringRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringRouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParsePeeringRouteTableIDInsensitively parses 'input' case-insensitively into a PeeringRouteTableId -// note: this method should only be used for API response data and not user input -func ParsePeeringRouteTableIDInsensitively(input string) (*PeeringRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringRouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringRouteTableID checks that 'input' can be parsed as a Peering Route Table ID -func ValidatePeeringRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering Route Table ID -func (id PeeringRouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering Route Table ID -func (id PeeringRouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Peering Route Table ID -func (id PeeringRouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Peering Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/id_peeringroutetable_test.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestable/id_peeringroutetable_test.go deleted file mode 100644 index 64f99c70086..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/id_peeringroutetable_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecircuitroutestable - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringRouteTableId{} - -func TestNewPeeringRouteTableID(t *testing.T) { - id := NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatPeeringRouteTableID(t *testing.T) { - actual := NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue", - Expected: &PeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParsePeeringRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue", - Expected: &PeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &PeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForPeeringRouteTableId(t *testing.T) { - segments := PeeringRouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringRouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go deleted file mode 100644 index e407449341a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecircuitroutestable - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsListRoutesTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCircuitsListRoutesTable ... -func (c ExpressRouteCircuitRoutesTableClient) ExpressRouteCircuitsListRoutesTable(ctx context.Context, id PeeringRouteTableId) (result ExpressRouteCircuitsListRoutesTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCircuitsListRoutesTableThenPoll performs ExpressRouteCircuitsListRoutesTable then polls until it's completed -func (c ExpressRouteCircuitRoutesTableClient) ExpressRouteCircuitsListRoutesTableThenPoll(ctx context.Context, id PeeringRouteTableId) error { - result, err := c.ExpressRouteCircuitsListRoutesTable(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCircuitsListRoutesTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCircuitsListRoutesTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/model_expressroutecircuitroutestable.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestable/model_expressroutecircuitroutestable.go deleted file mode 100644 index d70d9310d29..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/model_expressroutecircuitroutestable.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitroutestable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTable struct { - LocPrf *string `json:"locPrf,omitempty"` - Network *string `json:"network,omitempty"` - NextHop *string `json:"nextHop,omitempty"` - Path *string `json:"path,omitempty"` - Weight *int64 `json:"weight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index 7ff773de0b1..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/version.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestable/version.go deleted file mode 100644 index c4b4bd73782..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestable/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitroutestable - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestable/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/README.md deleted file mode 100644 index 8310acb3391..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary` Documentation - -The `expressroutecircuitroutestablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary" -``` - - -### Client Initialization - -```go -client := expressroutecircuitroutestablesummary.NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitRoutesTableSummaryClient.ExpressRouteCircuitsListRoutesTableSummary` - -```go -ctx := context.TODO() -id := expressroutecircuitroutestablesummary.NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue") - -if err := client.ExpressRouteCircuitsListRoutesTableSummaryThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/client.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/client.go deleted file mode 100644 index 93516365ad8..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitroutestablesummary - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTableSummaryClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitRoutesTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitroutestablesummary", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableSummaryClient: %+v", err) - } - - return &ExpressRouteCircuitRoutesTableSummaryClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/id_routetablessummary.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/id_routetablessummary.go deleted file mode 100644 index 1cbf9698584..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/id_routetablessummary.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecircuitroutestablesummary - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTablesSummaryId{} - -// RouteTablesSummaryId is a struct representing the Resource ID for a Route Tables Summary -type RouteTablesSummaryId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - RouteTablesSummaryName string -} - -// NewRouteTablesSummaryID returns a new RouteTablesSummaryId struct -func NewRouteTablesSummaryID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, routeTablesSummaryName string) RouteTablesSummaryId { - return RouteTablesSummaryId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - RouteTablesSummaryName: routeTablesSummaryName, - } -} - -// ParseRouteTablesSummaryID parses 'input' into a RouteTablesSummaryId -func ParseRouteTablesSummaryID(input string) (*RouteTablesSummaryId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTablesSummaryId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) - } - - return &id, nil -} - -// ParseRouteTablesSummaryIDInsensitively parses 'input' case-insensitively into a RouteTablesSummaryId -// note: this method should only be used for API response data and not user input -func ParseRouteTablesSummaryIDInsensitively(input string) (*RouteTablesSummaryId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTablesSummaryId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) - } - - return &id, nil -} - -// ValidateRouteTablesSummaryID checks that 'input' can be parsed as a Route Tables Summary ID -func ValidateRouteTablesSummaryID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteTablesSummaryID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Tables Summary ID -func (id RouteTablesSummaryId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/routeTablesSummary/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.RouteTablesSummaryName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Tables Summary ID -func (id RouteTablesSummaryId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticRouteTablesSummary", "routeTablesSummary", "routeTablesSummary"), - resourceids.UserSpecifiedSegment("routeTablesSummaryName", "routeTablesSummaryValue"), - } -} - -// String returns a human-readable description of this Route Tables Summary ID -func (id RouteTablesSummaryId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Route Tables Summary Name: %q", id.RouteTablesSummaryName), - } - return fmt.Sprintf("Route Tables Summary (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/id_routetablessummary_test.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/id_routetablessummary_test.go deleted file mode 100644 index b8df970cca2..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/id_routetablessummary_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecircuitroutestablesummary - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTablesSummaryId{} - -func TestNewRouteTablesSummaryID(t *testing.T) { - id := NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.RouteTablesSummaryName != "routeTablesSummaryValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTablesSummaryName'", id.RouteTablesSummaryName, "routeTablesSummaryValue") - } -} - -func TestFormatRouteTablesSummaryID(t *testing.T) { - actual := NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteTablesSummaryID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTablesSummaryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue", - Expected: &RouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - RouteTablesSummaryName: "routeTablesSummaryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTablesSummaryID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTablesSummaryName != v.Expected.RouteTablesSummaryName { - t.Fatalf("Expected %q but got %q for RouteTablesSummaryName", v.Expected.RouteTablesSummaryName, actual.RouteTablesSummaryName) - } - - } -} - -func TestParseRouteTablesSummaryIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTablesSummaryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue", - Expected: &RouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - RouteTablesSummaryName: "routeTablesSummaryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY/rOuTeTaBlEsSuMmArYvAlUe", - Expected: &RouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - RouteTablesSummaryName: "rOuTeTaBlEsSuMmArYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY/rOuTeTaBlEsSuMmArYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTablesSummaryIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTablesSummaryName != v.Expected.RouteTablesSummaryName { - t.Fatalf("Expected %q but got %q for RouteTablesSummaryName", v.Expected.RouteTablesSummaryName, actual.RouteTablesSummaryName) - } - - } -} - -func TestSegmentsForRouteTablesSummaryId(t *testing.T) { - segments := RouteTablesSummaryId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteTablesSummaryId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go deleted file mode 100644 index e40aa5c5c09..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecircuitroutestablesummary - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsListRoutesTableSummaryOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCircuitsListRoutesTableSummary ... -func (c ExpressRouteCircuitRoutesTableSummaryClient) ExpressRouteCircuitsListRoutesTableSummary(ctx context.Context, id RouteTablesSummaryId) (result ExpressRouteCircuitsListRoutesTableSummaryOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCircuitsListRoutesTableSummaryThenPoll performs ExpressRouteCircuitsListRoutesTableSummary then polls until it's completed -func (c ExpressRouteCircuitRoutesTableSummaryClient) ExpressRouteCircuitsListRoutesTableSummaryThenPoll(ctx context.Context, id RouteTablesSummaryId) error { - result, err := c.ExpressRouteCircuitsListRoutesTableSummary(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCircuitsListRoutesTableSummary: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCircuitsListRoutesTableSummary: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitroutestablesummary.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitroutestablesummary.go deleted file mode 100644 index 926fc450623..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitroutestablesummary.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitroutestablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTableSummary struct { - As *int64 `json:"as,omitempty"` - Neighbor *string `json:"neighbor,omitempty"` - StatePfxRcd *string `json:"statePfxRcd,omitempty"` - UpDown *string `json:"upDown,omitempty"` - V *int64 `json:"v,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go deleted file mode 100644 index 819e27f860b..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/version.go b/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/version.go deleted file mode 100644 index 20c2ff6214d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitroutestablesummary/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitroutestablesummary - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/README.md b/resource-manager/network/2022-09-01/expressroutecircuits/README.md deleted file mode 100644 index 23e3ce56424..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuits` Documentation - -The `expressroutecircuits` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuits" -``` - - -### Client Initialization - -```go -client := expressroutecircuits.NewExpressRouteCircuitsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -payload := expressroutecircuits.ExpressRouteCircuit{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.List` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.ListAll` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.UpdateTags` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -payload := expressroutecircuits.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/client.go b/resource-manager/network/2022-09-01/expressroutecircuits/client.go deleted file mode 100644 index 380fde4f56c..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuits - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuits", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitsClient: %+v", err) - } - - return &ExpressRouteCircuitsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/constants.go b/resource-manager/network/2022-09-01/expressroutecircuits/constants.go deleted file mode 100644 index 017902fa091..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/constants.go +++ /dev/null @@ -1,450 +0,0 @@ -package expressroutecircuits - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthorizationUseStatus string - -const ( - AuthorizationUseStatusAvailable AuthorizationUseStatus = "Available" - AuthorizationUseStatusInUse AuthorizationUseStatus = "InUse" -) - -func PossibleValuesForAuthorizationUseStatus() []string { - return []string{ - string(AuthorizationUseStatusAvailable), - string(AuthorizationUseStatusInUse), - } -} - -func (s *AuthorizationUseStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthorizationUseStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthorizationUseStatus(input string) (*AuthorizationUseStatus, error) { - vals := map[string]AuthorizationUseStatus{ - "available": AuthorizationUseStatusAvailable, - "inuse": AuthorizationUseStatusInUse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthorizationUseStatus(input) - return &out, nil -} - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRouteCircuitSkuFamily string - -const ( - ExpressRouteCircuitSkuFamilyMeteredData ExpressRouteCircuitSkuFamily = "MeteredData" - ExpressRouteCircuitSkuFamilyUnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData" -) - -func PossibleValuesForExpressRouteCircuitSkuFamily() []string { - return []string{ - string(ExpressRouteCircuitSkuFamilyMeteredData), - string(ExpressRouteCircuitSkuFamilyUnlimitedData), - } -} - -func (s *ExpressRouteCircuitSkuFamily) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitSkuFamily(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitSkuFamily(input string) (*ExpressRouteCircuitSkuFamily, error) { - vals := map[string]ExpressRouteCircuitSkuFamily{ - "metereddata": ExpressRouteCircuitSkuFamilyMeteredData, - "unlimiteddata": ExpressRouteCircuitSkuFamilyUnlimitedData, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitSkuFamily(input) - return &out, nil -} - -type ExpressRouteCircuitSkuTier string - -const ( - ExpressRouteCircuitSkuTierBasic ExpressRouteCircuitSkuTier = "Basic" - ExpressRouteCircuitSkuTierLocal ExpressRouteCircuitSkuTier = "Local" - ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" - ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard" -) - -func PossibleValuesForExpressRouteCircuitSkuTier() []string { - return []string{ - string(ExpressRouteCircuitSkuTierBasic), - string(ExpressRouteCircuitSkuTierLocal), - string(ExpressRouteCircuitSkuTierPremium), - string(ExpressRouteCircuitSkuTierStandard), - } -} - -func (s *ExpressRouteCircuitSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitSkuTier(input string) (*ExpressRouteCircuitSkuTier, error) { - vals := map[string]ExpressRouteCircuitSkuTier{ - "basic": ExpressRouteCircuitSkuTierBasic, - "local": ExpressRouteCircuitSkuTierLocal, - "premium": ExpressRouteCircuitSkuTierPremium, - "standard": ExpressRouteCircuitSkuTierStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitSkuTier(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type ServiceProviderProvisioningState string - -const ( - ServiceProviderProvisioningStateDeprovisioning ServiceProviderProvisioningState = "Deprovisioning" - ServiceProviderProvisioningStateNotProvisioned ServiceProviderProvisioningState = "NotProvisioned" - ServiceProviderProvisioningStateProvisioned ServiceProviderProvisioningState = "Provisioned" - ServiceProviderProvisioningStateProvisioning ServiceProviderProvisioningState = "Provisioning" -) - -func PossibleValuesForServiceProviderProvisioningState() []string { - return []string{ - string(ServiceProviderProvisioningStateDeprovisioning), - string(ServiceProviderProvisioningStateNotProvisioned), - string(ServiceProviderProvisioningStateProvisioned), - string(ServiceProviderProvisioningStateProvisioning), - } -} - -func (s *ServiceProviderProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServiceProviderProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServiceProviderProvisioningState(input string) (*ServiceProviderProvisioningState, error) { - vals := map[string]ServiceProviderProvisioningState{ - "deprovisioning": ServiceProviderProvisioningStateDeprovisioning, - "notprovisioned": ServiceProviderProvisioningStateNotProvisioned, - "provisioned": ServiceProviderProvisioningStateProvisioned, - "provisioning": ServiceProviderProvisioningStateProvisioning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServiceProviderProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/id_expressroutecircuit.go b/resource-manager/network/2022-09-01/expressroutecircuits/id_expressroutecircuit.go deleted file mode 100644 index 76f0cad7940..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/id_expressroutecircuit.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecircuits - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -// ExpressRouteCircuitId is a struct representing the Resource ID for a Express Route Circuit -type ExpressRouteCircuitId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string -} - -// NewExpressRouteCircuitID returns a new ExpressRouteCircuitId struct -func NewExpressRouteCircuitID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string) ExpressRouteCircuitId { - return ExpressRouteCircuitId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - } -} - -// ParseExpressRouteCircuitID parses 'input' into a ExpressRouteCircuitId -func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCircuitIDInsensitively parses 'input' case-insensitively into a ExpressRouteCircuitId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID -func ValidateExpressRouteCircuitID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCircuitID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Circuit ID -func (id ExpressRouteCircuitId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Circuit ID -func (id ExpressRouteCircuitId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - } -} - -// String returns a human-readable description of this Express Route Circuit ID -func (id ExpressRouteCircuitId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - } - return fmt.Sprintf("Express Route Circuit (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/id_expressroutecircuit_test.go b/resource-manager/network/2022-09-01/expressroutecircuits/id_expressroutecircuit_test.go deleted file mode 100644 index 67044c85345..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/id_expressroutecircuit_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecircuits - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -func TestNewExpressRouteCircuitID(t *testing.T) { - id := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } -} - -func TestFormatExpressRouteCircuitID(t *testing.T) { - actual := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCircuitID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestParseExpressRouteCircuitIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestSegmentsForExpressRouteCircuitId(t *testing.T) { - segments := ExpressRouteCircuitId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCircuitId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/method_createorupdate.go b/resource-manager/network/2022-09-01/expressroutecircuits/method_createorupdate.go deleted file mode 100644 index 4463c162391..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, id ExpressRouteCircuitId, input ExpressRouteCircuit) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCircuitsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRouteCircuitId, input ExpressRouteCircuit) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/method_delete.go b/resource-manager/network/2022-09-01/expressroutecircuits/method_delete.go deleted file mode 100644 index 91f8aa53bed..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCircuitsClient) Delete(ctx context.Context, id ExpressRouteCircuitId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCircuitsClient) DeleteThenPoll(ctx context.Context, id ExpressRouteCircuitId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/method_get.go b/resource-manager/network/2022-09-01/expressroutecircuits/method_get.go deleted file mode 100644 index 2e4d336e70b..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuit -} - -// Get ... -func (c ExpressRouteCircuitsClient) Get(ctx context.Context, id ExpressRouteCircuitId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/method_list.go b/resource-manager/network/2022-09-01/expressroutecircuits/method_list.go deleted file mode 100644 index 0f3277d1d26..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuit -} - -type ListCompleteResult struct { - Items []ExpressRouteCircuit -} - -// List ... -func (c ExpressRouteCircuitsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteCircuits", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuit `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCircuitsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ExpressRouteCircuitOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCircuit, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/method_listall.go b/resource-manager/network/2022-09-01/expressroutecircuits/method_listall.go deleted file mode 100644 index 1689bd19cae..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuit -} - -type ListAllCompleteResult struct { - Items []ExpressRouteCircuit -} - -// ListAll ... -func (c ExpressRouteCircuitsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteCircuits", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuit `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c ExpressRouteCircuitsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRouteCircuitOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]ExpressRouteCircuit, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/method_updatetags.go b/resource-manager/network/2022-09-01/expressroutecircuits/method_updatetags.go deleted file mode 100644 index 6e2d55efeb4..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuit -} - -// UpdateTags ... -func (c ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, id ExpressRouteCircuitId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_authorizationpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_authorizationpropertiesformat.go deleted file mode 100644 index a539b0f44a2..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_authorizationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthorizationPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - AuthorizationUseStatus *AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuit.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuit.go deleted file mode 100644 index a74493fcec8..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuit.go +++ /dev/null @@ -1,15 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuit struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` - Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitauthorization.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitauthorization.go deleted file mode 100644 index 2942811a91c..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitauthorization.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitAuthorization struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AuthorizationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitconnection.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitconnection.go deleted file mode 100644 index 901ef503724..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index 897f772964a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeering.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeering.go deleted file mode 100644 index d7431190482..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 836b1d5e963..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeeringpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeeringpropertiesformat.go deleted file mode 100644 index 87a88e75638..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpeeringpropertiesformat.go +++ /dev/null @@ -1,27 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringPropertiesFormat struct { - AzureASN *int64 `json:"azureASN,omitempty"` - Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` - ExpressRouteConnection *ExpressRouteConnectionId `json:"expressRouteConnection,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpropertiesformat.go deleted file mode 100644 index 89faee5aa48..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitpropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPropertiesFormat struct { - AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - AuthorizationStatus *string `json:"authorizationStatus,omitempty"` - Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` - BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"` - CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` - ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"` - Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceKey *string `json:"serviceKey,omitempty"` - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` - ServiceProviderProvisioningState *ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - Stag *int64 `json:"stag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitserviceproviderproperties.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitserviceproviderproperties.go deleted file mode 100644 index 432cdaf5a4a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitserviceproviderproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitServiceProviderProperties struct { - BandwidthInMbps *int64 `json:"bandwidthInMbps,omitempty"` - PeeringLocation *string `json:"peeringLocation,omitempty"` - ServiceProviderName *string `json:"serviceProviderName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitsku.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitsku.go deleted file mode 100644 index 186629b51a6..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitsku.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitSku struct { - Family *ExpressRouteCircuitSkuFamily `json:"family,omitempty"` - Name *string `json:"name,omitempty"` - Tier *ExpressRouteCircuitSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitstats.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitstats.go deleted file mode 100644 index ca8cd2c52bc..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressroutecircuitstats.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStats struct { - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressrouteconnectionid.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_expressrouteconnectionid.go deleted file mode 100644 index 70b79aa3ec7..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_expressrouteconnectionid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_ipv6circuitconnectionconfig.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_ipv6circuitconnectionconfig.go deleted file mode 100644 index 49a42177273..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_ipv6circuitconnectionconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6CircuitConnectionConfig struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index 02e4a94b316..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_peerexpressroutecircuitconnection.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_peerexpressroutecircuitconnection.go deleted file mode 100644 index e52a6b6f8c3..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_peerexpressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_peerexpressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_peerexpressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index 804baee319a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_peerexpressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthResourceGuid *string `json:"authResourceGuid,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ConnectionName *string `json:"connectionName,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_subresource.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_subresource.go deleted file mode 100644 index daf852a98a9..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/model_tagsobject.go b/resource-manager/network/2022-09-01/expressroutecircuits/model_tagsobject.go deleted file mode 100644 index 585eaaba376..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/predicates.go b/resource-manager/network/2022-09-01/expressroutecircuits/predicates.go deleted file mode 100644 index 3fdbc040dbf..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRouteCircuitOperationPredicate) Matches(input ExpressRouteCircuit) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuits/version.go b/resource-manager/network/2022-09-01/expressroutecircuits/version.go deleted file mode 100644 index 12b736bd131..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuits/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuits/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitstats/README.md b/resource-manager/network/2022-09-01/expressroutecircuitstats/README.md deleted file mode 100644 index f809658b690..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitstats/README.md +++ /dev/null @@ -1,52 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitstats` Documentation - -The `expressroutecircuitstats` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecircuitstats" -``` - - -### Client Initialization - -```go -client := expressroutecircuitstats.NewExpressRouteCircuitStatsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitStatsClient.ExpressRouteCircuitsGetPeeringStats` - -```go -ctx := context.TODO() -id := expressroutecircuitstats.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -read, err := client.ExpressRouteCircuitsGetPeeringStats(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitStatsClient.ExpressRouteCircuitsGetStats` - -```go -ctx := context.TODO() -id := expressroutecircuitstats.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -read, err := client.ExpressRouteCircuitsGetStats(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecircuitstats/client.go b/resource-manager/network/2022-09-01/expressroutecircuitstats/client.go deleted file mode 100644 index 1ccb263389c..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitstats/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitstats - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStatsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitStatsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitStatsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitstats", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitStatsClient: %+v", err) - } - - return &ExpressRouteCircuitStatsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitstats/id_expressroutecircuit.go b/resource-manager/network/2022-09-01/expressroutecircuitstats/id_expressroutecircuit.go deleted file mode 100644 index 8f5bdbd93bb..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitstats/id_expressroutecircuit.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecircuitstats - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -// ExpressRouteCircuitId is a struct representing the Resource ID for a Express Route Circuit -type ExpressRouteCircuitId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string -} - -// NewExpressRouteCircuitID returns a new ExpressRouteCircuitId struct -func NewExpressRouteCircuitID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string) ExpressRouteCircuitId { - return ExpressRouteCircuitId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - } -} - -// ParseExpressRouteCircuitID parses 'input' into a ExpressRouteCircuitId -func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCircuitIDInsensitively parses 'input' case-insensitively into a ExpressRouteCircuitId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID -func ValidateExpressRouteCircuitID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCircuitID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Circuit ID -func (id ExpressRouteCircuitId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Circuit ID -func (id ExpressRouteCircuitId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - } -} - -// String returns a human-readable description of this Express Route Circuit ID -func (id ExpressRouteCircuitId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - } - return fmt.Sprintf("Express Route Circuit (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitstats/id_expressroutecircuit_test.go b/resource-manager/network/2022-09-01/expressroutecircuitstats/id_expressroutecircuit_test.go deleted file mode 100644 index f38835e049b..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitstats/id_expressroutecircuit_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecircuitstats - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -func TestNewExpressRouteCircuitID(t *testing.T) { - id := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } -} - -func TestFormatExpressRouteCircuitID(t *testing.T) { - actual := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCircuitID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestParseExpressRouteCircuitIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestSegmentsForExpressRouteCircuitId(t *testing.T) { - segments := ExpressRouteCircuitId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCircuitId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go b/resource-manager/network/2022-09-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go deleted file mode 100644 index 7ebebe12324..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go +++ /dev/null @@ -1,53 +0,0 @@ -package expressroutecircuitstats - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsGetPeeringStatsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitStats -} - -// ExpressRouteCircuitsGetPeeringStats ... -func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetPeeringStats(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result ExpressRouteCircuitsGetPeeringStatsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/stats", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go b/resource-manager/network/2022-09-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go deleted file mode 100644 index 95301a45517..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go +++ /dev/null @@ -1,52 +0,0 @@ -package expressroutecircuitstats - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsGetStatsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitStats -} - -// ExpressRouteCircuitsGetStats ... -func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetStats(ctx context.Context, id ExpressRouteCircuitId) (result ExpressRouteCircuitsGetStatsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/stats", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitstats/model_expressroutecircuitstats.go b/resource-manager/network/2022-09-01/expressroutecircuitstats/model_expressroutecircuitstats.go deleted file mode 100644 index f93c0daeba8..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitstats/model_expressroutecircuitstats.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecircuitstats - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStats struct { - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecircuitstats/version.go b/resource-manager/network/2022-09-01/expressroutecircuitstats/version.go deleted file mode 100644 index a79eb10384a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecircuitstats/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitstats - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitstats/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/README.md b/resource-manager/network/2022-09-01/expressrouteconnections/README.md deleted file mode 100644 index af277045f15..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/README.md +++ /dev/null @@ -1,81 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteconnections` Documentation - -The `expressrouteconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteconnections" -``` - - -### Client Initialization - -```go -client := expressrouteconnections.NewExpressRouteConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressrouteconnections.NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue") - -payload := expressrouteconnections.ExpressRouteConnection{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := expressrouteconnections.NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteConnectionsClient.Get` - -```go -ctx := context.TODO() -id := expressrouteconnections.NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteConnectionsClient.List` - -```go -ctx := context.TODO() -id := expressrouteconnections.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/client.go b/resource-manager/network/2022-09-01/expressrouteconnections/client.go deleted file mode 100644 index 9fb5bde933b..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteConnectionsClientWithBaseURI(api environments.Api) (*ExpressRouteConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteConnectionsClient: %+v", err) - } - - return &ExpressRouteConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/constants.go b/resource-manager/network/2022-09-01/expressrouteconnections/constants.go deleted file mode 100644 index 571bcb03c1e..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package expressrouteconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/id_expressrouteconnection.go b/resource-manager/network/2022-09-01/expressrouteconnections/id_expressrouteconnection.go deleted file mode 100644 index 9df4b46202b..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/id_expressrouteconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressrouteconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteConnectionId{} - -// ExpressRouteConnectionId is a struct representing the Resource ID for a Express Route Connection -type ExpressRouteConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteGatewayName string - ExpressRouteConnectionName string -} - -// NewExpressRouteConnectionID returns a new ExpressRouteConnectionId struct -func NewExpressRouteConnectionID(subscriptionId string, resourceGroupName string, expressRouteGatewayName string, expressRouteConnectionName string) ExpressRouteConnectionId { - return ExpressRouteConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteGatewayName: expressRouteGatewayName, - ExpressRouteConnectionName: expressRouteConnectionName, - } -} - -// ParseExpressRouteConnectionID parses 'input' into a ExpressRouteConnectionId -func ParseExpressRouteConnectionID(input string) (*ExpressRouteConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - if id.ExpressRouteConnectionName, ok = parsed.Parsed["expressRouteConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteConnectionName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteConnectionIDInsensitively parses 'input' case-insensitively into a ExpressRouteConnectionId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteConnectionIDInsensitively(input string) (*ExpressRouteConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - if id.ExpressRouteConnectionName, ok = parsed.Parsed["expressRouteConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteConnectionID checks that 'input' can be parsed as a Express Route Connection ID -func ValidateExpressRouteConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Connection ID -func (id ExpressRouteConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteGateways/%s/expressRouteConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteGatewayName, id.ExpressRouteConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Connection ID -func (id ExpressRouteConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteGateways", "expressRouteGateways", "expressRouteGateways"), - resourceids.UserSpecifiedSegment("expressRouteGatewayName", "expressRouteGatewayValue"), - resourceids.StaticSegment("staticExpressRouteConnections", "expressRouteConnections", "expressRouteConnections"), - resourceids.UserSpecifiedSegment("expressRouteConnectionName", "expressRouteConnectionValue"), - } -} - -// String returns a human-readable description of this Express Route Connection ID -func (id ExpressRouteConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Gateway Name: %q", id.ExpressRouteGatewayName), - fmt.Sprintf("Express Route Connection Name: %q", id.ExpressRouteConnectionName), - } - return fmt.Sprintf("Express Route Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/id_expressrouteconnection_test.go b/resource-manager/network/2022-09-01/expressrouteconnections/id_expressrouteconnection_test.go deleted file mode 100644 index 31d5263ea71..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/id_expressrouteconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressrouteconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteConnectionId{} - -func TestNewExpressRouteConnectionID(t *testing.T) { - id := NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteGatewayName != "expressRouteGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteGatewayName'", id.ExpressRouteGatewayName, "expressRouteGatewayValue") - } - - if id.ExpressRouteConnectionName != "expressRouteConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteConnectionName'", id.ExpressRouteConnectionName, "expressRouteConnectionValue") - } -} - -func TestFormatExpressRouteConnectionID(t *testing.T) { - actual := NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue", - Expected: &ExpressRouteConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - ExpressRouteConnectionName: "expressRouteConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - if actual.ExpressRouteConnectionName != v.Expected.ExpressRouteConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteConnectionName", v.Expected.ExpressRouteConnectionName, actual.ExpressRouteConnectionName) - } - - } -} - -func TestParseExpressRouteConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/eXpReSsRoUtEcOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue", - Expected: &ExpressRouteConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - ExpressRouteConnectionName: "expressRouteConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/eXpReSsRoUtEcOnNeCtIoNs/eXpReSsRoUtEcOnNeCtIoNvAlUe", - Expected: &ExpressRouteConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteGatewayName: "eXpReSsRoUtEgAtEwAyVaLuE", - ExpressRouteConnectionName: "eXpReSsRoUtEcOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/eXpReSsRoUtEcOnNeCtIoNs/eXpReSsRoUtEcOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - if actual.ExpressRouteConnectionName != v.Expected.ExpressRouteConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteConnectionName", v.Expected.ExpressRouteConnectionName, actual.ExpressRouteConnectionName) - } - - } -} - -func TestSegmentsForExpressRouteConnectionId(t *testing.T) { - segments := ExpressRouteConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/id_expressroutegateway.go b/resource-manager/network/2022-09-01/expressrouteconnections/id_expressroutegateway.go deleted file mode 100644 index a697ea8a7e4..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/id_expressroutegateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressrouteconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteGatewayId{} - -// ExpressRouteGatewayId is a struct representing the Resource ID for a Express Route Gateway -type ExpressRouteGatewayId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteGatewayName string -} - -// NewExpressRouteGatewayID returns a new ExpressRouteGatewayId struct -func NewExpressRouteGatewayID(subscriptionId string, resourceGroupName string, expressRouteGatewayName string) ExpressRouteGatewayId { - return ExpressRouteGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteGatewayName: expressRouteGatewayName, - } -} - -// ParseExpressRouteGatewayID parses 'input' into a ExpressRouteGatewayId -func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteGatewayIDInsensitively parses 'input' case-insensitively into a ExpressRouteGatewayId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteGatewayID checks that 'input' can be parsed as a Express Route Gateway ID -func ValidateExpressRouteGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Gateway ID -func (id ExpressRouteGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Gateway ID -func (id ExpressRouteGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteGateways", "expressRouteGateways", "expressRouteGateways"), - resourceids.UserSpecifiedSegment("expressRouteGatewayName", "expressRouteGatewayValue"), - } -} - -// String returns a human-readable description of this Express Route Gateway ID -func (id ExpressRouteGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Gateway Name: %q", id.ExpressRouteGatewayName), - } - return fmt.Sprintf("Express Route Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/id_expressroutegateway_test.go b/resource-manager/network/2022-09-01/expressrouteconnections/id_expressroutegateway_test.go deleted file mode 100644 index 6d44fe191ad..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/id_expressroutegateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressrouteconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteGatewayId{} - -func TestNewExpressRouteGatewayID(t *testing.T) { - id := NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteGatewayName != "expressRouteGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteGatewayName'", id.ExpressRouteGatewayName, "expressRouteGatewayValue") - } -} - -func TestFormatExpressRouteGatewayID(t *testing.T) { - actual := NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - } -} - -func TestParseExpressRouteGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteGatewayName: "eXpReSsRoUtEgAtEwAyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - } -} - -func TestSegmentsForExpressRouteGatewayId(t *testing.T) { - segments := ExpressRouteGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/method_createorupdate.go b/resource-manager/network/2022-09-01/expressrouteconnections/method_createorupdate.go deleted file mode 100644 index 2297489ff1e..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressrouteconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context, id ExpressRouteConnectionId, input ExpressRouteConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteConnectionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRouteConnectionId, input ExpressRouteConnection) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/method_delete.go b/resource-manager/network/2022-09-01/expressrouteconnections/method_delete.go deleted file mode 100644 index 8f3816bde32..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressrouteconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteConnectionsClient) Delete(ctx context.Context, id ExpressRouteConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteConnectionsClient) DeleteThenPoll(ctx context.Context, id ExpressRouteConnectionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/method_get.go b/resource-manager/network/2022-09-01/expressrouteconnections/method_get.go deleted file mode 100644 index bfea9625ae1..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteConnection -} - -// Get ... -func (c ExpressRouteConnectionsClient) Get(ctx context.Context, id ExpressRouteConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/method_list.go b/resource-manager/network/2022-09-01/expressrouteconnections/method_list.go deleted file mode 100644 index 5ee34abaa62..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/method_list.go +++ /dev/null @@ -1,52 +0,0 @@ -package expressrouteconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteConnectionList -} - -// List ... -func (c ExpressRouteConnectionsClient) List(ctx context.Context, id ExpressRouteGatewayId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/expressRouteConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_expressroutecircuitpeeringid.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_expressroutecircuitpeeringid.go deleted file mode 100644 index 3a30ff411e8..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_expressroutecircuitpeeringid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnection.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnection.go deleted file mode 100644 index 1e31fa6c860..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnection.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnection struct { - Id *string `json:"id,omitempty"` - Name string `json:"name"` - Properties *ExpressRouteConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnectionlist.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnectionlist.go deleted file mode 100644 index a16565b3cd5..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnectionlist.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionList struct { - Value *[]ExpressRouteConnection `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnectionproperties.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnectionproperties.go deleted file mode 100644 index 2e9dddfbc1a..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_expressrouteconnectionproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionProperties struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - EnablePrivateLinkFastPath *bool `json:"enablePrivateLinkFastPath,omitempty"` - ExpressRouteCircuitPeering ExpressRouteCircuitPeeringId `json:"expressRouteCircuitPeering"` - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_propagatedroutetable.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_propagatedroutetable.go deleted file mode 100644 index 7279e13359c..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_routingconfiguration.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_routingconfiguration.go deleted file mode 100644 index 4e1904d9c6e..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_staticroute.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_staticroute.go deleted file mode 100644 index c1e414bbe16..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_staticroutesconfig.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_staticroutesconfig.go deleted file mode 100644 index 9ee286419ac..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_subresource.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_subresource.go deleted file mode 100644 index 5a5f53696f8..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/model_vnetroute.go b/resource-manager/network/2022-09-01/expressrouteconnections/model_vnetroute.go deleted file mode 100644 index 9e296eed5de..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteconnections/version.go b/resource-manager/network/2022-09-01/expressrouteconnections/version.go deleted file mode 100644 index a2368ddc9b4..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/README.md deleted file mode 100644 index c0493d386e7..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable` Documentation - -The `expressroutecrossconnectionarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnectionarptable.NewExpressRouteCrossConnectionArpTableClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionArpTableClient.ExpressRouteCrossConnectionsListArpTable` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionarptable.NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue") - -if err := client.ExpressRouteCrossConnectionsListArpTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/client.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/client.go deleted file mode 100644 index 674582d3ee4..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnectionarptable - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionArpTableClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionArpTableClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnectionarptable", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionArpTableClient: %+v", err) - } - - return &ExpressRouteCrossConnectionArpTableClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/id_peeringarptable.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/id_peeringarptable.go deleted file mode 100644 index c7d0e4d6c08..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/id_peeringarptable.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecrossconnectionarptable - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringArpTableId{} - -// PeeringArpTableId is a struct representing the Resource ID for a Peering Arp Table -type PeeringArpTableId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string - PeeringName string - ArpTableName string -} - -// NewPeeringArpTableID returns a new PeeringArpTableId struct -func NewPeeringArpTableID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string, peeringName string, arpTableName string) PeeringArpTableId { - return PeeringArpTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - PeeringName: peeringName, - ArpTableName: arpTableName, - } -} - -// ParsePeeringArpTableID parses 'input' into a PeeringArpTableId -func ParsePeeringArpTableID(input string) (*PeeringArpTableId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringArpTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) - } - - return &id, nil -} - -// ParsePeeringArpTableIDInsensitively parses 'input' case-insensitively into a PeeringArpTableId -// note: this method should only be used for API response data and not user input -func ParsePeeringArpTableIDInsensitively(input string) (*PeeringArpTableId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringArpTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringArpTableID checks that 'input' can be parsed as a Peering Arp Table ID -func ValidatePeeringArpTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringArpTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering Arp Table ID -func (id PeeringArpTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s/peerings/%s/arpTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName, id.PeeringName, id.ArpTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering Arp Table ID -func (id PeeringArpTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticArpTables", "arpTables", "arpTables"), - resourceids.UserSpecifiedSegment("arpTableName", "arpTableValue"), - } -} - -// String returns a human-readable description of this Peering Arp Table ID -func (id PeeringArpTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Arp Table Name: %q", id.ArpTableName), - } - return fmt.Sprintf("Peering Arp Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/id_peeringarptable_test.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/id_peeringarptable_test.go deleted file mode 100644 index 289a18dd71e..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/id_peeringarptable_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecrossconnectionarptable - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringArpTableId{} - -func TestNewPeeringArpTableID(t *testing.T) { - id := NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.ArpTableName != "arpTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'ArpTableName'", id.ArpTableName, "arpTableValue") - } -} - -func TestFormatPeeringArpTableID(t *testing.T) { - actual := NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringArpTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringArpTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue", - Expected: &PeeringArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - ArpTableName: "arpTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringArpTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ArpTableName != v.Expected.ArpTableName { - t.Fatalf("Expected %q but got %q for ArpTableName", v.Expected.ArpTableName, actual.ArpTableName) - } - - } -} - -func TestParsePeeringArpTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringArpTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue", - Expected: &PeeringArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - ArpTableName: "arpTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs/aRpTaBlEvAlUe", - Expected: &PeeringArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - PeeringName: "pEeRiNgVaLuE", - ArpTableName: "aRpTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs/aRpTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringArpTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ArpTableName != v.Expected.ArpTableName { - t.Fatalf("Expected %q but got %q for ArpTableName", v.Expected.ArpTableName, actual.ArpTableName) - } - - } -} - -func TestSegmentsForPeeringArpTableId(t *testing.T) { - segments := PeeringArpTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringArpTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go deleted file mode 100644 index e95485a99f9..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecrossconnectionarptable - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsListArpTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCrossConnectionsListArpTable ... -func (c ExpressRouteCrossConnectionArpTableClient) ExpressRouteCrossConnectionsListArpTable(ctx context.Context, id PeeringArpTableId) (result ExpressRouteCrossConnectionsListArpTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCrossConnectionsListArpTableThenPoll performs ExpressRouteCrossConnectionsListArpTable then polls until it's completed -func (c ExpressRouteCrossConnectionArpTableClient) ExpressRouteCrossConnectionsListArpTableThenPoll(ctx context.Context, id PeeringArpTableId) error { - result, err := c.ExpressRouteCrossConnectionsListArpTable(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCrossConnectionsListArpTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCrossConnectionsListArpTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitarptable.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitarptable.go deleted file mode 100644 index eb25fb1e02d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitarptable.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecrossconnectionarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitArpTable struct { - Age *int64 `json:"age,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - Interface *string `json:"interface,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index 67147d0690b..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/version.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/version.go deleted file mode 100644 index 03636a682b8..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionarptable/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionarptable - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/README.md b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/README.md deleted file mode 100644 index 654fd61bc58..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings` Documentation - -The `expressroutecrossconnectionpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnectionpeerings.NewExpressRouteCrossConnectionPeeringsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionpeerings.NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue") - -payload := expressroutecrossconnectionpeerings.ExpressRouteCrossConnectionPeering{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionPeeringsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionpeerings.NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionPeeringsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionpeerings.NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionPeeringsClient.List` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionpeerings.NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/client.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/client.go deleted file mode 100644 index 320a0785b8d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeeringsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnectionpeerings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionPeeringsClient: %+v", err) - } - - return &ExpressRouteCrossConnectionPeeringsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/constants.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/constants.go deleted file mode 100644 index 96dec453442..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/constants.go +++ /dev/null @@ -1,230 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go deleted file mode 100644 index c2abc2bcb6e..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionId{} - -// ExpressRouteCrossConnectionId is a struct representing the Resource ID for a Express Route Cross Connection -type ExpressRouteCrossConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string -} - -// NewExpressRouteCrossConnectionID returns a new ExpressRouteCrossConnectionId struct -func NewExpressRouteCrossConnectionID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string) ExpressRouteCrossConnectionId { - return ExpressRouteCrossConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - } -} - -// ParseExpressRouteCrossConnectionID parses 'input' into a ExpressRouteCrossConnectionId -func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCrossConnectionIDInsensitively parses 'input' case-insensitively into a ExpressRouteCrossConnectionId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRouteCrossConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCrossConnectionID checks that 'input' can be parsed as a Express Route Cross Connection ID -func ValidateExpressRouteCrossConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCrossConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - } -} - -// String returns a human-readable description of this Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - } - return fmt.Sprintf("Express Route Cross Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection_test.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection_test.go deleted file mode 100644 index bf20788ec3f..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionId{} - -func TestNewExpressRouteCrossConnectionID(t *testing.T) { - id := NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } -} - -func TestFormatExpressRouteCrossConnectionID(t *testing.T) { - actual := NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCrossConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - } -} - -func TestParseExpressRouteCrossConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - } -} - -func TestSegmentsForExpressRouteCrossConnectionId(t *testing.T) { - segments := ExpressRouteCrossConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCrossConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_peering.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_peering.go deleted file mode 100644 index 8ff1861f76d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_peering.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringId{} - -// PeeringId is a struct representing the Resource ID for a Peering -type PeeringId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string - PeeringName string -} - -// NewPeeringID returns a new PeeringId struct -func NewPeeringID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string, peeringName string) PeeringId { - return PeeringId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - PeeringName: peeringName, - } -} - -// ParsePeeringID parses 'input' into a PeeringId -func ParsePeeringID(input string) (*PeeringId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - return &id, nil -} - -// ParsePeeringIDInsensitively parses 'input' case-insensitively into a PeeringId -// note: this method should only be used for API response data and not user input -func ParsePeeringIDInsensitively(input string) (*PeeringId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringID checks that 'input' can be parsed as a Peering ID -func ValidatePeeringID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering ID -func (id PeeringId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s/peerings/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName, id.PeeringName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering ID -func (id PeeringId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - } -} - -// String returns a human-readable description of this Peering ID -func (id PeeringId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - } - return fmt.Sprintf("Peering (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_peering_test.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_peering_test.go deleted file mode 100644 index bf32bedd8cb..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/id_peering_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringId{} - -func TestNewPeeringID(t *testing.T) { - id := NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } -} - -func TestFormatPeeringID(t *testing.T) { - actual := NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Expected: &PeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - } -} - -func TestParsePeeringIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Expected: &PeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Expected: &PeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - PeeringName: "pEeRiNgVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - } -} - -func TestSegmentsForPeeringId(t *testing.T) { - segments := PeeringId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_createorupdate.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_createorupdate.go deleted file mode 100644 index c906a0ff64a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx context.Context, id PeeringId, input ExpressRouteCrossConnectionPeering) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateThenPoll(ctx context.Context, id PeeringId, input ExpressRouteCrossConnectionPeering) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_delete.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_delete.go deleted file mode 100644 index f2073ab1bd3..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Context, id PeeringId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCrossConnectionPeeringsClient) DeleteThenPoll(ctx context.Context, id PeeringId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_get.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_get.go deleted file mode 100644 index 3f9b08ca277..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCrossConnectionPeering -} - -// Get ... -func (c ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, id PeeringId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_list.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_list.go deleted file mode 100644 index 6703864be9d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCrossConnectionPeering -} - -type ListCompleteResult struct { - Items []ExpressRouteCrossConnectionPeering -} - -// List ... -func (c ExpressRouteCrossConnectionPeeringsClient) List(ctx context.Context, id ExpressRouteCrossConnectionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/peerings", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCrossConnectionPeering `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCrossConnectionPeeringsClient) ListComplete(ctx context.Context, id ExpressRouteCrossConnectionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCrossConnectionPeeringOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCrossConnectionPeeringsClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRouteCrossConnectionId, predicate ExpressRouteCrossConnectionPeeringOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCrossConnectionPeering, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 298b61e03ee..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeering.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeering.go deleted file mode 100644 index 3244f828098..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeering.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeeringproperties.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeeringproperties.go deleted file mode 100644 index 64330e5a7ea..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeeringproperties.go +++ /dev/null @@ -1,22 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeeringProperties struct { - AzureASN *int64 `json:"azureASN,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index ec7f2c4a72c..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_subresource.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_subresource.go deleted file mode 100644 index 919b934c547..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/predicates.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/predicates.go deleted file mode 100644 index abec5984ec1..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeeringOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p ExpressRouteCrossConnectionPeeringOperationPredicate) Matches(input ExpressRouteCrossConnectionPeering) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/version.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/version.go deleted file mode 100644 index 2d84cd84baf..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionpeerings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionpeerings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/README.md deleted file mode 100644 index 9ff3c26d381..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable` Documentation - -The `expressroutecrossconnectionroutetable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionRouteTableClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionRouteTableClient.ExpressRouteCrossConnectionsListRoutesTable` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue") - -if err := client.ExpressRouteCrossConnectionsListRoutesTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/client.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/client.go deleted file mode 100644 index 4437ac75b0d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnectionroutetable - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionRouteTableClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionRouteTableClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionRouteTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnectionroutetable", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableClient: %+v", err) - } - - return &ExpressRouteCrossConnectionRouteTableClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go deleted file mode 100644 index 5c0a0ea5302..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecrossconnectionroutetable - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionPeeringRouteTableId{} - -// ExpressRouteCrossConnectionPeeringRouteTableId is a struct representing the Resource ID for a Express Route Cross Connection Peering Route Table -type ExpressRouteCrossConnectionPeeringRouteTableId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string - PeeringName string - RouteTableName string -} - -// NewExpressRouteCrossConnectionPeeringRouteTableID returns a new ExpressRouteCrossConnectionPeeringRouteTableId struct -func NewExpressRouteCrossConnectionPeeringRouteTableID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string, peeringName string, routeTableName string) ExpressRouteCrossConnectionPeeringRouteTableId { - return ExpressRouteCrossConnectionPeeringRouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - PeeringName: peeringName, - RouteTableName: routeTableName, - } -} - -// ParseExpressRouteCrossConnectionPeeringRouteTableID parses 'input' into a ExpressRouteCrossConnectionPeeringRouteTableId -func ParseExpressRouteCrossConnectionPeeringRouteTableID(input string) (*ExpressRouteCrossConnectionPeeringRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionPeeringRouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionPeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively parses 'input' case-insensitively into a ExpressRouteCrossConnectionPeeringRouteTableId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(input string) (*ExpressRouteCrossConnectionPeeringRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionPeeringRouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionPeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCrossConnectionPeeringRouteTableID checks that 'input' can be parsed as a Express Route Cross Connection Peering Route Table ID -func ValidateExpressRouteCrossConnectionPeeringRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCrossConnectionPeeringRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Cross Connection Peering Route Table ID -func (id ExpressRouteCrossConnectionPeeringRouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s/peerings/%s/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName, id.PeeringName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Cross Connection Peering Route Table ID -func (id ExpressRouteCrossConnectionPeeringRouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Express Route Cross Connection Peering Route Table ID -func (id ExpressRouteCrossConnectionPeeringRouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Express Route Cross Connection Peering Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable_test.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable_test.go deleted file mode 100644 index 10f2f2389e8..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecrossconnectionroutetable - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionPeeringRouteTableId{} - -func TestNewExpressRouteCrossConnectionPeeringRouteTableID(t *testing.T) { - id := NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatExpressRouteCrossConnectionPeeringRouteTableID(t *testing.T) { - actual := NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCrossConnectionPeeringRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionPeeringRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue", - Expected: &ExpressRouteCrossConnectionPeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionPeeringRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionPeeringRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue", - Expected: &ExpressRouteCrossConnectionPeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &ExpressRouteCrossConnectionPeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - PeeringName: "pEeRiNgVaLuE", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForExpressRouteCrossConnectionPeeringRouteTableId(t *testing.T) { - segments := ExpressRouteCrossConnectionPeeringRouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCrossConnectionPeeringRouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go deleted file mode 100644 index ed8ff9b8feb..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecrossconnectionroutetable - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsListRoutesTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCrossConnectionsListRoutesTable ... -func (c ExpressRouteCrossConnectionRouteTableClient) ExpressRouteCrossConnectionsListRoutesTable(ctx context.Context, id ExpressRouteCrossConnectionPeeringRouteTableId) (result ExpressRouteCrossConnectionsListRoutesTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCrossConnectionsListRoutesTableThenPoll performs ExpressRouteCrossConnectionsListRoutesTable then polls until it's completed -func (c ExpressRouteCrossConnectionRouteTableClient) ExpressRouteCrossConnectionsListRoutesTableThenPoll(ctx context.Context, id ExpressRouteCrossConnectionPeeringRouteTableId) error { - result, err := c.ExpressRouteCrossConnectionsListRoutesTable(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCrossConnectionsListRoutesTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCrossConnectionsListRoutesTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitroutestable.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitroutestable.go deleted file mode 100644 index 4861d1c6ca2..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitroutestable.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionroutetable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTable struct { - LocPrf *string `json:"locPrf,omitempty"` - Network *string `json:"network,omitempty"` - NextHop *string `json:"nextHop,omitempty"` - Path *string `json:"path,omitempty"` - Weight *int64 `json:"weight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index d42583463b3..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/version.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/version.go deleted file mode 100644 index 4a1456896d0..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetable/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionroutetable - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/README.md deleted file mode 100644 index 0dd4d389863..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary` Documentation - -The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnectionroutetablesummary.NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionRouteTableSummaryClient.ExpressRouteCrossConnectionsListRoutesTableSummary` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionroutetablesummary.NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue") - -if err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/client.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/client.go deleted file mode 100644 index d9ffe2f386e..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionRouteTableSummaryClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionRouteTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableSummaryClient: %+v", err) - } - - return &ExpressRouteCrossConnectionRouteTableSummaryClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go deleted file mode 100644 index d679350bf9b..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringRouteTablesSummaryId{} - -// PeeringRouteTablesSummaryId is a struct representing the Resource ID for a Peering Route Tables Summary -type PeeringRouteTablesSummaryId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string - PeeringName string - RouteTablesSummaryName string -} - -// NewPeeringRouteTablesSummaryID returns a new PeeringRouteTablesSummaryId struct -func NewPeeringRouteTablesSummaryID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string, peeringName string, routeTablesSummaryName string) PeeringRouteTablesSummaryId { - return PeeringRouteTablesSummaryId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - PeeringName: peeringName, - RouteTablesSummaryName: routeTablesSummaryName, - } -} - -// ParsePeeringRouteTablesSummaryID parses 'input' into a PeeringRouteTablesSummaryId -func ParsePeeringRouteTablesSummaryID(input string) (*PeeringRouteTablesSummaryId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringRouteTablesSummaryId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringRouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) - } - - return &id, nil -} - -// ParsePeeringRouteTablesSummaryIDInsensitively parses 'input' case-insensitively into a PeeringRouteTablesSummaryId -// note: this method should only be used for API response data and not user input -func ParsePeeringRouteTablesSummaryIDInsensitively(input string) (*PeeringRouteTablesSummaryId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringRouteTablesSummaryId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringRouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringRouteTablesSummaryID checks that 'input' can be parsed as a Peering Route Tables Summary ID -func ValidatePeeringRouteTablesSummaryID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringRouteTablesSummaryID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering Route Tables Summary ID -func (id PeeringRouteTablesSummaryId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s/peerings/%s/routeTablesSummary/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName, id.PeeringName, id.RouteTablesSummaryName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering Route Tables Summary ID -func (id PeeringRouteTablesSummaryId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticRouteTablesSummary", "routeTablesSummary", "routeTablesSummary"), - resourceids.UserSpecifiedSegment("routeTablesSummaryName", "routeTablesSummaryValue"), - } -} - -// String returns a human-readable description of this Peering Route Tables Summary ID -func (id PeeringRouteTablesSummaryId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Route Tables Summary Name: %q", id.RouteTablesSummaryName), - } - return fmt.Sprintf("Peering Route Tables Summary (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary_test.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary_test.go deleted file mode 100644 index 2a3ec3f77ff..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringRouteTablesSummaryId{} - -func TestNewPeeringRouteTablesSummaryID(t *testing.T) { - id := NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.RouteTablesSummaryName != "routeTablesSummaryValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTablesSummaryName'", id.RouteTablesSummaryName, "routeTablesSummaryValue") - } -} - -func TestFormatPeeringRouteTablesSummaryID(t *testing.T) { - actual := NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringRouteTablesSummaryID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringRouteTablesSummaryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue", - Expected: &PeeringRouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - RouteTablesSummaryName: "routeTablesSummaryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringRouteTablesSummaryID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTablesSummaryName != v.Expected.RouteTablesSummaryName { - t.Fatalf("Expected %q but got %q for RouteTablesSummaryName", v.Expected.RouteTablesSummaryName, actual.RouteTablesSummaryName) - } - - } -} - -func TestParsePeeringRouteTablesSummaryIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringRouteTablesSummaryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue", - Expected: &PeeringRouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - RouteTablesSummaryName: "routeTablesSummaryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY/rOuTeTaBlEsSuMmArYvAlUe", - Expected: &PeeringRouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - PeeringName: "pEeRiNgVaLuE", - RouteTablesSummaryName: "rOuTeTaBlEsSuMmArYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY/rOuTeTaBlEsSuMmArYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringRouteTablesSummaryIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTablesSummaryName != v.Expected.RouteTablesSummaryName { - t.Fatalf("Expected %q but got %q for RouteTablesSummaryName", v.Expected.RouteTablesSummaryName, actual.RouteTablesSummaryName) - } - - } -} - -func TestSegmentsForPeeringRouteTablesSummaryId(t *testing.T) { - segments := PeeringRouteTablesSummaryId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringRouteTablesSummaryId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go deleted file mode 100644 index 383873d1554..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsListRoutesTableSummaryOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCrossConnectionsListRoutesTableSummary ... -func (c ExpressRouteCrossConnectionRouteTableSummaryClient) ExpressRouteCrossConnectionsListRoutesTableSummary(ctx context.Context, id PeeringRouteTablesSummaryId) (result ExpressRouteCrossConnectionsListRoutesTableSummaryOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll performs ExpressRouteCrossConnectionsListRoutesTableSummary then polls until it's completed -func (c ExpressRouteCrossConnectionRouteTableSummaryClient) ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll(ctx context.Context, id PeeringRouteTablesSummaryId) error { - result, err := c.ExpressRouteCrossConnectionsListRoutesTableSummary(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCrossConnectionsListRoutesTableSummary: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCrossConnectionsListRoutesTableSummary: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionroutestablesummary.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionroutestablesummary.go deleted file mode 100644 index e13df051962..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionroutestablesummary.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionRoutesTableSummary struct { - Asn *int64 `json:"asn,omitempty"` - Neighbor *string `json:"neighbor,omitempty"` - StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` - UpDown *string `json:"upDown,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go deleted file mode 100644 index 21d57c1911b..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/version.go b/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/version.go deleted file mode 100644 index 500f8b36d88..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnectionroutetablesummary/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/README.md b/resource-manager/network/2022-09-01/expressroutecrossconnections/README.md deleted file mode 100644 index d8bc721b63a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/README.md +++ /dev/null @@ -1,108 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnections` Documentation - -The `expressroutecrossconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutecrossconnections" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnections.NewExpressRouteCrossConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - -payload := expressroutecrossconnections.ExpressRouteCrossConnection{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.List` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.UpdateTags` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - -payload := expressroutecrossconnections.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/client.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/client.go deleted file mode 100644 index 6c02cfc4b39..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionsClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionsClient: %+v", err) - } - - return &ExpressRouteCrossConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/constants.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/constants.go deleted file mode 100644 index 2e9d3456d55..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/constants.go +++ /dev/null @@ -1,277 +0,0 @@ -package expressroutecrossconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type ServiceProviderProvisioningState string - -const ( - ServiceProviderProvisioningStateDeprovisioning ServiceProviderProvisioningState = "Deprovisioning" - ServiceProviderProvisioningStateNotProvisioned ServiceProviderProvisioningState = "NotProvisioned" - ServiceProviderProvisioningStateProvisioned ServiceProviderProvisioningState = "Provisioned" - ServiceProviderProvisioningStateProvisioning ServiceProviderProvisioningState = "Provisioning" -) - -func PossibleValuesForServiceProviderProvisioningState() []string { - return []string{ - string(ServiceProviderProvisioningStateDeprovisioning), - string(ServiceProviderProvisioningStateNotProvisioned), - string(ServiceProviderProvisioningStateProvisioned), - string(ServiceProviderProvisioningStateProvisioning), - } -} - -func (s *ServiceProviderProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServiceProviderProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServiceProviderProvisioningState(input string) (*ServiceProviderProvisioningState, error) { - vals := map[string]ServiceProviderProvisioningState{ - "deprovisioning": ServiceProviderProvisioningStateDeprovisioning, - "notprovisioned": ServiceProviderProvisioningStateNotProvisioned, - "provisioned": ServiceProviderProvisioningStateProvisioned, - "provisioning": ServiceProviderProvisioningStateProvisioning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServiceProviderProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/id_expressroutecrossconnection.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/id_expressroutecrossconnection.go deleted file mode 100644 index a8eb6b95127..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/id_expressroutecrossconnection.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecrossconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionId{} - -// ExpressRouteCrossConnectionId is a struct representing the Resource ID for a Express Route Cross Connection -type ExpressRouteCrossConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string -} - -// NewExpressRouteCrossConnectionID returns a new ExpressRouteCrossConnectionId struct -func NewExpressRouteCrossConnectionID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string) ExpressRouteCrossConnectionId { - return ExpressRouteCrossConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - } -} - -// ParseExpressRouteCrossConnectionID parses 'input' into a ExpressRouteCrossConnectionId -func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCrossConnectionIDInsensitively parses 'input' case-insensitively into a ExpressRouteCrossConnectionId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRouteCrossConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCrossConnectionID checks that 'input' can be parsed as a Express Route Cross Connection ID -func ValidateExpressRouteCrossConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCrossConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - } -} - -// String returns a human-readable description of this Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - } - return fmt.Sprintf("Express Route Cross Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/id_expressroutecrossconnection_test.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/id_expressroutecrossconnection_test.go deleted file mode 100644 index 610f0fd32f1..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/id_expressroutecrossconnection_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecrossconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionId{} - -func TestNewExpressRouteCrossConnectionID(t *testing.T) { - id := NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } -} - -func TestFormatExpressRouteCrossConnectionID(t *testing.T) { - actual := NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCrossConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - } -} - -func TestParseExpressRouteCrossConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - } -} - -func TestSegmentsForExpressRouteCrossConnectionId(t *testing.T) { - segments := ExpressRouteCrossConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCrossConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_createorupdate.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/method_createorupdate.go deleted file mode 100644 index 098ffd595ed..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_createorupdate.go +++ /dev/null @@ -1,73 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Context, id ExpressRouteCrossConnectionId, input ExpressRouteCrossConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCrossConnectionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRouteCrossConnectionId, input ExpressRouteCrossConnection) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_get.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/method_get.go deleted file mode 100644 index 0690a0b91f4..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCrossConnection -} - -// Get ... -func (c ExpressRouteCrossConnectionsClient) Get(ctx context.Context, id ExpressRouteCrossConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_list.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/method_list.go deleted file mode 100644 index c78b435eedc..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCrossConnection -} - -type ListCompleteResult struct { - Items []ExpressRouteCrossConnection -} - -// List ... -func (c ExpressRouteCrossConnectionsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteCrossConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCrossConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCrossConnectionsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCrossConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCrossConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRouteCrossConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCrossConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/method_listbyresourcegroup.go deleted file mode 100644 index 529dd057edf..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCrossConnection -} - -type ListByResourceGroupCompleteResult struct { - Items []ExpressRouteCrossConnection -} - -// ListByResourceGroup ... -func (c ExpressRouteCrossConnectionsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteCrossConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCrossConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c ExpressRouteCrossConnectionsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ExpressRouteCrossConnectionOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCrossConnectionsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ExpressRouteCrossConnectionOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]ExpressRouteCrossConnection, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_updatetags.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/method_updatetags.go deleted file mode 100644 index a7ae529a169..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCrossConnection -} - -// UpdateTags ... -func (c ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, id ExpressRouteCrossConnectionId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 08d50c826a9..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecircuitreference.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecircuitreference.go deleted file mode 100644 index cbf4167bab5..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecircuitreference.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitReference struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnection.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnection.go deleted file mode 100644 index 52da62754ff..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnection.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionpeering.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionpeering.go deleted file mode 100644 index e207a422215..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionpeering.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionpeeringproperties.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionpeeringproperties.go deleted file mode 100644 index 0d9a1673538..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionpeeringproperties.go +++ /dev/null @@ -1,22 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeeringProperties struct { - AzureASN *int64 `json:"azureASN,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionproperties.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionproperties.go deleted file mode 100644 index 84515d8082c..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_expressroutecrossconnectionproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionProperties struct { - BandwidthInMbps *int64 `json:"bandwidthInMbps,omitempty"` - ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` - PeeringLocation *string `json:"peeringLocation,omitempty"` - Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - STag *int64 `json:"sTag,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - ServiceProviderProvisioningState *ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index 0101ae80d9e..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_subresource.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/model_subresource.go deleted file mode 100644 index b2922ebb4d1..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_tagsobject.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/model_tagsobject.go deleted file mode 100644 index f47ce1a3f42..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/predicates.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/predicates.go deleted file mode 100644 index f3d9b3a8dff..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRouteCrossConnectionOperationPredicate) Matches(input ExpressRouteCrossConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressroutecrossconnections/version.go b/resource-manager/network/2022-09-01/expressroutecrossconnections/version.go deleted file mode 100644 index 3f4bb319ce1..00000000000 --- a/resource-manager/network/2022-09-01/expressroutecrossconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/README.md b/resource-manager/network/2022-09-01/expressroutegateways/README.md deleted file mode 100644 index 5bb7aefb868..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/README.md +++ /dev/null @@ -1,114 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutegateways` Documentation - -The `expressroutegateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutegateways" -``` - - -### Client Initialization - -```go -client := expressroutegateways.NewExpressRouteGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutegateways.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -payload := expressroutegateways.ExpressRouteGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := expressroutegateways.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.Get` - -```go -ctx := context.TODO() -id := expressroutegateways.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := expressroutegateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -read, err := client.ListByResourceGroup(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.ListBySubscription` - -```go -ctx := context.TODO() -id := expressroutegateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListBySubscription(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := expressroutegateways.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -payload := expressroutegateways.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutegateways/client.go b/resource-manager/network/2022-09-01/expressroutegateways/client.go deleted file mode 100644 index 474f4529b5a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutegateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteGatewaysClientWithBaseURI(api environments.Api) (*ExpressRouteGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutegateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteGatewaysClient: %+v", err) - } - - return &ExpressRouteGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/constants.go b/resource-manager/network/2022-09-01/expressroutegateways/constants.go deleted file mode 100644 index ce8f5d5f24a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package expressroutegateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/id_expressroutegateway.go b/resource-manager/network/2022-09-01/expressroutegateways/id_expressroutegateway.go deleted file mode 100644 index 4e9f6ccc25f..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/id_expressroutegateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutegateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteGatewayId{} - -// ExpressRouteGatewayId is a struct representing the Resource ID for a Express Route Gateway -type ExpressRouteGatewayId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteGatewayName string -} - -// NewExpressRouteGatewayID returns a new ExpressRouteGatewayId struct -func NewExpressRouteGatewayID(subscriptionId string, resourceGroupName string, expressRouteGatewayName string) ExpressRouteGatewayId { - return ExpressRouteGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteGatewayName: expressRouteGatewayName, - } -} - -// ParseExpressRouteGatewayID parses 'input' into a ExpressRouteGatewayId -func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteGatewayIDInsensitively parses 'input' case-insensitively into a ExpressRouteGatewayId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteGatewayID checks that 'input' can be parsed as a Express Route Gateway ID -func ValidateExpressRouteGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Gateway ID -func (id ExpressRouteGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Gateway ID -func (id ExpressRouteGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteGateways", "expressRouteGateways", "expressRouteGateways"), - resourceids.UserSpecifiedSegment("expressRouteGatewayName", "expressRouteGatewayValue"), - } -} - -// String returns a human-readable description of this Express Route Gateway ID -func (id ExpressRouteGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Gateway Name: %q", id.ExpressRouteGatewayName), - } - return fmt.Sprintf("Express Route Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/id_expressroutegateway_test.go b/resource-manager/network/2022-09-01/expressroutegateways/id_expressroutegateway_test.go deleted file mode 100644 index 6a481aa8c6e..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/id_expressroutegateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutegateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteGatewayId{} - -func TestNewExpressRouteGatewayID(t *testing.T) { - id := NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteGatewayName != "expressRouteGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteGatewayName'", id.ExpressRouteGatewayName, "expressRouteGatewayValue") - } -} - -func TestFormatExpressRouteGatewayID(t *testing.T) { - actual := NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - } -} - -func TestParseExpressRouteGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteGatewayName: "eXpReSsRoUtEgAtEwAyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - } -} - -func TestSegmentsForExpressRouteGatewayId(t *testing.T) { - segments := ExpressRouteGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/method_createorupdate.go b/resource-manager/network/2022-09-01/expressroutegateways/method_createorupdate.go deleted file mode 100644 index 5be37ac97d3..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, id ExpressRouteGatewayId, input ExpressRouteGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRouteGatewayId, input ExpressRouteGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/method_delete.go b/resource-manager/network/2022-09-01/expressroutegateways/method_delete.go deleted file mode 100644 index 200f12cef03..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteGatewaysClient) Delete(ctx context.Context, id ExpressRouteGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteGatewaysClient) DeleteThenPoll(ctx context.Context, id ExpressRouteGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/method_get.go b/resource-manager/network/2022-09-01/expressroutegateways/method_get.go deleted file mode 100644 index 54c443259b1..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutegateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteGateway -} - -// Get ... -func (c ExpressRouteGatewaysClient) Get(ctx context.Context, id ExpressRouteGatewayId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/expressroutegateways/method_listbyresourcegroup.go deleted file mode 100644 index 608f1f9590d..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/method_listbyresourcegroup.go +++ /dev/null @@ -1,53 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteGatewayList -} - -// ListByResourceGroup ... -func (c ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/method_listbysubscription.go b/resource-manager/network/2022-09-01/expressroutegateways/method_listbysubscription.go deleted file mode 100644 index 10e12759fcc..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/method_listbysubscription.go +++ /dev/null @@ -1,53 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteGatewayList -} - -// ListBySubscription ... -func (c ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/method_updatetags.go b/resource-manager/network/2022-09-01/expressroutegateways/method_updatetags.go deleted file mode 100644 index 4fd81413ab8..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c ExpressRouteGatewaysClient) UpdateTags(ctx context.Context, id ExpressRouteGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c ExpressRouteGatewaysClient) UpdateTagsThenPoll(ctx context.Context, id ExpressRouteGatewayId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutecircuitpeeringid.go b/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutecircuitpeeringid.go deleted file mode 100644 index 832d97a1174..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutecircuitpeeringid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_expressrouteconnection.go b/resource-manager/network/2022-09-01/expressroutegateways/model_expressrouteconnection.go deleted file mode 100644 index 99219dd6cfd..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_expressrouteconnection.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnection struct { - Id *string `json:"id,omitempty"` - Name string `json:"name"` - Properties *ExpressRouteConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_expressrouteconnectionproperties.go b/resource-manager/network/2022-09-01/expressroutegateways/model_expressrouteconnectionproperties.go deleted file mode 100644 index 931b412129f..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_expressrouteconnectionproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionProperties struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - EnablePrivateLinkFastPath *bool `json:"enablePrivateLinkFastPath,omitempty"` - ExpressRouteCircuitPeering ExpressRouteCircuitPeeringId `json:"expressRouteCircuitPeering"` - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegateway.go b/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegateway.go deleted file mode 100644 index 5505ff540a8..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaylist.go b/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaylist.go deleted file mode 100644 index 51667424380..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaylist.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewayList struct { - Value *[]ExpressRouteGateway `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewayproperties.go b/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewayproperties.go deleted file mode 100644 index 4860e7d555a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewayproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewayProperties struct { - AllowNonVirtualWanTraffic *bool `json:"allowNonVirtualWanTraffic,omitempty"` - AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"` - ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub VirtualHubId `json:"virtualHub"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfiguration.go b/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfiguration.go deleted file mode 100644 index 60677f25d4c..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct { - Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfigurationbounds.go b/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfigurationbounds.go deleted file mode 100644 index 65a1ccb474b..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfigurationbounds.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { - Max *int64 `json:"max,omitempty"` - Min *int64 `json:"min,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_propagatedroutetable.go b/resource-manager/network/2022-09-01/expressroutegateways/model_propagatedroutetable.go deleted file mode 100644 index 93c6f306054..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_routingconfiguration.go b/resource-manager/network/2022-09-01/expressroutegateways/model_routingconfiguration.go deleted file mode 100644 index 670d9907881..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_staticroute.go b/resource-manager/network/2022-09-01/expressroutegateways/model_staticroute.go deleted file mode 100644 index 29422baf743..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_staticroutesconfig.go b/resource-manager/network/2022-09-01/expressroutegateways/model_staticroutesconfig.go deleted file mode 100644 index d570d0ec17a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_subresource.go b/resource-manager/network/2022-09-01/expressroutegateways/model_subresource.go deleted file mode 100644 index f86e3493340..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_tagsobject.go b/resource-manager/network/2022-09-01/expressroutegateways/model_tagsobject.go deleted file mode 100644 index 706aff41cd4..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_virtualhubid.go b/resource-manager/network/2022-09-01/expressroutegateways/model_virtualhubid.go deleted file mode 100644 index 41cb5ff6fd1..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_virtualhubid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/model_vnetroute.go b/resource-manager/network/2022-09-01/expressroutegateways/model_vnetroute.go deleted file mode 100644 index c9586e946c6..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutegateways/version.go b/resource-manager/network/2022-09-01/expressroutegateways/version.go deleted file mode 100644 index 6cf0c066f5b..00000000000 --- a/resource-manager/network/2022-09-01/expressroutegateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutegateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutegateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/README.md b/resource-manager/network/2022-09-01/expressroutelinks/README.md deleted file mode 100644 index 8780a4fd169..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutelinks` Documentation - -The `expressroutelinks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressroutelinks" -``` - - -### Client Initialization - -```go -client := expressroutelinks.NewExpressRouteLinksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteLinksClient.Get` - -```go -ctx := context.TODO() -id := expressroutelinks.NewLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "linkValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteLinksClient.List` - -```go -ctx := context.TODO() -id := expressroutelinks.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/expressroutelinks/client.go b/resource-manager/network/2022-09-01/expressroutelinks/client.go deleted file mode 100644 index 316b515aeba..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutelinks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinksClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteLinksClientWithBaseURI(api environments.Api) (*ExpressRouteLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutelinks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteLinksClient: %+v", err) - } - - return &ExpressRouteLinksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/constants.go b/resource-manager/network/2022-09-01/expressroutelinks/constants.go deleted file mode 100644 index bc075bf128a..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/constants.go +++ /dev/null @@ -1,227 +0,0 @@ -package expressroutelinks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkAdminState string - -const ( - ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled" - ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled" -) - -func PossibleValuesForExpressRouteLinkAdminState() []string { - return []string{ - string(ExpressRouteLinkAdminStateDisabled), - string(ExpressRouteLinkAdminStateEnabled), - } -} - -func (s *ExpressRouteLinkAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkAdminState(input string) (*ExpressRouteLinkAdminState, error) { - vals := map[string]ExpressRouteLinkAdminState{ - "disabled": ExpressRouteLinkAdminStateDisabled, - "enabled": ExpressRouteLinkAdminStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkAdminState(input) - return &out, nil -} - -type ExpressRouteLinkConnectorType string - -const ( - ExpressRouteLinkConnectorTypeLC ExpressRouteLinkConnectorType = "LC" - ExpressRouteLinkConnectorTypeSC ExpressRouteLinkConnectorType = "SC" -) - -func PossibleValuesForExpressRouteLinkConnectorType() []string { - return []string{ - string(ExpressRouteLinkConnectorTypeLC), - string(ExpressRouteLinkConnectorTypeSC), - } -} - -func (s *ExpressRouteLinkConnectorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkConnectorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkConnectorType(input string) (*ExpressRouteLinkConnectorType, error) { - vals := map[string]ExpressRouteLinkConnectorType{ - "lc": ExpressRouteLinkConnectorTypeLC, - "sc": ExpressRouteLinkConnectorTypeSC, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkConnectorType(input) - return &out, nil -} - -type ExpressRouteLinkMacSecCipher string - -const ( - ExpressRouteLinkMacSecCipherGcmAesOneTwoEight ExpressRouteLinkMacSecCipher = "GcmAes128" - ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix ExpressRouteLinkMacSecCipher = "GcmAes256" - ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight ExpressRouteLinkMacSecCipher = "GcmAesXpn128" - ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix ExpressRouteLinkMacSecCipher = "GcmAesXpn256" -) - -func PossibleValuesForExpressRouteLinkMacSecCipher() []string { - return []string{ - string(ExpressRouteLinkMacSecCipherGcmAesOneTwoEight), - string(ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix), - string(ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight), - string(ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix), - } -} - -func (s *ExpressRouteLinkMacSecCipher) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkMacSecCipher(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkMacSecCipher(input string) (*ExpressRouteLinkMacSecCipher, error) { - vals := map[string]ExpressRouteLinkMacSecCipher{ - "gcmaes128": ExpressRouteLinkMacSecCipherGcmAesOneTwoEight, - "gcmaes256": ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix, - "gcmaesxpn128": ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight, - "gcmaesxpn256": ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkMacSecCipher(input) - return &out, nil -} - -type ExpressRouteLinkMacSecSciState string - -const ( - ExpressRouteLinkMacSecSciStateDisabled ExpressRouteLinkMacSecSciState = "Disabled" - ExpressRouteLinkMacSecSciStateEnabled ExpressRouteLinkMacSecSciState = "Enabled" -) - -func PossibleValuesForExpressRouteLinkMacSecSciState() []string { - return []string{ - string(ExpressRouteLinkMacSecSciStateDisabled), - string(ExpressRouteLinkMacSecSciStateEnabled), - } -} - -func (s *ExpressRouteLinkMacSecSciState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkMacSecSciState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkMacSecSciState(input string) (*ExpressRouteLinkMacSecSciState, error) { - vals := map[string]ExpressRouteLinkMacSecSciState{ - "disabled": ExpressRouteLinkMacSecSciStateDisabled, - "enabled": ExpressRouteLinkMacSecSciStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkMacSecSciState(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/id_expressrouteport.go b/resource-manager/network/2022-09-01/expressroutelinks/id_expressrouteport.go deleted file mode 100644 index 4c0b60ea457..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/id_expressrouteport.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutelinks - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -// ExpressRoutePortId is a struct representing the Resource ID for a Express Route Port -type ExpressRoutePortId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string -} - -// NewExpressRoutePortID returns a new ExpressRoutePortId struct -func NewExpressRoutePortID(subscriptionId string, resourceGroupName string, expressRoutePortName string) ExpressRoutePortId { - return ExpressRoutePortId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - } -} - -// ParseExpressRoutePortID parses 'input' into a ExpressRoutePortId -func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortID checks that 'input' can be parsed as a Express Route Port ID -func ValidateExpressRoutePortID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Port ID -func (id ExpressRoutePortId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Port ID -func (id ExpressRoutePortId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - } -} - -// String returns a human-readable description of this Express Route Port ID -func (id ExpressRoutePortId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - } - return fmt.Sprintf("Express Route Port (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/id_expressrouteport_test.go b/resource-manager/network/2022-09-01/expressroutelinks/id_expressrouteport_test.go deleted file mode 100644 index 65f7d26a08b..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/id_expressrouteport_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutelinks - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -func TestNewExpressRoutePortID(t *testing.T) { - id := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } -} - -func TestFormatExpressRoutePortID(t *testing.T) { - actual := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestParseExpressRoutePortIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestSegmentsForExpressRoutePortId(t *testing.T) { - segments := ExpressRoutePortId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/id_link.go b/resource-manager/network/2022-09-01/expressroutelinks/id_link.go deleted file mode 100644 index 39a80538a62..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/id_link.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressroutelinks - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LinkId{} - -// LinkId is a struct representing the Resource ID for a Link -type LinkId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string - LinkName string -} - -// NewLinkID returns a new LinkId struct -func NewLinkID(subscriptionId string, resourceGroupName string, expressRoutePortName string, linkName string) LinkId { - return LinkId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - LinkName: linkName, - } -} - -// ParseLinkID parses 'input' into a LinkId -func ParseLinkID(input string) (*LinkId, error) { - parser := resourceids.NewParserFromResourceIdType(LinkId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.LinkName, ok = parsed.Parsed["linkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkName", *parsed) - } - - return &id, nil -} - -// ParseLinkIDInsensitively parses 'input' case-insensitively into a LinkId -// note: this method should only be used for API response data and not user input -func ParseLinkIDInsensitively(input string) (*LinkId, error) { - parser := resourceids.NewParserFromResourceIdType(LinkId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.LinkName, ok = parsed.Parsed["linkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkName", *parsed) - } - - return &id, nil -} - -// ValidateLinkID checks that 'input' can be parsed as a Link ID -func ValidateLinkID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLinkID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Link ID -func (id LinkId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s/links/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName, id.LinkName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Link ID -func (id LinkId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - resourceids.StaticSegment("staticLinks", "links", "links"), - resourceids.UserSpecifiedSegment("linkName", "linkValue"), - } -} - -// String returns a human-readable description of this Link ID -func (id LinkId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - fmt.Sprintf("Link Name: %q", id.LinkName), - } - return fmt.Sprintf("Link (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/id_link_test.go b/resource-manager/network/2022-09-01/expressroutelinks/id_link_test.go deleted file mode 100644 index 67420e5a0eb..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/id_link_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressroutelinks - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LinkId{} - -func TestNewLinkID(t *testing.T) { - id := NewLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "linkValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } - - if id.LinkName != "linkValue" { - t.Fatalf("Expected %q but got %q for Segment 'LinkName'", id.LinkName, "linkValue") - } -} - -func TestFormatLinkID(t *testing.T) { - actual := NewLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "linkValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLinkID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LinkId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue", - Expected: &LinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - LinkName: "linkValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLinkID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - if actual.LinkName != v.Expected.LinkName { - t.Fatalf("Expected %q but got %q for LinkName", v.Expected.LinkName, actual.LinkName) - } - - } -} - -func TestParseLinkIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LinkId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/lInKs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue", - Expected: &LinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - LinkName: "linkValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/lInKs/lInKvAlUe", - Expected: &LinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - LinkName: "lInKvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/lInKs/lInKvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLinkIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - if actual.LinkName != v.Expected.LinkName { - t.Fatalf("Expected %q but got %q for LinkName", v.Expected.LinkName, actual.LinkName) - } - - } -} - -func TestSegmentsForLinkId(t *testing.T) { - segments := LinkId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LinkId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/method_get.go b/resource-manager/network/2022-09-01/expressroutelinks/method_get.go deleted file mode 100644 index 1b2aa890c99..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutelinks - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteLink -} - -// Get ... -func (c ExpressRouteLinksClient) Get(ctx context.Context, id LinkId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/method_list.go b/resource-manager/network/2022-09-01/expressroutelinks/method_list.go deleted file mode 100644 index 1c924747e76..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressroutelinks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteLink -} - -type ListCompleteResult struct { - Items []ExpressRouteLink -} - -// List ... -func (c ExpressRouteLinksClient) List(ctx context.Context, id ExpressRoutePortId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/links", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteLinksClient) ListComplete(ctx context.Context, id ExpressRoutePortId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteLinkOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteLinksClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRoutePortId, predicate ExpressRouteLinkOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteLink, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelink.go b/resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelink.go deleted file mode 100644 index d8919f16d71..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelink.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutelinks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelinkmacsecconfig.go b/resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelinkmacsecconfig.go deleted file mode 100644 index 91551b3b16f..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelinkmacsecconfig.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutelinks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkMacSecConfig struct { - CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"` - Cipher *ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"` - CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"` - SciState *ExpressRouteLinkMacSecSciState `json:"sciState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelinkpropertiesformat.go b/resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelinkpropertiesformat.go deleted file mode 100644 index 6d9466ff4ff..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/model_expressroutelinkpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package expressroutelinks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkPropertiesFormat struct { - AdminState *ExpressRouteLinkAdminState `json:"adminState,omitempty"` - ColoLocation *string `json:"coloLocation,omitempty"` - ConnectorType *ExpressRouteLinkConnectorType `json:"connectorType,omitempty"` - InterfaceName *string `json:"interfaceName,omitempty"` - MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"` - PatchPanelId *string `json:"patchPanelId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RackId *string `json:"rackId,omitempty"` - RouterName *string `json:"routerName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/predicates.go b/resource-manager/network/2022-09-01/expressroutelinks/predicates.go deleted file mode 100644 index bd6127afc55..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package expressroutelinks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p ExpressRouteLinkOperationPredicate) Matches(input ExpressRouteLink) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressroutelinks/version.go b/resource-manager/network/2022-09-01/expressroutelinks/version.go deleted file mode 100644 index 866b116e227..00000000000 --- a/resource-manager/network/2022-09-01/expressroutelinks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutelinks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutelinks/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/README.md b/resource-manager/network/2022-09-01/expressrouteportauthorizations/README.md deleted file mode 100644 index 067ef67b652..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteportauthorizations` Documentation - -The `expressrouteportauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteportauthorizations" -``` - - -### Client Initialization - -```go -client := expressrouteportauthorizations.NewExpressRoutePortAuthorizationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRoutePortAuthorizationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressrouteportauthorizations.NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue") - -payload := expressrouteportauthorizations.ExpressRoutePortAuthorization{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRoutePortAuthorizationsClient.Delete` - -```go -ctx := context.TODO() -id := expressrouteportauthorizations.NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRoutePortAuthorizationsClient.Get` - -```go -ctx := context.TODO() -id := expressrouteportauthorizations.NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRoutePortAuthorizationsClient.List` - -```go -ctx := context.TODO() -id := expressrouteportauthorizations.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/client.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/client.go deleted file mode 100644 index 532d877b9fe..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteportauthorizations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorizationsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRoutePortAuthorizationsClientWithBaseURI(api environments.Api) (*ExpressRoutePortAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteportauthorizations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRoutePortAuthorizationsClient: %+v", err) - } - - return &ExpressRoutePortAuthorizationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/constants.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/constants.go deleted file mode 100644 index 3fbd20f1075..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package expressrouteportauthorizations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorizationUseStatus string - -const ( - ExpressRoutePortAuthorizationUseStatusAvailable ExpressRoutePortAuthorizationUseStatus = "Available" - ExpressRoutePortAuthorizationUseStatusInUse ExpressRoutePortAuthorizationUseStatus = "InUse" -) - -func PossibleValuesForExpressRoutePortAuthorizationUseStatus() []string { - return []string{ - string(ExpressRoutePortAuthorizationUseStatusAvailable), - string(ExpressRoutePortAuthorizationUseStatusInUse), - } -} - -func (s *ExpressRoutePortAuthorizationUseStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePortAuthorizationUseStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePortAuthorizationUseStatus(input string) (*ExpressRoutePortAuthorizationUseStatus, error) { - vals := map[string]ExpressRoutePortAuthorizationUseStatus{ - "available": ExpressRoutePortAuthorizationUseStatusAvailable, - "inuse": ExpressRoutePortAuthorizationUseStatusInUse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePortAuthorizationUseStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteport.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteport.go deleted file mode 100644 index be98e366b7f..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteport.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressrouteportauthorizations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -// ExpressRoutePortId is a struct representing the Resource ID for a Express Route Port -type ExpressRoutePortId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string -} - -// NewExpressRoutePortID returns a new ExpressRoutePortId struct -func NewExpressRoutePortID(subscriptionId string, resourceGroupName string, expressRoutePortName string) ExpressRoutePortId { - return ExpressRoutePortId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - } -} - -// ParseExpressRoutePortID parses 'input' into a ExpressRoutePortId -func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortID checks that 'input' can be parsed as a Express Route Port ID -func ValidateExpressRoutePortID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Port ID -func (id ExpressRoutePortId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Port ID -func (id ExpressRoutePortId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - } -} - -// String returns a human-readable description of this Express Route Port ID -func (id ExpressRoutePortId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - } - return fmt.Sprintf("Express Route Port (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteport_test.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteport_test.go deleted file mode 100644 index ebb9d47ae1c..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteport_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressrouteportauthorizations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -func TestNewExpressRoutePortID(t *testing.T) { - id := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } -} - -func TestFormatExpressRoutePortID(t *testing.T) { - actual := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestParseExpressRoutePortIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestSegmentsForExpressRoutePortId(t *testing.T) { - segments := ExpressRoutePortId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteportauthorization.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteportauthorization.go deleted file mode 100644 index 5b7042091d0..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteportauthorization.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressrouteportauthorizations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortAuthorizationId{} - -// ExpressRoutePortAuthorizationId is a struct representing the Resource ID for a Express Route Port Authorization -type ExpressRoutePortAuthorizationId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string - AuthorizationName string -} - -// NewExpressRoutePortAuthorizationID returns a new ExpressRoutePortAuthorizationId struct -func NewExpressRoutePortAuthorizationID(subscriptionId string, resourceGroupName string, expressRoutePortName string, authorizationName string) ExpressRoutePortAuthorizationId { - return ExpressRoutePortAuthorizationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - AuthorizationName: authorizationName, - } -} - -// ParseExpressRoutePortAuthorizationID parses 'input' into a ExpressRoutePortAuthorizationId -func ParseExpressRoutePortAuthorizationID(input string) (*ExpressRoutePortAuthorizationId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortAuthorizationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortAuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortAuthorizationIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortAuthorizationId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortAuthorizationIDInsensitively(input string) (*ExpressRoutePortAuthorizationId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortAuthorizationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortAuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortAuthorizationID checks that 'input' can be parsed as a Express Route Port Authorization ID -func ValidateExpressRoutePortAuthorizationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortAuthorizationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Port Authorization ID -func (id ExpressRoutePortAuthorizationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s/authorizations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName, id.AuthorizationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Port Authorization ID -func (id ExpressRoutePortAuthorizationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - resourceids.StaticSegment("staticAuthorizations", "authorizations", "authorizations"), - resourceids.UserSpecifiedSegment("authorizationName", "authorizationValue"), - } -} - -// String returns a human-readable description of this Express Route Port Authorization ID -func (id ExpressRoutePortAuthorizationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - fmt.Sprintf("Authorization Name: %q", id.AuthorizationName), - } - return fmt.Sprintf("Express Route Port Authorization (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteportauthorization_test.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteportauthorization_test.go deleted file mode 100644 index b1cbdc14bbb..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/id_expressrouteportauthorization_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressrouteportauthorizations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortAuthorizationId{} - -func TestNewExpressRoutePortAuthorizationID(t *testing.T) { - id := NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } - - if id.AuthorizationName != "authorizationValue" { - t.Fatalf("Expected %q but got %q for Segment 'AuthorizationName'", id.AuthorizationName, "authorizationValue") - } -} - -func TestFormatExpressRoutePortAuthorizationID(t *testing.T) { - actual := NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortAuthorizationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortAuthorizationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue", - Expected: &ExpressRoutePortAuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - AuthorizationName: "authorizationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortAuthorizationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - if actual.AuthorizationName != v.Expected.AuthorizationName { - t.Fatalf("Expected %q but got %q for AuthorizationName", v.Expected.AuthorizationName, actual.AuthorizationName) - } - - } -} - -func TestParseExpressRoutePortAuthorizationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortAuthorizationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/aUtHoRiZaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue", - Expected: &ExpressRoutePortAuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - AuthorizationName: "authorizationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/aUtHoRiZaTiOnS/aUtHoRiZaTiOnVaLuE", - Expected: &ExpressRoutePortAuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - AuthorizationName: "aUtHoRiZaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/aUtHoRiZaTiOnS/aUtHoRiZaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortAuthorizationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - if actual.AuthorizationName != v.Expected.AuthorizationName { - t.Fatalf("Expected %q but got %q for AuthorizationName", v.Expected.AuthorizationName, actual.AuthorizationName) - } - - } -} - -func TestSegmentsForExpressRoutePortAuthorizationId(t *testing.T) { - segments := ExpressRoutePortAuthorizationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortAuthorizationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_createorupdate.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_createorupdate.go deleted file mode 100644 index 9310042b48b..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressrouteportauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRoutePortAuthorizationsClient) CreateOrUpdate(ctx context.Context, id ExpressRoutePortAuthorizationId, input ExpressRoutePortAuthorization) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRoutePortAuthorizationsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRoutePortAuthorizationId, input ExpressRoutePortAuthorization) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_delete.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_delete.go deleted file mode 100644 index 8940670b615..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressrouteportauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRoutePortAuthorizationsClient) Delete(ctx context.Context, id ExpressRoutePortAuthorizationId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRoutePortAuthorizationsClient) DeleteThenPoll(ctx context.Context, id ExpressRoutePortAuthorizationId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_get.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_get.go deleted file mode 100644 index e47761c3ca7..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteportauthorizations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRoutePortAuthorization -} - -// Get ... -func (c ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, id ExpressRoutePortAuthorizationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_list.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_list.go deleted file mode 100644 index 4cb6fc73a07..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressrouteportauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRoutePortAuthorization -} - -type ListCompleteResult struct { - Items []ExpressRoutePortAuthorization -} - -// List ... -func (c ExpressRoutePortAuthorizationsClient) List(ctx context.Context, id ExpressRoutePortId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/authorizations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRoutePortAuthorization `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRoutePortAuthorizationsClient) ListComplete(ctx context.Context, id ExpressRoutePortId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRoutePortAuthorizationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRoutePortAuthorizationsClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRoutePortId, predicate ExpressRoutePortAuthorizationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRoutePortAuthorization, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/model_expressrouteportauthorization.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/model_expressrouteportauthorization.go deleted file mode 100644 index aee29af0a99..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/model_expressrouteportauthorization.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteportauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorization struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRoutePortAuthorizationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/model_expressrouteportauthorizationpropertiesformat.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/model_expressrouteportauthorizationpropertiesformat.go deleted file mode 100644 index 9370c4f6323..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/model_expressrouteportauthorizationpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressrouteportauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorizationPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - AuthorizationUseStatus *ExpressRoutePortAuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` - CircuitResourceUri *string `json:"circuitResourceUri,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/predicates.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/predicates.go deleted file mode 100644 index d12fc29e52a..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressrouteportauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorizationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ExpressRoutePortAuthorizationOperationPredicate) Matches(input ExpressRoutePortAuthorization) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressrouteportauthorizations/version.go b/resource-manager/network/2022-09-01/expressrouteportauthorizations/version.go deleted file mode 100644 index fe87ad207a0..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportauthorizations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteportauthorizations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportauthorizations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/README.md b/resource-manager/network/2022-09-01/expressrouteports/README.md deleted file mode 100644 index ed873e6d4d6..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/README.md +++ /dev/null @@ -1,141 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteports` Documentation - -The `expressrouteports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteports" -``` - - -### Client Initialization - -```go -client := expressrouteports.NewExpressRoutePortsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRoutePortsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -payload := expressrouteports.ExpressRoutePort{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRoutePortsClient.Delete` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRoutePortsClient.GenerateLOA` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -payload := expressrouteports.GenerateExpressRoutePortsLOARequest{ - // ... -} - - -read, err := client.GenerateLOA(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRoutePortsClient.Get` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRoutePortsClient.List` - -```go -ctx := context.TODO() -id := expressrouteports.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRoutePortsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := expressrouteports.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRoutePortsClient.UpdateTags` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -payload := expressrouteports.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/expressrouteports/client.go b/resource-manager/network/2022-09-01/expressrouteports/client.go deleted file mode 100644 index e0be48aade5..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteports - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRoutePortsClientWithBaseURI(api environments.Api) (*ExpressRoutePortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteports", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRoutePortsClient: %+v", err) - } - - return &ExpressRoutePortsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/constants.go b/resource-manager/network/2022-09-01/expressrouteports/constants.go deleted file mode 100644 index 0c08bc2c72f..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/constants.go +++ /dev/null @@ -1,309 +0,0 @@ -package expressrouteports - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkAdminState string - -const ( - ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled" - ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled" -) - -func PossibleValuesForExpressRouteLinkAdminState() []string { - return []string{ - string(ExpressRouteLinkAdminStateDisabled), - string(ExpressRouteLinkAdminStateEnabled), - } -} - -func (s *ExpressRouteLinkAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkAdminState(input string) (*ExpressRouteLinkAdminState, error) { - vals := map[string]ExpressRouteLinkAdminState{ - "disabled": ExpressRouteLinkAdminStateDisabled, - "enabled": ExpressRouteLinkAdminStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkAdminState(input) - return &out, nil -} - -type ExpressRouteLinkConnectorType string - -const ( - ExpressRouteLinkConnectorTypeLC ExpressRouteLinkConnectorType = "LC" - ExpressRouteLinkConnectorTypeSC ExpressRouteLinkConnectorType = "SC" -) - -func PossibleValuesForExpressRouteLinkConnectorType() []string { - return []string{ - string(ExpressRouteLinkConnectorTypeLC), - string(ExpressRouteLinkConnectorTypeSC), - } -} - -func (s *ExpressRouteLinkConnectorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkConnectorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkConnectorType(input string) (*ExpressRouteLinkConnectorType, error) { - vals := map[string]ExpressRouteLinkConnectorType{ - "lc": ExpressRouteLinkConnectorTypeLC, - "sc": ExpressRouteLinkConnectorTypeSC, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkConnectorType(input) - return &out, nil -} - -type ExpressRouteLinkMacSecCipher string - -const ( - ExpressRouteLinkMacSecCipherGcmAesOneTwoEight ExpressRouteLinkMacSecCipher = "GcmAes128" - ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix ExpressRouteLinkMacSecCipher = "GcmAes256" - ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight ExpressRouteLinkMacSecCipher = "GcmAesXpn128" - ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix ExpressRouteLinkMacSecCipher = "GcmAesXpn256" -) - -func PossibleValuesForExpressRouteLinkMacSecCipher() []string { - return []string{ - string(ExpressRouteLinkMacSecCipherGcmAesOneTwoEight), - string(ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix), - string(ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight), - string(ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix), - } -} - -func (s *ExpressRouteLinkMacSecCipher) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkMacSecCipher(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkMacSecCipher(input string) (*ExpressRouteLinkMacSecCipher, error) { - vals := map[string]ExpressRouteLinkMacSecCipher{ - "gcmaes128": ExpressRouteLinkMacSecCipherGcmAesOneTwoEight, - "gcmaes256": ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix, - "gcmaesxpn128": ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight, - "gcmaesxpn256": ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkMacSecCipher(input) - return &out, nil -} - -type ExpressRouteLinkMacSecSciState string - -const ( - ExpressRouteLinkMacSecSciStateDisabled ExpressRouteLinkMacSecSciState = "Disabled" - ExpressRouteLinkMacSecSciStateEnabled ExpressRouteLinkMacSecSciState = "Enabled" -) - -func PossibleValuesForExpressRouteLinkMacSecSciState() []string { - return []string{ - string(ExpressRouteLinkMacSecSciStateDisabled), - string(ExpressRouteLinkMacSecSciStateEnabled), - } -} - -func (s *ExpressRouteLinkMacSecSciState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkMacSecSciState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkMacSecSciState(input string) (*ExpressRouteLinkMacSecSciState, error) { - vals := map[string]ExpressRouteLinkMacSecSciState{ - "disabled": ExpressRouteLinkMacSecSciStateDisabled, - "enabled": ExpressRouteLinkMacSecSciStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkMacSecSciState(input) - return &out, nil -} - -type ExpressRoutePortsBillingType string - -const ( - ExpressRoutePortsBillingTypeMeteredData ExpressRoutePortsBillingType = "MeteredData" - ExpressRoutePortsBillingTypeUnlimitedData ExpressRoutePortsBillingType = "UnlimitedData" -) - -func PossibleValuesForExpressRoutePortsBillingType() []string { - return []string{ - string(ExpressRoutePortsBillingTypeMeteredData), - string(ExpressRoutePortsBillingTypeUnlimitedData), - } -} - -func (s *ExpressRoutePortsBillingType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePortsBillingType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePortsBillingType(input string) (*ExpressRoutePortsBillingType, error) { - vals := map[string]ExpressRoutePortsBillingType{ - "metereddata": ExpressRoutePortsBillingTypeMeteredData, - "unlimiteddata": ExpressRoutePortsBillingTypeUnlimitedData, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePortsBillingType(input) - return &out, nil -} - -type ExpressRoutePortsEncapsulation string - -const ( - ExpressRoutePortsEncapsulationDotOneQ ExpressRoutePortsEncapsulation = "Dot1Q" - ExpressRoutePortsEncapsulationQinQ ExpressRoutePortsEncapsulation = "QinQ" -) - -func PossibleValuesForExpressRoutePortsEncapsulation() []string { - return []string{ - string(ExpressRoutePortsEncapsulationDotOneQ), - string(ExpressRoutePortsEncapsulationQinQ), - } -} - -func (s *ExpressRoutePortsEncapsulation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePortsEncapsulation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePortsEncapsulation(input string) (*ExpressRoutePortsEncapsulation, error) { - vals := map[string]ExpressRoutePortsEncapsulation{ - "dot1q": ExpressRoutePortsEncapsulationDotOneQ, - "qinq": ExpressRoutePortsEncapsulationQinQ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePortsEncapsulation(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/id_expressrouteport.go b/resource-manager/network/2022-09-01/expressrouteports/id_expressrouteport.go deleted file mode 100644 index 2d3ef3fed81..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/id_expressrouteport.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressrouteports - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -// ExpressRoutePortId is a struct representing the Resource ID for a Express Route Port -type ExpressRoutePortId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string -} - -// NewExpressRoutePortID returns a new ExpressRoutePortId struct -func NewExpressRoutePortID(subscriptionId string, resourceGroupName string, expressRoutePortName string) ExpressRoutePortId { - return ExpressRoutePortId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - } -} - -// ParseExpressRoutePortID parses 'input' into a ExpressRoutePortId -func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortID checks that 'input' can be parsed as a Express Route Port ID -func ValidateExpressRoutePortID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Port ID -func (id ExpressRoutePortId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Port ID -func (id ExpressRoutePortId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - } -} - -// String returns a human-readable description of this Express Route Port ID -func (id ExpressRoutePortId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - } - return fmt.Sprintf("Express Route Port (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/id_expressrouteport_test.go b/resource-manager/network/2022-09-01/expressrouteports/id_expressrouteport_test.go deleted file mode 100644 index 1dee47df2b1..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/id_expressrouteport_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressrouteports - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -func TestNewExpressRoutePortID(t *testing.T) { - id := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } -} - -func TestFormatExpressRoutePortID(t *testing.T) { - actual := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestParseExpressRoutePortIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestSegmentsForExpressRoutePortId(t *testing.T) { - segments := ExpressRoutePortId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/method_createorupdate.go b/resource-manager/network/2022-09-01/expressrouteports/method_createorupdate.go deleted file mode 100644 index e9deaae8003..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, id ExpressRoutePortId, input ExpressRoutePort) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRoutePortsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRoutePortId, input ExpressRoutePort) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/method_delete.go b/resource-manager/network/2022-09-01/expressrouteports/method_delete.go deleted file mode 100644 index 899e7de35bd..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRoutePortsClient) Delete(ctx context.Context, id ExpressRoutePortId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRoutePortsClient) DeleteThenPoll(ctx context.Context, id ExpressRoutePortId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/method_generateloa.go b/resource-manager/network/2022-09-01/expressrouteports/method_generateloa.go deleted file mode 100644 index 987f0d2b6df..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/method_generateloa.go +++ /dev/null @@ -1,56 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateLOAOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *GenerateExpressRoutePortsLOAResult -} - -// GenerateLOA ... -func (c ExpressRoutePortsClient) GenerateLOA(ctx context.Context, id ExpressRoutePortId, input GenerateExpressRoutePortsLOARequest) (result GenerateLOAOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generateLoa", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/method_get.go b/resource-manager/network/2022-09-01/expressrouteports/method_get.go deleted file mode 100644 index 91eabb6a2e5..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteports - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRoutePort -} - -// Get ... -func (c ExpressRoutePortsClient) Get(ctx context.Context, id ExpressRoutePortId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/method_list.go b/resource-manager/network/2022-09-01/expressrouteports/method_list.go deleted file mode 100644 index 60aa2b7a2d0..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRoutePort -} - -type ListCompleteResult struct { - Items []ExpressRoutePort -} - -// List ... -func (c ExpressRoutePortsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRoutePorts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRoutePort `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRoutePortsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRoutePortOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRoutePortsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRoutePortOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRoutePort, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/expressrouteports/method_listbyresourcegroup.go deleted file mode 100644 index 41d1b61d286..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRoutePort -} - -type ListByResourceGroupCompleteResult struct { - Items []ExpressRoutePort -} - -// ListByResourceGroup ... -func (c ExpressRoutePortsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRoutePorts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRoutePort `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c ExpressRoutePortsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ExpressRoutePortOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRoutePortsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ExpressRoutePortOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]ExpressRoutePort, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/method_updatetags.go b/resource-manager/network/2022-09-01/expressrouteports/method_updatetags.go deleted file mode 100644 index 42bc8dc875e..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package expressrouteports - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRoutePort -} - -// UpdateTags ... -func (c ExpressRoutePortsClient) UpdateTags(ctx context.Context, id ExpressRoutePortId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/model_expressroutelink.go b/resource-manager/network/2022-09-01/expressrouteports/model_expressroutelink.go deleted file mode 100644 index 60ed59156ad..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/model_expressroutelink.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/model_expressroutelinkmacsecconfig.go b/resource-manager/network/2022-09-01/expressrouteports/model_expressroutelinkmacsecconfig.go deleted file mode 100644 index f41c94b3401..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/model_expressroutelinkmacsecconfig.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkMacSecConfig struct { - CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"` - Cipher *ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"` - CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"` - SciState *ExpressRouteLinkMacSecSciState `json:"sciState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/model_expressroutelinkpropertiesformat.go b/resource-manager/network/2022-09-01/expressrouteports/model_expressroutelinkpropertiesformat.go deleted file mode 100644 index a9fd2f6e03d..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/model_expressroutelinkpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkPropertiesFormat struct { - AdminState *ExpressRouteLinkAdminState `json:"adminState,omitempty"` - ColoLocation *string `json:"coloLocation,omitempty"` - ConnectorType *ExpressRouteLinkConnectorType `json:"connectorType,omitempty"` - InterfaceName *string `json:"interfaceName,omitempty"` - MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"` - PatchPanelId *string `json:"patchPanelId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RackId *string `json:"rackId,omitempty"` - RouterName *string `json:"routerName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/model_expressrouteport.go b/resource-manager/network/2022-09-01/expressrouteports/model_expressrouteport.go deleted file mode 100644 index 4e2aa94784f..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/model_expressrouteport.go +++ /dev/null @@ -1,19 +0,0 @@ -package expressrouteports - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePort struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRoutePortPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/model_expressrouteportpropertiesformat.go b/resource-manager/network/2022-09-01/expressrouteports/model_expressrouteportpropertiesformat.go deleted file mode 100644 index 897d5ea08de..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/model_expressrouteportpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortPropertiesFormat struct { - AllocationDate *string `json:"allocationDate,omitempty"` - BandwidthInGbps *int64 `json:"bandwidthInGbps,omitempty"` - BillingType *ExpressRoutePortsBillingType `json:"billingType,omitempty"` - Circuits *[]SubResource `json:"circuits,omitempty"` - Encapsulation *ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"` - EtherType *string `json:"etherType,omitempty"` - Links *[]ExpressRouteLink `json:"links,omitempty"` - Mtu *string `json:"mtu,omitempty"` - PeeringLocation *string `json:"peeringLocation,omitempty"` - ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/model_generateexpressrouteportsloarequest.go b/resource-manager/network/2022-09-01/expressrouteports/model_generateexpressrouteportsloarequest.go deleted file mode 100644 index d588660f834..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/model_generateexpressrouteportsloarequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateExpressRoutePortsLOARequest struct { - CustomerName string `json:"customerName"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/model_generateexpressrouteportsloaresult.go b/resource-manager/network/2022-09-01/expressrouteports/model_generateexpressrouteportsloaresult.go deleted file mode 100644 index 54defeace0f..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/model_generateexpressrouteportsloaresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateExpressRoutePortsLOAResult struct { - EncodedContent *string `json:"encodedContent,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/model_subresource.go b/resource-manager/network/2022-09-01/expressrouteports/model_subresource.go deleted file mode 100644 index ef7329a3163..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/model_tagsobject.go b/resource-manager/network/2022-09-01/expressrouteports/model_tagsobject.go deleted file mode 100644 index d0cb6f9d317..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/predicates.go b/resource-manager/network/2022-09-01/expressrouteports/predicates.go deleted file mode 100644 index 7339fac991b..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRoutePortOperationPredicate) Matches(input ExpressRoutePort) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressrouteports/version.go b/resource-manager/network/2022-09-01/expressrouteports/version.go deleted file mode 100644 index e96efcf749f..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteports/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteports - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteports/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/README.md b/resource-manager/network/2022-09-01/expressrouteportslocations/README.md deleted file mode 100644 index 0e543a88e52..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteportslocations` Documentation - -The `expressrouteportslocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteportslocations" -``` - - -### Client Initialization - -```go -client := expressrouteportslocations.NewExpressRoutePortsLocationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRoutePortsLocationsClient.Get` - -```go -ctx := context.TODO() -id := expressrouteportslocations.NewExpressRoutePortsLocationID("12345678-1234-9876-4563-123456789012", "expressRoutePortsLocationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRoutePortsLocationsClient.List` - -```go -ctx := context.TODO() -id := expressrouteportslocations.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/client.go b/resource-manager/network/2022-09-01/expressrouteportslocations/client.go deleted file mode 100644 index e57bad8052e..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteportslocations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocationsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRoutePortsLocationsClientWithBaseURI(api environments.Api) (*ExpressRoutePortsLocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteportslocations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRoutePortsLocationsClient: %+v", err) - } - - return &ExpressRoutePortsLocationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/constants.go b/resource-manager/network/2022-09-01/expressrouteportslocations/constants.go deleted file mode 100644 index 79d7bad3ae5..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package expressrouteportslocations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/id_expressrouteportslocation.go b/resource-manager/network/2022-09-01/expressrouteportslocations/id_expressrouteportslocation.go deleted file mode 100644 index 096c43de667..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/id_expressrouteportslocation.go +++ /dev/null @@ -1,114 +0,0 @@ -package expressrouteportslocations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortsLocationId{} - -// ExpressRoutePortsLocationId is a struct representing the Resource ID for a Express Route Ports Location -type ExpressRoutePortsLocationId struct { - SubscriptionId string - ExpressRoutePortsLocationName string -} - -// NewExpressRoutePortsLocationID returns a new ExpressRoutePortsLocationId struct -func NewExpressRoutePortsLocationID(subscriptionId string, expressRoutePortsLocationName string) ExpressRoutePortsLocationId { - return ExpressRoutePortsLocationId{ - SubscriptionId: subscriptionId, - ExpressRoutePortsLocationName: expressRoutePortsLocationName, - } -} - -// ParseExpressRoutePortsLocationID parses 'input' into a ExpressRoutePortsLocationId -func ParseExpressRoutePortsLocationID(input string) (*ExpressRoutePortsLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortsLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortsLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRoutePortsLocationName, ok = parsed.Parsed["expressRoutePortsLocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortsLocationName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortsLocationIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortsLocationId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortsLocationIDInsensitively(input string) (*ExpressRoutePortsLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortsLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortsLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRoutePortsLocationName, ok = parsed.Parsed["expressRoutePortsLocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortsLocationName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortsLocationID checks that 'input' can be parsed as a Express Route Ports Location ID -func ValidateExpressRoutePortsLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortsLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Ports Location ID -func (id ExpressRoutePortsLocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/expressRoutePortsLocations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ExpressRoutePortsLocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Ports Location ID -func (id ExpressRoutePortsLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePortsLocations", "expressRoutePortsLocations", "expressRoutePortsLocations"), - resourceids.UserSpecifiedSegment("expressRoutePortsLocationName", "expressRoutePortsLocationValue"), - } -} - -// String returns a human-readable description of this Express Route Ports Location ID -func (id ExpressRoutePortsLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Express Route Ports Location Name: %q", id.ExpressRoutePortsLocationName), - } - return fmt.Sprintf("Express Route Ports Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/id_expressrouteportslocation_test.go b/resource-manager/network/2022-09-01/expressrouteportslocations/id_expressrouteportslocation_test.go deleted file mode 100644 index b1811870728..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/id_expressrouteportslocation_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package expressrouteportslocations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortsLocationId{} - -func TestNewExpressRoutePortsLocationID(t *testing.T) { - id := NewExpressRoutePortsLocationID("12345678-1234-9876-4563-123456789012", "expressRoutePortsLocationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ExpressRoutePortsLocationName != "expressRoutePortsLocationValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortsLocationName'", id.ExpressRoutePortsLocationName, "expressRoutePortsLocationValue") - } -} - -func TestFormatExpressRoutePortsLocationID(t *testing.T) { - actual := NewExpressRoutePortsLocationID("12345678-1234-9876-4563-123456789012", "expressRoutePortsLocationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortsLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortsLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue", - Expected: &ExpressRoutePortsLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRoutePortsLocationName: "expressRoutePortsLocationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortsLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ExpressRoutePortsLocationName != v.Expected.ExpressRoutePortsLocationName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortsLocationName", v.Expected.ExpressRoutePortsLocationName, actual.ExpressRoutePortsLocationName) - } - - } -} - -func TestParseExpressRoutePortsLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortsLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTsLoCaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue", - Expected: &ExpressRoutePortsLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRoutePortsLocationName: "expressRoutePortsLocationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTsLoCaTiOnS/eXpReSsRoUtEpOrTsLoCaTiOnVaLuE", - Expected: &ExpressRoutePortsLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRoutePortsLocationName: "eXpReSsRoUtEpOrTsLoCaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTsLoCaTiOnS/eXpReSsRoUtEpOrTsLoCaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortsLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ExpressRoutePortsLocationName != v.Expected.ExpressRoutePortsLocationName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortsLocationName", v.Expected.ExpressRoutePortsLocationName, actual.ExpressRoutePortsLocationName) - } - - } -} - -func TestSegmentsForExpressRoutePortsLocationId(t *testing.T) { - segments := ExpressRoutePortsLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortsLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/method_get.go b/resource-manager/network/2022-09-01/expressrouteportslocations/method_get.go deleted file mode 100644 index 1b9b58d6939..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteportslocations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRoutePortsLocation -} - -// Get ... -func (c ExpressRoutePortsLocationsClient) Get(ctx context.Context, id ExpressRoutePortsLocationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/method_list.go b/resource-manager/network/2022-09-01/expressrouteportslocations/method_list.go deleted file mode 100644 index 380c2745ac1..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressrouteportslocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRoutePortsLocation -} - -type ListCompleteResult struct { - Items []ExpressRoutePortsLocation -} - -// List ... -func (c ExpressRoutePortsLocationsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRoutePortsLocations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRoutePortsLocation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRoutePortsLocationsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRoutePortsLocationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRoutePortsLocationsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRoutePortsLocationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRoutePortsLocation, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocation.go b/resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocation.go deleted file mode 100644 index 86d94dc7922..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocation.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressrouteportslocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocation struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocationbandwidths.go b/resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocationbandwidths.go deleted file mode 100644 index 018cb977672..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocationbandwidths.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteportslocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocationBandwidths struct { - OfferName *string `json:"offerName,omitempty"` - ValueInGbps *int64 `json:"valueInGbps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocationpropertiesformat.go b/resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocationpropertiesformat.go deleted file mode 100644 index fa52c31306b..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/model_expressrouteportslocationpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressrouteportslocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocationPropertiesFormat struct { - Address *string `json:"address,omitempty"` - AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"` - Contact *string `json:"contact,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/predicates.go b/resource-manager/network/2022-09-01/expressrouteportslocations/predicates.go deleted file mode 100644 index 3b345c2e1f5..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressrouteportslocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocationOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRoutePortsLocationOperationPredicate) Matches(input ExpressRoutePortsLocation) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressrouteportslocations/version.go b/resource-manager/network/2022-09-01/expressrouteportslocations/version.go deleted file mode 100644 index 16b2bb351a9..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteportslocations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteportslocations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportslocations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/README.md b/resource-manager/network/2022-09-01/expressrouteproviderports/README.md deleted file mode 100644 index 84da1844d5d..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/README.md +++ /dev/null @@ -1,52 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteproviderports` Documentation - -The `expressrouteproviderports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteproviderports" -``` - - -### Client Initialization - -```go -client := expressrouteproviderports.NewExpressRouteProviderPortsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteProviderPortsClient.ExpressRouteProviderPort` - -```go -ctx := context.TODO() -id := expressrouteproviderports.NewExpressRouteProviderPortID("12345678-1234-9876-4563-123456789012", "expressRouteProviderPortValue") - -read, err := client.ExpressRouteProviderPort(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteProviderPortsClient.LocationList` - -```go -ctx := context.TODO() -id := expressrouteproviderports.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.LocationList(ctx, id, expressrouteproviderports.DefaultLocationListOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/client.go b/resource-manager/network/2022-09-01/expressrouteproviderports/client.go deleted file mode 100644 index 276d5877f63..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteproviderports - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPortsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteProviderPortsClientWithBaseURI(api environments.Api) (*ExpressRouteProviderPortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteproviderports", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteProviderPortsClient: %+v", err) - } - - return &ExpressRouteProviderPortsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/id_expressrouteproviderport.go b/resource-manager/network/2022-09-01/expressrouteproviderports/id_expressrouteproviderport.go deleted file mode 100644 index e7df5d969e9..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/id_expressrouteproviderport.go +++ /dev/null @@ -1,114 +0,0 @@ -package expressrouteproviderports - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteProviderPortId{} - -// ExpressRouteProviderPortId is a struct representing the Resource ID for a Express Route Provider Port -type ExpressRouteProviderPortId struct { - SubscriptionId string - ExpressRouteProviderPortName string -} - -// NewExpressRouteProviderPortID returns a new ExpressRouteProviderPortId struct -func NewExpressRouteProviderPortID(subscriptionId string, expressRouteProviderPortName string) ExpressRouteProviderPortId { - return ExpressRouteProviderPortId{ - SubscriptionId: subscriptionId, - ExpressRouteProviderPortName: expressRouteProviderPortName, - } -} - -// ParseExpressRouteProviderPortID parses 'input' into a ExpressRouteProviderPortId -func ParseExpressRouteProviderPortID(input string) (*ExpressRouteProviderPortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteProviderPortId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteProviderPortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRouteProviderPortName, ok = parsed.Parsed["expressRouteProviderPortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteProviderPortName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteProviderPortIDInsensitively parses 'input' case-insensitively into a ExpressRouteProviderPortId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteProviderPortIDInsensitively(input string) (*ExpressRouteProviderPortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteProviderPortId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteProviderPortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRouteProviderPortName, ok = parsed.Parsed["expressRouteProviderPortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteProviderPortName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteProviderPortID checks that 'input' can be parsed as a Express Route Provider Port ID -func ValidateExpressRouteProviderPortID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteProviderPortID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Provider Port ID -func (id ExpressRouteProviderPortId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/expressRouteProviderPorts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ExpressRouteProviderPortName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Provider Port ID -func (id ExpressRouteProviderPortId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteProviderPorts", "expressRouteProviderPorts", "expressRouteProviderPorts"), - resourceids.UserSpecifiedSegment("expressRouteProviderPortName", "expressRouteProviderPortValue"), - } -} - -// String returns a human-readable description of this Express Route Provider Port ID -func (id ExpressRouteProviderPortId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Express Route Provider Port Name: %q", id.ExpressRouteProviderPortName), - } - return fmt.Sprintf("Express Route Provider Port (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/id_expressrouteproviderport_test.go b/resource-manager/network/2022-09-01/expressrouteproviderports/id_expressrouteproviderport_test.go deleted file mode 100644 index 3ec793bc6e3..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/id_expressrouteproviderport_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package expressrouteproviderports - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteProviderPortId{} - -func TestNewExpressRouteProviderPortID(t *testing.T) { - id := NewExpressRouteProviderPortID("12345678-1234-9876-4563-123456789012", "expressRouteProviderPortValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ExpressRouteProviderPortName != "expressRouteProviderPortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteProviderPortName'", id.ExpressRouteProviderPortName, "expressRouteProviderPortValue") - } -} - -func TestFormatExpressRouteProviderPortID(t *testing.T) { - actual := NewExpressRouteProviderPortID("12345678-1234-9876-4563-123456789012", "expressRouteProviderPortValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteProviderPortID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteProviderPortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue", - Expected: &ExpressRouteProviderPortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRouteProviderPortName: "expressRouteProviderPortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteProviderPortID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ExpressRouteProviderPortName != v.Expected.ExpressRouteProviderPortName { - t.Fatalf("Expected %q but got %q for ExpressRouteProviderPortName", v.Expected.ExpressRouteProviderPortName, actual.ExpressRouteProviderPortName) - } - - } -} - -func TestParseExpressRouteProviderPortIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteProviderPortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpRoViDeRpOrTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue", - Expected: &ExpressRouteProviderPortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRouteProviderPortName: "expressRouteProviderPortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpRoViDeRpOrTs/eXpReSsRoUtEpRoViDeRpOrTvAlUe", - Expected: &ExpressRouteProviderPortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRouteProviderPortName: "eXpReSsRoUtEpRoViDeRpOrTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpRoViDeRpOrTs/eXpReSsRoUtEpRoViDeRpOrTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteProviderPortIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ExpressRouteProviderPortName != v.Expected.ExpressRouteProviderPortName { - t.Fatalf("Expected %q but got %q for ExpressRouteProviderPortName", v.Expected.ExpressRouteProviderPortName, actual.ExpressRouteProviderPortName) - } - - } -} - -func TestSegmentsForExpressRouteProviderPortId(t *testing.T) { - segments := ExpressRouteProviderPortId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteProviderPortId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/method_expressrouteproviderport.go b/resource-manager/network/2022-09-01/expressrouteproviderports/method_expressrouteproviderport.go deleted file mode 100644 index 8972c25c114..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/method_expressrouteproviderport.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteproviderports - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPortOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteProviderPort -} - -// ExpressRouteProviderPort ... -func (c ExpressRouteProviderPortsClient) ExpressRouteProviderPort(ctx context.Context, id ExpressRouteProviderPortId) (result ExpressRouteProviderPortOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/method_locationlist.go b/resource-manager/network/2022-09-01/expressrouteproviderports/method_locationlist.go deleted file mode 100644 index 786df1827f9..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/method_locationlist.go +++ /dev/null @@ -1,81 +0,0 @@ -package expressrouteproviderports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocationListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteProviderPortListResult -} - -type LocationListOperationOptions struct { - Filter *string -} - -func DefaultLocationListOperationOptions() LocationListOperationOptions { - return LocationListOperationOptions{} -} - -func (o LocationListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o LocationListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o LocationListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - return &out -} - -// LocationList ... -func (c ExpressRouteProviderPortsClient) LocationList(ctx context.Context, id commonids.SubscriptionId, options LocationListOperationOptions) (result LocationListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteProviderPorts", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderport.go b/resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderport.go deleted file mode 100644 index 9bb3723c40e..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderport.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressrouteproviderports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPort struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteProviderPortProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderportlistresult.go b/resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderportlistresult.go deleted file mode 100644 index 3648c0c7147..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderportlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteproviderports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPortListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteProviderPort `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderportproperties.go b/resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderportproperties.go deleted file mode 100644 index d0a93ccf046..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/model_expressrouteproviderportproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package expressrouteproviderports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPortProperties struct { - OverprovisionFactor *int64 `json:"overprovisionFactor,omitempty"` - PeeringLocation *string `json:"peeringLocation,omitempty"` - PortBandwidthInMbps *int64 `json:"portBandwidthInMbps,omitempty"` - PortPairDescriptor *string `json:"portPairDescriptor,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - RemainingBandwidthInMbps *int64 `json:"remainingBandwidthInMbps,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - UsedBandwidthInMbps *int64 `json:"usedBandwidthInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteproviderports/version.go b/resource-manager/network/2022-09-01/expressrouteproviderports/version.go deleted file mode 100644 index bb3f19e8966..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteproviderports/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteproviderports - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteproviderports/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/expressrouteserviceproviders/README.md b/resource-manager/network/2022-09-01/expressrouteserviceproviders/README.md deleted file mode 100644 index acd22f75821..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteserviceproviders/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteserviceproviders` Documentation - -The `expressrouteserviceproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/expressrouteserviceproviders" -``` - - -### Client Initialization - -```go -client := expressrouteserviceproviders.NewExpressRouteServiceProvidersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteServiceProvidersClient.List` - -```go -ctx := context.TODO() -id := expressrouteserviceproviders.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/expressrouteserviceproviders/client.go b/resource-manager/network/2022-09-01/expressrouteserviceproviders/client.go deleted file mode 100644 index 68ed2324e0d..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteserviceproviders/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteserviceproviders - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProvidersClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteServiceProvidersClientWithBaseURI(api environments.Api) (*ExpressRouteServiceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteserviceproviders", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteServiceProvidersClient: %+v", err) - } - - return &ExpressRouteServiceProvidersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteserviceproviders/constants.go b/resource-manager/network/2022-09-01/expressrouteserviceproviders/constants.go deleted file mode 100644 index 7e0b7b9a059..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteserviceproviders/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package expressrouteserviceproviders - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/expressrouteserviceproviders/method_list.go b/resource-manager/network/2022-09-01/expressrouteserviceproviders/method_list.go deleted file mode 100644 index 1d07ccf05b5..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteserviceproviders/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressrouteserviceproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteServiceProvider -} - -type ListCompleteResult struct { - Items []ExpressRouteServiceProvider -} - -// List ... -func (c ExpressRouteServiceProvidersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteServiceProviders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteServiceProvider `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteServiceProvidersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteServiceProviderOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteServiceProvidersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRouteServiceProviderOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteServiceProvider, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceprovider.go b/resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceprovider.go deleted file mode 100644 index 156136ef150..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceprovider.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressrouteserviceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProvider struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceproviderbandwidthsoffered.go b/resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceproviderbandwidthsoffered.go deleted file mode 100644 index 72758b5e1d5..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceproviderbandwidthsoffered.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteserviceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProviderBandwidthsOffered struct { - OfferName *string `json:"offerName,omitempty"` - ValueInMbps *int64 `json:"valueInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceproviderpropertiesformat.go b/resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceproviderpropertiesformat.go deleted file mode 100644 index e3c3cc178f9..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteserviceproviders/model_expressrouteserviceproviderpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressrouteserviceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProviderPropertiesFormat struct { - BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` - PeeringLocations *[]string `json:"peeringLocations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/expressrouteserviceproviders/predicates.go b/resource-manager/network/2022-09-01/expressrouteserviceproviders/predicates.go deleted file mode 100644 index d2c605983d7..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteserviceproviders/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressrouteserviceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProviderOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRouteServiceProviderOperationPredicate) Matches(input ExpressRouteServiceProvider) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/expressrouteserviceproviders/version.go b/resource-manager/network/2022-09-01/expressrouteserviceproviders/version.go deleted file mode 100644 index 00042aa025a..00000000000 --- a/resource-manager/network/2022-09-01/expressrouteserviceproviders/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteserviceproviders - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteserviceproviders/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/README.md b/resource-manager/network/2022-09-01/firewallpolicies/README.md deleted file mode 100644 index ae610efec4a..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/README.md +++ /dev/null @@ -1,236 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/firewallpolicies` Documentation - -The `firewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/firewallpolicies" -``` - - -### Client Initialization - -```go -client := firewallpolicies.NewFirewallPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `FirewallPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.FirewallPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesFilterValuesList` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.SignatureOverridesFilterValuesQuery{ - // ... -} - - -read, err := client.FirewallPolicyIdpsSignaturesFilterValuesList(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesList` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.IDPSQueryObject{ - // ... -} - - -read, err := client.FirewallPolicyIdpsSignaturesList(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesOverridesGet` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -read, err := client.FirewallPolicyIdpsSignaturesOverridesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesOverridesList` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -read, err := client.FirewallPolicyIdpsSignaturesOverridesList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesOverridesPatch` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.SignaturesOverrides{ - // ... -} - - -read, err := client.FirewallPolicyIdpsSignaturesOverridesPatch(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesOverridesPut` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.SignaturesOverrides{ - // ... -} - - -read, err := client.FirewallPolicyIdpsSignaturesOverridesPut(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.Get` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -read, err := client.Get(ctx, id, firewallpolicies.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.List` - -```go -ctx := context.TODO() -id := firewallpolicies.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `FirewallPoliciesClient.ListAll` - -```go -ctx := context.TODO() -id := firewallpolicies.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `FirewallPoliciesClient.UpdateTags` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/firewallpolicies/client.go b/resource-manager/network/2022-09-01/firewallpolicies/client.go deleted file mode 100644 index 791b0949b8c..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package firewallpolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewFirewallPoliciesClientWithBaseURI(api environments.Api) (*FirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "firewallpolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating FirewallPoliciesClient: %+v", err) - } - - return &FirewallPoliciesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/constants.go b/resource-manager/network/2022-09-01/firewallpolicies/constants.go deleted file mode 100644 index 6a392fdaa9f..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/constants.go +++ /dev/null @@ -1,366 +0,0 @@ -package firewallpolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoLearnPrivateRangesMode string - -const ( - AutoLearnPrivateRangesModeDisabled AutoLearnPrivateRangesMode = "Disabled" - AutoLearnPrivateRangesModeEnabled AutoLearnPrivateRangesMode = "Enabled" -) - -func PossibleValuesForAutoLearnPrivateRangesMode() []string { - return []string{ - string(AutoLearnPrivateRangesModeDisabled), - string(AutoLearnPrivateRangesModeEnabled), - } -} - -func (s *AutoLearnPrivateRangesMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAutoLearnPrivateRangesMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAutoLearnPrivateRangesMode(input string) (*AutoLearnPrivateRangesMode, error) { - vals := map[string]AutoLearnPrivateRangesMode{ - "disabled": AutoLearnPrivateRangesModeDisabled, - "enabled": AutoLearnPrivateRangesModeEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AutoLearnPrivateRangesMode(input) - return &out, nil -} - -type AzureFirewallThreatIntelMode string - -const ( - AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" - AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" - AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" -) - -func PossibleValuesForAzureFirewallThreatIntelMode() []string { - return []string{ - string(AzureFirewallThreatIntelModeAlert), - string(AzureFirewallThreatIntelModeDeny), - string(AzureFirewallThreatIntelModeOff), - } -} - -func (s *AzureFirewallThreatIntelMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallThreatIntelMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallThreatIntelMode(input string) (*AzureFirewallThreatIntelMode, error) { - vals := map[string]AzureFirewallThreatIntelMode{ - "alert": AzureFirewallThreatIntelModeAlert, - "deny": AzureFirewallThreatIntelModeDeny, - "off": AzureFirewallThreatIntelModeOff, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallThreatIntelMode(input) - return &out, nil -} - -type FirewallPolicyIDPSQuerySortOrder string - -const ( - FirewallPolicyIDPSQuerySortOrderAscending FirewallPolicyIDPSQuerySortOrder = "Ascending" - FirewallPolicyIDPSQuerySortOrderDescending FirewallPolicyIDPSQuerySortOrder = "Descending" -) - -func PossibleValuesForFirewallPolicyIDPSQuerySortOrder() []string { - return []string{ - string(FirewallPolicyIDPSQuerySortOrderAscending), - string(FirewallPolicyIDPSQuerySortOrderDescending), - } -} - -func (s *FirewallPolicyIDPSQuerySortOrder) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyIDPSQuerySortOrder(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyIDPSQuerySortOrder(input string) (*FirewallPolicyIDPSQuerySortOrder, error) { - vals := map[string]FirewallPolicyIDPSQuerySortOrder{ - "ascending": FirewallPolicyIDPSQuerySortOrderAscending, - "descending": FirewallPolicyIDPSQuerySortOrderDescending, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyIDPSQuerySortOrder(input) - return &out, nil -} - -type FirewallPolicyIDPSSignatureDirection int64 - -const ( - FirewallPolicyIDPSSignatureDirectionOne FirewallPolicyIDPSSignatureDirection = 1 - FirewallPolicyIDPSSignatureDirectionTwo FirewallPolicyIDPSSignatureDirection = 2 - FirewallPolicyIDPSSignatureDirectionZero FirewallPolicyIDPSSignatureDirection = 0 -) - -func PossibleValuesForFirewallPolicyIDPSSignatureDirection() []int64 { - return []int64{ - int64(FirewallPolicyIDPSSignatureDirectionOne), - int64(FirewallPolicyIDPSSignatureDirectionTwo), - int64(FirewallPolicyIDPSSignatureDirectionZero), - } -} - -type FirewallPolicyIDPSSignatureMode int64 - -const ( - FirewallPolicyIDPSSignatureModeOne FirewallPolicyIDPSSignatureMode = 1 - FirewallPolicyIDPSSignatureModeTwo FirewallPolicyIDPSSignatureMode = 2 - FirewallPolicyIDPSSignatureModeZero FirewallPolicyIDPSSignatureMode = 0 -) - -func PossibleValuesForFirewallPolicyIDPSSignatureMode() []int64 { - return []int64{ - int64(FirewallPolicyIDPSSignatureModeOne), - int64(FirewallPolicyIDPSSignatureModeTwo), - int64(FirewallPolicyIDPSSignatureModeZero), - } -} - -type FirewallPolicyIDPSSignatureSeverity int64 - -const ( - FirewallPolicyIDPSSignatureSeverityOne FirewallPolicyIDPSSignatureSeverity = 1 - FirewallPolicyIDPSSignatureSeverityThree FirewallPolicyIDPSSignatureSeverity = 3 - FirewallPolicyIDPSSignatureSeverityTwo FirewallPolicyIDPSSignatureSeverity = 2 -) - -func PossibleValuesForFirewallPolicyIDPSSignatureSeverity() []int64 { - return []int64{ - int64(FirewallPolicyIDPSSignatureSeverityOne), - int64(FirewallPolicyIDPSSignatureSeverityThree), - int64(FirewallPolicyIDPSSignatureSeverityTwo), - } -} - -type FirewallPolicyIntrusionDetectionProtocol string - -const ( - FirewallPolicyIntrusionDetectionProtocolANY FirewallPolicyIntrusionDetectionProtocol = "ANY" - FirewallPolicyIntrusionDetectionProtocolICMP FirewallPolicyIntrusionDetectionProtocol = "ICMP" - FirewallPolicyIntrusionDetectionProtocolTCP FirewallPolicyIntrusionDetectionProtocol = "TCP" - FirewallPolicyIntrusionDetectionProtocolUDP FirewallPolicyIntrusionDetectionProtocol = "UDP" -) - -func PossibleValuesForFirewallPolicyIntrusionDetectionProtocol() []string { - return []string{ - string(FirewallPolicyIntrusionDetectionProtocolANY), - string(FirewallPolicyIntrusionDetectionProtocolICMP), - string(FirewallPolicyIntrusionDetectionProtocolTCP), - string(FirewallPolicyIntrusionDetectionProtocolUDP), - } -} - -func (s *FirewallPolicyIntrusionDetectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyIntrusionDetectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyIntrusionDetectionProtocol(input string) (*FirewallPolicyIntrusionDetectionProtocol, error) { - vals := map[string]FirewallPolicyIntrusionDetectionProtocol{ - "any": FirewallPolicyIntrusionDetectionProtocolANY, - "icmp": FirewallPolicyIntrusionDetectionProtocolICMP, - "tcp": FirewallPolicyIntrusionDetectionProtocolTCP, - "udp": FirewallPolicyIntrusionDetectionProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyIntrusionDetectionProtocol(input) - return &out, nil -} - -type FirewallPolicyIntrusionDetectionStateType string - -const ( - FirewallPolicyIntrusionDetectionStateTypeAlert FirewallPolicyIntrusionDetectionStateType = "Alert" - FirewallPolicyIntrusionDetectionStateTypeDeny FirewallPolicyIntrusionDetectionStateType = "Deny" - FirewallPolicyIntrusionDetectionStateTypeOff FirewallPolicyIntrusionDetectionStateType = "Off" -) - -func PossibleValuesForFirewallPolicyIntrusionDetectionStateType() []string { - return []string{ - string(FirewallPolicyIntrusionDetectionStateTypeAlert), - string(FirewallPolicyIntrusionDetectionStateTypeDeny), - string(FirewallPolicyIntrusionDetectionStateTypeOff), - } -} - -func (s *FirewallPolicyIntrusionDetectionStateType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyIntrusionDetectionStateType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyIntrusionDetectionStateType(input string) (*FirewallPolicyIntrusionDetectionStateType, error) { - vals := map[string]FirewallPolicyIntrusionDetectionStateType{ - "alert": FirewallPolicyIntrusionDetectionStateTypeAlert, - "deny": FirewallPolicyIntrusionDetectionStateTypeDeny, - "off": FirewallPolicyIntrusionDetectionStateTypeOff, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyIntrusionDetectionStateType(input) - return &out, nil -} - -type FirewallPolicySkuTier string - -const ( - FirewallPolicySkuTierBasic FirewallPolicySkuTier = "Basic" - FirewallPolicySkuTierPremium FirewallPolicySkuTier = "Premium" - FirewallPolicySkuTierStandard FirewallPolicySkuTier = "Standard" -) - -func PossibleValuesForFirewallPolicySkuTier() []string { - return []string{ - string(FirewallPolicySkuTierBasic), - string(FirewallPolicySkuTierPremium), - string(FirewallPolicySkuTierStandard), - } -} - -func (s *FirewallPolicySkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicySkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicySkuTier(input string) (*FirewallPolicySkuTier, error) { - vals := map[string]FirewallPolicySkuTier{ - "basic": FirewallPolicySkuTierBasic, - "premium": FirewallPolicySkuTierPremium, - "standard": FirewallPolicySkuTierStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicySkuTier(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/id_firewallpolicy.go b/resource-manager/network/2022-09-01/firewallpolicies/id_firewallpolicy.go deleted file mode 100644 index 7b760ef341f..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/id_firewallpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package firewallpolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FirewallPolicyId{} - -// FirewallPolicyId is a struct representing the Resource ID for a Firewall Policy -type FirewallPolicyId struct { - SubscriptionId string - ResourceGroupName string - FirewallPolicyName string -} - -// NewFirewallPolicyID returns a new FirewallPolicyId struct -func NewFirewallPolicyID(subscriptionId string, resourceGroupName string, firewallPolicyName string) FirewallPolicyId { - return FirewallPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FirewallPolicyName: firewallPolicyName, - } -} - -// ParseFirewallPolicyID parses 'input' into a FirewallPolicyId -func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(FirewallPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - return &id, nil -} - -// ParseFirewallPolicyIDInsensitively parses 'input' case-insensitively into a FirewallPolicyId -// note: this method should only be used for API response data and not user input -func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(FirewallPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateFirewallPolicyID checks that 'input' can be parsed as a Firewall Policy ID -func ValidateFirewallPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFirewallPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Firewall Policy ID -func (id FirewallPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/firewallPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FirewallPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Firewall Policy ID -func (id FirewallPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticFirewallPolicies", "firewallPolicies", "firewallPolicies"), - resourceids.UserSpecifiedSegment("firewallPolicyName", "firewallPolicyValue"), - } -} - -// String returns a human-readable description of this Firewall Policy ID -func (id FirewallPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Firewall Policy Name: %q", id.FirewallPolicyName), - } - return fmt.Sprintf("Firewall Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/id_firewallpolicy_test.go b/resource-manager/network/2022-09-01/firewallpolicies/id_firewallpolicy_test.go deleted file mode 100644 index 6480bf04ca7..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/id_firewallpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package firewallpolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FirewallPolicyId{} - -func TestNewFirewallPolicyID(t *testing.T) { - id := NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FirewallPolicyName != "firewallPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'FirewallPolicyName'", id.FirewallPolicyName, "firewallPolicyValue") - } -} - -func TestFormatFirewallPolicyID(t *testing.T) { - actual := NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFirewallPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFirewallPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - } -} - -func TestParseFirewallPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FirewallPolicyName: "fIrEwAlLpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFirewallPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - } -} - -func TestSegmentsForFirewallPolicyId(t *testing.T) { - segments := FirewallPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FirewallPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_createorupdate.go b/resource-manager/network/2022-09-01/firewallpolicies/method_createorupdate.go deleted file mode 100644 index 2bc3de97416..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, id FirewallPolicyId, input FirewallPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c FirewallPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id FirewallPolicyId, input FirewallPolicy) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_delete.go b/resource-manager/network/2022-09-01/firewallpolicies/method_delete.go deleted file mode 100644 index 432932fda66..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c FirewallPoliciesClient) Delete(ctx context.Context, id FirewallPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c FirewallPoliciesClient) DeleteThenPoll(ctx context.Context, id FirewallPolicyId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go b/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go deleted file mode 100644 index 10e70f20fb4..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesFilterValuesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignatureOverridesFilterValuesResponse -} - -// FirewallPolicyIdpsSignaturesFilterValuesList ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesFilterValuesList(ctx context.Context, id FirewallPolicyId, input SignatureOverridesFilterValuesQuery) (result FirewallPolicyIdpsSignaturesFilterValuesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listIdpsFilterOptions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go b/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go deleted file mode 100644 index 07fdedd6aea..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *QueryResults -} - -// FirewallPolicyIdpsSignaturesList ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesList(ctx context.Context, id FirewallPolicyId, input IDPSQueryObject) (result FirewallPolicyIdpsSignaturesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listIdpsSignatures", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go b/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go deleted file mode 100644 index c283ea59e73..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go +++ /dev/null @@ -1,52 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesOverridesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignaturesOverrides -} - -// FirewallPolicyIdpsSignaturesOverridesGet ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesGet(ctx context.Context, id FirewallPolicyId) (result FirewallPolicyIdpsSignaturesOverridesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/signatureOverrides/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go b/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go deleted file mode 100644 index d5fece73566..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go +++ /dev/null @@ -1,52 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesOverridesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignaturesOverridesList -} - -// FirewallPolicyIdpsSignaturesOverridesList ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesList(ctx context.Context, id FirewallPolicyId) (result FirewallPolicyIdpsSignaturesOverridesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/signatureOverrides", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go b/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go deleted file mode 100644 index 3cc4e3cb860..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesOverridesPatchOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignaturesOverrides -} - -// FirewallPolicyIdpsSignaturesOverridesPatch ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPatch(ctx context.Context, id FirewallPolicyId, input SignaturesOverrides) (result FirewallPolicyIdpsSignaturesOverridesPatchOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: fmt.Sprintf("%s/signatureOverrides/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go b/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go deleted file mode 100644 index ccd306f8ec4..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesOverridesPutOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignaturesOverrides -} - -// FirewallPolicyIdpsSignaturesOverridesPut ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPut(ctx context.Context, id FirewallPolicyId, input SignaturesOverrides) (result FirewallPolicyIdpsSignaturesOverridesPutOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: fmt.Sprintf("%s/signatureOverrides/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_get.go b/resource-manager/network/2022-09-01/firewallpolicies/method_get.go deleted file mode 100644 index 691c02b6911..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FirewallPolicy -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c FirewallPoliciesClient) Get(ctx context.Context, id FirewallPolicyId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_list.go b/resource-manager/network/2022-09-01/firewallpolicies/method_list.go deleted file mode 100644 index fe34e8db345..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FirewallPolicy -} - -type ListCompleteResult struct { - Items []FirewallPolicy -} - -// List ... -func (c FirewallPoliciesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/firewallPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FirewallPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c FirewallPoliciesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, FirewallPolicyOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FirewallPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate FirewallPolicyOperationPredicate) (result ListCompleteResult, err error) { - items := make([]FirewallPolicy, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_listall.go b/resource-manager/network/2022-09-01/firewallpolicies/method_listall.go deleted file mode 100644 index ac53257bbf8..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FirewallPolicy -} - -type ListAllCompleteResult struct { - Items []FirewallPolicy -} - -// ListAll ... -func (c FirewallPoliciesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/firewallPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FirewallPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c FirewallPoliciesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, FirewallPolicyOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FirewallPoliciesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate FirewallPolicyOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]FirewallPolicy, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/method_updatetags.go b/resource-manager/network/2022-09-01/firewallpolicies/method_updatetags.go deleted file mode 100644 index 40cd013ce58..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package firewallpolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FirewallPolicy -} - -// UpdateTags ... -func (c FirewallPoliciesClient) UpdateTags(ctx context.Context, id FirewallPolicyId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_dnssettings.go b/resource-manager/network/2022-09-01/firewallpolicies/model_dnssettings.go deleted file mode 100644 index 6983f66f9dd..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_dnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DnsSettings struct { - EnableProxy *bool `json:"enableProxy,omitempty"` - RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"` - Servers *[]string `json:"servers,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_explicitproxy.go b/resource-manager/network/2022-09-01/firewallpolicies/model_explicitproxy.go deleted file mode 100644 index d8af7221ddf..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_explicitproxy.go +++ /dev/null @@ -1,13 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExplicitProxy struct { - EnableExplicitProxy *bool `json:"enableExplicitProxy,omitempty"` - EnablePacFile *bool `json:"enablePacFile,omitempty"` - HTTPPort *int64 `json:"httpPort,omitempty"` - HTTPSPort *int64 `json:"httpsPort,omitempty"` - PacFile *string `json:"pacFile,omitempty"` - PacFilePort *int64 `json:"pacFilePort,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_filteritems.go b/resource-manager/network/2022-09-01/firewallpolicies/model_filteritems.go deleted file mode 100644 index 943657d23f0..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_filteritems.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterItems struct { - Field *string `json:"field,omitempty"` - Values *[]string `json:"values,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicy.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicy.go deleted file mode 100644 index fb85165c9d9..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicy.go +++ /dev/null @@ -1,19 +0,0 @@ -package firewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FirewallPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicycertificateauthority.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicycertificateauthority.go deleted file mode 100644 index b1d1e5fcdd8..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicycertificateauthority.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyCertificateAuthority struct { - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyinsights.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyinsights.go deleted file mode 100644 index 5af7b2e446d..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyinsights.go +++ /dev/null @@ -1,10 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyInsights struct { - IsEnabled *bool `json:"isEnabled,omitempty"` - LogAnalyticsResources *FirewallPolicyLogAnalyticsResources `json:"logAnalyticsResources,omitempty"` - RetentionDays *int64 `json:"retentionDays,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetection.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetection.go deleted file mode 100644 index eac1fe0da0f..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetection.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIntrusionDetection struct { - Configuration *FirewallPolicyIntrusionDetectionConfiguration `json:"configuration,omitempty"` - Mode *FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionbypasstrafficspecifications.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionbypasstrafficspecifications.go deleted file mode 100644 index 088a6c5515f..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionbypasstrafficspecifications.go +++ /dev/null @@ -1,15 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct { - Description *string `json:"description,omitempty"` - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - Name *string `json:"name,omitempty"` - Protocol *FirewallPolicyIntrusionDetectionProtocol `json:"protocol,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionconfiguration.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionconfiguration.go deleted file mode 100644 index dce919867c0..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIntrusionDetectionConfiguration struct { - BypassTrafficSettings *[]FirewallPolicyIntrusionDetectionBypassTrafficSpecifications `json:"bypassTrafficSettings,omitempty"` - PrivateRanges *[]string `json:"privateRanges,omitempty"` - SignatureOverrides *[]FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionsignaturespecification.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionsignaturespecification.go deleted file mode 100644 index 2bae7fe0f04..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyintrusiondetectionsignaturespecification.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIntrusionDetectionSignatureSpecification struct { - Id *string `json:"id,omitempty"` - Mode *FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyloganalyticsresources.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyloganalyticsresources.go deleted file mode 100644 index 4f1280d942b..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyloganalyticsresources.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyLogAnalyticsResources struct { - DefaultWorkspaceId *SubResource `json:"defaultWorkspaceId,omitempty"` - Workspaces *[]FirewallPolicyLogAnalyticsWorkspace `json:"workspaces,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyloganalyticsworkspace.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyloganalyticsworkspace.go deleted file mode 100644 index 4cc72aa7cbb..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicyloganalyticsworkspace.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyLogAnalyticsWorkspace struct { - Region *string `json:"region,omitempty"` - WorkspaceId *SubResource `json:"workspaceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicypropertiesformat.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicypropertiesformat.go deleted file mode 100644 index 4aa274dbf0a..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicypropertiesformat.go +++ /dev/null @@ -1,22 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyPropertiesFormat struct { - BasePolicy *SubResource `json:"basePolicy,omitempty"` - ChildPolicies *[]SubResource `json:"childPolicies,omitempty"` - DnsSettings *DnsSettings `json:"dnsSettings,omitempty"` - ExplicitProxy *ExplicitProxy `json:"explicitProxy,omitempty"` - Firewalls *[]SubResource `json:"firewalls,omitempty"` - Insights *FirewallPolicyInsights `json:"insights,omitempty"` - IntrusionDetection *FirewallPolicyIntrusionDetection `json:"intrusionDetection,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleCollectionGroups *[]SubResource `json:"ruleCollectionGroups,omitempty"` - Sku *FirewallPolicySku `json:"sku,omitempty"` - Snat *FirewallPolicySNAT `json:"snat,omitempty"` - Sql *FirewallPolicySQL `json:"sql,omitempty"` - ThreatIntelMode *AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` - ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"` - TransportSecurity *FirewallPolicyTransportSecurity `json:"transportSecurity,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysku.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysku.go deleted file mode 100644 index 6c0cef08260..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicySku struct { - Tier *FirewallPolicySkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysnat.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysnat.go deleted file mode 100644 index 33dcf12744e..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysnat.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicySNAT struct { - AutoLearnPrivateRanges *AutoLearnPrivateRangesMode `json:"autoLearnPrivateRanges,omitempty"` - PrivateRanges *[]string `json:"privateRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysql.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysql.go deleted file mode 100644 index 32e50565577..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicysql.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicySQL struct { - AllowSqlRedirect *bool `json:"allowSqlRedirect,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicythreatintelwhitelist.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicythreatintelwhitelist.go deleted file mode 100644 index 376fba1c268..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicythreatintelwhitelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyThreatIntelWhitelist struct { - Fqdns *[]string `json:"fqdns,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicytransportsecurity.go b/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicytransportsecurity.go deleted file mode 100644 index 9fdbf9b4877..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_firewallpolicytransportsecurity.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyTransportSecurity struct { - CertificateAuthority *FirewallPolicyCertificateAuthority `json:"certificateAuthority,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_idpsqueryobject.go b/resource-manager/network/2022-09-01/firewallpolicies/model_idpsqueryobject.go deleted file mode 100644 index 3a1aca509b6..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_idpsqueryobject.go +++ /dev/null @@ -1,12 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IDPSQueryObject struct { - Filters *[]FilterItems `json:"filters,omitempty"` - OrderBy *OrderBy `json:"orderBy,omitempty"` - ResultsPerPage *int64 `json:"resultsPerPage,omitempty"` - Search *string `json:"search,omitempty"` - Skip *int64 `json:"skip,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_orderby.go b/resource-manager/network/2022-09-01/firewallpolicies/model_orderby.go deleted file mode 100644 index db1d05e4478..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_orderby.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OrderBy struct { - Field *string `json:"field,omitempty"` - Order *FirewallPolicyIDPSQuerySortOrder `json:"order,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_queryresults.go b/resource-manager/network/2022-09-01/firewallpolicies/model_queryresults.go deleted file mode 100644 index 4c0591a2f83..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_queryresults.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryResults struct { - MatchingRecordsCount *int64 `json:"matchingRecordsCount,omitempty"` - Signatures *[]SingleQueryResult `json:"signatures,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_signatureoverridesfiltervaluesquery.go b/resource-manager/network/2022-09-01/firewallpolicies/model_signatureoverridesfiltervaluesquery.go deleted file mode 100644 index 718d141e3c0..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_signatureoverridesfiltervaluesquery.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignatureOverridesFilterValuesQuery struct { - FilterName *string `json:"filterName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_signatureoverridesfiltervaluesresponse.go b/resource-manager/network/2022-09-01/firewallpolicies/model_signatureoverridesfiltervaluesresponse.go deleted file mode 100644 index 4b135d882ba..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_signatureoverridesfiltervaluesresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignatureOverridesFilterValuesResponse struct { - FilterValues *[]string `json:"filterValues,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverrides.go b/resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverrides.go deleted file mode 100644 index 2f1b84510c9..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverrides.go +++ /dev/null @@ -1,11 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignaturesOverrides struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SignaturesOverridesProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverrideslist.go b/resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverrideslist.go deleted file mode 100644 index d403a4eb590..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverrideslist.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignaturesOverridesList struct { - Value *[]SignaturesOverrides `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverridesproperties.go b/resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverridesproperties.go deleted file mode 100644 index a93d8699c02..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_signaturesoverridesproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignaturesOverridesProperties struct { - Signatures *map[string]string `json:"signatures,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_singlequeryresult.go b/resource-manager/network/2022-09-01/firewallpolicies/model_singlequeryresult.go deleted file mode 100644 index cbf78585e56..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_singlequeryresult.go +++ /dev/null @@ -1,18 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SingleQueryResult struct { - Description *string `json:"description,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - Direction *FirewallPolicyIDPSSignatureDirection `json:"direction,omitempty"` - Group *string `json:"group,omitempty"` - InheritedFromParentPolicy *bool `json:"inheritedFromParentPolicy,omitempty"` - LastUpdated *string `json:"lastUpdated,omitempty"` - Mode *FirewallPolicyIDPSSignatureMode `json:"mode,omitempty"` - Protocol *string `json:"protocol,omitempty"` - Severity *FirewallPolicyIDPSSignatureSeverity `json:"severity,omitempty"` - SignatureId *int64 `json:"signatureId,omitempty"` - SourcePorts *[]string `json:"sourcePorts,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_subresource.go b/resource-manager/network/2022-09-01/firewallpolicies/model_subresource.go deleted file mode 100644 index abee9f81d03..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/model_tagsobject.go b/resource-manager/network/2022-09-01/firewallpolicies/model_tagsobject.go deleted file mode 100644 index 22cc23110be..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/predicates.go b/resource-manager/network/2022-09-01/firewallpolicies/predicates.go deleted file mode 100644 index 2640042ba7a..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p FirewallPolicyOperationPredicate) Matches(input FirewallPolicy) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/firewallpolicies/version.go b/resource-manager/network/2022-09-01/firewallpolicies/version.go deleted file mode 100644 index 15e60167dc9..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package firewallpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicies/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/README.md b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/README.md deleted file mode 100644 index 5f855137142..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups` Documentation - -The `firewallpolicyrulecollectiongroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups" -``` - - -### Client Initialization - -```go -client := firewallpolicyrulecollectiongroups.NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := firewallpolicyrulecollectiongroups.NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue") - -payload := firewallpolicyrulecollectiongroups.FirewallPolicyRuleCollectionGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallPolicyRuleCollectionGroupsClient.Delete` - -```go -ctx := context.TODO() -id := firewallpolicyrulecollectiongroups.NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallPolicyRuleCollectionGroupsClient.Get` - -```go -ctx := context.TODO() -id := firewallpolicyrulecollectiongroups.NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPolicyRuleCollectionGroupsClient.List` - -```go -ctx := context.TODO() -id := firewallpolicyrulecollectiongroups.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/client.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/client.go deleted file mode 100644 index 1066038440b..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollectionGroupsClient struct { - Client *resourcemanager.Client -} - -func NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(api environments.Api) (*FirewallPolicyRuleCollectionGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "firewallpolicyrulecollectiongroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating FirewallPolicyRuleCollectionGroupsClient: %+v", err) - } - - return &FirewallPolicyRuleCollectionGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/constants.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/constants.go deleted file mode 100644 index 73fd6902a8b..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/constants.go +++ /dev/null @@ -1,309 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyFilterRuleCollectionActionType string - -const ( - FirewallPolicyFilterRuleCollectionActionTypeAllow FirewallPolicyFilterRuleCollectionActionType = "Allow" - FirewallPolicyFilterRuleCollectionActionTypeDeny FirewallPolicyFilterRuleCollectionActionType = "Deny" -) - -func PossibleValuesForFirewallPolicyFilterRuleCollectionActionType() []string { - return []string{ - string(FirewallPolicyFilterRuleCollectionActionTypeAllow), - string(FirewallPolicyFilterRuleCollectionActionTypeDeny), - } -} - -func (s *FirewallPolicyFilterRuleCollectionActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyFilterRuleCollectionActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyFilterRuleCollectionActionType(input string) (*FirewallPolicyFilterRuleCollectionActionType, error) { - vals := map[string]FirewallPolicyFilterRuleCollectionActionType{ - "allow": FirewallPolicyFilterRuleCollectionActionTypeAllow, - "deny": FirewallPolicyFilterRuleCollectionActionTypeDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyFilterRuleCollectionActionType(input) - return &out, nil -} - -type FirewallPolicyNatRuleCollectionActionType string - -const ( - FirewallPolicyNatRuleCollectionActionTypeDNAT FirewallPolicyNatRuleCollectionActionType = "DNAT" -) - -func PossibleValuesForFirewallPolicyNatRuleCollectionActionType() []string { - return []string{ - string(FirewallPolicyNatRuleCollectionActionTypeDNAT), - } -} - -func (s *FirewallPolicyNatRuleCollectionActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyNatRuleCollectionActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyNatRuleCollectionActionType(input string) (*FirewallPolicyNatRuleCollectionActionType, error) { - vals := map[string]FirewallPolicyNatRuleCollectionActionType{ - "dnat": FirewallPolicyNatRuleCollectionActionTypeDNAT, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyNatRuleCollectionActionType(input) - return &out, nil -} - -type FirewallPolicyRuleApplicationProtocolType string - -const ( - FirewallPolicyRuleApplicationProtocolTypeHTTP FirewallPolicyRuleApplicationProtocolType = "Http" - FirewallPolicyRuleApplicationProtocolTypeHTTPS FirewallPolicyRuleApplicationProtocolType = "Https" -) - -func PossibleValuesForFirewallPolicyRuleApplicationProtocolType() []string { - return []string{ - string(FirewallPolicyRuleApplicationProtocolTypeHTTP), - string(FirewallPolicyRuleApplicationProtocolTypeHTTPS), - } -} - -func (s *FirewallPolicyRuleApplicationProtocolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyRuleApplicationProtocolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyRuleApplicationProtocolType(input string) (*FirewallPolicyRuleApplicationProtocolType, error) { - vals := map[string]FirewallPolicyRuleApplicationProtocolType{ - "http": FirewallPolicyRuleApplicationProtocolTypeHTTP, - "https": FirewallPolicyRuleApplicationProtocolTypeHTTPS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyRuleApplicationProtocolType(input) - return &out, nil -} - -type FirewallPolicyRuleCollectionType string - -const ( - FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection FirewallPolicyRuleCollectionType = "FirewallPolicyFilterRuleCollection" - FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection FirewallPolicyRuleCollectionType = "FirewallPolicyNatRuleCollection" -) - -func PossibleValuesForFirewallPolicyRuleCollectionType() []string { - return []string{ - string(FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection), - string(FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection), - } -} - -func (s *FirewallPolicyRuleCollectionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyRuleCollectionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyRuleCollectionType(input string) (*FirewallPolicyRuleCollectionType, error) { - vals := map[string]FirewallPolicyRuleCollectionType{ - "firewallpolicyfilterrulecollection": FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection, - "firewallpolicynatrulecollection": FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyRuleCollectionType(input) - return &out, nil -} - -type FirewallPolicyRuleNetworkProtocol string - -const ( - FirewallPolicyRuleNetworkProtocolAny FirewallPolicyRuleNetworkProtocol = "Any" - FirewallPolicyRuleNetworkProtocolICMP FirewallPolicyRuleNetworkProtocol = "ICMP" - FirewallPolicyRuleNetworkProtocolTCP FirewallPolicyRuleNetworkProtocol = "TCP" - FirewallPolicyRuleNetworkProtocolUDP FirewallPolicyRuleNetworkProtocol = "UDP" -) - -func PossibleValuesForFirewallPolicyRuleNetworkProtocol() []string { - return []string{ - string(FirewallPolicyRuleNetworkProtocolAny), - string(FirewallPolicyRuleNetworkProtocolICMP), - string(FirewallPolicyRuleNetworkProtocolTCP), - string(FirewallPolicyRuleNetworkProtocolUDP), - } -} - -func (s *FirewallPolicyRuleNetworkProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyRuleNetworkProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyRuleNetworkProtocol(input string) (*FirewallPolicyRuleNetworkProtocol, error) { - vals := map[string]FirewallPolicyRuleNetworkProtocol{ - "any": FirewallPolicyRuleNetworkProtocolAny, - "icmp": FirewallPolicyRuleNetworkProtocolICMP, - "tcp": FirewallPolicyRuleNetworkProtocolTCP, - "udp": FirewallPolicyRuleNetworkProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyRuleNetworkProtocol(input) - return &out, nil -} - -type FirewallPolicyRuleType string - -const ( - FirewallPolicyRuleTypeApplicationRule FirewallPolicyRuleType = "ApplicationRule" - FirewallPolicyRuleTypeNatRule FirewallPolicyRuleType = "NatRule" - FirewallPolicyRuleTypeNetworkRule FirewallPolicyRuleType = "NetworkRule" -) - -func PossibleValuesForFirewallPolicyRuleType() []string { - return []string{ - string(FirewallPolicyRuleTypeApplicationRule), - string(FirewallPolicyRuleTypeNatRule), - string(FirewallPolicyRuleTypeNetworkRule), - } -} - -func (s *FirewallPolicyRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyRuleType(input string) (*FirewallPolicyRuleType, error) { - vals := map[string]FirewallPolicyRuleType{ - "applicationrule": FirewallPolicyRuleTypeApplicationRule, - "natrule": FirewallPolicyRuleTypeNatRule, - "networkrule": FirewallPolicyRuleTypeNetworkRule, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyRuleType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go deleted file mode 100644 index 0ab64308936..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FirewallPolicyId{} - -// FirewallPolicyId is a struct representing the Resource ID for a Firewall Policy -type FirewallPolicyId struct { - SubscriptionId string - ResourceGroupName string - FirewallPolicyName string -} - -// NewFirewallPolicyID returns a new FirewallPolicyId struct -func NewFirewallPolicyID(subscriptionId string, resourceGroupName string, firewallPolicyName string) FirewallPolicyId { - return FirewallPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FirewallPolicyName: firewallPolicyName, - } -} - -// ParseFirewallPolicyID parses 'input' into a FirewallPolicyId -func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(FirewallPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - return &id, nil -} - -// ParseFirewallPolicyIDInsensitively parses 'input' case-insensitively into a FirewallPolicyId -// note: this method should only be used for API response data and not user input -func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(FirewallPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateFirewallPolicyID checks that 'input' can be parsed as a Firewall Policy ID -func ValidateFirewallPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFirewallPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Firewall Policy ID -func (id FirewallPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/firewallPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FirewallPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Firewall Policy ID -func (id FirewallPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticFirewallPolicies", "firewallPolicies", "firewallPolicies"), - resourceids.UserSpecifiedSegment("firewallPolicyName", "firewallPolicyValue"), - } -} - -// String returns a human-readable description of this Firewall Policy ID -func (id FirewallPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Firewall Policy Name: %q", id.FirewallPolicyName), - } - return fmt.Sprintf("Firewall Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy_test.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy_test.go deleted file mode 100644 index 6ccc88e0431..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_firewallpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FirewallPolicyId{} - -func TestNewFirewallPolicyID(t *testing.T) { - id := NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FirewallPolicyName != "firewallPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'FirewallPolicyName'", id.FirewallPolicyName, "firewallPolicyValue") - } -} - -func TestFormatFirewallPolicyID(t *testing.T) { - actual := NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFirewallPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFirewallPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - } -} - -func TestParseFirewallPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FirewallPolicyName: "fIrEwAlLpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFirewallPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - } -} - -func TestSegmentsForFirewallPolicyId(t *testing.T) { - segments := FirewallPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FirewallPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go deleted file mode 100644 index 8ab322f77ac..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionGroupId{} - -// RuleCollectionGroupId is a struct representing the Resource ID for a Rule Collection Group -type RuleCollectionGroupId struct { - SubscriptionId string - ResourceGroupName string - FirewallPolicyName string - RuleCollectionGroupName string -} - -// NewRuleCollectionGroupID returns a new RuleCollectionGroupId struct -func NewRuleCollectionGroupID(subscriptionId string, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string) RuleCollectionGroupId { - return RuleCollectionGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FirewallPolicyName: firewallPolicyName, - RuleCollectionGroupName: ruleCollectionGroupName, - } -} - -// ParseRuleCollectionGroupID parses 'input' into a RuleCollectionGroupId -func ParseRuleCollectionGroupID(input string) (*RuleCollectionGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - if id.RuleCollectionGroupName, ok = parsed.Parsed["ruleCollectionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionGroupName", *parsed) - } - - return &id, nil -} - -// ParseRuleCollectionGroupIDInsensitively parses 'input' case-insensitively into a RuleCollectionGroupId -// note: this method should only be used for API response data and not user input -func ParseRuleCollectionGroupIDInsensitively(input string) (*RuleCollectionGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - if id.RuleCollectionGroupName, ok = parsed.Parsed["ruleCollectionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionGroupName", *parsed) - } - - return &id, nil -} - -// ValidateRuleCollectionGroupID checks that 'input' can be parsed as a Rule Collection Group ID -func ValidateRuleCollectionGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRuleCollectionGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Rule Collection Group ID -func (id RuleCollectionGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/firewallPolicies/%s/ruleCollectionGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FirewallPolicyName, id.RuleCollectionGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Rule Collection Group ID -func (id RuleCollectionGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticFirewallPolicies", "firewallPolicies", "firewallPolicies"), - resourceids.UserSpecifiedSegment("firewallPolicyName", "firewallPolicyValue"), - resourceids.StaticSegment("staticRuleCollectionGroups", "ruleCollectionGroups", "ruleCollectionGroups"), - resourceids.UserSpecifiedSegment("ruleCollectionGroupName", "ruleCollectionGroupValue"), - } -} - -// String returns a human-readable description of this Rule Collection Group ID -func (id RuleCollectionGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Firewall Policy Name: %q", id.FirewallPolicyName), - fmt.Sprintf("Rule Collection Group Name: %q", id.RuleCollectionGroupName), - } - return fmt.Sprintf("Rule Collection Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup_test.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup_test.go deleted file mode 100644 index 360291df9bc..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionGroupId{} - -func TestNewRuleCollectionGroupID(t *testing.T) { - id := NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FirewallPolicyName != "firewallPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'FirewallPolicyName'", id.FirewallPolicyName, "firewallPolicyValue") - } - - if id.RuleCollectionGroupName != "ruleCollectionGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleCollectionGroupName'", id.RuleCollectionGroupName, "ruleCollectionGroupValue") - } -} - -func TestFormatRuleCollectionGroupID(t *testing.T) { - actual := NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRuleCollectionGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue", - Expected: &RuleCollectionGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - RuleCollectionGroupName: "ruleCollectionGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - if actual.RuleCollectionGroupName != v.Expected.RuleCollectionGroupName { - t.Fatalf("Expected %q but got %q for RuleCollectionGroupName", v.Expected.RuleCollectionGroupName, actual.RuleCollectionGroupName) - } - - } -} - -func TestParseRuleCollectionGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/rUlEcOlLeCtIoNgRoUpS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue", - Expected: &RuleCollectionGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - RuleCollectionGroupName: "ruleCollectionGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/rUlEcOlLeCtIoNgRoUpS/rUlEcOlLeCtIoNgRoUpVaLuE", - Expected: &RuleCollectionGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FirewallPolicyName: "fIrEwAlLpOlIcYvAlUe", - RuleCollectionGroupName: "rUlEcOlLeCtIoNgRoUpVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/rUlEcOlLeCtIoNgRoUpS/rUlEcOlLeCtIoNgRoUpVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - if actual.RuleCollectionGroupName != v.Expected.RuleCollectionGroupName { - t.Fatalf("Expected %q but got %q for RuleCollectionGroupName", v.Expected.RuleCollectionGroupName, actual.RuleCollectionGroupName) - } - - } -} - -func TestSegmentsForRuleCollectionGroupId(t *testing.T) { - segments := RuleCollectionGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RuleCollectionGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_createorupdate.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_createorupdate.go deleted file mode 100644 index ced43f54187..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdate(ctx context.Context, id RuleCollectionGroupId, input FirewallPolicyRuleCollectionGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id RuleCollectionGroupId, input FirewallPolicyRuleCollectionGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_delete.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_delete.go deleted file mode 100644 index 159bb061b84..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c FirewallPolicyRuleCollectionGroupsClient) Delete(ctx context.Context, id RuleCollectionGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c FirewallPolicyRuleCollectionGroupsClient) DeleteThenPoll(ctx context.Context, id RuleCollectionGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_get.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_get.go deleted file mode 100644 index 9cc5777d9ad..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FirewallPolicyRuleCollectionGroup -} - -// Get ... -func (c FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, id RuleCollectionGroupId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_list.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_list.go deleted file mode 100644 index 5dec7573066..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FirewallPolicyRuleCollectionGroup -} - -type ListCompleteResult struct { - Items []FirewallPolicyRuleCollectionGroup -} - -// List ... -func (c FirewallPolicyRuleCollectionGroupsClient) List(ctx context.Context, id FirewallPolicyId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ruleCollectionGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FirewallPolicyRuleCollectionGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c FirewallPolicyRuleCollectionGroupsClient) ListComplete(ctx context.Context, id FirewallPolicyId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, FirewallPolicyRuleCollectionGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FirewallPolicyRuleCollectionGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id FirewallPolicyId, predicate FirewallPolicyRuleCollectionGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]FirewallPolicyRuleCollectionGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_applicationrule.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_applicationrule.go deleted file mode 100644 index 7986fbe7086..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_applicationrule.go +++ /dev/null @@ -1,51 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRule = ApplicationRule{} - -type ApplicationRule struct { - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - FqdnTags *[]string `json:"fqdnTags,omitempty"` - Protocols *[]FirewallPolicyRuleApplicationProtocol `json:"protocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - TargetFqdns *[]string `json:"targetFqdns,omitempty"` - TargetUrls *[]string `json:"targetUrls,omitempty"` - TerminateTLS *bool `json:"terminateTLS,omitempty"` - WebCategories *[]string `json:"webCategories,omitempty"` - - // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` -} - -var _ json.Marshaler = ApplicationRule{} - -func (s ApplicationRule) MarshalJSON() ([]byte, error) { - type wrapper ApplicationRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ApplicationRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ApplicationRule: %+v", err) - } - decoded["ruleType"] = "ApplicationRule" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ApplicationRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go deleted file mode 100644 index 6e9762da492..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go +++ /dev/null @@ -1,81 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRuleCollection = FirewallPolicyFilterRuleCollection{} - -type FirewallPolicyFilterRuleCollection struct { - Action *FirewallPolicyFilterRuleCollectionAction `json:"action,omitempty"` - Rules *[]FirewallPolicyRule `json:"rules,omitempty"` - - // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` -} - -var _ json.Marshaler = FirewallPolicyFilterRuleCollection{} - -func (s FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { - type wrapper FirewallPolicyFilterRuleCollection - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FirewallPolicyFilterRuleCollection: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection: %+v", err) - } - decoded["ruleCollectionType"] = "FirewallPolicyFilterRuleCollection" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FirewallPolicyFilterRuleCollection: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FirewallPolicyFilterRuleCollection{} - -func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { - type alias FirewallPolicyFilterRuleCollection - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into FirewallPolicyFilterRuleCollection: %+v", err) - } - - s.Action = decoded.Action - s.Name = decoded.Name - s.Priority = decoded.Priority - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["rules"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Rules into list []json.RawMessage: %+v", err) - } - - output := make([]FirewallPolicyRule, 0) - for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyFilterRuleCollection': %+v", i, err) - } - output = append(output, impl) - } - s.Rules = &output - } - return nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollectionaction.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollectionaction.go deleted file mode 100644 index 42d0cb7d127..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollectionaction.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyFilterRuleCollectionAction struct { - Type *FirewallPolicyFilterRuleCollectionActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go deleted file mode 100644 index 114889c0540..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go +++ /dev/null @@ -1,81 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRuleCollection = FirewallPolicyNatRuleCollection{} - -type FirewallPolicyNatRuleCollection struct { - Action *FirewallPolicyNatRuleCollectionAction `json:"action,omitempty"` - Rules *[]FirewallPolicyRule `json:"rules,omitempty"` - - // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` -} - -var _ json.Marshaler = FirewallPolicyNatRuleCollection{} - -func (s FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { - type wrapper FirewallPolicyNatRuleCollection - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FirewallPolicyNatRuleCollection: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection: %+v", err) - } - decoded["ruleCollectionType"] = "FirewallPolicyNatRuleCollection" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FirewallPolicyNatRuleCollection: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FirewallPolicyNatRuleCollection{} - -func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { - type alias FirewallPolicyNatRuleCollection - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into FirewallPolicyNatRuleCollection: %+v", err) - } - - s.Action = decoded.Action - s.Name = decoded.Name - s.Priority = decoded.Priority - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["rules"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Rules into list []json.RawMessage: %+v", err) - } - - output := make([]FirewallPolicyRule, 0) - for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyNatRuleCollection': %+v", i, err) - } - output = append(output, impl) - } - s.Rules = &output - } - return nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollectionaction.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollectionaction.go deleted file mode 100644 index 0b31f5d8ffa..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollectionaction.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyNatRuleCollectionAction struct { - Type *FirewallPolicyNatRuleCollectionActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go deleted file mode 100644 index 9976226339b..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go +++ /dev/null @@ -1,64 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRule interface { -} - -func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling FirewallPolicyRule into map[string]interface: %+v", err) - } - - value, ok := temp["ruleType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "ApplicationRule") { - var out ApplicationRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ApplicationRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "NatRule") { - var out NatRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into NatRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "NetworkRule") { - var out NetworkRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into NetworkRule: %+v", err) - } - return out, nil - } - - type RawFirewallPolicyRuleImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawFirewallPolicyRuleImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyruleapplicationprotocol.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyruleapplicationprotocol.go deleted file mode 100644 index cc2db178d08..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyruleapplicationprotocol.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleApplicationProtocol struct { - Port *int64 `json:"port,omitempty"` - ProtocolType *FirewallPolicyRuleApplicationProtocolType `json:"protocolType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go deleted file mode 100644 index 0e9829a4048..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollection interface { -} - -func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling FirewallPolicyRuleCollection into map[string]interface: %+v", err) - } - - value, ok := temp["ruleCollectionType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "FirewallPolicyFilterRuleCollection") { - var out FirewallPolicyFilterRuleCollection - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FirewallPolicyFilterRuleCollection: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "FirewallPolicyNatRuleCollection") { - var out FirewallPolicyNatRuleCollection - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FirewallPolicyNatRuleCollection: %+v", err) - } - return out, nil - } - - type RawFirewallPolicyRuleCollectionImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawFirewallPolicyRuleCollectionImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroup.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroup.go deleted file mode 100644 index 3cd2b948905..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollectionGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FirewallPolicyRuleCollectionGroupProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go deleted file mode 100644 index e137579ac44..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go +++ /dev/null @@ -1,51 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollectionGroupProperties struct { - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleCollections *[]FirewallPolicyRuleCollection `json:"ruleCollections,omitempty"` -} - -var _ json.Unmarshaler = &FirewallPolicyRuleCollectionGroupProperties{} - -func (s *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(bytes []byte) error { - type alias FirewallPolicyRuleCollectionGroupProperties - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into FirewallPolicyRuleCollectionGroupProperties: %+v", err) - } - - s.Priority = decoded.Priority - s.ProvisioningState = decoded.ProvisioningState - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FirewallPolicyRuleCollectionGroupProperties into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["ruleCollections"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling RuleCollections into list []json.RawMessage: %+v", err) - } - - output := make([]FirewallPolicyRuleCollection, 0) - for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleCollectionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'RuleCollections' for 'FirewallPolicyRuleCollectionGroupProperties': %+v", i, err) - } - output = append(output, impl) - } - s.RuleCollections = &output - } - return nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_natrule.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_natrule.go deleted file mode 100644 index 5354374d68c..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_natrule.go +++ /dev/null @@ -1,50 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRule = NatRule{} - -type NatRule struct { - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - TranslatedAddress *string `json:"translatedAddress,omitempty"` - TranslatedFqdn *string `json:"translatedFqdn,omitempty"` - TranslatedPort *string `json:"translatedPort,omitempty"` - - // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` -} - -var _ json.Marshaler = NatRule{} - -func (s NatRule) MarshalJSON() ([]byte, error) { - type wrapper NatRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling NatRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling NatRule: %+v", err) - } - decoded["ruleType"] = "NatRule" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling NatRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_networkrule.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_networkrule.go deleted file mode 100644 index 7548f48a194..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/model_networkrule.go +++ /dev/null @@ -1,49 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRule = NetworkRule{} - -type NetworkRule struct { - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationFqdns *[]string `json:"destinationFqdns,omitempty"` - DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - - // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` -} - -var _ json.Marshaler = NetworkRule{} - -func (s NetworkRule) MarshalJSON() ([]byte, error) { - type wrapper NetworkRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling NetworkRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling NetworkRule: %+v", err) - } - decoded["ruleType"] = "NetworkRule" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling NetworkRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/predicates.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/predicates.go deleted file mode 100644 index 9762acada56..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollectionGroupOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p FirewallPolicyRuleCollectionGroupOperationPredicate) Matches(input FirewallPolicyRuleCollectionGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/version.go b/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/version.go deleted file mode 100644 index 2e2a0798f6b..00000000000 --- a/resource-manager/network/2022-09-01/firewallpolicyrulecollectiongroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/flowlogs/README.md b/resource-manager/network/2022-09-01/flowlogs/README.md deleted file mode 100644 index 8e13ccd7507..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/README.md +++ /dev/null @@ -1,103 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/flowlogs` Documentation - -The `flowlogs` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/flowlogs" -``` - - -### Client Initialization - -```go -client := flowlogs.NewFlowLogsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `FlowLogsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - -payload := flowlogs.FlowLog{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `FlowLogsClient.Delete` - -```go -ctx := context.TODO() -id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `FlowLogsClient.Get` - -```go -ctx := context.TODO() -id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FlowLogsClient.List` - -```go -ctx := context.TODO() -id := flowlogs.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `FlowLogsClient.UpdateTags` - -```go -ctx := context.TODO() -id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - -payload := flowlogs.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/flowlogs/client.go b/resource-manager/network/2022-09-01/flowlogs/client.go deleted file mode 100644 index 51ae4558663..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package flowlogs - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogsClient struct { - Client *resourcemanager.Client -} - -func NewFlowLogsClientWithBaseURI(api environments.Api) (*FlowLogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "flowlogs", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating FlowLogsClient: %+v", err) - } - - return &FlowLogsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/flowlogs/constants.go b/resource-manager/network/2022-09-01/flowlogs/constants.go deleted file mode 100644 index e5e97eea109..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/constants.go +++ /dev/null @@ -1,95 +0,0 @@ -package flowlogs - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/flowlogs/id_flowlog.go b/resource-manager/network/2022-09-01/flowlogs/id_flowlog.go deleted file mode 100644 index 531b76451d0..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/id_flowlog.go +++ /dev/null @@ -1,140 +0,0 @@ -package flowlogs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FlowLogId{} - -// FlowLogId is a struct representing the Resource ID for a Flow Log -type FlowLogId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string - FlowLogName string -} - -// NewFlowLogID returns a new FlowLogId struct -func NewFlowLogID(subscriptionId string, resourceGroupName string, networkWatcherName string, flowLogName string) FlowLogId { - return FlowLogId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - FlowLogName: flowLogName, - } -} - -// ParseFlowLogID parses 'input' into a FlowLogId -func ParseFlowLogID(input string) (*FlowLogId, error) { - parser := resourceids.NewParserFromResourceIdType(FlowLogId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FlowLogId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.FlowLogName, ok = parsed.Parsed["flowLogName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flowLogName", *parsed) - } - - return &id, nil -} - -// ParseFlowLogIDInsensitively parses 'input' case-insensitively into a FlowLogId -// note: this method should only be used for API response data and not user input -func ParseFlowLogIDInsensitively(input string) (*FlowLogId, error) { - parser := resourceids.NewParserFromResourceIdType(FlowLogId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FlowLogId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.FlowLogName, ok = parsed.Parsed["flowLogName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flowLogName", *parsed) - } - - return &id, nil -} - -// ValidateFlowLogID checks that 'input' can be parsed as a Flow Log ID -func ValidateFlowLogID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFlowLogID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Flow Log ID -func (id FlowLogId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s/flowLogs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName, id.FlowLogName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Flow Log ID -func (id FlowLogId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - resourceids.StaticSegment("staticFlowLogs", "flowLogs", "flowLogs"), - resourceids.UserSpecifiedSegment("flowLogName", "flowLogValue"), - } -} - -// String returns a human-readable description of this Flow Log ID -func (id FlowLogId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - fmt.Sprintf("Flow Log Name: %q", id.FlowLogName), - } - return fmt.Sprintf("Flow Log (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/flowlogs/id_flowlog_test.go b/resource-manager/network/2022-09-01/flowlogs/id_flowlog_test.go deleted file mode 100644 index 787c0c562d6..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/id_flowlog_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package flowlogs - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FlowLogId{} - -func TestNewFlowLogID(t *testing.T) { - id := NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } - - if id.FlowLogName != "flowLogValue" { - t.Fatalf("Expected %q but got %q for Segment 'FlowLogName'", id.FlowLogName, "flowLogValue") - } -} - -func TestFormatFlowLogID(t *testing.T) { - actual := NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFlowLogID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlowLogId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue", - Expected: &FlowLogId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - FlowLogName: "flowLogValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlowLogID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.FlowLogName != v.Expected.FlowLogName { - t.Fatalf("Expected %q but got %q for FlowLogName", v.Expected.FlowLogName, actual.FlowLogName) - } - - } -} - -func TestParseFlowLogIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlowLogId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/fLoWlOgS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue", - Expected: &FlowLogId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - FlowLogName: "flowLogValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/fLoWlOgS/fLoWlOgVaLuE", - Expected: &FlowLogId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - FlowLogName: "fLoWlOgVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/fLoWlOgS/fLoWlOgVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlowLogIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.FlowLogName != v.Expected.FlowLogName { - t.Fatalf("Expected %q but got %q for FlowLogName", v.Expected.FlowLogName, actual.FlowLogName) - } - - } -} - -func TestSegmentsForFlowLogId(t *testing.T) { - segments := FlowLogId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FlowLogId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/flowlogs/id_networkwatcher.go b/resource-manager/network/2022-09-01/flowlogs/id_networkwatcher.go deleted file mode 100644 index 5fc6d966ffe..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package flowlogs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/flowlogs/id_networkwatcher_test.go b/resource-manager/network/2022-09-01/flowlogs/id_networkwatcher_test.go deleted file mode 100644 index 0d9277cf4bf..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package flowlogs - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/flowlogs/method_createorupdate.go b/resource-manager/network/2022-09-01/flowlogs/method_createorupdate.go deleted file mode 100644 index e4e731f0bbe..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package flowlogs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c FlowLogsClient) CreateOrUpdate(ctx context.Context, id FlowLogId, input FlowLog) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c FlowLogsClient) CreateOrUpdateThenPoll(ctx context.Context, id FlowLogId, input FlowLog) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/flowlogs/method_delete.go b/resource-manager/network/2022-09-01/flowlogs/method_delete.go deleted file mode 100644 index 1ff7776fa73..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/method_delete.go +++ /dev/null @@ -1,70 +0,0 @@ -package flowlogs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c FlowLogsClient) Delete(ctx context.Context, id FlowLogId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c FlowLogsClient) DeleteThenPoll(ctx context.Context, id FlowLogId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/flowlogs/method_get.go b/resource-manager/network/2022-09-01/flowlogs/method_get.go deleted file mode 100644 index 6bbe4c8574a..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package flowlogs - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FlowLog -} - -// Get ... -func (c FlowLogsClient) Get(ctx context.Context, id FlowLogId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/flowlogs/method_list.go b/resource-manager/network/2022-09-01/flowlogs/method_list.go deleted file mode 100644 index 3d8951e0659..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package flowlogs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FlowLog -} - -type ListCompleteResult struct { - Items []FlowLog -} - -// List ... -func (c FlowLogsClient) List(ctx context.Context, id NetworkWatcherId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/flowLogs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FlowLog `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c FlowLogsClient) ListComplete(ctx context.Context, id NetworkWatcherId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, FlowLogOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FlowLogsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkWatcherId, predicate FlowLogOperationPredicate) (result ListCompleteResult, err error) { - items := make([]FlowLog, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/flowlogs/method_updatetags.go b/resource-manager/network/2022-09-01/flowlogs/method_updatetags.go deleted file mode 100644 index bb55968efe9..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package flowlogs - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FlowLog -} - -// UpdateTags ... -func (c FlowLogsClient) UpdateTags(ctx context.Context, id FlowLogId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/flowlogs/model_flowlog.go b/resource-manager/network/2022-09-01/flowlogs/model_flowlog.go deleted file mode 100644 index 6cb0c1a33b5..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/flowlogs/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/flowlogs/model_flowlogformatparameters.go deleted file mode 100644 index 16ca58e95a3..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/flowlogs/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/flowlogs/model_flowlogpropertiesformat.go deleted file mode 100644 index e08f8fc6124..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/flowlogs/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/flowlogs/model_retentionpolicyparameters.go deleted file mode 100644 index 37f07668bea..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/flowlogs/model_tagsobject.go b/resource-manager/network/2022-09-01/flowlogs/model_tagsobject.go deleted file mode 100644 index c5cd354ef29..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/flowlogs/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/flowlogs/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 5b935e5f27b..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/flowlogs/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/flowlogs/model_trafficanalyticsproperties.go deleted file mode 100644 index d6d9faede4b..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/flowlogs/predicates.go b/resource-manager/network/2022-09-01/flowlogs/predicates.go deleted file mode 100644 index 746df2611cc..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p FlowLogOperationPredicate) Matches(input FlowLog) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/flowlogs/version.go b/resource-manager/network/2022-09-01/flowlogs/version.go deleted file mode 100644 index d36da596709..00000000000 --- a/resource-manager/network/2022-09-01/flowlogs/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package flowlogs - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/flowlogs/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/ipallocations/README.md b/resource-manager/network/2022-09-01/ipallocations/README.md deleted file mode 100644 index 04c7b564f82..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ipallocations` Documentation - -The `ipallocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ipallocations" -``` - - -### Client Initialization - -```go -client := ipallocations.NewIPAllocationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `IPAllocationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := ipallocations.NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - -payload := ipallocations.IPAllocation{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `IPAllocationsClient.Delete` - -```go -ctx := context.TODO() -id := ipallocations.NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `IPAllocationsClient.Get` - -```go -ctx := context.TODO() -id := ipallocations.NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - -read, err := client.Get(ctx, id, ipallocations.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `IPAllocationsClient.List` - -```go -ctx := context.TODO() -id := ipallocations.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `IPAllocationsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := ipallocations.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `IPAllocationsClient.UpdateTags` - -```go -ctx := context.TODO() -id := ipallocations.NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - -payload := ipallocations.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/ipallocations/client.go b/resource-manager/network/2022-09-01/ipallocations/client.go deleted file mode 100644 index a9a2ce87420..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package ipallocations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocationsClient struct { - Client *resourcemanager.Client -} - -func NewIPAllocationsClientWithBaseURI(api environments.Api) (*IPAllocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "ipallocations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating IPAllocationsClient: %+v", err) - } - - return &IPAllocationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/ipallocations/constants.go b/resource-manager/network/2022-09-01/ipallocations/constants.go deleted file mode 100644 index da0323d2ad0..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/constants.go +++ /dev/null @@ -1,92 +0,0 @@ -package ipallocations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocationType string - -const ( - IPAllocationTypeHypernet IPAllocationType = "Hypernet" - IPAllocationTypeUndefined IPAllocationType = "Undefined" -) - -func PossibleValuesForIPAllocationType() []string { - return []string{ - string(IPAllocationTypeHypernet), - string(IPAllocationTypeUndefined), - } -} - -func (s *IPAllocationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationType(input string) (*IPAllocationType, error) { - vals := map[string]IPAllocationType{ - "hypernet": IPAllocationTypeHypernet, - "undefined": IPAllocationTypeUndefined, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationType(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/ipallocations/id_ipallocation.go b/resource-manager/network/2022-09-01/ipallocations/id_ipallocation.go deleted file mode 100644 index 6e8aa2517f8..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/id_ipallocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package ipallocations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = IPAllocationId{} - -// IPAllocationId is a struct representing the Resource ID for a I P Allocation -type IPAllocationId struct { - SubscriptionId string - ResourceGroupName string - IpAllocationName string -} - -// NewIPAllocationID returns a new IPAllocationId struct -func NewIPAllocationID(subscriptionId string, resourceGroupName string, ipAllocationName string) IPAllocationId { - return IPAllocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - IpAllocationName: ipAllocationName, - } -} - -// ParseIPAllocationID parses 'input' into a IPAllocationId -func ParseIPAllocationID(input string) (*IPAllocationId, error) { - parser := resourceids.NewParserFromResourceIdType(IPAllocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := IPAllocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpAllocationName, ok = parsed.Parsed["ipAllocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipAllocationName", *parsed) - } - - return &id, nil -} - -// ParseIPAllocationIDInsensitively parses 'input' case-insensitively into a IPAllocationId -// note: this method should only be used for API response data and not user input -func ParseIPAllocationIDInsensitively(input string) (*IPAllocationId, error) { - parser := resourceids.NewParserFromResourceIdType(IPAllocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := IPAllocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpAllocationName, ok = parsed.Parsed["ipAllocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipAllocationName", *parsed) - } - - return &id, nil -} - -// ValidateIPAllocationID checks that 'input' can be parsed as a I P Allocation ID -func ValidateIPAllocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseIPAllocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted I P Allocation ID -func (id IPAllocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/ipAllocations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IpAllocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this I P Allocation ID -func (id IPAllocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticIpAllocations", "ipAllocations", "ipAllocations"), - resourceids.UserSpecifiedSegment("ipAllocationName", "ipAllocationValue"), - } -} - -// String returns a human-readable description of this I P Allocation ID -func (id IPAllocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Ip Allocation Name: %q", id.IpAllocationName), - } - return fmt.Sprintf("I P Allocation (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/ipallocations/id_ipallocation_test.go b/resource-manager/network/2022-09-01/ipallocations/id_ipallocation_test.go deleted file mode 100644 index b739b9dd6b1..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/id_ipallocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package ipallocations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = IPAllocationId{} - -func TestNewIPAllocationID(t *testing.T) { - id := NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.IpAllocationName != "ipAllocationValue" { - t.Fatalf("Expected %q but got %q for Segment 'IpAllocationName'", id.IpAllocationName, "ipAllocationValue") - } -} - -func TestFormatIPAllocationID(t *testing.T) { - actual := NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseIPAllocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IPAllocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue", - Expected: &IPAllocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - IpAllocationName: "ipAllocationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseIPAllocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.IpAllocationName != v.Expected.IpAllocationName { - t.Fatalf("Expected %q but got %q for IpAllocationName", v.Expected.IpAllocationName, actual.IpAllocationName) - } - - } -} - -func TestParseIPAllocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IPAllocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPaLlOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue", - Expected: &IPAllocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - IpAllocationName: "ipAllocationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPaLlOcAtIoNs/iPaLlOcAtIoNvAlUe", - Expected: &IPAllocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - IpAllocationName: "iPaLlOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPaLlOcAtIoNs/iPaLlOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseIPAllocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.IpAllocationName != v.Expected.IpAllocationName { - t.Fatalf("Expected %q but got %q for IpAllocationName", v.Expected.IpAllocationName, actual.IpAllocationName) - } - - } -} - -func TestSegmentsForIPAllocationId(t *testing.T) { - segments := IPAllocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("IPAllocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/ipallocations/method_createorupdate.go b/resource-manager/network/2022-09-01/ipallocations/method_createorupdate.go deleted file mode 100644 index 12fbb4a8080..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c IPAllocationsClient) CreateOrUpdate(ctx context.Context, id IPAllocationId, input IPAllocation) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c IPAllocationsClient) CreateOrUpdateThenPoll(ctx context.Context, id IPAllocationId, input IPAllocation) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/ipallocations/method_delete.go b/resource-manager/network/2022-09-01/ipallocations/method_delete.go deleted file mode 100644 index 2e272e0b823..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c IPAllocationsClient) Delete(ctx context.Context, id IPAllocationId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c IPAllocationsClient) DeleteThenPoll(ctx context.Context, id IPAllocationId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/ipallocations/method_get.go b/resource-manager/network/2022-09-01/ipallocations/method_get.go deleted file mode 100644 index 89218415c21..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPAllocation -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c IPAllocationsClient) Get(ctx context.Context, id IPAllocationId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/ipallocations/method_list.go b/resource-manager/network/2022-09-01/ipallocations/method_list.go deleted file mode 100644 index e8d1620c52f..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]IPAllocation -} - -type ListCompleteResult struct { - Items []IPAllocation -} - -// List ... -func (c IPAllocationsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ipAllocations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]IPAllocation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c IPAllocationsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, IPAllocationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IPAllocationsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate IPAllocationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]IPAllocation, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/ipallocations/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/ipallocations/method_listbyresourcegroup.go deleted file mode 100644 index 05ae05abc4d..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]IPAllocation -} - -type ListByResourceGroupCompleteResult struct { - Items []IPAllocation -} - -// ListByResourceGroup ... -func (c IPAllocationsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ipAllocations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]IPAllocation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c IPAllocationsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, IPAllocationOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IPAllocationsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate IPAllocationOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]IPAllocation, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/ipallocations/method_updatetags.go b/resource-manager/network/2022-09-01/ipallocations/method_updatetags.go deleted file mode 100644 index 7d95fb25e97..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package ipallocations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPAllocation -} - -// UpdateTags ... -func (c IPAllocationsClient) UpdateTags(ctx context.Context, id IPAllocationId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/ipallocations/model_ipallocation.go b/resource-manager/network/2022-09-01/ipallocations/model_ipallocation.go deleted file mode 100644 index d59b8140ce3..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/model_ipallocation.go +++ /dev/null @@ -1,14 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPAllocationPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ipallocations/model_ipallocationpropertiesformat.go b/resource-manager/network/2022-09-01/ipallocations/model_ipallocationpropertiesformat.go deleted file mode 100644 index ee1eec041ee..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/model_ipallocationpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocationPropertiesFormat struct { - AllocationTags *map[string]string `json:"allocationTags,omitempty"` - IPamAllocationId *string `json:"ipamAllocationId,omitempty"` - Prefix *string `json:"prefix,omitempty"` - PrefixLength *int64 `json:"prefixLength,omitempty"` - PrefixType *IPVersion `json:"prefixType,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - Type *IPAllocationType `json:"type,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ipallocations/model_subresource.go b/resource-manager/network/2022-09-01/ipallocations/model_subresource.go deleted file mode 100644 index 3d4e1d6d386..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ipallocations/model_tagsobject.go b/resource-manager/network/2022-09-01/ipallocations/model_tagsobject.go deleted file mode 100644 index e07b18f03bb..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ipallocations/predicates.go b/resource-manager/network/2022-09-01/ipallocations/predicates.go deleted file mode 100644 index 5f4e136ae66..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocationOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p IPAllocationOperationPredicate) Matches(input IPAllocation) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/ipallocations/version.go b/resource-manager/network/2022-09-01/ipallocations/version.go deleted file mode 100644 index 8b33c30d925..00000000000 --- a/resource-manager/network/2022-09-01/ipallocations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package ipallocations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipallocations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/ipgroups/README.md b/resource-manager/network/2022-09-01/ipgroups/README.md deleted file mode 100644 index 8f3b70db6fa..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ipgroups` Documentation - -The `ipgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/ipgroups" -``` - - -### Client Initialization - -```go -client := ipgroups.NewIPGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `IPGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - -payload := ipgroups.IPGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `IPGroupsClient.Delete` - -```go -ctx := context.TODO() -id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `IPGroupsClient.Get` - -```go -ctx := context.TODO() -id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - -read, err := client.Get(ctx, id, ipgroups.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `IPGroupsClient.List` - -```go -ctx := context.TODO() -id := ipgroups.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `IPGroupsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := ipgroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `IPGroupsClient.UpdateGroups` - -```go -ctx := context.TODO() -id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - -payload := ipgroups.TagsObject{ - // ... -} - - -read, err := client.UpdateGroups(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/ipgroups/client.go b/resource-manager/network/2022-09-01/ipgroups/client.go deleted file mode 100644 index 74e63c13a67..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package ipgroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPGroupsClient struct { - Client *resourcemanager.Client -} - -func NewIPGroupsClientWithBaseURI(api environments.Api) (*IPGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "ipgroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating IPGroupsClient: %+v", err) - } - - return &IPGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/ipgroups/constants.go b/resource-manager/network/2022-09-01/ipgroups/constants.go deleted file mode 100644 index a50092f263a..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package ipgroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/ipgroups/id_ipgroup.go b/resource-manager/network/2022-09-01/ipgroups/id_ipgroup.go deleted file mode 100644 index 8ca4249bbd4..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/id_ipgroup.go +++ /dev/null @@ -1,127 +0,0 @@ -package ipgroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = IPGroupId{} - -// IPGroupId is a struct representing the Resource ID for a I P Group -type IPGroupId struct { - SubscriptionId string - ResourceGroupName string - IpGroupName string -} - -// NewIPGroupID returns a new IPGroupId struct -func NewIPGroupID(subscriptionId string, resourceGroupName string, ipGroupName string) IPGroupId { - return IPGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - IpGroupName: ipGroupName, - } -} - -// ParseIPGroupID parses 'input' into a IPGroupId -func ParseIPGroupID(input string) (*IPGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(IPGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := IPGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpGroupName, ok = parsed.Parsed["ipGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipGroupName", *parsed) - } - - return &id, nil -} - -// ParseIPGroupIDInsensitively parses 'input' case-insensitively into a IPGroupId -// note: this method should only be used for API response data and not user input -func ParseIPGroupIDInsensitively(input string) (*IPGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(IPGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := IPGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpGroupName, ok = parsed.Parsed["ipGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipGroupName", *parsed) - } - - return &id, nil -} - -// ValidateIPGroupID checks that 'input' can be parsed as a I P Group ID -func ValidateIPGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseIPGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted I P Group ID -func (id IPGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/ipGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IpGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this I P Group ID -func (id IPGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticIpGroups", "ipGroups", "ipGroups"), - resourceids.UserSpecifiedSegment("ipGroupName", "ipGroupValue"), - } -} - -// String returns a human-readable description of this I P Group ID -func (id IPGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Ip Group Name: %q", id.IpGroupName), - } - return fmt.Sprintf("I P Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/ipgroups/id_ipgroup_test.go b/resource-manager/network/2022-09-01/ipgroups/id_ipgroup_test.go deleted file mode 100644 index cfd4c2e130b..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/id_ipgroup_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package ipgroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = IPGroupId{} - -func TestNewIPGroupID(t *testing.T) { - id := NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.IpGroupName != "ipGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'IpGroupName'", id.IpGroupName, "ipGroupValue") - } -} - -func TestFormatIPGroupID(t *testing.T) { - actual := NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseIPGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IPGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue", - Expected: &IPGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - IpGroupName: "ipGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseIPGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.IpGroupName != v.Expected.IpGroupName { - t.Fatalf("Expected %q but got %q for IpGroupName", v.Expected.IpGroupName, actual.IpGroupName) - } - - } -} - -func TestParseIPGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IPGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPgRoUpS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue", - Expected: &IPGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - IpGroupName: "ipGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPgRoUpS/iPgRoUpVaLuE", - Expected: &IPGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - IpGroupName: "iPgRoUpVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPgRoUpS/iPgRoUpVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseIPGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.IpGroupName != v.Expected.IpGroupName { - t.Fatalf("Expected %q but got %q for IpGroupName", v.Expected.IpGroupName, actual.IpGroupName) - } - - } -} - -func TestSegmentsForIPGroupId(t *testing.T) { - segments := IPGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("IPGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/ipgroups/method_createorupdate.go b/resource-manager/network/2022-09-01/ipgroups/method_createorupdate.go deleted file mode 100644 index cdcf7f488f9..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c IPGroupsClient) CreateOrUpdate(ctx context.Context, id IPGroupId, input IPGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c IPGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id IPGroupId, input IPGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/ipgroups/method_delete.go b/resource-manager/network/2022-09-01/ipgroups/method_delete.go deleted file mode 100644 index 1e1797dd8d3..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c IPGroupsClient) Delete(ctx context.Context, id IPGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c IPGroupsClient) DeleteThenPoll(ctx context.Context, id IPGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/ipgroups/method_get.go b/resource-manager/network/2022-09-01/ipgroups/method_get.go deleted file mode 100644 index 7fc933f3b60..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPGroup -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c IPGroupsClient) Get(ctx context.Context, id IPGroupId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/ipgroups/method_list.go b/resource-manager/network/2022-09-01/ipgroups/method_list.go deleted file mode 100644 index e0ce95d2c78..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]IPGroup -} - -type ListCompleteResult struct { - Items []IPGroup -} - -// List ... -func (c IPGroupsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ipGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]IPGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c IPGroupsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, IPGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IPGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate IPGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]IPGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/ipgroups/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/ipgroups/method_listbyresourcegroup.go deleted file mode 100644 index b4a110d752c..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]IPGroup -} - -type ListByResourceGroupCompleteResult struct { - Items []IPGroup -} - -// ListByResourceGroup ... -func (c IPGroupsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ipGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]IPGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c IPGroupsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, IPGroupOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IPGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate IPGroupOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]IPGroup, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/ipgroups/method_updategroups.go b/resource-manager/network/2022-09-01/ipgroups/method_updategroups.go deleted file mode 100644 index f3300f8d8fc..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/method_updategroups.go +++ /dev/null @@ -1,55 +0,0 @@ -package ipgroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateGroupsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPGroup -} - -// UpdateGroups ... -func (c IPGroupsClient) UpdateGroups(ctx context.Context, id IPGroupId, input TagsObject) (result UpdateGroupsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/ipgroups/model_ipgroup.go b/resource-manager/network/2022-09-01/ipgroups/model_ipgroup.go deleted file mode 100644 index 7f586ce2b06..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/model_ipgroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ipgroups/model_ipgrouppropertiesformat.go b/resource-manager/network/2022-09-01/ipgroups/model_ipgrouppropertiesformat.go deleted file mode 100644 index 866075a1038..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/model_ipgrouppropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPGroupPropertiesFormat struct { - FirewallPolicies *[]SubResource `json:"firewallPolicies,omitempty"` - Firewalls *[]SubResource `json:"firewalls,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ipgroups/model_subresource.go b/resource-manager/network/2022-09-01/ipgroups/model_subresource.go deleted file mode 100644 index 5e6c0552f0c..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ipgroups/model_tagsobject.go b/resource-manager/network/2022-09-01/ipgroups/model_tagsobject.go deleted file mode 100644 index df59e42aff4..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/ipgroups/predicates.go b/resource-manager/network/2022-09-01/ipgroups/predicates.go deleted file mode 100644 index a64e98c2290..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPGroupOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p IPGroupOperationPredicate) Matches(input IPGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/ipgroups/version.go b/resource-manager/network/2022-09-01/ipgroups/version.go deleted file mode 100644 index 091d735ff08..00000000000 --- a/resource-manager/network/2022-09-01/ipgroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package ipgroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipgroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/README.md b/resource-manager/network/2022-09-01/loadbalancers/README.md deleted file mode 100644 index f12867485f6..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/README.md +++ /dev/null @@ -1,427 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/loadbalancers` Documentation - -The `loadbalancers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/loadbalancers" -``` - - -### Client Initialization - -```go -client := loadbalancers.NewLoadBalancersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LoadBalancersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -payload := loadbalancers.LoadBalancer{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.Delete` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.Get` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -read, err := client.Get(ctx, id, loadbalancers.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.InboundNatRulesCreateOrUpdate` - -```go -ctx := context.TODO() -id := loadbalancers.NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue") - -payload := loadbalancers.InboundNatRule{ - // ... -} - - -if err := client.InboundNatRulesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.InboundNatRulesDelete` - -```go -ctx := context.TODO() -id := loadbalancers.NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue") - -if err := client.InboundNatRulesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.InboundNatRulesGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue") - -read, err := client.InboundNatRulesGet(ctx, id, loadbalancers.DefaultInboundNatRulesGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.InboundNatRulesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.InboundNatRulesList(ctx, id)` can be used to do batched pagination -items, err := client.InboundNatRulesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.List` - -```go -ctx := context.TODO() -id := loadbalancers.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.ListAll` - -```go -ctx := context.TODO() -id := loadbalancers.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.ListInboundNatRulePortMappings` - -```go -ctx := context.TODO() -id := loadbalancers.NewBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "loadBalancerValue", "backendAddressPoolValue") - -payload := loadbalancers.QueryInboundNatRulePortMappingRequest{ - // ... -} - - -if err := client.ListInboundNatRulePortMappingsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerBackendAddressPoolsCreateOrUpdate` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue") - -payload := loadbalancers.BackendAddressPool{ - // ... -} - - -if err := client.LoadBalancerBackendAddressPoolsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerBackendAddressPoolsDelete` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue") - -if err := client.LoadBalancerBackendAddressPoolsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerBackendAddressPoolsGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue") - -read, err := client.LoadBalancerBackendAddressPoolsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerBackendAddressPoolsList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerBackendAddressPoolsList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerBackendAddressPoolsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerFrontendIPConfigurationsGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewFrontendIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "frontendIPConfigurationValue") - -read, err := client.LoadBalancerFrontendIPConfigurationsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerFrontendIPConfigurationsList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerFrontendIPConfigurationsList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerFrontendIPConfigurationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerLoadBalancingRulesGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "loadBalancingRuleValue") - -read, err := client.LoadBalancerLoadBalancingRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerLoadBalancingRulesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerLoadBalancingRulesList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerLoadBalancingRulesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerNetworkInterfacesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerNetworkInterfacesList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerNetworkInterfacesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerOutboundRulesGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewOutboundRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "outboundRuleValue") - -read, err := client.LoadBalancerOutboundRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerOutboundRulesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerOutboundRulesList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerOutboundRulesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerProbesGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewProbeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "probeValue") - -read, err := client.LoadBalancerProbesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerProbesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerProbesList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerProbesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.SwapPublicIPAddresses` - -```go -ctx := context.TODO() -id := loadbalancers.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -payload := loadbalancers.LoadBalancerVipSwapRequest{ - // ... -} - - -if err := client.SwapPublicIPAddressesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.UpdateTags` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -payload := loadbalancers.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/loadbalancers/client.go b/resource-manager/network/2022-09-01/loadbalancers/client.go deleted file mode 100644 index c61a342321c..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package loadbalancers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancersClient struct { - Client *resourcemanager.Client -} - -func NewLoadBalancersClientWithBaseURI(api environments.Api) (*LoadBalancersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "loadbalancers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LoadBalancersClient: %+v", err) - } - - return &LoadBalancersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/constants.go b/resource-manager/network/2022-09-01/loadbalancers/constants.go deleted file mode 100644 index ad4d2500cd2..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/constants.go +++ /dev/null @@ -1,1230 +0,0 @@ -package loadbalancers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type LoadBalancerOutboundRuleProtocol string - -const ( - LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" - LoadBalancerOutboundRuleProtocolTcp LoadBalancerOutboundRuleProtocol = "Tcp" - LoadBalancerOutboundRuleProtocolUdp LoadBalancerOutboundRuleProtocol = "Udp" -) - -func PossibleValuesForLoadBalancerOutboundRuleProtocol() []string { - return []string{ - string(LoadBalancerOutboundRuleProtocolAll), - string(LoadBalancerOutboundRuleProtocolTcp), - string(LoadBalancerOutboundRuleProtocolUdp), - } -} - -func (s *LoadBalancerOutboundRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerOutboundRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerOutboundRuleProtocol(input string) (*LoadBalancerOutboundRuleProtocol, error) { - vals := map[string]LoadBalancerOutboundRuleProtocol{ - "all": LoadBalancerOutboundRuleProtocolAll, - "tcp": LoadBalancerOutboundRuleProtocolTcp, - "udp": LoadBalancerOutboundRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerOutboundRuleProtocol(input) - return &out, nil -} - -type LoadBalancerSkuName string - -const ( - LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" - LoadBalancerSkuNameGateway LoadBalancerSkuName = "Gateway" - LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" -) - -func PossibleValuesForLoadBalancerSkuName() []string { - return []string{ - string(LoadBalancerSkuNameBasic), - string(LoadBalancerSkuNameGateway), - string(LoadBalancerSkuNameStandard), - } -} - -func (s *LoadBalancerSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerSkuName(input string) (*LoadBalancerSkuName, error) { - vals := map[string]LoadBalancerSkuName{ - "basic": LoadBalancerSkuNameBasic, - "gateway": LoadBalancerSkuNameGateway, - "standard": LoadBalancerSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerSkuName(input) - return &out, nil -} - -type LoadBalancerSkuTier string - -const ( - LoadBalancerSkuTierGlobal LoadBalancerSkuTier = "Global" - LoadBalancerSkuTierRegional LoadBalancerSkuTier = "Regional" -) - -func PossibleValuesForLoadBalancerSkuTier() []string { - return []string{ - string(LoadBalancerSkuTierGlobal), - string(LoadBalancerSkuTierRegional), - } -} - -func (s *LoadBalancerSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerSkuTier(input string) (*LoadBalancerSkuTier, error) { - vals := map[string]LoadBalancerSkuTier{ - "global": LoadBalancerSkuTierGlobal, - "regional": LoadBalancerSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerSkuTier(input) - return &out, nil -} - -type LoadDistribution string - -const ( - LoadDistributionDefault LoadDistribution = "Default" - LoadDistributionSourceIP LoadDistribution = "SourceIP" - LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" -) - -func PossibleValuesForLoadDistribution() []string { - return []string{ - string(LoadDistributionDefault), - string(LoadDistributionSourceIP), - string(LoadDistributionSourceIPProtocol), - } -} - -func (s *LoadDistribution) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadDistribution(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadDistribution(input string) (*LoadDistribution, error) { - vals := map[string]LoadDistribution{ - "default": LoadDistributionDefault, - "sourceip": LoadDistributionSourceIP, - "sourceipprotocol": LoadDistributionSourceIPProtocol, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadDistribution(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProbeProtocol string - -const ( - ProbeProtocolHTTP ProbeProtocol = "Http" - ProbeProtocolHTTPS ProbeProtocol = "Https" - ProbeProtocolTcp ProbeProtocol = "Tcp" -) - -func PossibleValuesForProbeProtocol() []string { - return []string{ - string(ProbeProtocolHTTP), - string(ProbeProtocolHTTPS), - string(ProbeProtocolTcp), - } -} - -func (s *ProbeProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProbeProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProbeProtocol(input string) (*ProbeProtocol, error) { - vals := map[string]ProbeProtocol{ - "http": ProbeProtocolHTTP, - "https": ProbeProtocolHTTPS, - "tcp": ProbeProtocolTcp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProbeProtocol(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_backendaddresspool.go b/resource-manager/network/2022-09-01/loadbalancers/id_backendaddresspool.go deleted file mode 100644 index 39e1f9356f9..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_backendaddresspool.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BackendAddressPoolId{} - -// BackendAddressPoolId is a struct representing the Resource ID for a Backend Address Pool -type BackendAddressPoolId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - BackendAddressPoolName string -} - -// NewBackendAddressPoolID returns a new BackendAddressPoolId struct -func NewBackendAddressPoolID(subscriptionId string, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) BackendAddressPoolId { - return BackendAddressPoolId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - BackendAddressPoolName: backendAddressPoolName, - } -} - -// ParseBackendAddressPoolID parses 'input' into a BackendAddressPoolId -func ParseBackendAddressPoolID(input string) (*BackendAddressPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(BackendAddressPoolId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) - } - - return &id, nil -} - -// ParseBackendAddressPoolIDInsensitively parses 'input' case-insensitively into a BackendAddressPoolId -// note: this method should only be used for API response data and not user input -func ParseBackendAddressPoolIDInsensitively(input string) (*BackendAddressPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(BackendAddressPoolId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) - } - - return &id, nil -} - -// ValidateBackendAddressPoolID checks that 'input' can be parsed as a Backend Address Pool ID -func ValidateBackendAddressPoolID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseBackendAddressPoolID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Backend Address Pool ID -func (id BackendAddressPoolId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/backendAddressPools/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.BackendAddressPoolName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Backend Address Pool ID -func (id BackendAddressPoolId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.UserSpecifiedSegment("resourceGroupName", "resourceGroupValue"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticBackendAddressPools", "backendAddressPools", "backendAddressPools"), - resourceids.UserSpecifiedSegment("backendAddressPoolName", "backendAddressPoolValue"), - } -} - -// String returns a human-readable description of this Backend Address Pool ID -func (id BackendAddressPoolId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Backend Address Pool Name: %q", id.BackendAddressPoolName), - } - return fmt.Sprintf("Backend Address Pool (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_backendaddresspool_test.go b/resource-manager/network/2022-09-01/loadbalancers/id_backendaddresspool_test.go deleted file mode 100644 index 130e347cf17..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_backendaddresspool_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BackendAddressPoolId{} - -func TestNewBackendAddressPoolID(t *testing.T) { - id := NewBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "loadBalancerValue", "backendAddressPoolValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "resourceGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "resourceGroupValue") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.BackendAddressPoolName != "backendAddressPoolValue" { - t.Fatalf("Expected %q but got %q for Segment 'BackendAddressPoolName'", id.BackendAddressPoolName, "backendAddressPoolValue") - } -} - -func TestFormatBackendAddressPoolID(t *testing.T) { - actual := NewBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "loadBalancerValue", "backendAddressPoolValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseBackendAddressPoolID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BackendAddressPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue", - Expected: &BackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "resourceGroupValue", - LoadBalancerName: "loadBalancerValue", - BackendAddressPoolName: "backendAddressPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBackendAddressPoolID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.BackendAddressPoolName != v.Expected.BackendAddressPoolName { - t.Fatalf("Expected %q but got %q for BackendAddressPoolName", v.Expected.BackendAddressPoolName, actual.BackendAddressPoolName) - } - - } -} - -func TestParseBackendAddressPoolIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BackendAddressPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue", - Expected: &BackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "resourceGroupValue", - LoadBalancerName: "loadBalancerValue", - BackendAddressPoolName: "backendAddressPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs/bAcKeNdAdDrEsSpOoLvAlUe", - Expected: &BackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "rEsOuRcEgRoUpVaLuE", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - BackendAddressPoolName: "bAcKeNdAdDrEsSpOoLvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs/bAcKeNdAdDrEsSpOoLvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBackendAddressPoolIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.BackendAddressPoolName != v.Expected.BackendAddressPoolName { - t.Fatalf("Expected %q but got %q for BackendAddressPoolName", v.Expected.BackendAddressPoolName, actual.BackendAddressPoolName) - } - - } -} - -func TestSegmentsForBackendAddressPoolId(t *testing.T) { - segments := BackendAddressPoolId{}.Segments() - if len(segments) == 0 { - t.Fatalf("BackendAddressPoolId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_frontendipconfiguration.go b/resource-manager/network/2022-09-01/loadbalancers/id_frontendipconfiguration.go deleted file mode 100644 index 9f6c3f96a03..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_frontendipconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FrontendIPConfigurationId{} - -// FrontendIPConfigurationId is a struct representing the Resource ID for a Frontend I P Configuration -type FrontendIPConfigurationId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - FrontendIPConfigurationName string -} - -// NewFrontendIPConfigurationID returns a new FrontendIPConfigurationId struct -func NewFrontendIPConfigurationID(subscriptionId string, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) FrontendIPConfigurationId { - return FrontendIPConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - FrontendIPConfigurationName: frontendIPConfigurationName, - } -} - -// ParseFrontendIPConfigurationID parses 'input' into a FrontendIPConfigurationId -func ParseFrontendIPConfigurationID(input string) (*FrontendIPConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(FrontendIPConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FrontendIPConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.FrontendIPConfigurationName, ok = parsed.Parsed["frontendIPConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendIPConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseFrontendIPConfigurationIDInsensitively parses 'input' case-insensitively into a FrontendIPConfigurationId -// note: this method should only be used for API response data and not user input -func ParseFrontendIPConfigurationIDInsensitively(input string) (*FrontendIPConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(FrontendIPConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FrontendIPConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.FrontendIPConfigurationName, ok = parsed.Parsed["frontendIPConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendIPConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateFrontendIPConfigurationID checks that 'input' can be parsed as a Frontend I P Configuration ID -func ValidateFrontendIPConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFrontendIPConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Frontend I P Configuration ID -func (id FrontendIPConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/frontendIPConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.FrontendIPConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Frontend I P Configuration ID -func (id FrontendIPConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticFrontendIPConfigurations", "frontendIPConfigurations", "frontendIPConfigurations"), - resourceids.UserSpecifiedSegment("frontendIPConfigurationName", "frontendIPConfigurationValue"), - } -} - -// String returns a human-readable description of this Frontend I P Configuration ID -func (id FrontendIPConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Frontend I P Configuration Name: %q", id.FrontendIPConfigurationName), - } - return fmt.Sprintf("Frontend I P Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_frontendipconfiguration_test.go b/resource-manager/network/2022-09-01/loadbalancers/id_frontendipconfiguration_test.go deleted file mode 100644 index cfdf6c24505..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_frontendipconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FrontendIPConfigurationId{} - -func TestNewFrontendIPConfigurationID(t *testing.T) { - id := NewFrontendIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "frontendIPConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.FrontendIPConfigurationName != "frontendIPConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'FrontendIPConfigurationName'", id.FrontendIPConfigurationName, "frontendIPConfigurationValue") - } -} - -func TestFormatFrontendIPConfigurationID(t *testing.T) { - actual := NewFrontendIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "frontendIPConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFrontendIPConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FrontendIPConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue", - Expected: &FrontendIPConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - FrontendIPConfigurationName: "frontendIPConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFrontendIPConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.FrontendIPConfigurationName != v.Expected.FrontendIPConfigurationName { - t.Fatalf("Expected %q but got %q for FrontendIPConfigurationName", v.Expected.FrontendIPConfigurationName, actual.FrontendIPConfigurationName) - } - - } -} - -func TestParseFrontendIPConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FrontendIPConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/fRoNtEnDiPcOnFiGuRaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue", - Expected: &FrontendIPConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - FrontendIPConfigurationName: "frontendIPConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/fRoNtEnDiPcOnFiGuRaTiOnS/fRoNtEnDiPcOnFiGuRaTiOnVaLuE", - Expected: &FrontendIPConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - FrontendIPConfigurationName: "fRoNtEnDiPcOnFiGuRaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/fRoNtEnDiPcOnFiGuRaTiOnS/fRoNtEnDiPcOnFiGuRaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFrontendIPConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.FrontendIPConfigurationName != v.Expected.FrontendIPConfigurationName { - t.Fatalf("Expected %q but got %q for FrontendIPConfigurationName", v.Expected.FrontendIPConfigurationName, actual.FrontendIPConfigurationName) - } - - } -} - -func TestSegmentsForFrontendIPConfigurationId(t *testing.T) { - segments := FrontendIPConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FrontendIPConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_inboundnatrule.go b/resource-manager/network/2022-09-01/loadbalancers/id_inboundnatrule.go deleted file mode 100644 index 8a803ad6788..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_inboundnatrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = InboundNatRuleId{} - -// InboundNatRuleId is a struct representing the Resource ID for a Inbound Nat Rule -type InboundNatRuleId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - InboundNatRuleName string -} - -// NewInboundNatRuleID returns a new InboundNatRuleId struct -func NewInboundNatRuleID(subscriptionId string, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) InboundNatRuleId { - return InboundNatRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - InboundNatRuleName: inboundNatRuleName, - } -} - -// ParseInboundNatRuleID parses 'input' into a InboundNatRuleId -func ParseInboundNatRuleID(input string) (*InboundNatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(InboundNatRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := InboundNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.InboundNatRuleName, ok = parsed.Parsed["inboundNatRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundNatRuleName", *parsed) - } - - return &id, nil -} - -// ParseInboundNatRuleIDInsensitively parses 'input' case-insensitively into a InboundNatRuleId -// note: this method should only be used for API response data and not user input -func ParseInboundNatRuleIDInsensitively(input string) (*InboundNatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(InboundNatRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := InboundNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.InboundNatRuleName, ok = parsed.Parsed["inboundNatRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundNatRuleName", *parsed) - } - - return &id, nil -} - -// ValidateInboundNatRuleID checks that 'input' can be parsed as a Inbound Nat Rule ID -func ValidateInboundNatRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseInboundNatRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Inbound Nat Rule ID -func (id InboundNatRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/inboundNatRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.InboundNatRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Inbound Nat Rule ID -func (id InboundNatRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticInboundNatRules", "inboundNatRules", "inboundNatRules"), - resourceids.UserSpecifiedSegment("inboundNatRuleName", "inboundNatRuleValue"), - } -} - -// String returns a human-readable description of this Inbound Nat Rule ID -func (id InboundNatRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Inbound Nat Rule Name: %q", id.InboundNatRuleName), - } - return fmt.Sprintf("Inbound Nat Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_inboundnatrule_test.go b/resource-manager/network/2022-09-01/loadbalancers/id_inboundnatrule_test.go deleted file mode 100644 index fe827b355be..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_inboundnatrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = InboundNatRuleId{} - -func TestNewInboundNatRuleID(t *testing.T) { - id := NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.InboundNatRuleName != "inboundNatRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'InboundNatRuleName'", id.InboundNatRuleName, "inboundNatRuleValue") - } -} - -func TestFormatInboundNatRuleID(t *testing.T) { - actual := NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseInboundNatRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *InboundNatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue", - Expected: &InboundNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - InboundNatRuleName: "inboundNatRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseInboundNatRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.InboundNatRuleName != v.Expected.InboundNatRuleName { - t.Fatalf("Expected %q but got %q for InboundNatRuleName", v.Expected.InboundNatRuleName, actual.InboundNatRuleName) - } - - } -} - -func TestParseInboundNatRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *InboundNatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/iNbOuNdNaTrUlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue", - Expected: &InboundNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - InboundNatRuleName: "inboundNatRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/iNbOuNdNaTrUlEs/iNbOuNdNaTrUlEvAlUe", - Expected: &InboundNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - InboundNatRuleName: "iNbOuNdNaTrUlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/iNbOuNdNaTrUlEs/iNbOuNdNaTrUlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseInboundNatRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.InboundNatRuleName != v.Expected.InboundNatRuleName { - t.Fatalf("Expected %q but got %q for InboundNatRuleName", v.Expected.InboundNatRuleName, actual.InboundNatRuleName) - } - - } -} - -func TestSegmentsForInboundNatRuleId(t *testing.T) { - segments := InboundNatRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("InboundNatRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancer.go b/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancer.go deleted file mode 100644 index b0a9491d230..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancer.go +++ /dev/null @@ -1,127 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancerId{} - -// LoadBalancerId is a struct representing the Resource ID for a Load Balancer -type LoadBalancerId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string -} - -// NewLoadBalancerID returns a new LoadBalancerId struct -func NewLoadBalancerID(subscriptionId string, resourceGroupName string, loadBalancerName string) LoadBalancerId { - return LoadBalancerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - } -} - -// ParseLoadBalancerID parses 'input' into a LoadBalancerId -func ParseLoadBalancerID(input string) (*LoadBalancerId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - return &id, nil -} - -// ParseLoadBalancerIDInsensitively parses 'input' case-insensitively into a LoadBalancerId -// note: this method should only be used for API response data and not user input -func ParseLoadBalancerIDInsensitively(input string) (*LoadBalancerId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - return &id, nil -} - -// ValidateLoadBalancerID checks that 'input' can be parsed as a Load Balancer ID -func ValidateLoadBalancerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLoadBalancerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Load Balancer ID -func (id LoadBalancerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Load Balancer ID -func (id LoadBalancerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - } -} - -// String returns a human-readable description of this Load Balancer ID -func (id LoadBalancerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - } - return fmt.Sprintf("Load Balancer (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancer_test.go b/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancer_test.go deleted file mode 100644 index 0d17ff3a1cd..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancer_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancerId{} - -func TestNewLoadBalancerID(t *testing.T) { - id := NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } -} - -func TestFormatLoadBalancerID(t *testing.T) { - actual := NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLoadBalancerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Expected: &LoadBalancerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - } -} - -func TestParseLoadBalancerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Expected: &LoadBalancerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Expected: &LoadBalancerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - } -} - -func TestSegmentsForLoadBalancerId(t *testing.T) { - segments := LoadBalancerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LoadBalancerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancerbackendaddresspool.go b/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancerbackendaddresspool.go deleted file mode 100644 index 98ac08abc20..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancerbackendaddresspool.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancerBackendAddressPoolId{} - -// LoadBalancerBackendAddressPoolId is a struct representing the Resource ID for a Load Balancer Backend Address Pool -type LoadBalancerBackendAddressPoolId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - BackendAddressPoolName string -} - -// NewLoadBalancerBackendAddressPoolID returns a new LoadBalancerBackendAddressPoolId struct -func NewLoadBalancerBackendAddressPoolID(subscriptionId string, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) LoadBalancerBackendAddressPoolId { - return LoadBalancerBackendAddressPoolId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - BackendAddressPoolName: backendAddressPoolName, - } -} - -// ParseLoadBalancerBackendAddressPoolID parses 'input' into a LoadBalancerBackendAddressPoolId -func ParseLoadBalancerBackendAddressPoolID(input string) (*LoadBalancerBackendAddressPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancerBackendAddressPoolId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancerBackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) - } - - return &id, nil -} - -// ParseLoadBalancerBackendAddressPoolIDInsensitively parses 'input' case-insensitively into a LoadBalancerBackendAddressPoolId -// note: this method should only be used for API response data and not user input -func ParseLoadBalancerBackendAddressPoolIDInsensitively(input string) (*LoadBalancerBackendAddressPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancerBackendAddressPoolId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancerBackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) - } - - return &id, nil -} - -// ValidateLoadBalancerBackendAddressPoolID checks that 'input' can be parsed as a Load Balancer Backend Address Pool ID -func ValidateLoadBalancerBackendAddressPoolID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLoadBalancerBackendAddressPoolID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Load Balancer Backend Address Pool ID -func (id LoadBalancerBackendAddressPoolId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/backendAddressPools/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.BackendAddressPoolName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Load Balancer Backend Address Pool ID -func (id LoadBalancerBackendAddressPoolId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticBackendAddressPools", "backendAddressPools", "backendAddressPools"), - resourceids.UserSpecifiedSegment("backendAddressPoolName", "backendAddressPoolValue"), - } -} - -// String returns a human-readable description of this Load Balancer Backend Address Pool ID -func (id LoadBalancerBackendAddressPoolId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Backend Address Pool Name: %q", id.BackendAddressPoolName), - } - return fmt.Sprintf("Load Balancer Backend Address Pool (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancerbackendaddresspool_test.go b/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancerbackendaddresspool_test.go deleted file mode 100644 index 028fa96ce23..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancerbackendaddresspool_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancerBackendAddressPoolId{} - -func TestNewLoadBalancerBackendAddressPoolID(t *testing.T) { - id := NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.BackendAddressPoolName != "backendAddressPoolValue" { - t.Fatalf("Expected %q but got %q for Segment 'BackendAddressPoolName'", id.BackendAddressPoolName, "backendAddressPoolValue") - } -} - -func TestFormatLoadBalancerBackendAddressPoolID(t *testing.T) { - actual := NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLoadBalancerBackendAddressPoolID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancerBackendAddressPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue", - Expected: &LoadBalancerBackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - BackendAddressPoolName: "backendAddressPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancerBackendAddressPoolID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.BackendAddressPoolName != v.Expected.BackendAddressPoolName { - t.Fatalf("Expected %q but got %q for BackendAddressPoolName", v.Expected.BackendAddressPoolName, actual.BackendAddressPoolName) - } - - } -} - -func TestParseLoadBalancerBackendAddressPoolIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancerBackendAddressPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue", - Expected: &LoadBalancerBackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - BackendAddressPoolName: "backendAddressPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs/bAcKeNdAdDrEsSpOoLvAlUe", - Expected: &LoadBalancerBackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - BackendAddressPoolName: "bAcKeNdAdDrEsSpOoLvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs/bAcKeNdAdDrEsSpOoLvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancerBackendAddressPoolIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.BackendAddressPoolName != v.Expected.BackendAddressPoolName { - t.Fatalf("Expected %q but got %q for BackendAddressPoolName", v.Expected.BackendAddressPoolName, actual.BackendAddressPoolName) - } - - } -} - -func TestSegmentsForLoadBalancerBackendAddressPoolId(t *testing.T) { - segments := LoadBalancerBackendAddressPoolId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LoadBalancerBackendAddressPoolId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancingrule.go b/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancingrule.go deleted file mode 100644 index 4b3bb48b397..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancingrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancingRuleId{} - -// LoadBalancingRuleId is a struct representing the Resource ID for a Load Balancing Rule -type LoadBalancingRuleId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - LoadBalancingRuleName string -} - -// NewLoadBalancingRuleID returns a new LoadBalancingRuleId struct -func NewLoadBalancingRuleID(subscriptionId string, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) LoadBalancingRuleId { - return LoadBalancingRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - LoadBalancingRuleName: loadBalancingRuleName, - } -} - -// ParseLoadBalancingRuleID parses 'input' into a LoadBalancingRuleId -func ParseLoadBalancingRuleID(input string) (*LoadBalancingRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancingRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancingRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.LoadBalancingRuleName, ok = parsed.Parsed["loadBalancingRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancingRuleName", *parsed) - } - - return &id, nil -} - -// ParseLoadBalancingRuleIDInsensitively parses 'input' case-insensitively into a LoadBalancingRuleId -// note: this method should only be used for API response data and not user input -func ParseLoadBalancingRuleIDInsensitively(input string) (*LoadBalancingRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancingRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancingRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.LoadBalancingRuleName, ok = parsed.Parsed["loadBalancingRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancingRuleName", *parsed) - } - - return &id, nil -} - -// ValidateLoadBalancingRuleID checks that 'input' can be parsed as a Load Balancing Rule ID -func ValidateLoadBalancingRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLoadBalancingRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Load Balancing Rule ID -func (id LoadBalancingRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/loadBalancingRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.LoadBalancingRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Load Balancing Rule ID -func (id LoadBalancingRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticLoadBalancingRules", "loadBalancingRules", "loadBalancingRules"), - resourceids.UserSpecifiedSegment("loadBalancingRuleName", "loadBalancingRuleValue"), - } -} - -// String returns a human-readable description of this Load Balancing Rule ID -func (id LoadBalancingRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Load Balancing Rule Name: %q", id.LoadBalancingRuleName), - } - return fmt.Sprintf("Load Balancing Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancingrule_test.go b/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancingrule_test.go deleted file mode 100644 index 99df294466c..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_loadbalancingrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancingRuleId{} - -func TestNewLoadBalancingRuleID(t *testing.T) { - id := NewLoadBalancingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "loadBalancingRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.LoadBalancingRuleName != "loadBalancingRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancingRuleName'", id.LoadBalancingRuleName, "loadBalancingRuleValue") - } -} - -func TestFormatLoadBalancingRuleID(t *testing.T) { - actual := NewLoadBalancingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "loadBalancingRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLoadBalancingRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancingRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue", - Expected: &LoadBalancingRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - LoadBalancingRuleName: "loadBalancingRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancingRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.LoadBalancingRuleName != v.Expected.LoadBalancingRuleName { - t.Fatalf("Expected %q but got %q for LoadBalancingRuleName", v.Expected.LoadBalancingRuleName, actual.LoadBalancingRuleName) - } - - } -} - -func TestParseLoadBalancingRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancingRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/lOaDbAlAnCiNgRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue", - Expected: &LoadBalancingRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - LoadBalancingRuleName: "loadBalancingRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/lOaDbAlAnCiNgRuLeS/lOaDbAlAnCiNgRuLeVaLuE", - Expected: &LoadBalancingRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - LoadBalancingRuleName: "lOaDbAlAnCiNgRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/lOaDbAlAnCiNgRuLeS/lOaDbAlAnCiNgRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancingRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.LoadBalancingRuleName != v.Expected.LoadBalancingRuleName { - t.Fatalf("Expected %q but got %q for LoadBalancingRuleName", v.Expected.LoadBalancingRuleName, actual.LoadBalancingRuleName) - } - - } -} - -func TestSegmentsForLoadBalancingRuleId(t *testing.T) { - segments := LoadBalancingRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LoadBalancingRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_location.go b/resource-manager/network/2022-09-01/loadbalancers/id_location.go deleted file mode 100644 index 3a2efc6db17..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_location_test.go b/resource-manager/network/2022-09-01/loadbalancers/id_location_test.go deleted file mode 100644 index 382c290ede8..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_outboundrule.go b/resource-manager/network/2022-09-01/loadbalancers/id_outboundrule.go deleted file mode 100644 index b2c3cafa61b..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_outboundrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = OutboundRuleId{} - -// OutboundRuleId is a struct representing the Resource ID for a Outbound Rule -type OutboundRuleId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - OutboundRuleName string -} - -// NewOutboundRuleID returns a new OutboundRuleId struct -func NewOutboundRuleID(subscriptionId string, resourceGroupName string, loadBalancerName string, outboundRuleName string) OutboundRuleId { - return OutboundRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - OutboundRuleName: outboundRuleName, - } -} - -// ParseOutboundRuleID parses 'input' into a OutboundRuleId -func ParseOutboundRuleID(input string) (*OutboundRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(OutboundRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := OutboundRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.OutboundRuleName, ok = parsed.Parsed["outboundRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outboundRuleName", *parsed) - } - - return &id, nil -} - -// ParseOutboundRuleIDInsensitively parses 'input' case-insensitively into a OutboundRuleId -// note: this method should only be used for API response data and not user input -func ParseOutboundRuleIDInsensitively(input string) (*OutboundRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(OutboundRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := OutboundRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.OutboundRuleName, ok = parsed.Parsed["outboundRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outboundRuleName", *parsed) - } - - return &id, nil -} - -// ValidateOutboundRuleID checks that 'input' can be parsed as a Outbound Rule ID -func ValidateOutboundRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseOutboundRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Outbound Rule ID -func (id OutboundRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/outboundRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.OutboundRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Outbound Rule ID -func (id OutboundRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticOutboundRules", "outboundRules", "outboundRules"), - resourceids.UserSpecifiedSegment("outboundRuleName", "outboundRuleValue"), - } -} - -// String returns a human-readable description of this Outbound Rule ID -func (id OutboundRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Outbound Rule Name: %q", id.OutboundRuleName), - } - return fmt.Sprintf("Outbound Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_outboundrule_test.go b/resource-manager/network/2022-09-01/loadbalancers/id_outboundrule_test.go deleted file mode 100644 index 7b462f2ed6a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_outboundrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = OutboundRuleId{} - -func TestNewOutboundRuleID(t *testing.T) { - id := NewOutboundRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "outboundRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.OutboundRuleName != "outboundRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'OutboundRuleName'", id.OutboundRuleName, "outboundRuleValue") - } -} - -func TestFormatOutboundRuleID(t *testing.T) { - actual := NewOutboundRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "outboundRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseOutboundRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *OutboundRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue", - Expected: &OutboundRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - OutboundRuleName: "outboundRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseOutboundRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.OutboundRuleName != v.Expected.OutboundRuleName { - t.Fatalf("Expected %q but got %q for OutboundRuleName", v.Expected.OutboundRuleName, actual.OutboundRuleName) - } - - } -} - -func TestParseOutboundRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *OutboundRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/oUtBoUnDrUlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue", - Expected: &OutboundRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - OutboundRuleName: "outboundRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/oUtBoUnDrUlEs/oUtBoUnDrUlEvAlUe", - Expected: &OutboundRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - OutboundRuleName: "oUtBoUnDrUlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/oUtBoUnDrUlEs/oUtBoUnDrUlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseOutboundRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.OutboundRuleName != v.Expected.OutboundRuleName { - t.Fatalf("Expected %q but got %q for OutboundRuleName", v.Expected.OutboundRuleName, actual.OutboundRuleName) - } - - } -} - -func TestSegmentsForOutboundRuleId(t *testing.T) { - segments := OutboundRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("OutboundRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_probe.go b/resource-manager/network/2022-09-01/loadbalancers/id_probe.go deleted file mode 100644 index 6307740b0b8..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_probe.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProbeId{} - -// ProbeId is a struct representing the Resource ID for a Probe -type ProbeId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - ProbeName string -} - -// NewProbeID returns a new ProbeId struct -func NewProbeID(subscriptionId string, resourceGroupName string, loadBalancerName string, probeName string) ProbeId { - return ProbeId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - ProbeName: probeName, - } -} - -// ParseProbeID parses 'input' into a ProbeId -func ParseProbeID(input string) (*ProbeId, error) { - parser := resourceids.NewParserFromResourceIdType(ProbeId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProbeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.ProbeName, ok = parsed.Parsed["probeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "probeName", *parsed) - } - - return &id, nil -} - -// ParseProbeIDInsensitively parses 'input' case-insensitively into a ProbeId -// note: this method should only be used for API response data and not user input -func ParseProbeIDInsensitively(input string) (*ProbeId, error) { - parser := resourceids.NewParserFromResourceIdType(ProbeId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProbeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.ProbeName, ok = parsed.Parsed["probeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "probeName", *parsed) - } - - return &id, nil -} - -// ValidateProbeID checks that 'input' can be parsed as a Probe ID -func ValidateProbeID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProbeID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Probe ID -func (id ProbeId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/probes/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.ProbeName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Probe ID -func (id ProbeId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticProbes", "probes", "probes"), - resourceids.UserSpecifiedSegment("probeName", "probeValue"), - } -} - -// String returns a human-readable description of this Probe ID -func (id ProbeId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Probe Name: %q", id.ProbeName), - } - return fmt.Sprintf("Probe (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/id_probe_test.go b/resource-manager/network/2022-09-01/loadbalancers/id_probe_test.go deleted file mode 100644 index 7ad75b16134..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/id_probe_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProbeId{} - -func TestNewProbeID(t *testing.T) { - id := NewProbeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "probeValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.ProbeName != "probeValue" { - t.Fatalf("Expected %q but got %q for Segment 'ProbeName'", id.ProbeName, "probeValue") - } -} - -func TestFormatProbeID(t *testing.T) { - actual := NewProbeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "probeValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProbeID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProbeId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue", - Expected: &ProbeId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - ProbeName: "probeValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProbeID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.ProbeName != v.Expected.ProbeName { - t.Fatalf("Expected %q but got %q for ProbeName", v.Expected.ProbeName, actual.ProbeName) - } - - } -} - -func TestParseProbeIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProbeId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/pRoBeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue", - Expected: &ProbeId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - ProbeName: "probeValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/pRoBeS/pRoBeVaLuE", - Expected: &ProbeId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - ProbeName: "pRoBeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/pRoBeS/pRoBeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProbeIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.ProbeName != v.Expected.ProbeName { - t.Fatalf("Expected %q but got %q for ProbeName", v.Expected.ProbeName, actual.ProbeName) - } - - } -} - -func TestSegmentsForProbeId(t *testing.T) { - segments := ProbeId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProbeId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_createorupdate.go b/resource-manager/network/2022-09-01/loadbalancers/method_createorupdate.go deleted file mode 100644 index 11aa72d7b79..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c LoadBalancersClient) CreateOrUpdate(ctx context.Context, id LoadBalancerId, input LoadBalancer) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c LoadBalancersClient) CreateOrUpdateThenPoll(ctx context.Context, id LoadBalancerId, input LoadBalancer) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_delete.go b/resource-manager/network/2022-09-01/loadbalancers/method_delete.go deleted file mode 100644 index 54ff21552df..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LoadBalancersClient) Delete(ctx context.Context, id LoadBalancerId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LoadBalancersClient) DeleteThenPoll(ctx context.Context, id LoadBalancerId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_get.go b/resource-manager/network/2022-09-01/loadbalancers/method_get.go deleted file mode 100644 index dc43d33378a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LoadBalancer -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c LoadBalancersClient) Get(ctx context.Context, id LoadBalancerId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulescreateorupdate.go b/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulescreateorupdate.go deleted file mode 100644 index 7af0442381b..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// InboundNatRulesCreateOrUpdate ... -func (c LoadBalancersClient) InboundNatRulesCreateOrUpdate(ctx context.Context, id InboundNatRuleId, input InboundNatRule) (result InboundNatRulesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// InboundNatRulesCreateOrUpdateThenPoll performs InboundNatRulesCreateOrUpdate then polls until it's completed -func (c LoadBalancersClient) InboundNatRulesCreateOrUpdateThenPoll(ctx context.Context, id InboundNatRuleId, input InboundNatRule) error { - result, err := c.InboundNatRulesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing InboundNatRulesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after InboundNatRulesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulesdelete.go b/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulesdelete.go deleted file mode 100644 index 2d19b62f757..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// InboundNatRulesDelete ... -func (c LoadBalancersClient) InboundNatRulesDelete(ctx context.Context, id InboundNatRuleId) (result InboundNatRulesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// InboundNatRulesDeleteThenPoll performs InboundNatRulesDelete then polls until it's completed -func (c LoadBalancersClient) InboundNatRulesDeleteThenPoll(ctx context.Context, id InboundNatRuleId) error { - result, err := c.InboundNatRulesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing InboundNatRulesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after InboundNatRulesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulesget.go b/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulesget.go deleted file mode 100644 index d26617f69c0..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatrulesget.go +++ /dev/null @@ -1,80 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *InboundNatRule -} - -type InboundNatRulesGetOperationOptions struct { - Expand *string -} - -func DefaultInboundNatRulesGetOperationOptions() InboundNatRulesGetOperationOptions { - return InboundNatRulesGetOperationOptions{} -} - -func (o InboundNatRulesGetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o InboundNatRulesGetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o InboundNatRulesGetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// InboundNatRulesGet ... -func (c LoadBalancersClient) InboundNatRulesGet(ctx context.Context, id InboundNatRuleId, options InboundNatRulesGetOperationOptions) (result InboundNatRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatruleslist.go b/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatruleslist.go deleted file mode 100644 index 5705e65a2a6..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_inboundnatruleslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]InboundNatRule -} - -type InboundNatRulesListCompleteResult struct { - Items []InboundNatRule -} - -// InboundNatRulesList ... -func (c LoadBalancersClient) InboundNatRulesList(ctx context.Context, id LoadBalancerId) (result InboundNatRulesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/inboundNatRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]InboundNatRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// InboundNatRulesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) InboundNatRulesListComplete(ctx context.Context, id LoadBalancerId) (InboundNatRulesListCompleteResult, error) { - return c.InboundNatRulesListCompleteMatchingPredicate(ctx, id, InboundNatRuleOperationPredicate{}) -} - -// InboundNatRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) InboundNatRulesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate InboundNatRuleOperationPredicate) (result InboundNatRulesListCompleteResult, err error) { - items := make([]InboundNatRule, 0) - - resp, err := c.InboundNatRulesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = InboundNatRulesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_list.go b/resource-manager/network/2022-09-01/loadbalancers/method_list.go deleted file mode 100644 index 854252c93ea..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LoadBalancer -} - -type ListCompleteResult struct { - Items []LoadBalancer -} - -// List ... -func (c LoadBalancersClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/loadBalancers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LoadBalancer `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c LoadBalancersClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LoadBalancerOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LoadBalancerOperationPredicate) (result ListCompleteResult, err error) { - items := make([]LoadBalancer, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_listall.go b/resource-manager/network/2022-09-01/loadbalancers/method_listall.go deleted file mode 100644 index 097745137c5..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LoadBalancer -} - -type ListAllCompleteResult struct { - Items []LoadBalancer -} - -// ListAll ... -func (c LoadBalancersClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/loadBalancers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LoadBalancer `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c LoadBalancersClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, LoadBalancerOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LoadBalancerOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]LoadBalancer, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_listinboundnatruleportmappings.go b/resource-manager/network/2022-09-01/loadbalancers/method_listinboundnatruleportmappings.go deleted file mode 100644 index 7cf0c7ed2ae..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_listinboundnatruleportmappings.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListInboundNatRulePortMappingsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ListInboundNatRulePortMappings ... -func (c LoadBalancersClient) ListInboundNatRulePortMappings(ctx context.Context, id BackendAddressPoolId, input QueryInboundNatRulePortMappingRequest) (result ListInboundNatRulePortMappingsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryInboundNatRulePortMapping", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ListInboundNatRulePortMappingsThenPoll performs ListInboundNatRulePortMappings then polls until it's completed -func (c LoadBalancersClient) ListInboundNatRulePortMappingsThenPoll(ctx context.Context, id BackendAddressPoolId, input QueryInboundNatRulePortMappingRequest) error { - result, err := c.ListInboundNatRulePortMappings(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ListInboundNatRulePortMappings: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ListInboundNatRulePortMappings: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolscreateorupdate.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolscreateorupdate.go deleted file mode 100644 index 3015d6037c7..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPoolsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// LoadBalancerBackendAddressPoolsCreateOrUpdate ... -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsCreateOrUpdate(ctx context.Context, id LoadBalancerBackendAddressPoolId, input BackendAddressPool) (result LoadBalancerBackendAddressPoolsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// LoadBalancerBackendAddressPoolsCreateOrUpdateThenPoll performs LoadBalancerBackendAddressPoolsCreateOrUpdate then polls until it's completed -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsCreateOrUpdateThenPoll(ctx context.Context, id LoadBalancerBackendAddressPoolId, input BackendAddressPool) error { - result, err := c.LoadBalancerBackendAddressPoolsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing LoadBalancerBackendAddressPoolsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after LoadBalancerBackendAddressPoolsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsdelete.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsdelete.go deleted file mode 100644 index 748b8b97657..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPoolsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// LoadBalancerBackendAddressPoolsDelete ... -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsDelete(ctx context.Context, id LoadBalancerBackendAddressPoolId) (result LoadBalancerBackendAddressPoolsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// LoadBalancerBackendAddressPoolsDeleteThenPoll performs LoadBalancerBackendAddressPoolsDelete then polls until it's completed -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsDeleteThenPoll(ctx context.Context, id LoadBalancerBackendAddressPoolId) error { - result, err := c.LoadBalancerBackendAddressPoolsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing LoadBalancerBackendAddressPoolsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after LoadBalancerBackendAddressPoolsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go deleted file mode 100644 index e2a1e679dfa..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPoolsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BackendAddressPool -} - -// LoadBalancerBackendAddressPoolsGet ... -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsGet(ctx context.Context, id LoadBalancerBackendAddressPoolId) (result LoadBalancerBackendAddressPoolsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolslist.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolslist.go deleted file mode 100644 index 25489397193..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerbackendaddresspoolslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPoolsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BackendAddressPool -} - -type LoadBalancerBackendAddressPoolsListCompleteResult struct { - Items []BackendAddressPool -} - -// LoadBalancerBackendAddressPoolsList ... -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsList(ctx context.Context, id LoadBalancerId) (result LoadBalancerBackendAddressPoolsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/backendAddressPools", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BackendAddressPool `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerBackendAddressPoolsListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerBackendAddressPoolsListCompleteResult, error) { - return c.LoadBalancerBackendAddressPoolsListCompleteMatchingPredicate(ctx, id, BackendAddressPoolOperationPredicate{}) -} - -// LoadBalancerBackendAddressPoolsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate BackendAddressPoolOperationPredicate) (result LoadBalancerBackendAddressPoolsListCompleteResult, err error) { - items := make([]BackendAddressPool, 0) - - resp, err := c.LoadBalancerBackendAddressPoolsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerBackendAddressPoolsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go deleted file mode 100644 index e1f00d52c9d..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerFrontendIPConfigurationsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FrontendIPConfiguration -} - -// LoadBalancerFrontendIPConfigurationsGet ... -func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsGet(ctx context.Context, id FrontendIPConfigurationId) (result LoadBalancerFrontendIPConfigurationsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationslist.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationslist.go deleted file mode 100644 index 94a00f15c62..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerfrontendipconfigurationslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerFrontendIPConfigurationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FrontendIPConfiguration -} - -type LoadBalancerFrontendIPConfigurationsListCompleteResult struct { - Items []FrontendIPConfiguration -} - -// LoadBalancerFrontendIPConfigurationsList ... -func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsList(ctx context.Context, id LoadBalancerId) (result LoadBalancerFrontendIPConfigurationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/frontendIPConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FrontendIPConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerFrontendIPConfigurationsListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerFrontendIPConfigurationsListCompleteResult, error) { - return c.LoadBalancerFrontendIPConfigurationsListCompleteMatchingPredicate(ctx, id, FrontendIPConfigurationOperationPredicate{}) -} - -// LoadBalancerFrontendIPConfigurationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate FrontendIPConfigurationOperationPredicate) (result LoadBalancerFrontendIPConfigurationsListCompleteResult, err error) { - items := make([]FrontendIPConfiguration, 0) - - resp, err := c.LoadBalancerFrontendIPConfigurationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerFrontendIPConfigurationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go deleted file mode 100644 index dbeda3c41ce..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerLoadBalancingRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LoadBalancingRule -} - -// LoadBalancerLoadBalancingRulesGet ... -func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesGet(ctx context.Context, id LoadBalancingRuleId) (result LoadBalancerLoadBalancingRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerloadbalancingruleslist.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerloadbalancingruleslist.go deleted file mode 100644 index e9cb03cd2b0..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerloadbalancingruleslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerLoadBalancingRulesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LoadBalancingRule -} - -type LoadBalancerLoadBalancingRulesListCompleteResult struct { - Items []LoadBalancingRule -} - -// LoadBalancerLoadBalancingRulesList ... -func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesList(ctx context.Context, id LoadBalancerId) (result LoadBalancerLoadBalancingRulesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/loadBalancingRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LoadBalancingRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerLoadBalancingRulesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerLoadBalancingRulesListCompleteResult, error) { - return c.LoadBalancerLoadBalancingRulesListCompleteMatchingPredicate(ctx, id, LoadBalancingRuleOperationPredicate{}) -} - -// LoadBalancerLoadBalancingRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate LoadBalancingRuleOperationPredicate) (result LoadBalancerLoadBalancingRulesListCompleteResult, err error) { - items := make([]LoadBalancingRule, 0) - - resp, err := c.LoadBalancerLoadBalancingRulesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerLoadBalancingRulesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancernetworkinterfaceslist.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancernetworkinterfaceslist.go deleted file mode 100644 index 5d2067f531e..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancernetworkinterfaceslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerNetworkInterfacesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type LoadBalancerNetworkInterfacesListCompleteResult struct { - Items []NetworkInterface -} - -// LoadBalancerNetworkInterfacesList ... -func (c LoadBalancersClient) LoadBalancerNetworkInterfacesList(ctx context.Context, id LoadBalancerId) (result LoadBalancerNetworkInterfacesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerNetworkInterfacesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerNetworkInterfacesListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerNetworkInterfacesListCompleteResult, error) { - return c.LoadBalancerNetworkInterfacesListCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// LoadBalancerNetworkInterfacesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerNetworkInterfacesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate NetworkInterfaceOperationPredicate) (result LoadBalancerNetworkInterfacesListCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.LoadBalancerNetworkInterfacesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerNetworkInterfacesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalanceroutboundrulesget.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalanceroutboundrulesget.go deleted file mode 100644 index dd66ec86570..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalanceroutboundrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerOutboundRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *OutboundRule -} - -// LoadBalancerOutboundRulesGet ... -func (c LoadBalancersClient) LoadBalancerOutboundRulesGet(ctx context.Context, id OutboundRuleId) (result LoadBalancerOutboundRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalanceroutboundruleslist.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalanceroutboundruleslist.go deleted file mode 100644 index e561dfc5dca..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalanceroutboundruleslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerOutboundRulesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]OutboundRule -} - -type LoadBalancerOutboundRulesListCompleteResult struct { - Items []OutboundRule -} - -// LoadBalancerOutboundRulesList ... -func (c LoadBalancersClient) LoadBalancerOutboundRulesList(ctx context.Context, id LoadBalancerId) (result LoadBalancerOutboundRulesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/outboundRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]OutboundRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerOutboundRulesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerOutboundRulesListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerOutboundRulesListCompleteResult, error) { - return c.LoadBalancerOutboundRulesListCompleteMatchingPredicate(ctx, id, OutboundRuleOperationPredicate{}) -} - -// LoadBalancerOutboundRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerOutboundRulesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate OutboundRuleOperationPredicate) (result LoadBalancerOutboundRulesListCompleteResult, err error) { - items := make([]OutboundRule, 0) - - resp, err := c.LoadBalancerOutboundRulesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerOutboundRulesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerprobesget.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerprobesget.go deleted file mode 100644 index b825861d655..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerprobesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerProbesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Probe -} - -// LoadBalancerProbesGet ... -func (c LoadBalancersClient) LoadBalancerProbesGet(ctx context.Context, id ProbeId) (result LoadBalancerProbesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerprobeslist.go b/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerprobeslist.go deleted file mode 100644 index 109d820c0c0..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_loadbalancerprobeslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerProbesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Probe -} - -type LoadBalancerProbesListCompleteResult struct { - Items []Probe -} - -// LoadBalancerProbesList ... -func (c LoadBalancersClient) LoadBalancerProbesList(ctx context.Context, id LoadBalancerId) (result LoadBalancerProbesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/probes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Probe `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerProbesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerProbesListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerProbesListCompleteResult, error) { - return c.LoadBalancerProbesListCompleteMatchingPredicate(ctx, id, ProbeOperationPredicate{}) -} - -// LoadBalancerProbesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerProbesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate ProbeOperationPredicate) (result LoadBalancerProbesListCompleteResult, err error) { - items := make([]Probe, 0) - - resp, err := c.LoadBalancerProbesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerProbesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_swappublicipaddresses.go b/resource-manager/network/2022-09-01/loadbalancers/method_swappublicipaddresses.go deleted file mode 100644 index ea34d09163d..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_swappublicipaddresses.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SwapPublicIPAddressesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SwapPublicIPAddresses ... -func (c LoadBalancersClient) SwapPublicIPAddresses(ctx context.Context, id LocationId, input LoadBalancerVipSwapRequest) (result SwapPublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/setLoadBalancerFrontendPublicIpAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SwapPublicIPAddressesThenPoll performs SwapPublicIPAddresses then polls until it's completed -func (c LoadBalancersClient) SwapPublicIPAddressesThenPoll(ctx context.Context, id LocationId, input LoadBalancerVipSwapRequest) error { - result, err := c.SwapPublicIPAddresses(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SwapPublicIPAddresses: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SwapPublicIPAddresses: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/method_updatetags.go b/resource-manager/network/2022-09-01/loadbalancers/method_updatetags.go deleted file mode 100644 index ca3be786b0a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LoadBalancer -} - -// UpdateTags ... -func (c LoadBalancersClient) UpdateTags(ctx context.Context, id LoadBalancerId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddress.go deleted file mode 100644 index ba8ecb73101..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index ae525920084..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 339eab474ad..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 85af1e99371..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index ba22dcca046..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/loadbalancers/model_applicationsecuritygroup.go deleted file mode 100644 index a39478d2c00..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 6ab25279d91..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_backendaddressinboundnatruleportmappings.go b/resource-manager/network/2022-09-01/loadbalancers/model_backendaddressinboundnatruleportmappings.go deleted file mode 100644 index 4e124f8b471..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_backendaddressinboundnatruleportmappings.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressInboundNatRulePortMappings struct { - InboundNatRulePortMappings *[]InboundNatRulePortMapping `json:"inboundNatRulePortMappings,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_backendaddresspool.go b/resource-manager/network/2022-09-01/loadbalancers/model_backendaddresspool.go deleted file mode 100644 index f21aa313263..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 37a78041bf9..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index bdb38484c9a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_ddossettings.go b/resource-manager/network/2022-09-01/loadbalancers/model_ddossettings.go deleted file mode 100644 index 49f08256215..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_delegation.go b/resource-manager/network/2022-09-01/loadbalancers/model_delegation.go deleted file mode 100644 index ca1a156ae30..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_flowlog.go b/resource-manager/network/2022-09-01/loadbalancers/model_flowlog.go deleted file mode 100644 index 90210c29260..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/loadbalancers/model_flowlogformatparameters.go deleted file mode 100644 index fa0c6c067e8..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_flowlogpropertiesformat.go deleted file mode 100644 index 4c800ad5f68..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/loadbalancers/model_frontendipconfiguration.go deleted file mode 100644 index aee3ea162e5..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 3ec56d01ffe..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/loadbalancers/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 0b58f57fe92..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatpool.go b/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatpool.go deleted file mode 100644 index d89dc6f5777..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatpool.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatpoolpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatpoolpropertiesformat.go deleted file mode 100644 index df78a1ed77a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatpoolpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatPoolPropertiesFormat struct { - BackendPort int64 `json:"backendPort"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPortRangeEnd int64 `json:"frontendPortRangeEnd"` - FrontendPortRangeStart int64 `json:"frontendPortRangeStart"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol TransportProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatrule.go b/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatrule.go deleted file mode 100644 index adb4dbeea97..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatruleportmapping.go b/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatruleportmapping.go deleted file mode 100644 index f2e3789517f..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatruleportmapping.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 3e2eb61ad03..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_ipconfiguration.go b/resource-manager/network/2022-09-01/loadbalancers/model_ipconfiguration.go deleted file mode 100644 index 8d6200049ae..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationprofile.go deleted file mode 100644 index 96c0f6e1f83..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 42790e1043c..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 4d288c5dd29..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_iptag.go b/resource-manager/network/2022-09-01/loadbalancers/model_iptag.go deleted file mode 100644 index bf32e63b59f..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancer.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancer.go deleted file mode 100644 index 76572914bb6..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancer.go +++ /dev/null @@ -1,20 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancer struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LoadBalancerPropertiesFormat `json:"properties,omitempty"` - Sku *LoadBalancerSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerbackendaddress.go deleted file mode 100644 index c85572e3101..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 92e1899840b..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerpropertiesformat.go deleted file mode 100644 index 7ffa00517b8..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancerpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerPropertiesFormat struct { - BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` - FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` - InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` - OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` - Probes *[]Probe `json:"probes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancersku.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancersku.go deleted file mode 100644 index 1575eae78c5..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancersku.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerSku struct { - Name *LoadBalancerSkuName `json:"name,omitempty"` - Tier *LoadBalancerSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequest.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequest.go deleted file mode 100644 index 8bea43b7a0d..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerVipSwapRequest struct { - FrontendIPConfigurations *[]LoadBalancerVipSwapRequestFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfiguration.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfiguration.go deleted file mode 100644 index fd4e68458a9..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerVipSwapRequestFrontendIPConfiguration struct { - Id *string `json:"id,omitempty"` - Properties *LoadBalancerVipSwapRequestFrontendIPConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfigurationproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfigurationproperties.go deleted file mode 100644 index 56e8c5d7e4e..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfigurationproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties struct { - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancingrule.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancingrule.go deleted file mode 100644 index ff651417937..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancingrulepropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancingrulepropertiesformat.go deleted file mode 100644 index 4b1908352dd..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_loadbalancingrulepropertiesformat.go +++ /dev/null @@ -1,20 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendAddressPools *[]SubResource `json:"backendAddressPools,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort int64 `json:"frontendPort"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LoadDistribution *LoadDistribution `json:"loadDistribution,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - Protocol TransportProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_natgateway.go b/resource-manager/network/2022-09-01/loadbalancers/model_natgateway.go deleted file mode 100644 index 0eb10d867d8..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_natgatewaypropertiesformat.go deleted file mode 100644 index 4903d67cdc0..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_natgatewaysku.go b/resource-manager/network/2022-09-01/loadbalancers/model_natgatewaysku.go deleted file mode 100644 index d503f4fbbfb..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_natruleportmapping.go b/resource-manager/network/2022-09-01/loadbalancers/model_natruleportmapping.go deleted file mode 100644 index d0afcac5584..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterface.go b/resource-manager/network/2022-09-01/loadbalancers/model_networkinterface.go deleted file mode 100644 index 3a7fc490368..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacednssettings.go deleted file mode 100644 index 91dbc787d0a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 60978bfaf56..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 6dcb491a3d7..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index d0e35f43bfb..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 60cd769c0b2..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 86c1f45766f..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 60f5f46a243..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/loadbalancers/model_networksecuritygroup.go deleted file mode 100644 index e4baa9839d3..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index a3c43420ed8..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_outboundrule.go b/resource-manager/network/2022-09-01/loadbalancers/model_outboundrule.go deleted file mode 100644 index 1dfd6977a6a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_outboundrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutboundRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *OutboundRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_outboundrulepropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_outboundrulepropertiesformat.go deleted file mode 100644 index 3c7b13886c0..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_outboundrulepropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutboundRulePropertiesFormat struct { - AllocatedOutboundPorts *int64 `json:"allocatedOutboundPorts,omitempty"` - BackendAddressPool SubResource `json:"backendAddressPool"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfigurations []SubResource `json:"frontendIPConfigurations"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol LoadBalancerOutboundRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpoint.go b/resource-manager/network/2022-09-01/loadbalancers/model_privateendpoint.go deleted file mode 100644 index 1b7d03d287c..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointconnection.go deleted file mode 100644 index 4324f758e00..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointconnectionproperties.go deleted file mode 100644 index 117a6f07de8..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointipconfiguration.go deleted file mode 100644 index 5bae49165b4..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 7b4d544edd6..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointproperties.go deleted file mode 100644 index b949c31f69e..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkservice.go b/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkservice.go deleted file mode 100644 index 90ac8b3e5ca..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnection.go deleted file mode 100644 index 7657685128f..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 047e30a886a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index a4eb6e38f9b..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index fef899c9ed5..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 0209c2ffc37..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceproperties.go deleted file mode 100644 index f3e3d05de18..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_probe.go b/resource-manager/network/2022-09-01/loadbalancers/model_probe.go deleted file mode 100644 index 07c805bf4b6..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_probe.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Probe struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ProbePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_probepropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_probepropertiesformat.go deleted file mode 100644 index ddc84044699..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_probepropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProbePropertiesFormat struct { - IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - NumberOfProbes *int64 `json:"numberOfProbes,omitempty"` - Port int64 `json:"port"` - ProbeThreshold *int64 `json:"probeThreshold,omitempty"` - Protocol ProbeProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestPath *string `json:"requestPath,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddress.go b/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddress.go deleted file mode 100644 index bdc0de0a218..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddressdnssettings.go deleted file mode 100644 index d72d7f32bff..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 5a73a6d016d..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddresssku.go deleted file mode 100644 index b15c3f179cf..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_queryinboundnatruleportmappingrequest.go b/resource-manager/network/2022-09-01/loadbalancers/model_queryinboundnatruleportmappingrequest.go deleted file mode 100644 index 537750e7e89..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_queryinboundnatruleportmappingrequest.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryInboundNatRulePortMappingRequest struct { - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *SubResource `json:"ipConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/loadbalancers/model_resourcenavigationlink.go deleted file mode 100644 index 264f22dde08..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_resourcenavigationlinkformat.go deleted file mode 100644 index 4b34d1eca84..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_resourceset.go b/resource-manager/network/2022-09-01/loadbalancers/model_resourceset.go deleted file mode 100644 index 6d37b1b6861..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/loadbalancers/model_retentionpolicyparameters.go deleted file mode 100644 index 36d6b05e540..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_route.go b/resource-manager/network/2022-09-01/loadbalancers/model_route.go deleted file mode 100644 index 60ee56ca15b..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_routepropertiesformat.go deleted file mode 100644 index dad41f27203..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_routetable.go b/resource-manager/network/2022-09-01/loadbalancers/model_routetable.go deleted file mode 100644 index e6d4f4faa3d..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_routetablepropertiesformat.go deleted file mode 100644 index 1169823e36a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_securityrule.go b/resource-manager/network/2022-09-01/loadbalancers/model_securityrule.go deleted file mode 100644 index 1bd37068862..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_securityrulepropertiesformat.go deleted file mode 100644 index 000a9d8a16f..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/loadbalancers/model_serviceassociationlink.go deleted file mode 100644 index 880f8a061c0..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 5984df7dfe6..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 18a1fb457e6..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicy.go deleted file mode 100644 index 00941b4063a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicydefinition.go deleted file mode 100644 index b1f2f8e3300..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 0f54d85448c..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 74afcc602fc..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5610d7f722b..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_subnet.go b/resource-manager/network/2022-09-01/loadbalancers/model_subnet.go deleted file mode 100644 index 802fd17a35b..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_subnetpropertiesformat.go deleted file mode 100644 index 03b4dde75aa..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_subresource.go b/resource-manager/network/2022-09-01/loadbalancers/model_subresource.go deleted file mode 100644 index e288e1dcb19..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_tagsobject.go b/resource-manager/network/2022-09-01/loadbalancers/model_tagsobject.go deleted file mode 100644 index 6b83deef865..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index ecbf7509a1e..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/loadbalancers/model_trafficanalyticsproperties.go deleted file mode 100644 index 2503ab90312..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/loadbalancers/model_virtualnetworktap.go deleted file mode 100644 index ca9e2389b65..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/loadbalancers/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 5cac0b1e63a..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/predicates.go b/resource-manager/network/2022-09-01/loadbalancers/predicates.go deleted file mode 100644 index 82f247704c6..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/predicates.go +++ /dev/null @@ -1,238 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p BackendAddressPoolOperationPredicate) Matches(input BackendAddressPool) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type FrontendIPConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p FrontendIPConfigurationOperationPredicate) Matches(input FrontendIPConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type InboundNatRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p InboundNatRuleOperationPredicate) Matches(input InboundNatRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type LoadBalancerOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p LoadBalancerOperationPredicate) Matches(input LoadBalancer) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type LoadBalancingRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p LoadBalancingRuleOperationPredicate) Matches(input LoadBalancingRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type NetworkInterfaceOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkInterfaceOperationPredicate) Matches(input NetworkInterface) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type OutboundRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p OutboundRuleOperationPredicate) Matches(input OutboundRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type ProbeOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ProbeOperationPredicate) Matches(input Probe) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/loadbalancers/version.go b/resource-manager/network/2022-09-01/loadbalancers/version.go deleted file mode 100644 index 861e93f1e57..00000000000 --- a/resource-manager/network/2022-09-01/loadbalancers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loadbalancers/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/README.md b/resource-manager/network/2022-09-01/localnetworkgateways/README.md deleted file mode 100644 index d8b7c791b78..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/README.md +++ /dev/null @@ -1,103 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/localnetworkgateways` Documentation - -The `localnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/localnetworkgateways" -``` - - -### Client Initialization - -```go -client := localnetworkgateways.NewLocalNetworkGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LocalNetworkGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - -payload := localnetworkgateways.LocalNetworkGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LocalNetworkGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LocalNetworkGatewaysClient.Get` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LocalNetworkGatewaysClient.List` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LocalNetworkGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - -payload := localnetworkgateways.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/client.go b/resource-manager/network/2022-09-01/localnetworkgateways/client.go deleted file mode 100644 index b52d286c069..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package localnetworkgateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewLocalNetworkGatewaysClientWithBaseURI(api environments.Api) (*LocalNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "localnetworkgateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LocalNetworkGatewaysClient: %+v", err) - } - - return &LocalNetworkGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/constants.go b/resource-manager/network/2022-09-01/localnetworkgateways/constants.go deleted file mode 100644 index f82efef3b1f..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package localnetworkgateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/id_localnetworkgateway.go b/resource-manager/network/2022-09-01/localnetworkgateways/id_localnetworkgateway.go deleted file mode 100644 index 9e5a1b39e8c..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/id_localnetworkgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package localnetworkgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocalNetworkGatewayId{} - -// LocalNetworkGatewayId is a struct representing the Resource ID for a Local Network Gateway -type LocalNetworkGatewayId struct { - SubscriptionId string - ResourceGroupName string - LocalNetworkGatewayName string -} - -// NewLocalNetworkGatewayID returns a new LocalNetworkGatewayId struct -func NewLocalNetworkGatewayID(subscriptionId string, resourceGroupName string, localNetworkGatewayName string) LocalNetworkGatewayId { - return LocalNetworkGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocalNetworkGatewayName: localNetworkGatewayName, - } -} - -// ParseLocalNetworkGatewayID parses 'input' into a LocalNetworkGatewayId -func ParseLocalNetworkGatewayID(input string) (*LocalNetworkGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(LocalNetworkGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocalNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalNetworkGatewayName, ok = parsed.Parsed["localNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localNetworkGatewayName", *parsed) - } - - return &id, nil -} - -// ParseLocalNetworkGatewayIDInsensitively parses 'input' case-insensitively into a LocalNetworkGatewayId -// note: this method should only be used for API response data and not user input -func ParseLocalNetworkGatewayIDInsensitively(input string) (*LocalNetworkGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(LocalNetworkGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocalNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalNetworkGatewayName, ok = parsed.Parsed["localNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localNetworkGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateLocalNetworkGatewayID checks that 'input' can be parsed as a Local Network Gateway ID -func ValidateLocalNetworkGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocalNetworkGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Local Network Gateway ID -func (id LocalNetworkGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/localNetworkGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocalNetworkGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Local Network Gateway ID -func (id LocalNetworkGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocalNetworkGateways", "localNetworkGateways", "localNetworkGateways"), - resourceids.UserSpecifiedSegment("localNetworkGatewayName", "localNetworkGatewayValue"), - } -} - -// String returns a human-readable description of this Local Network Gateway ID -func (id LocalNetworkGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Local Network Gateway Name: %q", id.LocalNetworkGatewayName), - } - return fmt.Sprintf("Local Network Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/id_localnetworkgateway_test.go b/resource-manager/network/2022-09-01/localnetworkgateways/id_localnetworkgateway_test.go deleted file mode 100644 index 9210636fe64..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/id_localnetworkgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package localnetworkgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocalNetworkGatewayId{} - -func TestNewLocalNetworkGatewayID(t *testing.T) { - id := NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocalNetworkGatewayName != "localNetworkGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocalNetworkGatewayName'", id.LocalNetworkGatewayName, "localNetworkGatewayValue") - } -} - -func TestFormatLocalNetworkGatewayID(t *testing.T) { - actual := NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocalNetworkGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocalNetworkGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue", - Expected: &LocalNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocalNetworkGatewayName: "localNetworkGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocalNetworkGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocalNetworkGatewayName != v.Expected.LocalNetworkGatewayName { - t.Fatalf("Expected %q but got %q for LocalNetworkGatewayName", v.Expected.LocalNetworkGatewayName, actual.LocalNetworkGatewayName) - } - - } -} - -func TestParseLocalNetworkGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocalNetworkGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAlNeTwOrKgAtEwAyS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue", - Expected: &LocalNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocalNetworkGatewayName: "localNetworkGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAlNeTwOrKgAtEwAyS/lOcAlNeTwOrKgAtEwAyVaLuE", - Expected: &LocalNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocalNetworkGatewayName: "lOcAlNeTwOrKgAtEwAyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAlNeTwOrKgAtEwAyS/lOcAlNeTwOrKgAtEwAyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocalNetworkGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocalNetworkGatewayName != v.Expected.LocalNetworkGatewayName { - t.Fatalf("Expected %q but got %q for LocalNetworkGatewayName", v.Expected.LocalNetworkGatewayName, actual.LocalNetworkGatewayName) - } - - } -} - -func TestSegmentsForLocalNetworkGatewayId(t *testing.T) { - segments := LocalNetworkGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocalNetworkGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/method_createorupdate.go b/resource-manager/network/2022-09-01/localnetworkgateways/method_createorupdate.go deleted file mode 100644 index 13eb3ce284b..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, id LocalNetworkGatewayId, input LocalNetworkGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c LocalNetworkGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id LocalNetworkGatewayId, input LocalNetworkGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/method_delete.go b/resource-manager/network/2022-09-01/localnetworkgateways/method_delete.go deleted file mode 100644 index 2b155d2b9e7..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LocalNetworkGatewaysClient) Delete(ctx context.Context, id LocalNetworkGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LocalNetworkGatewaysClient) DeleteThenPoll(ctx context.Context, id LocalNetworkGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/method_get.go b/resource-manager/network/2022-09-01/localnetworkgateways/method_get.go deleted file mode 100644 index 46dda6cab71..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LocalNetworkGateway -} - -// Get ... -func (c LocalNetworkGatewaysClient) Get(ctx context.Context, id LocalNetworkGatewayId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/method_list.go b/resource-manager/network/2022-09-01/localnetworkgateways/method_list.go deleted file mode 100644 index d67b5e8316c..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LocalNetworkGateway -} - -type ListCompleteResult struct { - Items []LocalNetworkGateway -} - -// List ... -func (c LocalNetworkGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/localNetworkGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LocalNetworkGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c LocalNetworkGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LocalNetworkGatewayOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LocalNetworkGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LocalNetworkGatewayOperationPredicate) (result ListCompleteResult, err error) { - items := make([]LocalNetworkGateway, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/method_updatetags.go b/resource-manager/network/2022-09-01/localnetworkgateways/method_updatetags.go deleted file mode 100644 index 4409aee2361..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LocalNetworkGateway -} - -// UpdateTags ... -func (c LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, id LocalNetworkGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/model_addressspace.go b/resource-manager/network/2022-09-01/localnetworkgateways/model_addressspace.go deleted file mode 100644 index 232140416bf..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/model_bgpsettings.go b/resource-manager/network/2022-09-01/localnetworkgateways/model_bgpsettings.go deleted file mode 100644 index 9d3dfccb4b1..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-09-01/localnetworkgateways/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index 4778a80b432..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/model_localnetworkgateway.go b/resource-manager/network/2022-09-01/localnetworkgateways/model_localnetworkgateway.go deleted file mode 100644 index 684fe705afc..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/model_localnetworkgateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties LocalNetworkGatewayPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/model_localnetworkgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/localnetworkgateways/model_localnetworkgatewaypropertiesformat.go deleted file mode 100644 index fb7a91a8c71..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/model_localnetworkgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGatewayPropertiesFormat struct { - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` - LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/model_tagsobject.go b/resource-manager/network/2022-09-01/localnetworkgateways/model_tagsobject.go deleted file mode 100644 index 214a0886d9b..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/predicates.go b/resource-manager/network/2022-09-01/localnetworkgateways/predicates.go deleted file mode 100644 index d4e529f8a9c..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p LocalNetworkGatewayOperationPredicate) Matches(input LocalNetworkGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/localnetworkgateways/version.go b/resource-manager/network/2022-09-01/localnetworkgateways/version.go deleted file mode 100644 index f57744246e5..00000000000 --- a/resource-manager/network/2022-09-01/localnetworkgateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package localnetworkgateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localnetworkgateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/natgateways/README.md b/resource-manager/network/2022-09-01/natgateways/README.md deleted file mode 100644 index 88ed4bd4e26..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/natgateways` Documentation - -The `natgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/natgateways" -``` - - -### Client Initialization - -```go -client := natgateways.NewNatGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NatGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := natgateways.NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - -payload := natgateways.NatGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NatGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := natgateways.NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NatGatewaysClient.Get` - -```go -ctx := context.TODO() -id := natgateways.NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - -read, err := client.Get(ctx, id, natgateways.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NatGatewaysClient.List` - -```go -ctx := context.TODO() -id := natgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NatGatewaysClient.ListAll` - -```go -ctx := context.TODO() -id := natgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NatGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := natgateways.NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - -payload := natgateways.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/natgateways/client.go b/resource-manager/network/2022-09-01/natgateways/client.go deleted file mode 100644 index 043b69b83b7..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package natgateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewNatGatewaysClientWithBaseURI(api environments.Api) (*NatGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "natgateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NatGatewaysClient: %+v", err) - } - - return &NatGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/natgateways/constants.go b/resource-manager/network/2022-09-01/natgateways/constants.go deleted file mode 100644 index db752936aa3..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/constants.go +++ /dev/null @@ -1,95 +0,0 @@ -package natgateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/natgateways/id_natgateway.go b/resource-manager/network/2022-09-01/natgateways/id_natgateway.go deleted file mode 100644 index 2ce4673298f..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/id_natgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package natgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NatGatewayId{} - -// NatGatewayId is a struct representing the Resource ID for a Nat Gateway -type NatGatewayId struct { - SubscriptionId string - ResourceGroupName string - NatGatewayName string -} - -// NewNatGatewayID returns a new NatGatewayId struct -func NewNatGatewayID(subscriptionId string, resourceGroupName string, natGatewayName string) NatGatewayId { - return NatGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NatGatewayName: natGatewayName, - } -} - -// ParseNatGatewayID parses 'input' into a NatGatewayId -func ParseNatGatewayID(input string) (*NatGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(NatGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NatGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NatGatewayName, ok = parsed.Parsed["natGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natGatewayName", *parsed) - } - - return &id, nil -} - -// ParseNatGatewayIDInsensitively parses 'input' case-insensitively into a NatGatewayId -// note: this method should only be used for API response data and not user input -func ParseNatGatewayIDInsensitively(input string) (*NatGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(NatGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NatGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NatGatewayName, ok = parsed.Parsed["natGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateNatGatewayID checks that 'input' can be parsed as a Nat Gateway ID -func ValidateNatGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNatGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Nat Gateway ID -func (id NatGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/natGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NatGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Nat Gateway ID -func (id NatGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNatGateways", "natGateways", "natGateways"), - resourceids.UserSpecifiedSegment("natGatewayName", "natGatewayValue"), - } -} - -// String returns a human-readable description of this Nat Gateway ID -func (id NatGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Nat Gateway Name: %q", id.NatGatewayName), - } - return fmt.Sprintf("Nat Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/natgateways/id_natgateway_test.go b/resource-manager/network/2022-09-01/natgateways/id_natgateway_test.go deleted file mode 100644 index 6ace84f9518..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/id_natgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package natgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NatGatewayId{} - -func TestNewNatGatewayID(t *testing.T) { - id := NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NatGatewayName != "natGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'NatGatewayName'", id.NatGatewayName, "natGatewayValue") - } -} - -func TestFormatNatGatewayID(t *testing.T) { - actual := NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNatGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NatGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue", - Expected: &NatGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NatGatewayName: "natGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNatGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NatGatewayName != v.Expected.NatGatewayName { - t.Fatalf("Expected %q but got %q for NatGatewayName", v.Expected.NatGatewayName, actual.NatGatewayName) - } - - } -} - -func TestParseNatGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NatGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nAtGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue", - Expected: &NatGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NatGatewayName: "natGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nAtGaTeWaYs/nAtGaTeWaYvAlUe", - Expected: &NatGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NatGatewayName: "nAtGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nAtGaTeWaYs/nAtGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNatGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NatGatewayName != v.Expected.NatGatewayName { - t.Fatalf("Expected %q but got %q for NatGatewayName", v.Expected.NatGatewayName, actual.NatGatewayName) - } - - } -} - -func TestSegmentsForNatGatewayId(t *testing.T) { - segments := NatGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NatGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/natgateways/method_createorupdate.go b/resource-manager/network/2022-09-01/natgateways/method_createorupdate.go deleted file mode 100644 index 8897051aceb..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c NatGatewaysClient) CreateOrUpdate(ctx context.Context, id NatGatewayId, input NatGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c NatGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id NatGatewayId, input NatGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/natgateways/method_delete.go b/resource-manager/network/2022-09-01/natgateways/method_delete.go deleted file mode 100644 index d03d142add6..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NatGatewaysClient) Delete(ctx context.Context, id NatGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NatGatewaysClient) DeleteThenPoll(ctx context.Context, id NatGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/natgateways/method_get.go b/resource-manager/network/2022-09-01/natgateways/method_get.go deleted file mode 100644 index 35387ffdde9..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NatGateway -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NatGatewaysClient) Get(ctx context.Context, id NatGatewayId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/natgateways/method_list.go b/resource-manager/network/2022-09-01/natgateways/method_list.go deleted file mode 100644 index 9cb80b2394b..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NatGateway -} - -type ListCompleteResult struct { - Items []NatGateway -} - -// List ... -func (c NatGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/natGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NatGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NatGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NatGatewayOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NatGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NatGatewayOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NatGateway, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/natgateways/method_listall.go b/resource-manager/network/2022-09-01/natgateways/method_listall.go deleted file mode 100644 index 664969ae4f8..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NatGateway -} - -type ListAllCompleteResult struct { - Items []NatGateway -} - -// ListAll ... -func (c NatGatewaysClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/natGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NatGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c NatGatewaysClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, NatGatewayOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NatGatewaysClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NatGatewayOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]NatGateway, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/natgateways/method_updatetags.go b/resource-manager/network/2022-09-01/natgateways/method_updatetags.go deleted file mode 100644 index 0ec2a4910cd..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package natgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NatGateway -} - -// UpdateTags ... -func (c NatGatewaysClient) UpdateTags(ctx context.Context, id NatGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/natgateways/model_natgateway.go b/resource-manager/network/2022-09-01/natgateways/model_natgateway.go deleted file mode 100644 index 0aabf1ead87..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package natgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/natgateways/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/natgateways/model_natgatewaypropertiesformat.go deleted file mode 100644 index 7bfde80e4d9..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/natgateways/model_natgatewaysku.go b/resource-manager/network/2022-09-01/natgateways/model_natgatewaysku.go deleted file mode 100644 index 962d747cc17..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/natgateways/model_subresource.go b/resource-manager/network/2022-09-01/natgateways/model_subresource.go deleted file mode 100644 index ea00694667d..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/natgateways/model_tagsobject.go b/resource-manager/network/2022-09-01/natgateways/model_tagsobject.go deleted file mode 100644 index c5e055c3a58..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/natgateways/predicates.go b/resource-manager/network/2022-09-01/natgateways/predicates.go deleted file mode 100644 index c0e09cf2f07..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NatGatewayOperationPredicate) Matches(input NatGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/natgateways/version.go b/resource-manager/network/2022-09-01/natgateways/version.go deleted file mode 100644 index bbc4d02706e..00000000000 --- a/resource-manager/network/2022-09-01/natgateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package natgateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/natgateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkgroups/README.md b/resource-manager/network/2022-09-01/networkgroups/README.md deleted file mode 100644 index 3aed2c65f9b..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkgroups` Documentation - -The `networkgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkgroups" -``` - - -### Client Initialization - -```go -client := networkgroups.NewNetworkGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkgroups.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - -payload := networkgroups.NetworkGroup{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload, networkgroups.DefaultCreateOrUpdateOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkGroupsClient.Delete` - -```go -ctx := context.TODO() -id := networkgroups.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - -if err := client.DeleteThenPoll(ctx, id, networkgroups.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkGroupsClient.Get` - -```go -ctx := context.TODO() -id := networkgroups.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkGroupsClient.List` - -```go -ctx := context.TODO() -id := networkgroups.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -// alternatively `client.List(ctx, id, networkgroups.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, networkgroups.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/networkgroups/client.go b/resource-manager/network/2022-09-01/networkgroups/client.go deleted file mode 100644 index 7c9fe140203..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkgroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkGroupsClientWithBaseURI(api environments.Api) (*NetworkGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkgroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkGroupsClient: %+v", err) - } - - return &NetworkGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkgroups/constants.go b/resource-manager/network/2022-09-01/networkgroups/constants.go deleted file mode 100644 index 3bc1d35bd51..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package networkgroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkgroups/id_networkgroup.go b/resource-manager/network/2022-09-01/networkgroups/id_networkgroup.go deleted file mode 100644 index e96f87ea6b4..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/id_networkgroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkgroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkGroupId{} - -// NetworkGroupId is a struct representing the Resource ID for a Network Group -type NetworkGroupId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - NetworkGroupName string -} - -// NewNetworkGroupID returns a new NetworkGroupId struct -func NewNetworkGroupID(subscriptionId string, resourceGroupName string, networkManagerName string, networkGroupName string) NetworkGroupId { - return NetworkGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - NetworkGroupName: networkGroupName, - } -} - -// ParseNetworkGroupID parses 'input' into a NetworkGroupId -func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - return &id, nil -} - -// ParseNetworkGroupIDInsensitively parses 'input' case-insensitively into a NetworkGroupId -// note: this method should only be used for API response data and not user input -func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkGroupID checks that 'input' can be parsed as a Network Group ID -func ValidateNetworkGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Group ID -func (id NetworkGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/networkGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.NetworkGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Group ID -func (id NetworkGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticNetworkGroups", "networkGroups", "networkGroups"), - resourceids.UserSpecifiedSegment("networkGroupName", "networkGroupValue"), - } -} - -// String returns a human-readable description of this Network Group ID -func (id NetworkGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Network Group Name: %q", id.NetworkGroupName), - } - return fmt.Sprintf("Network Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkgroups/id_networkgroup_test.go b/resource-manager/network/2022-09-01/networkgroups/id_networkgroup_test.go deleted file mode 100644 index 5da8e8419e8..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/id_networkgroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkgroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkGroupId{} - -func TestNewNetworkGroupID(t *testing.T) { - id := NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.NetworkGroupName != "networkGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkGroupName'", id.NetworkGroupName, "networkGroupValue") - } -} - -func TestFormatNetworkGroupID(t *testing.T) { - actual := NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - } -} - -func TestParseNetworkGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - NetworkGroupName: "nEtWoRkGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - } -} - -func TestSegmentsForNetworkGroupId(t *testing.T) { - segments := NetworkGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkgroups/id_networkmanager.go b/resource-manager/network/2022-09-01/networkgroups/id_networkmanager.go deleted file mode 100644 index 0524156947b..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkgroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkgroups/id_networkmanager_test.go b/resource-manager/network/2022-09-01/networkgroups/id_networkmanager_test.go deleted file mode 100644 index f7476410445..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkgroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkgroups/method_createorupdate.go b/resource-manager/network/2022-09-01/networkgroups/method_createorupdate.go deleted file mode 100644 index 4c296dffad4..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/method_createorupdate.go +++ /dev/null @@ -1,85 +0,0 @@ -package networkgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkGroup -} - -type CreateOrUpdateOperationOptions struct { - IfMatch *string -} - -func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions { - return CreateOrUpdateOperationOptions{} -} - -func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - if o.IfMatch != nil { - out.Append("If-Match", fmt.Sprintf("%v", *o.IfMatch)) - } - return &out -} - -func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - - return &out -} - -// CreateOrUpdate ... -func (c NetworkGroupsClient) CreateOrUpdate(ctx context.Context, id NetworkGroupId, input NetworkGroup, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkgroups/method_delete.go b/resource-manager/network/2022-09-01/networkgroups/method_delete.go deleted file mode 100644 index 567e0fb203a..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package networkgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c NetworkGroupsClient) Delete(ctx context.Context, id NetworkGroupId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkGroupsClient) DeleteThenPoll(ctx context.Context, id NetworkGroupId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkgroups/method_get.go b/resource-manager/network/2022-09-01/networkgroups/method_get.go deleted file mode 100644 index ef4a3273539..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkgroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkGroup -} - -// Get ... -func (c NetworkGroupsClient) Get(ctx context.Context, id NetworkGroupId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkgroups/method_list.go b/resource-manager/network/2022-09-01/networkgroups/method_list.go deleted file mode 100644 index cfd88cc17a7..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package networkgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkGroup -} - -type ListCompleteResult struct { - Items []NetworkGroup -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c NetworkGroupsClient) List(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkGroups", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkGroupsClient) ListComplete(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, NetworkGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate NetworkGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkGroup, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkgroups/model_networkgroup.go b/resource-manager/network/2022-09-01/networkgroups/model_networkgroup.go deleted file mode 100644 index c35ded0ac80..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/model_networkgroup.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkgroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkgroups/model_networkgroupproperties.go b/resource-manager/network/2022-09-01/networkgroups/model_networkgroupproperties.go deleted file mode 100644 index 4b35dcc425e..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkgroups/predicates.go b/resource-manager/network/2022-09-01/networkgroups/predicates.go deleted file mode 100644 index 621d0d7b40a..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package networkgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p NetworkGroupOperationPredicate) Matches(input NetworkGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/networkgroups/version.go b/resource-manager/network/2022-09-01/networkgroups/version.go deleted file mode 100644 index 5acac1d51b5..00000000000 --- a/resource-manager/network/2022-09-01/networkgroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkgroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkgroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/README.md b/resource-manager/network/2022-09-01/networkinterfaces/README.md deleted file mode 100644 index a9c83151595..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/README.md +++ /dev/null @@ -1,360 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkinterfaces` Documentation - -The `networkinterfaces` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkinterfaces" -``` - - -### Client Initialization - -```go -client := networkinterfaces.NewNetworkInterfacesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkInterfacesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -payload := networkinterfaces.NetworkInterface{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkInterfacesClient.Delete` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkInterfacesClient.Get` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -read, err := client.Get(ctx, id, networkinterfaces.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.GetCloudServiceNetworkInterface` - -```go -ctx := context.TODO() -id := networkinterfaces.NewRoleInstanceNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue") - -read, err := client.GetCloudServiceNetworkInterface(ctx, id, networkinterfaces.DefaultGetCloudServiceNetworkInterfaceOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.GetEffectiveRouteTable` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -if err := client.GetEffectiveRouteTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkInterfacesClient.GetVirtualMachineScaleSetIPConfiguration` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineScaleSetIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue", "ipConfigurationValue") - -read, err := client.GetVirtualMachineScaleSetIPConfiguration(ctx, id, networkinterfaces.DefaultGetVirtualMachineScaleSetIPConfigurationOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.GetVirtualMachineScaleSetNetworkInterface` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineScaleSetNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue") - -read, err := client.GetVirtualMachineScaleSetNetworkInterface(ctx, id, networkinterfaces.DefaultGetVirtualMachineScaleSetNetworkInterfaceOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.List` - -```go -ctx := context.TODO() -id := networkinterfaces.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListAll` - -```go -ctx := context.TODO() -id := networkinterfaces.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListCloudServiceNetworkInterfaces` - -```go -ctx := context.TODO() -id := networkinterfaces.NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue") - -// alternatively `client.ListCloudServiceNetworkInterfaces(ctx, id)` can be used to do batched pagination -items, err := client.ListCloudServiceNetworkInterfacesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces` - -```go -ctx := context.TODO() -id := networkinterfaces.NewRoleInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue") - -// alternatively `client.ListCloudServiceRoleInstanceNetworkInterfaces(ctx, id)` can be used to do batched pagination -items, err := client.ListCloudServiceRoleInstanceNetworkInterfacesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListEffectiveNetworkSecurityGroups` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -if err := client.ListEffectiveNetworkSecurityGroupsThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListVirtualMachineScaleSetIPConfigurations` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineScaleSetNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue") - -// alternatively `client.ListVirtualMachineScaleSetIPConfigurations(ctx, id, networkinterfaces.DefaultListVirtualMachineScaleSetIPConfigurationsOperationOptions())` can be used to do batched pagination -items, err := client.ListVirtualMachineScaleSetIPConfigurationsComplete(ctx, id, networkinterfaces.DefaultListVirtualMachineScaleSetIPConfigurationsOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -// alternatively `client.ListVirtualMachineScaleSetNetworkInterfaces(ctx, id)` can be used to do batched pagination -items, err := client.ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue") - -// alternatively `client.ListVirtualMachineScaleSetVMNetworkInterfaces(ctx, id)` can be used to do batched pagination -items, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceIPConfigurationsGet` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue", "ipConfigurationValue") - -read, err := client.NetworkInterfaceIPConfigurationsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceIPConfigurationsList` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -// alternatively `client.NetworkInterfaceIPConfigurationsList(ctx, id)` can be used to do batched pagination -items, err := client.NetworkInterfaceIPConfigurationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceLoadBalancersList` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -// alternatively `client.NetworkInterfaceLoadBalancersList(ctx, id)` can be used to do batched pagination -items, err := client.NetworkInterfaceLoadBalancersListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceTapConfigurationsGet` - -```go -ctx := context.TODO() -id := networkinterfaces.NewTapConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue", "tapConfigurationValue") - -read, err := client.NetworkInterfaceTapConfigurationsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceTapConfigurationsList` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -// alternatively `client.NetworkInterfaceTapConfigurationsList(ctx, id)` can be used to do batched pagination -items, err := client.NetworkInterfaceTapConfigurationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.UpdateTags` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -payload := networkinterfaces.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/networkinterfaces/client.go b/resource-manager/network/2022-09-01/networkinterfaces/client.go deleted file mode 100644 index c0faee67c81..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacesClient struct { - Client *resourcemanager.Client -} - -func NewNetworkInterfacesClientWithBaseURI(api environments.Api) (*NetworkInterfacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkinterfaces", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkInterfacesClient: %+v", err) - } - - return &NetworkInterfacesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/constants.go b/resource-manager/network/2022-09-01/networkinterfaces/constants.go deleted file mode 100644 index 7bf626b0538..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/constants.go +++ /dev/null @@ -1,1362 +0,0 @@ -package networkinterfaces - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type EffectiveRouteSource string - -const ( - EffectiveRouteSourceDefault EffectiveRouteSource = "Default" - EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" - EffectiveRouteSourceUser EffectiveRouteSource = "User" - EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" -) - -func PossibleValuesForEffectiveRouteSource() []string { - return []string{ - string(EffectiveRouteSourceDefault), - string(EffectiveRouteSourceUnknown), - string(EffectiveRouteSourceUser), - string(EffectiveRouteSourceVirtualNetworkGateway), - } -} - -func (s *EffectiveRouteSource) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveRouteSource(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveRouteSource(input string) (*EffectiveRouteSource, error) { - vals := map[string]EffectiveRouteSource{ - "default": EffectiveRouteSourceDefault, - "unknown": EffectiveRouteSourceUnknown, - "user": EffectiveRouteSourceUser, - "virtualnetworkgateway": EffectiveRouteSourceVirtualNetworkGateway, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveRouteSource(input) - return &out, nil -} - -type EffectiveRouteState string - -const ( - EffectiveRouteStateActive EffectiveRouteState = "Active" - EffectiveRouteStateInvalid EffectiveRouteState = "Invalid" -) - -func PossibleValuesForEffectiveRouteState() []string { - return []string{ - string(EffectiveRouteStateActive), - string(EffectiveRouteStateInvalid), - } -} - -func (s *EffectiveRouteState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveRouteState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveRouteState(input string) (*EffectiveRouteState, error) { - vals := map[string]EffectiveRouteState{ - "active": EffectiveRouteStateActive, - "invalid": EffectiveRouteStateInvalid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveRouteState(input) - return &out, nil -} - -type EffectiveSecurityRuleProtocol string - -const ( - EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" - EffectiveSecurityRuleProtocolTcp EffectiveSecurityRuleProtocol = "Tcp" - EffectiveSecurityRuleProtocolUdp EffectiveSecurityRuleProtocol = "Udp" -) - -func PossibleValuesForEffectiveSecurityRuleProtocol() []string { - return []string{ - string(EffectiveSecurityRuleProtocolAll), - string(EffectiveSecurityRuleProtocolTcp), - string(EffectiveSecurityRuleProtocolUdp), - } -} - -func (s *EffectiveSecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveSecurityRuleProtocol(input string) (*EffectiveSecurityRuleProtocol, error) { - vals := map[string]EffectiveSecurityRuleProtocol{ - "all": EffectiveSecurityRuleProtocolAll, - "tcp": EffectiveSecurityRuleProtocolTcp, - "udp": EffectiveSecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveSecurityRuleProtocol(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type LoadBalancerOutboundRuleProtocol string - -const ( - LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" - LoadBalancerOutboundRuleProtocolTcp LoadBalancerOutboundRuleProtocol = "Tcp" - LoadBalancerOutboundRuleProtocolUdp LoadBalancerOutboundRuleProtocol = "Udp" -) - -func PossibleValuesForLoadBalancerOutboundRuleProtocol() []string { - return []string{ - string(LoadBalancerOutboundRuleProtocolAll), - string(LoadBalancerOutboundRuleProtocolTcp), - string(LoadBalancerOutboundRuleProtocolUdp), - } -} - -func (s *LoadBalancerOutboundRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerOutboundRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerOutboundRuleProtocol(input string) (*LoadBalancerOutboundRuleProtocol, error) { - vals := map[string]LoadBalancerOutboundRuleProtocol{ - "all": LoadBalancerOutboundRuleProtocolAll, - "tcp": LoadBalancerOutboundRuleProtocolTcp, - "udp": LoadBalancerOutboundRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerOutboundRuleProtocol(input) - return &out, nil -} - -type LoadBalancerSkuName string - -const ( - LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" - LoadBalancerSkuNameGateway LoadBalancerSkuName = "Gateway" - LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" -) - -func PossibleValuesForLoadBalancerSkuName() []string { - return []string{ - string(LoadBalancerSkuNameBasic), - string(LoadBalancerSkuNameGateway), - string(LoadBalancerSkuNameStandard), - } -} - -func (s *LoadBalancerSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerSkuName(input string) (*LoadBalancerSkuName, error) { - vals := map[string]LoadBalancerSkuName{ - "basic": LoadBalancerSkuNameBasic, - "gateway": LoadBalancerSkuNameGateway, - "standard": LoadBalancerSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerSkuName(input) - return &out, nil -} - -type LoadBalancerSkuTier string - -const ( - LoadBalancerSkuTierGlobal LoadBalancerSkuTier = "Global" - LoadBalancerSkuTierRegional LoadBalancerSkuTier = "Regional" -) - -func PossibleValuesForLoadBalancerSkuTier() []string { - return []string{ - string(LoadBalancerSkuTierGlobal), - string(LoadBalancerSkuTierRegional), - } -} - -func (s *LoadBalancerSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerSkuTier(input string) (*LoadBalancerSkuTier, error) { - vals := map[string]LoadBalancerSkuTier{ - "global": LoadBalancerSkuTierGlobal, - "regional": LoadBalancerSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerSkuTier(input) - return &out, nil -} - -type LoadDistribution string - -const ( - LoadDistributionDefault LoadDistribution = "Default" - LoadDistributionSourceIP LoadDistribution = "SourceIP" - LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" -) - -func PossibleValuesForLoadDistribution() []string { - return []string{ - string(LoadDistributionDefault), - string(LoadDistributionSourceIP), - string(LoadDistributionSourceIPProtocol), - } -} - -func (s *LoadDistribution) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadDistribution(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadDistribution(input string) (*LoadDistribution, error) { - vals := map[string]LoadDistribution{ - "default": LoadDistributionDefault, - "sourceip": LoadDistributionSourceIP, - "sourceipprotocol": LoadDistributionSourceIPProtocol, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadDistribution(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProbeProtocol string - -const ( - ProbeProtocolHTTP ProbeProtocol = "Http" - ProbeProtocolHTTPS ProbeProtocol = "Https" - ProbeProtocolTcp ProbeProtocol = "Tcp" -) - -func PossibleValuesForProbeProtocol() []string { - return []string{ - string(ProbeProtocolHTTP), - string(ProbeProtocolHTTPS), - string(ProbeProtocolTcp), - } -} - -func (s *ProbeProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProbeProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProbeProtocol(input string) (*ProbeProtocol, error) { - vals := map[string]ProbeProtocol{ - "http": ProbeProtocolHTTP, - "https": ProbeProtocolHTTPS, - "tcp": ProbeProtocolTcp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProbeProtocol(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_providercloudservice.go b/resource-manager/network/2022-09-01/networkinterfaces/id_providercloudservice.go deleted file mode 100644 index 3fcfcb53fc7..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_providercloudservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderCloudServiceId{} - -// ProviderCloudServiceId is a struct representing the Resource ID for a Provider Cloud Service -type ProviderCloudServiceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string -} - -// NewProviderCloudServiceID returns a new ProviderCloudServiceId struct -func NewProviderCloudServiceID(subscriptionId string, resourceGroupName string, cloudServiceName string) ProviderCloudServiceId { - return ProviderCloudServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - } -} - -// ParseProviderCloudServiceID parses 'input' into a ProviderCloudServiceId -func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderCloudServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ParseProviderCloudServiceIDInsensitively parses 'input' case-insensitively into a ProviderCloudServiceId -// note: this method should only be used for API response data and not user input -func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderCloudServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ValidateProviderCloudServiceID checks that 'input' can be parsed as a Provider Cloud Service ID -func ValidateProviderCloudServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderCloudServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Cloud Service ID -func (id ProviderCloudServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Cloud Service ID -func (id ProviderCloudServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - } -} - -// String returns a human-readable description of this Provider Cloud Service ID -func (id ProviderCloudServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - } - return fmt.Sprintf("Provider Cloud Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_providercloudservice_test.go b/resource-manager/network/2022-09-01/networkinterfaces/id_providercloudservice_test.go deleted file mode 100644 index b938b9fbdd5..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_providercloudservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderCloudServiceId{} - -func TestNewProviderCloudServiceID(t *testing.T) { - id := NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } -} - -func TestFormatProviderCloudServiceID(t *testing.T) { - actual := NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderCloudServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderCloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderCloudServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestParseProviderCloudServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderCloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderCloudServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestSegmentsForProviderCloudServiceId(t *testing.T) { - segments := ProviderCloudServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderCloudServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstance.go b/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstance.go deleted file mode 100644 index 5c916d65fd8..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstance.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoleInstanceId{} - -// RoleInstanceId is a struct representing the Resource ID for a Role Instance -type RoleInstanceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string - RoleInstanceName string -} - -// NewRoleInstanceID returns a new RoleInstanceId struct -func NewRoleInstanceID(subscriptionId string, resourceGroupName string, cloudServiceName string, roleInstanceName string) RoleInstanceId { - return RoleInstanceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - RoleInstanceName: roleInstanceName, - } -} - -// ParseRoleInstanceID parses 'input' into a RoleInstanceId -func ParseRoleInstanceID(input string) (*RoleInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(RoleInstanceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoleInstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) - } - - return &id, nil -} - -// ParseRoleInstanceIDInsensitively parses 'input' case-insensitively into a RoleInstanceId -// note: this method should only be used for API response data and not user input -func ParseRoleInstanceIDInsensitively(input string) (*RoleInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(RoleInstanceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoleInstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) - } - - return &id, nil -} - -// ValidateRoleInstanceID checks that 'input' can be parsed as a Role Instance ID -func ValidateRoleInstanceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRoleInstanceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Role Instance ID -func (id RoleInstanceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s/roleInstances/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName, id.RoleInstanceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Role Instance ID -func (id RoleInstanceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - resourceids.StaticSegment("staticRoleInstances", "roleInstances", "roleInstances"), - resourceids.UserSpecifiedSegment("roleInstanceName", "roleInstanceValue"), - } -} - -// String returns a human-readable description of this Role Instance ID -func (id RoleInstanceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - fmt.Sprintf("Role Instance Name: %q", id.RoleInstanceName), - } - return fmt.Sprintf("Role Instance (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstance_test.go b/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstance_test.go deleted file mode 100644 index d6851ea82b0..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstance_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoleInstanceId{} - -func TestNewRoleInstanceID(t *testing.T) { - id := NewRoleInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } - - if id.RoleInstanceName != "roleInstanceValue" { - t.Fatalf("Expected %q but got %q for Segment 'RoleInstanceName'", id.RoleInstanceName, "roleInstanceValue") - } -} - -func TestFormatRoleInstanceID(t *testing.T) { - actual := NewRoleInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRoleInstanceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoleInstanceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue", - Expected: &RoleInstanceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - RoleInstanceName: "roleInstanceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoleInstanceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - if actual.RoleInstanceName != v.Expected.RoleInstanceName { - t.Fatalf("Expected %q but got %q for RoleInstanceName", v.Expected.RoleInstanceName, actual.RoleInstanceName) - } - - } -} - -func TestParseRoleInstanceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoleInstanceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue", - Expected: &RoleInstanceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - RoleInstanceName: "roleInstanceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe", - Expected: &RoleInstanceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - RoleInstanceName: "rOlEiNsTaNcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoleInstanceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - if actual.RoleInstanceName != v.Expected.RoleInstanceName { - t.Fatalf("Expected %q but got %q for RoleInstanceName", v.Expected.RoleInstanceName, actual.RoleInstanceName) - } - - } -} - -func TestSegmentsForRoleInstanceId(t *testing.T) { - segments := RoleInstanceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RoleInstanceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstancenetworkinterface.go b/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstancenetworkinterface.go deleted file mode 100644 index b0f618d319e..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstancenetworkinterface.go +++ /dev/null @@ -1,153 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoleInstanceNetworkInterfaceId{} - -// RoleInstanceNetworkInterfaceId is a struct representing the Resource ID for a Role Instance Network Interface -type RoleInstanceNetworkInterfaceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string - RoleInstanceName string - NetworkInterfaceName string -} - -// NewRoleInstanceNetworkInterfaceID returns a new RoleInstanceNetworkInterfaceId struct -func NewRoleInstanceNetworkInterfaceID(subscriptionId string, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string) RoleInstanceNetworkInterfaceId { - return RoleInstanceNetworkInterfaceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - RoleInstanceName: roleInstanceName, - NetworkInterfaceName: networkInterfaceName, - } -} - -// ParseRoleInstanceNetworkInterfaceID parses 'input' into a RoleInstanceNetworkInterfaceId -func ParseRoleInstanceNetworkInterfaceID(input string) (*RoleInstanceNetworkInterfaceId, error) { - parser := resourceids.NewParserFromResourceIdType(RoleInstanceNetworkInterfaceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoleInstanceNetworkInterfaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) - } - - return &id, nil -} - -// ParseRoleInstanceNetworkInterfaceIDInsensitively parses 'input' case-insensitively into a RoleInstanceNetworkInterfaceId -// note: this method should only be used for API response data and not user input -func ParseRoleInstanceNetworkInterfaceIDInsensitively(input string) (*RoleInstanceNetworkInterfaceId, error) { - parser := resourceids.NewParserFromResourceIdType(RoleInstanceNetworkInterfaceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoleInstanceNetworkInterfaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) - } - - return &id, nil -} - -// ValidateRoleInstanceNetworkInterfaceID checks that 'input' can be parsed as a Role Instance Network Interface ID -func ValidateRoleInstanceNetworkInterfaceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRoleInstanceNetworkInterfaceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Role Instance Network Interface ID -func (id RoleInstanceNetworkInterfaceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s/roleInstances/%s/networkInterfaces/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName, id.RoleInstanceName, id.NetworkInterfaceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Role Instance Network Interface ID -func (id RoleInstanceNetworkInterfaceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - resourceids.StaticSegment("staticRoleInstances", "roleInstances", "roleInstances"), - resourceids.UserSpecifiedSegment("roleInstanceName", "roleInstanceValue"), - resourceids.StaticSegment("staticNetworkInterfaces", "networkInterfaces", "networkInterfaces"), - resourceids.UserSpecifiedSegment("networkInterfaceName", "networkInterfaceValue"), - } -} - -// String returns a human-readable description of this Role Instance Network Interface ID -func (id RoleInstanceNetworkInterfaceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - fmt.Sprintf("Role Instance Name: %q", id.RoleInstanceName), - fmt.Sprintf("Network Interface Name: %q", id.NetworkInterfaceName), - } - return fmt.Sprintf("Role Instance Network Interface (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstancenetworkinterface_test.go b/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstancenetworkinterface_test.go deleted file mode 100644 index cc9bd6e2f79..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_roleinstancenetworkinterface_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoleInstanceNetworkInterfaceId{} - -func TestNewRoleInstanceNetworkInterfaceID(t *testing.T) { - id := NewRoleInstanceNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } - - if id.RoleInstanceName != "roleInstanceValue" { - t.Fatalf("Expected %q but got %q for Segment 'RoleInstanceName'", id.RoleInstanceName, "roleInstanceValue") - } - - if id.NetworkInterfaceName != "networkInterfaceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkInterfaceName'", id.NetworkInterfaceName, "networkInterfaceValue") - } -} - -func TestFormatRoleInstanceNetworkInterfaceID(t *testing.T) { - actual := NewRoleInstanceNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRoleInstanceNetworkInterfaceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoleInstanceNetworkInterfaceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue", - Expected: &RoleInstanceNetworkInterfaceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - RoleInstanceName: "roleInstanceValue", - NetworkInterfaceName: "networkInterfaceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoleInstanceNetworkInterfaceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - if actual.RoleInstanceName != v.Expected.RoleInstanceName { - t.Fatalf("Expected %q but got %q for RoleInstanceName", v.Expected.RoleInstanceName, actual.RoleInstanceName) - } - - if actual.NetworkInterfaceName != v.Expected.NetworkInterfaceName { - t.Fatalf("Expected %q but got %q for NetworkInterfaceName", v.Expected.NetworkInterfaceName, actual.NetworkInterfaceName) - } - - } -} - -func TestParseRoleInstanceNetworkInterfaceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoleInstanceNetworkInterfaceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe/nEtWoRkInTeRfAcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue", - Expected: &RoleInstanceNetworkInterfaceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - RoleInstanceName: "roleInstanceValue", - NetworkInterfaceName: "networkInterfaceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe", - Expected: &RoleInstanceNetworkInterfaceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - RoleInstanceName: "rOlEiNsTaNcEvAlUe", - NetworkInterfaceName: "nEtWoRkInTeRfAcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoleInstanceNetworkInterfaceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - if actual.RoleInstanceName != v.Expected.RoleInstanceName { - t.Fatalf("Expected %q but got %q for RoleInstanceName", v.Expected.RoleInstanceName, actual.RoleInstanceName) - } - - if actual.NetworkInterfaceName != v.Expected.NetworkInterfaceName { - t.Fatalf("Expected %q but got %q for NetworkInterfaceName", v.Expected.NetworkInterfaceName, actual.NetworkInterfaceName) - } - - } -} - -func TestSegmentsForRoleInstanceNetworkInterfaceId(t *testing.T) { - segments := RoleInstanceNetworkInterfaceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RoleInstanceNetworkInterfaceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_tapconfiguration.go b/resource-manager/network/2022-09-01/networkinterfaces/id_tapconfiguration.go deleted file mode 100644 index c7879c40c1f..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_tapconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = TapConfigurationId{} - -// TapConfigurationId is a struct representing the Resource ID for a Tap Configuration -type TapConfigurationId struct { - SubscriptionId string - ResourceGroupName string - NetworkInterfaceName string - TapConfigurationName string -} - -// NewTapConfigurationID returns a new TapConfigurationId struct -func NewTapConfigurationID(subscriptionId string, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) TapConfigurationId { - return TapConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkInterfaceName: networkInterfaceName, - TapConfigurationName: tapConfigurationName, - } -} - -// ParseTapConfigurationID parses 'input' into a TapConfigurationId -func ParseTapConfigurationID(input string) (*TapConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(TapConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := TapConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) - } - - if id.TapConfigurationName, ok = parsed.Parsed["tapConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tapConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseTapConfigurationIDInsensitively parses 'input' case-insensitively into a TapConfigurationId -// note: this method should only be used for API response data and not user input -func ParseTapConfigurationIDInsensitively(input string) (*TapConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(TapConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := TapConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) - } - - if id.TapConfigurationName, ok = parsed.Parsed["tapConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tapConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateTapConfigurationID checks that 'input' can be parsed as a Tap Configuration ID -func ValidateTapConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseTapConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Tap Configuration ID -func (id TapConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkInterfaces/%s/tapConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkInterfaceName, id.TapConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Tap Configuration ID -func (id TapConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkInterfaces", "networkInterfaces", "networkInterfaces"), - resourceids.UserSpecifiedSegment("networkInterfaceName", "networkInterfaceValue"), - resourceids.StaticSegment("staticTapConfigurations", "tapConfigurations", "tapConfigurations"), - resourceids.UserSpecifiedSegment("tapConfigurationName", "tapConfigurationValue"), - } -} - -// String returns a human-readable description of this Tap Configuration ID -func (id TapConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Interface Name: %q", id.NetworkInterfaceName), - fmt.Sprintf("Tap Configuration Name: %q", id.TapConfigurationName), - } - return fmt.Sprintf("Tap Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_tapconfiguration_test.go b/resource-manager/network/2022-09-01/networkinterfaces/id_tapconfiguration_test.go deleted file mode 100644 index b4b2c101ba1..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_tapconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = TapConfigurationId{} - -func TestNewTapConfigurationID(t *testing.T) { - id := NewTapConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue", "tapConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkInterfaceName != "networkInterfaceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkInterfaceName'", id.NetworkInterfaceName, "networkInterfaceValue") - } - - if id.TapConfigurationName != "tapConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'TapConfigurationName'", id.TapConfigurationName, "tapConfigurationValue") - } -} - -func TestFormatTapConfigurationID(t *testing.T) { - actual := NewTapConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue", "tapConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseTapConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *TapConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue", - Expected: &TapConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkInterfaceName: "networkInterfaceValue", - TapConfigurationName: "tapConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseTapConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkInterfaceName != v.Expected.NetworkInterfaceName { - t.Fatalf("Expected %q but got %q for NetworkInterfaceName", v.Expected.NetworkInterfaceName, actual.NetworkInterfaceName) - } - - if actual.TapConfigurationName != v.Expected.TapConfigurationName { - t.Fatalf("Expected %q but got %q for TapConfigurationName", v.Expected.TapConfigurationName, actual.TapConfigurationName) - } - - } -} - -func TestParseTapConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *TapConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe/tApCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue", - Expected: &TapConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkInterfaceName: "networkInterfaceValue", - TapConfigurationName: "tapConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe/tApCoNfIgUrAtIoNs/tApCoNfIgUrAtIoNvAlUe", - Expected: &TapConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkInterfaceName: "nEtWoRkInTeRfAcEvAlUe", - TapConfigurationName: "tApCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe/tApCoNfIgUrAtIoNs/tApCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseTapConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkInterfaceName != v.Expected.NetworkInterfaceName { - t.Fatalf("Expected %q but got %q for NetworkInterfaceName", v.Expected.NetworkInterfaceName, actual.NetworkInterfaceName) - } - - if actual.TapConfigurationName != v.Expected.TapConfigurationName { - t.Fatalf("Expected %q but got %q for TapConfigurationName", v.Expected.TapConfigurationName, actual.TapConfigurationName) - } - - } -} - -func TestSegmentsForTapConfigurationId(t *testing.T) { - segments := TapConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("TapConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachine.go b/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachine.go deleted file mode 100644 index c0c1dd29a1b..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachine.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineId{} - -// VirtualMachineId is a struct representing the Resource ID for a Virtual Machine -type VirtualMachineId struct { - SubscriptionId string - ResourceGroupName string - VirtualMachineScaleSetName string - VirtualMachineName string -} - -// NewVirtualMachineID returns a new VirtualMachineId struct -func NewVirtualMachineID(subscriptionId string, resourceGroupName string, virtualMachineScaleSetName string, virtualMachineName string) VirtualMachineId { - return VirtualMachineId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualMachineScaleSetName: virtualMachineScaleSetName, - VirtualMachineName: virtualMachineName, - } -} - -// ParseVirtualMachineID parses 'input' into a VirtualMachineId -func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) - } - - return &id, nil -} - -// ParseVirtualMachineIDInsensitively parses 'input' case-insensitively into a VirtualMachineId -// note: this method should only be used for API response data and not user input -func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID -func ValidateVirtualMachineID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualMachineID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Machine ID -func (id VirtualMachineId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s/virtualMachines/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualMachineScaleSetName, id.VirtualMachineName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Machine ID -func (id VirtualMachineId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticVirtualMachineScaleSets", "virtualMachineScaleSets", "virtualMachineScaleSets"), - resourceids.UserSpecifiedSegment("virtualMachineScaleSetName", "virtualMachineScaleSetValue"), - resourceids.StaticSegment("staticVirtualMachines", "virtualMachines", "virtualMachines"), - resourceids.UserSpecifiedSegment("virtualMachineName", "virtualMachineValue"), - } -} - -// String returns a human-readable description of this Virtual Machine ID -func (id VirtualMachineId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Machine Scale Set Name: %q", id.VirtualMachineScaleSetName), - fmt.Sprintf("Virtual Machine Name: %q", id.VirtualMachineName), - } - return fmt.Sprintf("Virtual Machine (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachine_test.go b/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachine_test.go deleted file mode 100644 index 03ce3542b5e..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachine_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineId{} - -func TestNewVirtualMachineID(t *testing.T) { - id := NewVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualMachineScaleSetName != "virtualMachineScaleSetValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualMachineScaleSetName'", id.VirtualMachineScaleSetName, "virtualMachineScaleSetValue") - } - - if id.VirtualMachineName != "virtualMachineValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualMachineName'", id.VirtualMachineName, "virtualMachineValue") - } -} - -func TestFormatVirtualMachineID(t *testing.T) { - actual := NewVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualMachineID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue", - Expected: &VirtualMachineId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - VirtualMachineName: "virtualMachineValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - if actual.VirtualMachineName != v.Expected.VirtualMachineName { - t.Fatalf("Expected %q but got %q for VirtualMachineName", v.Expected.VirtualMachineName, actual.VirtualMachineName) - } - - } -} - -func TestParseVirtualMachineIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/vIrTuAlMaChInEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue", - Expected: &VirtualMachineId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - VirtualMachineName: "virtualMachineValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/vIrTuAlMaChInEs/vIrTuAlMaChInEvAlUe", - Expected: &VirtualMachineId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualMachineScaleSetName: "vIrTuAlMaChInEsCaLeSeTvAlUe", - VirtualMachineName: "vIrTuAlMaChInEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/vIrTuAlMaChInEs/vIrTuAlMaChInEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - if actual.VirtualMachineName != v.Expected.VirtualMachineName { - t.Fatalf("Expected %q but got %q for VirtualMachineName", v.Expected.VirtualMachineName, actual.VirtualMachineName) - } - - } -} - -func TestSegmentsForVirtualMachineId(t *testing.T) { - segments := VirtualMachineId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualMachineId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachinescaleset.go b/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachinescaleset.go deleted file mode 100644 index 8435bb247a2..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachinescaleset.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineScaleSetId{} - -// VirtualMachineScaleSetId is a struct representing the Resource ID for a Virtual Machine Scale Set -type VirtualMachineScaleSetId struct { - SubscriptionId string - ResourceGroupName string - VirtualMachineScaleSetName string -} - -// NewVirtualMachineScaleSetID returns a new VirtualMachineScaleSetId struct -func NewVirtualMachineScaleSetID(subscriptionId string, resourceGroupName string, virtualMachineScaleSetName string) VirtualMachineScaleSetId { - return VirtualMachineScaleSetId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualMachineScaleSetName: virtualMachineScaleSetName, - } -} - -// ParseVirtualMachineScaleSetID parses 'input' into a VirtualMachineScaleSetId -func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineScaleSetId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - return &id, nil -} - -// ParseVirtualMachineScaleSetIDInsensitively parses 'input' case-insensitively into a VirtualMachineScaleSetId -// note: this method should only be used for API response data and not user input -func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineScaleSetId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineScaleSetId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualMachineScaleSetID checks that 'input' can be parsed as a Virtual Machine Scale Set ID -func ValidateVirtualMachineScaleSetID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualMachineScaleSetID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualMachineScaleSetName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticVirtualMachineScaleSets", "virtualMachineScaleSets", "virtualMachineScaleSets"), - resourceids.UserSpecifiedSegment("virtualMachineScaleSetName", "virtualMachineScaleSetValue"), - } -} - -// String returns a human-readable description of this Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Machine Scale Set Name: %q", id.VirtualMachineScaleSetName), - } - return fmt.Sprintf("Virtual Machine Scale Set (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachinescaleset_test.go b/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachinescaleset_test.go deleted file mode 100644 index 4532954cb50..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/id_virtualmachinescaleset_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineScaleSetId{} - -func TestNewVirtualMachineScaleSetID(t *testing.T) { - id := NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualMachineScaleSetName != "virtualMachineScaleSetValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualMachineScaleSetName'", id.VirtualMachineScaleSetName, "virtualMachineScaleSetValue") - } -} - -func TestFormatVirtualMachineScaleSetID(t *testing.T) { - actual := NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualMachineScaleSetID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineScaleSetId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineScaleSetID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - } -} - -func TestParseVirtualMachineScaleSetIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineScaleSetId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualMachineScaleSetName: "vIrTuAlMaChInEsCaLeSeTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineScaleSetIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - } -} - -func TestSegmentsForVirtualMachineScaleSetId(t *testing.T) { - segments := VirtualMachineScaleSetId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualMachineScaleSetId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_createorupdate.go b/resource-manager/network/2022-09-01/networkinterfaces/method_createorupdate.go deleted file mode 100644 index fa6a1a6e7c7..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c NetworkInterfacesClient) CreateOrUpdate(ctx context.Context, id commonids.NetworkInterfaceId, input NetworkInterface) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c NetworkInterfacesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.NetworkInterfaceId, input NetworkInterface) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_delete.go b/resource-manager/network/2022-09-01/networkinterfaces/method_delete.go deleted file mode 100644 index 99f476e3fa9..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkInterfacesClient) Delete(ctx context.Context, id commonids.NetworkInterfaceId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkInterfacesClient) DeleteThenPoll(ctx context.Context, id commonids.NetworkInterfaceId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_get.go b/resource-manager/network/2022-09-01/networkinterfaces/method_get.go deleted file mode 100644 index 6404bcc65e3..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_get.go +++ /dev/null @@ -1,81 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterface -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NetworkInterfacesClient) Get(ctx context.Context, id commonids.NetworkInterfaceId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_getcloudservicenetworkinterface.go b/resource-manager/network/2022-09-01/networkinterfaces/method_getcloudservicenetworkinterface.go deleted file mode 100644 index 4c523d42933..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_getcloudservicenetworkinterface.go +++ /dev/null @@ -1,80 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetCloudServiceNetworkInterfaceOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterface -} - -type GetCloudServiceNetworkInterfaceOperationOptions struct { - Expand *string -} - -func DefaultGetCloudServiceNetworkInterfaceOperationOptions() GetCloudServiceNetworkInterfaceOperationOptions { - return GetCloudServiceNetworkInterfaceOperationOptions{} -} - -func (o GetCloudServiceNetworkInterfaceOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetCloudServiceNetworkInterfaceOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetCloudServiceNetworkInterfaceOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// GetCloudServiceNetworkInterface ... -func (c NetworkInterfacesClient) GetCloudServiceNetworkInterface(ctx context.Context, id RoleInstanceNetworkInterfaceId, options GetCloudServiceNetworkInterfaceOperationOptions) (result GetCloudServiceNetworkInterfaceOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_geteffectiveroutetable.go b/resource-manager/network/2022-09-01/networkinterfaces/method_geteffectiveroutetable.go deleted file mode 100644 index e2f12a04cd3..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_geteffectiveroutetable.go +++ /dev/null @@ -1,71 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetEffectiveRouteTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetEffectiveRouteTable ... -func (c NetworkInterfacesClient) GetEffectiveRouteTable(ctx context.Context, id commonids.NetworkInterfaceId) (result GetEffectiveRouteTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/effectiveRouteTable", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetEffectiveRouteTableThenPoll performs GetEffectiveRouteTable then polls until it's completed -func (c NetworkInterfacesClient) GetEffectiveRouteTableThenPoll(ctx context.Context, id commonids.NetworkInterfaceId) error { - result, err := c.GetEffectiveRouteTable(ctx, id) - if err != nil { - return fmt.Errorf("performing GetEffectiveRouteTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetEffectiveRouteTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go b/resource-manager/network/2022-09-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go deleted file mode 100644 index 80ffb98cd15..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go +++ /dev/null @@ -1,81 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVirtualMachineScaleSetIPConfigurationOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterfaceIPConfiguration -} - -type GetVirtualMachineScaleSetIPConfigurationOperationOptions struct { - Expand *string -} - -func DefaultGetVirtualMachineScaleSetIPConfigurationOperationOptions() GetVirtualMachineScaleSetIPConfigurationOperationOptions { - return GetVirtualMachineScaleSetIPConfigurationOperationOptions{} -} - -func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// GetVirtualMachineScaleSetIPConfiguration ... -func (c NetworkInterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, id commonids.VirtualMachineScaleSetIPConfigurationId, options GetVirtualMachineScaleSetIPConfigurationOperationOptions) (result GetVirtualMachineScaleSetIPConfigurationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go b/resource-manager/network/2022-09-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go deleted file mode 100644 index 0204c4303f2..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go +++ /dev/null @@ -1,81 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVirtualMachineScaleSetNetworkInterfaceOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterface -} - -type GetVirtualMachineScaleSetNetworkInterfaceOperationOptions struct { - Expand *string -} - -func DefaultGetVirtualMachineScaleSetNetworkInterfaceOperationOptions() GetVirtualMachineScaleSetNetworkInterfaceOperationOptions { - return GetVirtualMachineScaleSetNetworkInterfaceOperationOptions{} -} - -func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// GetVirtualMachineScaleSetNetworkInterface ... -func (c NetworkInterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, id commonids.VirtualMachineScaleSetNetworkInterfaceId, options GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) (result GetVirtualMachineScaleSetNetworkInterfaceOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_list.go b/resource-manager/network/2022-09-01/networkinterfaces/method_list.go deleted file mode 100644 index f875487accf..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListCompleteResult struct { - Items []NetworkInterface -} - -// List ... -func (c NetworkInterfacesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkInterfaceOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_listall.go b/resource-manager/network/2022-09-01/networkinterfaces/method_listall.go deleted file mode 100644 index 5f1086b5dbf..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListAllCompleteResult struct { - Items []NetworkInterface -} - -// ListAll ... -func (c NetworkInterfacesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkInterfaceOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_listcloudservicenetworkinterfaces.go b/resource-manager/network/2022-09-01/networkinterfaces/method_listcloudservicenetworkinterfaces.go deleted file mode 100644 index de1b7b7eda0..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_listcloudservicenetworkinterfaces.go +++ /dev/null @@ -1,89 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListCloudServiceNetworkInterfacesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListCloudServiceNetworkInterfacesCompleteResult struct { - Items []NetworkInterface -} - -// ListCloudServiceNetworkInterfaces ... -func (c NetworkInterfacesClient) ListCloudServiceNetworkInterfaces(ctx context.Context, id ProviderCloudServiceId) (result ListCloudServiceNetworkInterfacesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListCloudServiceNetworkInterfacesComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListCloudServiceNetworkInterfacesComplete(ctx context.Context, id ProviderCloudServiceId) (ListCloudServiceNetworkInterfacesCompleteResult, error) { - return c.ListCloudServiceNetworkInterfacesCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListCloudServiceNetworkInterfacesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListCloudServiceNetworkInterfacesCompleteMatchingPredicate(ctx context.Context, id ProviderCloudServiceId, predicate NetworkInterfaceOperationPredicate) (result ListCloudServiceNetworkInterfacesCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListCloudServiceNetworkInterfaces(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCloudServiceNetworkInterfacesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_listcloudserviceroleinstancenetworkinterfaces.go b/resource-manager/network/2022-09-01/networkinterfaces/method_listcloudserviceroleinstancenetworkinterfaces.go deleted file mode 100644 index 32a0b13450b..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_listcloudserviceroleinstancenetworkinterfaces.go +++ /dev/null @@ -1,89 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListCloudServiceRoleInstanceNetworkInterfacesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListCloudServiceRoleInstanceNetworkInterfacesCompleteResult struct { - Items []NetworkInterface -} - -// ListCloudServiceRoleInstanceNetworkInterfaces ... -func (c NetworkInterfacesClient) ListCloudServiceRoleInstanceNetworkInterfaces(ctx context.Context, id RoleInstanceId) (result ListCloudServiceRoleInstanceNetworkInterfacesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListCloudServiceRoleInstanceNetworkInterfacesComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListCloudServiceRoleInstanceNetworkInterfacesComplete(ctx context.Context, id RoleInstanceId) (ListCloudServiceRoleInstanceNetworkInterfacesCompleteResult, error) { - return c.ListCloudServiceRoleInstanceNetworkInterfacesCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListCloudServiceRoleInstanceNetworkInterfacesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListCloudServiceRoleInstanceNetworkInterfacesCompleteMatchingPredicate(ctx context.Context, id RoleInstanceId, predicate NetworkInterfaceOperationPredicate) (result ListCloudServiceRoleInstanceNetworkInterfacesCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListCloudServiceRoleInstanceNetworkInterfaces(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCloudServiceRoleInstanceNetworkInterfacesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go b/resource-manager/network/2022-09-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go deleted file mode 100644 index 2178f6e9709..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go +++ /dev/null @@ -1,71 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListEffectiveNetworkSecurityGroupsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ListEffectiveNetworkSecurityGroups ... -func (c NetworkInterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Context, id commonids.NetworkInterfaceId) (result ListEffectiveNetworkSecurityGroupsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/effectiveNetworkSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ListEffectiveNetworkSecurityGroupsThenPoll performs ListEffectiveNetworkSecurityGroups then polls until it's completed -func (c NetworkInterfacesClient) ListEffectiveNetworkSecurityGroupsThenPoll(ctx context.Context, id commonids.NetworkInterfaceId) error { - result, err := c.ListEffectiveNetworkSecurityGroups(ctx, id) - if err != nil { - return fmt.Errorf("performing ListEffectiveNetworkSecurityGroups: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ListEffectiveNetworkSecurityGroups: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go b/resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go deleted file mode 100644 index 8013b478315..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListVirtualMachineScaleSetIPConfigurationsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterfaceIPConfiguration -} - -type ListVirtualMachineScaleSetIPConfigurationsCompleteResult struct { - Items []NetworkInterfaceIPConfiguration -} - -type ListVirtualMachineScaleSetIPConfigurationsOperationOptions struct { - Expand *string -} - -func DefaultListVirtualMachineScaleSetIPConfigurationsOperationOptions() ListVirtualMachineScaleSetIPConfigurationsOperationOptions { - return ListVirtualMachineScaleSetIPConfigurationsOperationOptions{} -} - -func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// ListVirtualMachineScaleSetIPConfigurations ... -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetIPConfigurations(ctx context.Context, id commonids.VirtualMachineScaleSetNetworkInterfaceId, options ListVirtualMachineScaleSetIPConfigurationsOperationOptions) (result ListVirtualMachineScaleSetIPConfigurationsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ipConfigurations", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterfaceIPConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListVirtualMachineScaleSetIPConfigurationsComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetIPConfigurationsComplete(ctx context.Context, id commonids.VirtualMachineScaleSetNetworkInterfaceId, options ListVirtualMachineScaleSetIPConfigurationsOperationOptions) (ListVirtualMachineScaleSetIPConfigurationsCompleteResult, error) { - return c.ListVirtualMachineScaleSetIPConfigurationsCompleteMatchingPredicate(ctx, id, options, NetworkInterfaceIPConfigurationOperationPredicate{}) -} - -// ListVirtualMachineScaleSetIPConfigurationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetIPConfigurationsCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualMachineScaleSetNetworkInterfaceId, options ListVirtualMachineScaleSetIPConfigurationsOperationOptions, predicate NetworkInterfaceIPConfigurationOperationPredicate) (result ListVirtualMachineScaleSetIPConfigurationsCompleteResult, err error) { - items := make([]NetworkInterfaceIPConfiguration, 0) - - resp, err := c.ListVirtualMachineScaleSetIPConfigurations(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListVirtualMachineScaleSetIPConfigurationsCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetnetworkinterfaces.go b/resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetnetworkinterfaces.go deleted file mode 100644 index de68773ded1..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetnetworkinterfaces.go +++ /dev/null @@ -1,89 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListVirtualMachineScaleSetNetworkInterfacesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListVirtualMachineScaleSetNetworkInterfacesCompleteResult struct { - Items []NetworkInterface -} - -// ListVirtualMachineScaleSetNetworkInterfaces ... -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(ctx context.Context, id VirtualMachineScaleSetId) (result ListVirtualMachineScaleSetNetworkInterfacesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListVirtualMachineScaleSetNetworkInterfacesComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx context.Context, id VirtualMachineScaleSetId) (ListVirtualMachineScaleSetNetworkInterfacesCompleteResult, error) { - return c.ListVirtualMachineScaleSetNetworkInterfacesCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListVirtualMachineScaleSetNetworkInterfacesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesCompleteMatchingPredicate(ctx context.Context, id VirtualMachineScaleSetId, predicate NetworkInterfaceOperationPredicate) (result ListVirtualMachineScaleSetNetworkInterfacesCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListVirtualMachineScaleSetNetworkInterfaces(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListVirtualMachineScaleSetNetworkInterfacesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetvmnetworkinterfaces.go b/resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetvmnetworkinterfaces.go deleted file mode 100644 index d7c29b4a676..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_listvirtualmachinescalesetvmnetworkinterfaces.go +++ /dev/null @@ -1,89 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListVirtualMachineScaleSetVMNetworkInterfacesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListVirtualMachineScaleSetVMNetworkInterfacesCompleteResult struct { - Items []NetworkInterface -} - -// ListVirtualMachineScaleSetVMNetworkInterfaces ... -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(ctx context.Context, id VirtualMachineId) (result ListVirtualMachineScaleSetVMNetworkInterfacesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListVirtualMachineScaleSetVMNetworkInterfacesComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx context.Context, id VirtualMachineId) (ListVirtualMachineScaleSetVMNetworkInterfacesCompleteResult, error) { - return c.ListVirtualMachineScaleSetVMNetworkInterfacesCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListVirtualMachineScaleSetVMNetworkInterfacesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesCompleteMatchingPredicate(ctx context.Context, id VirtualMachineId, predicate NetworkInterfaceOperationPredicate) (result ListVirtualMachineScaleSetVMNetworkInterfacesCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListVirtualMachineScaleSetVMNetworkInterfaces(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListVirtualMachineScaleSetVMNetworkInterfacesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go b/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go deleted file mode 100644 index a8b8ccfc034..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go +++ /dev/null @@ -1,52 +0,0 @@ -package networkinterfaces - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterfaceIPConfiguration -} - -// NetworkInterfaceIPConfigurationsGet ... -func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsGet(ctx context.Context, id commonids.NetworkInterfaceIPConfigurationId) (result NetworkInterfaceIPConfigurationsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceipconfigurationslist.go b/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceipconfigurationslist.go deleted file mode 100644 index c1c3de1c8c4..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceipconfigurationslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterfaceIPConfiguration -} - -type NetworkInterfaceIPConfigurationsListCompleteResult struct { - Items []NetworkInterfaceIPConfiguration -} - -// NetworkInterfaceIPConfigurationsList ... -func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsList(ctx context.Context, id commonids.NetworkInterfaceId) (result NetworkInterfaceIPConfigurationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ipConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterfaceIPConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// NetworkInterfaceIPConfigurationsListComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsListComplete(ctx context.Context, id commonids.NetworkInterfaceId) (NetworkInterfaceIPConfigurationsListCompleteResult, error) { - return c.NetworkInterfaceIPConfigurationsListCompleteMatchingPredicate(ctx, id, NetworkInterfaceIPConfigurationOperationPredicate{}) -} - -// NetworkInterfaceIPConfigurationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsListCompleteMatchingPredicate(ctx context.Context, id commonids.NetworkInterfaceId, predicate NetworkInterfaceIPConfigurationOperationPredicate) (result NetworkInterfaceIPConfigurationsListCompleteResult, err error) { - items := make([]NetworkInterfaceIPConfiguration, 0) - - resp, err := c.NetworkInterfaceIPConfigurationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = NetworkInterfaceIPConfigurationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceloadbalancerslist.go b/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceloadbalancerslist.go deleted file mode 100644 index e53da2c4768..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfaceloadbalancerslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceLoadBalancersListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LoadBalancer -} - -type NetworkInterfaceLoadBalancersListCompleteResult struct { - Items []LoadBalancer -} - -// NetworkInterfaceLoadBalancersList ... -func (c NetworkInterfacesClient) NetworkInterfaceLoadBalancersList(ctx context.Context, id commonids.NetworkInterfaceId) (result NetworkInterfaceLoadBalancersListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/loadBalancers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LoadBalancer `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// NetworkInterfaceLoadBalancersListComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) NetworkInterfaceLoadBalancersListComplete(ctx context.Context, id commonids.NetworkInterfaceId) (NetworkInterfaceLoadBalancersListCompleteResult, error) { - return c.NetworkInterfaceLoadBalancersListCompleteMatchingPredicate(ctx, id, LoadBalancerOperationPredicate{}) -} - -// NetworkInterfaceLoadBalancersListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) NetworkInterfaceLoadBalancersListCompleteMatchingPredicate(ctx context.Context, id commonids.NetworkInterfaceId, predicate LoadBalancerOperationPredicate) (result NetworkInterfaceLoadBalancersListCompleteResult, err error) { - items := make([]LoadBalancer, 0) - - resp, err := c.NetworkInterfaceLoadBalancersList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = NetworkInterfaceLoadBalancersListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go b/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go deleted file mode 100644 index 6b948ca6d6f..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkinterfaces - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterfaceTapConfiguration -} - -// NetworkInterfaceTapConfigurationsGet ... -func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsGet(ctx context.Context, id TapConfigurationId) (result NetworkInterfaceTapConfigurationsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfacetapconfigurationslist.go b/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfacetapconfigurationslist.go deleted file mode 100644 index 1ca0c78d291..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_networkinterfacetapconfigurationslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterfaceTapConfiguration -} - -type NetworkInterfaceTapConfigurationsListCompleteResult struct { - Items []NetworkInterfaceTapConfiguration -} - -// NetworkInterfaceTapConfigurationsList ... -func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsList(ctx context.Context, id commonids.NetworkInterfaceId) (result NetworkInterfaceTapConfigurationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/tapConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterfaceTapConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// NetworkInterfaceTapConfigurationsListComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsListComplete(ctx context.Context, id commonids.NetworkInterfaceId) (NetworkInterfaceTapConfigurationsListCompleteResult, error) { - return c.NetworkInterfaceTapConfigurationsListCompleteMatchingPredicate(ctx, id, NetworkInterfaceTapConfigurationOperationPredicate{}) -} - -// NetworkInterfaceTapConfigurationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsListCompleteMatchingPredicate(ctx context.Context, id commonids.NetworkInterfaceId, predicate NetworkInterfaceTapConfigurationOperationPredicate) (result NetworkInterfaceTapConfigurationsListCompleteResult, err error) { - items := make([]NetworkInterfaceTapConfiguration, 0) - - resp, err := c.NetworkInterfaceTapConfigurationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = NetworkInterfaceTapConfigurationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/method_updatetags.go b/resource-manager/network/2022-09-01/networkinterfaces/method_updatetags.go deleted file mode 100644 index 2f45d915605..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/method_updatetags.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkinterfaces - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterface -} - -// UpdateTags ... -func (c NetworkInterfacesClient) UpdateTags(ctx context.Context, id commonids.NetworkInterfaceId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 126f8350b09..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 15c656ad057..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 34912a8fcbd..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 3b83d83c7c9..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index dd810dfed2c..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/networkinterfaces/model_applicationsecuritygroup.go deleted file mode 100644 index 2948e0c794a..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index aa06b33fbe1..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_backendaddresspool.go b/resource-manager/network/2022-09-01/networkinterfaces/model_backendaddresspool.go deleted file mode 100644 index bd329cce127..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 72034a1a0c3..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index e0be4a6b6f6..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_ddossettings.go b/resource-manager/network/2022-09-01/networkinterfaces/model_ddossettings.go deleted file mode 100644 index 4902360d689..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_delegation.go b/resource-manager/network/2022-09-01/networkinterfaces/model_delegation.go deleted file mode 100644 index 5fb9effbb1b..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygroup.go b/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygroup.go deleted file mode 100644 index 5c66ee3a9b5..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroup struct { - Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` - EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` - NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` - TagMap *map[string][]string `json:"tagMap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygroupassociation.go b/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygroupassociation.go deleted file mode 100644 index 3c6248c32c9..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygroupassociation.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroupAssociation struct { - NetworkInterface *SubResource `json:"networkInterface,omitempty"` - NetworkManager *SubResource `json:"networkManager,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go b/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go deleted file mode 100644 index b8111a10fff..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroupListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecurityrule.go b/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecurityrule.go deleted file mode 100644 index 9c9dd92e515..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_effectivenetworksecurityrule.go +++ /dev/null @@ -1,22 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityRule struct { - Access *SecurityRuleAccess `json:"access,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction *SecurityRuleDirection `json:"direction,omitempty"` - ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` - ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_effectiveroute.go b/resource-manager/network/2022-09-01/networkinterfaces/model_effectiveroute.go deleted file mode 100644 index aa9dac67810..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_effectiveroute.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRoute struct { - AddressPrefix *[]string `json:"addressPrefix,omitempty"` - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` - NextHopType *RouteNextHopType `json:"nextHopType,omitempty"` - Source *EffectiveRouteSource `json:"source,omitempty"` - State *EffectiveRouteState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_effectiveroutelistresult.go b/resource-manager/network/2022-09-01/networkinterfaces/model_effectiveroutelistresult.go deleted file mode 100644 index a3a975a8636..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_effectiveroutelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRouteListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_flowlog.go b/resource-manager/network/2022-09-01/networkinterfaces/model_flowlog.go deleted file mode 100644 index c2f71983a36..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/networkinterfaces/model_flowlogformatparameters.go deleted file mode 100644 index 43abd6c1532..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_flowlogpropertiesformat.go deleted file mode 100644 index e594a5d3819..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/networkinterfaces/model_frontendipconfiguration.go deleted file mode 100644 index 35c07477d52..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 174b1d44662..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/networkinterfaces/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 8562c4824fb..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatpool.go b/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatpool.go deleted file mode 100644 index a16659ffff0..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatpool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatpoolpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatpoolpropertiesformat.go deleted file mode 100644 index 4586e6ec1dc..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatpoolpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatPoolPropertiesFormat struct { - BackendPort int64 `json:"backendPort"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPortRangeEnd int64 `json:"frontendPortRangeEnd"` - FrontendPortRangeStart int64 `json:"frontendPortRangeStart"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol TransportProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatrule.go b/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatrule.go deleted file mode 100644 index a41993b3c8d..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 9a882cfef22..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfiguration.go b/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfiguration.go deleted file mode 100644 index c1294125f57..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationprofile.go deleted file mode 100644 index b5f591fbc35..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 0027cc6adbe..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 1338f55c4e1..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_iptag.go b/resource-manager/network/2022-09-01/networkinterfaces/model_iptag.go deleted file mode 100644 index c2dc282ad0e..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancer.go b/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancer.go deleted file mode 100644 index aaa7bd9d086..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancer.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancer struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LoadBalancerPropertiesFormat `json:"properties,omitempty"` - Sku *LoadBalancerSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerbackendaddress.go deleted file mode 100644 index 58da623122f..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 192b497dd13..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerpropertiesformat.go deleted file mode 100644 index b0c27be8bab..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancerpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerPropertiesFormat struct { - BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` - FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` - InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` - OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` - Probes *[]Probe `json:"probes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancersku.go b/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancersku.go deleted file mode 100644 index e10cf68701b..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancersku.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerSku struct { - Name *LoadBalancerSkuName `json:"name,omitempty"` - Tier *LoadBalancerSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancingrule.go b/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancingrule.go deleted file mode 100644 index 5ca9aca81f1..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancingrulepropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancingrulepropertiesformat.go deleted file mode 100644 index 79fe798b88d..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_loadbalancingrulepropertiesformat.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendAddressPools *[]SubResource `json:"backendAddressPools,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort int64 `json:"frontendPort"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LoadDistribution *LoadDistribution `json:"loadDistribution,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - Protocol TransportProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_natgateway.go b/resource-manager/network/2022-09-01/networkinterfaces/model_natgateway.go deleted file mode 100644 index 7fe571d7a74..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_natgatewaypropertiesformat.go deleted file mode 100644 index 9da53fae58a..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_natgatewaysku.go b/resource-manager/network/2022-09-01/networkinterfaces/model_natgatewaysku.go deleted file mode 100644 index aff4514b5e7..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_natruleportmapping.go b/resource-manager/network/2022-09-01/networkinterfaces/model_natruleportmapping.go deleted file mode 100644 index 05068ac7e2f..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterface.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterface.go deleted file mode 100644 index 286c9562aaf..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacednssettings.go deleted file mode 100644 index af3e4e75519..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfiguration.go deleted file mode 100644 index ca861570a5d..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index abcc6fdfc5b..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 1baf3488ee0..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 91fa2155d75..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacetapconfiguration.go deleted file mode 100644 index e67a81616a9..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 72010ae8dac..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networksecuritygroup.go deleted file mode 100644 index 05ed91fcd1a..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index ce8a013b83a..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_outboundrule.go b/resource-manager/network/2022-09-01/networkinterfaces/model_outboundrule.go deleted file mode 100644 index 2afc56da4cc..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_outboundrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutboundRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *OutboundRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_outboundrulepropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_outboundrulepropertiesformat.go deleted file mode 100644 index 4cc4e2f5087..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_outboundrulepropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutboundRulePropertiesFormat struct { - AllocatedOutboundPorts *int64 `json:"allocatedOutboundPorts,omitempty"` - BackendAddressPool SubResource `json:"backendAddressPool"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfigurations []SubResource `json:"frontendIPConfigurations"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol LoadBalancerOutboundRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpoint.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpoint.go deleted file mode 100644 index da5835bccba..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointconnection.go deleted file mode 100644 index 81a07962195..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointconnectionproperties.go deleted file mode 100644 index 65eb62e8518..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointipconfiguration.go deleted file mode 100644 index 085039e25e2..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 802747eb32e..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointproperties.go deleted file mode 100644 index ea496b7d032..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkservice.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkservice.go deleted file mode 100644 index 7dcd5f985b9..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnection.go deleted file mode 100644 index 5e32cbfab8a..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 355c3d254f2..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 367b48d2fd6..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 3893fd72b02..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index e1c0b0da64c..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceproperties.go deleted file mode 100644 index 2356695f6d1..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_probe.go b/resource-manager/network/2022-09-01/networkinterfaces/model_probe.go deleted file mode 100644 index d935d63eee6..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_probe.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Probe struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ProbePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_probepropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_probepropertiesformat.go deleted file mode 100644 index 343b46540f7..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_probepropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProbePropertiesFormat struct { - IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - NumberOfProbes *int64 `json:"numberOfProbes,omitempty"` - Port int64 `json:"port"` - ProbeThreshold *int64 `json:"probeThreshold,omitempty"` - Protocol ProbeProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestPath *string `json:"requestPath,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddress.go b/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddress.go deleted file mode 100644 index e89fe49804b..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddressdnssettings.go deleted file mode 100644 index a1d9e8885fe..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddresspropertiesformat.go deleted file mode 100644 index b13efec6d42..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddresssku.go deleted file mode 100644 index 4f6513789bc..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/networkinterfaces/model_resourcenavigationlink.go deleted file mode 100644 index 4a3f135d98d..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_resourcenavigationlinkformat.go deleted file mode 100644 index aa59d57de52..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_resourceset.go b/resource-manager/network/2022-09-01/networkinterfaces/model_resourceset.go deleted file mode 100644 index 48356d239d8..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/networkinterfaces/model_retentionpolicyparameters.go deleted file mode 100644 index fe69c5c3389..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_route.go b/resource-manager/network/2022-09-01/networkinterfaces/model_route.go deleted file mode 100644 index 8dd1c1c5cbe..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_routepropertiesformat.go deleted file mode 100644 index b031c9a871e..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_routetable.go b/resource-manager/network/2022-09-01/networkinterfaces/model_routetable.go deleted file mode 100644 index 31df96e7b73..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_routetablepropertiesformat.go deleted file mode 100644 index 3c524eb8fe1..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_securityrule.go b/resource-manager/network/2022-09-01/networkinterfaces/model_securityrule.go deleted file mode 100644 index af9210ebc2f..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_securityrulepropertiesformat.go deleted file mode 100644 index 0ff4ba975dc..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/networkinterfaces/model_serviceassociationlink.go deleted file mode 100644 index 88ebd302e70..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 538945df5d3..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 8444d0d495d..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicy.go deleted file mode 100644 index c77c2e3460a..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 6f523978f5b..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index ddd9db6fe47..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 2692b80393d..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 041498d2501..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_subnet.go b/resource-manager/network/2022-09-01/networkinterfaces/model_subnet.go deleted file mode 100644 index 47a0e306b4a..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_subnetpropertiesformat.go deleted file mode 100644 index c8311698c1c..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_subresource.go b/resource-manager/network/2022-09-01/networkinterfaces/model_subresource.go deleted file mode 100644 index 28fa931dbee..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_tagsobject.go b/resource-manager/network/2022-09-01/networkinterfaces/model_tagsobject.go deleted file mode 100644 index 32bf2f0b066..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/networkinterfaces/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index bd0b0fa5fe0..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/networkinterfaces/model_trafficanalyticsproperties.go deleted file mode 100644 index 302f5bfcc4d..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/networkinterfaces/model_virtualnetworktap.go deleted file mode 100644 index 315bcaef069..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/networkinterfaces/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 90ce2721f15..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/predicates.go b/resource-manager/network/2022-09-01/networkinterfaces/predicates.go deleted file mode 100644 index 1bdf1a16800..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/predicates.go +++ /dev/null @@ -1,126 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p LoadBalancerOperationPredicate) Matches(input LoadBalancer) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type NetworkInterfaceOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkInterfaceOperationPredicate) Matches(input NetworkInterface) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type NetworkInterfaceIPConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p NetworkInterfaceIPConfigurationOperationPredicate) Matches(input NetworkInterfaceIPConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type NetworkInterfaceTapConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p NetworkInterfaceTapConfigurationOperationPredicate) Matches(input NetworkInterfaceTapConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/networkinterfaces/version.go b/resource-manager/network/2022-09-01/networkinterfaces/version.go deleted file mode 100644 index efaaf7769b8..00000000000 --- a/resource-manager/network/2022-09-01/networkinterfaces/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkinterfaces/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/README.md b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/README.md deleted file mode 100644 index d4fece90e2d..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanageractiveconfigurations` Documentation - -The `networkmanageractiveconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanageractiveconfigurations" -``` - - -### Client Initialization - -```go -client := networkmanageractiveconfigurations.NewNetworkManagerActiveConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerActiveConfigurationsClient.ListActiveSecurityAdminRules` - -```go -ctx := context.TODO() -id := networkmanageractiveconfigurations.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanageractiveconfigurations.ActiveConfigurationParameter{ - // ... -} - - -read, err := client.ListActiveSecurityAdminRules(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/client.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/client.go deleted file mode 100644 index 221c88c6510..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerActiveConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerActiveConfigurationsClientWithBaseURI(api environments.Api) (*NetworkManagerActiveConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanageractiveconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerActiveConfigurationsClient: %+v", err) - } - - return &NetworkManagerActiveConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/constants.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/constants.go deleted file mode 100644 index e4a2b230b6e..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/constants.go +++ /dev/null @@ -1,277 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixType string - -const ( - AddressPrefixTypeIPPrefix AddressPrefixType = "IPPrefix" - AddressPrefixTypeServiceTag AddressPrefixType = "ServiceTag" -) - -func PossibleValuesForAddressPrefixType() []string { - return []string{ - string(AddressPrefixTypeIPPrefix), - string(AddressPrefixTypeServiceTag), - } -} - -func (s *AddressPrefixType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAddressPrefixType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAddressPrefixType(input string) (*AddressPrefixType, error) { - vals := map[string]AddressPrefixType{ - "ipprefix": AddressPrefixTypeIPPrefix, - "servicetag": AddressPrefixTypeServiceTag, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AddressPrefixType(input) - return &out, nil -} - -type EffectiveAdminRuleKind string - -const ( - EffectiveAdminRuleKindCustom EffectiveAdminRuleKind = "Custom" - EffectiveAdminRuleKindDefault EffectiveAdminRuleKind = "Default" -) - -func PossibleValuesForEffectiveAdminRuleKind() []string { - return []string{ - string(EffectiveAdminRuleKindCustom), - string(EffectiveAdminRuleKindDefault), - } -} - -func (s *EffectiveAdminRuleKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveAdminRuleKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveAdminRuleKind(input string) (*EffectiveAdminRuleKind, error) { - vals := map[string]EffectiveAdminRuleKind{ - "custom": EffectiveAdminRuleKindCustom, - "default": EffectiveAdminRuleKindDefault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveAdminRuleKind(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityConfigurationRuleAccess string - -const ( - SecurityConfigurationRuleAccessAllow SecurityConfigurationRuleAccess = "Allow" - SecurityConfigurationRuleAccessAlwaysAllow SecurityConfigurationRuleAccess = "AlwaysAllow" - SecurityConfigurationRuleAccessDeny SecurityConfigurationRuleAccess = "Deny" -) - -func PossibleValuesForSecurityConfigurationRuleAccess() []string { - return []string{ - string(SecurityConfigurationRuleAccessAllow), - string(SecurityConfigurationRuleAccessAlwaysAllow), - string(SecurityConfigurationRuleAccessDeny), - } -} - -func (s *SecurityConfigurationRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleAccess(input string) (*SecurityConfigurationRuleAccess, error) { - vals := map[string]SecurityConfigurationRuleAccess{ - "allow": SecurityConfigurationRuleAccessAllow, - "alwaysallow": SecurityConfigurationRuleAccessAlwaysAllow, - "deny": SecurityConfigurationRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleAccess(input) - return &out, nil -} - -type SecurityConfigurationRuleDirection string - -const ( - SecurityConfigurationRuleDirectionInbound SecurityConfigurationRuleDirection = "Inbound" - SecurityConfigurationRuleDirectionOutbound SecurityConfigurationRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityConfigurationRuleDirection() []string { - return []string{ - string(SecurityConfigurationRuleDirectionInbound), - string(SecurityConfigurationRuleDirectionOutbound), - } -} - -func (s *SecurityConfigurationRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleDirection(input string) (*SecurityConfigurationRuleDirection, error) { - vals := map[string]SecurityConfigurationRuleDirection{ - "inbound": SecurityConfigurationRuleDirectionInbound, - "outbound": SecurityConfigurationRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleDirection(input) - return &out, nil -} - -type SecurityConfigurationRuleProtocol string - -const ( - SecurityConfigurationRuleProtocolAh SecurityConfigurationRuleProtocol = "Ah" - SecurityConfigurationRuleProtocolAny SecurityConfigurationRuleProtocol = "Any" - SecurityConfigurationRuleProtocolEsp SecurityConfigurationRuleProtocol = "Esp" - SecurityConfigurationRuleProtocolIcmp SecurityConfigurationRuleProtocol = "Icmp" - SecurityConfigurationRuleProtocolTcp SecurityConfigurationRuleProtocol = "Tcp" - SecurityConfigurationRuleProtocolUdp SecurityConfigurationRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityConfigurationRuleProtocol() []string { - return []string{ - string(SecurityConfigurationRuleProtocolAh), - string(SecurityConfigurationRuleProtocolAny), - string(SecurityConfigurationRuleProtocolEsp), - string(SecurityConfigurationRuleProtocolIcmp), - string(SecurityConfigurationRuleProtocolTcp), - string(SecurityConfigurationRuleProtocolUdp), - } -} - -func (s *SecurityConfigurationRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleProtocol(input string) (*SecurityConfigurationRuleProtocol, error) { - vals := map[string]SecurityConfigurationRuleProtocol{ - "ah": SecurityConfigurationRuleProtocolAh, - "any": SecurityConfigurationRuleProtocolAny, - "esp": SecurityConfigurationRuleProtocolEsp, - "icmp": SecurityConfigurationRuleProtocolIcmp, - "tcp": SecurityConfigurationRuleProtocolTcp, - "udp": SecurityConfigurationRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleProtocol(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/id_networkmanager.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/id_networkmanager.go deleted file mode 100644 index eb40c45d568..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/id_networkmanager_test.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/id_networkmanager_test.go deleted file mode 100644 index 46325d537d8..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go deleted file mode 100644 index 38fd5b299da..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListActiveSecurityAdminRulesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ActiveSecurityAdminRulesListResult -} - -// ListActiveSecurityAdminRules ... -func (c NetworkManagerActiveConfigurationsClient) ListActiveSecurityAdminRules(ctx context.Context, id NetworkManagerId, input ActiveConfigurationParameter) (result ListActiveSecurityAdminRulesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listActiveSecurityAdminRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go deleted file mode 100644 index 668030e747e..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveBaseSecurityAdminRule interface { -} - -func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ActiveBaseSecurityAdminRule into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Default") { - var out ActiveDefaultSecurityAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ActiveDefaultSecurityAdminRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Custom") { - var out ActiveSecurityAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ActiveSecurityAdminRule: %+v", err) - } - return out, nil - } - - type RawActiveBaseSecurityAdminRuleImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawActiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activeconfigurationparameter.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activeconfigurationparameter.go deleted file mode 100644 index 309a4998c1b..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activeconfigurationparameter.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveConfigurationParameter struct { - Regions *[]string `json:"regions,omitempty"` - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go deleted file mode 100644 index 371ee82ef8c..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go +++ /dev/null @@ -1,63 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ActiveBaseSecurityAdminRule = ActiveDefaultSecurityAdminRule{} - -type ActiveDefaultSecurityAdminRule struct { - Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from ActiveBaseSecurityAdminRule - CommitTime *string `json:"commitTime,omitempty"` - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - Id *string `json:"id,omitempty"` - Region *string `json:"region,omitempty"` - RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -func (o *ActiveDefaultSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { - if o.CommitTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ActiveDefaultSecurityAdminRule) SetCommitTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTime = &formatted -} - -var _ json.Marshaler = ActiveDefaultSecurityAdminRule{} - -func (s ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { - type wrapper ActiveDefaultSecurityAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ActiveDefaultSecurityAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ActiveDefaultSecurityAdminRule: %+v", err) - } - decoded["kind"] = "Default" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ActiveDefaultSecurityAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go deleted file mode 100644 index 70266c6ff7c..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go +++ /dev/null @@ -1,63 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ActiveBaseSecurityAdminRule = ActiveSecurityAdminRule{} - -type ActiveSecurityAdminRule struct { - Properties *AdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from ActiveBaseSecurityAdminRule - CommitTime *string `json:"commitTime,omitempty"` - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - Id *string `json:"id,omitempty"` - Region *string `json:"region,omitempty"` - RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -func (o *ActiveSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { - if o.CommitTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ActiveSecurityAdminRule) SetCommitTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTime = &formatted -} - -var _ json.Marshaler = ActiveSecurityAdminRule{} - -func (s ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { - type wrapper ActiveSecurityAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ActiveSecurityAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ActiveSecurityAdminRule: %+v", err) - } - decoded["kind"] = "Custom" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ActiveSecurityAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go deleted file mode 100644 index c9007f5e0f3..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go +++ /dev/null @@ -1,49 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveSecurityAdminRulesListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]ActiveBaseSecurityAdminRule `json:"value,omitempty"` -} - -var _ json.Unmarshaler = &ActiveSecurityAdminRulesListResult{} - -func (s *ActiveSecurityAdminRulesListResult) UnmarshalJSON(bytes []byte) error { - type alias ActiveSecurityAdminRulesListResult - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ActiveSecurityAdminRulesListResult: %+v", err) - } - - s.SkipToken = decoded.SkipToken - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ActiveSecurityAdminRulesListResult into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]ActiveBaseSecurityAdminRule, 0) - for i, val := range listTemp { - impl, err := unmarshalActiveBaseSecurityAdminRuleImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'ActiveSecurityAdminRulesListResult': %+v", i, err) - } - output = append(output, impl) - } - s.Value = &output - } - return nil -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_addressprefixitem.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_addressprefixitem.go deleted file mode 100644 index f82ae16f590..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_addressprefixitem.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixItem struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixType *AddressPrefixType `json:"addressPrefixType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_adminpropertiesformat.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_adminpropertiesformat.go deleted file mode 100644 index b71a27f6304..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_adminpropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminPropertiesFormat struct { - Access SecurityConfigurationRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction SecurityConfigurationRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityConfigurationRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_configurationgroup.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_configurationgroup.go deleted file mode 100644 index be051a18f2d..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_configurationgroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationGroup struct { - Id *string `json:"id,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_defaultadminpropertiesformat.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_defaultadminpropertiesformat.go deleted file mode 100644 index 495691739ac..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_defaultadminpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultAdminPropertiesFormat struct { - Access *SecurityConfigurationRuleAccess `json:"access,omitempty"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction *SecurityConfigurationRuleDirection `json:"direction,omitempty"` - Flag *string `json:"flag,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *SecurityConfigurationRuleProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_networkgroupproperties.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_networkgroupproperties.go deleted file mode 100644 index 4aa5d8501e7..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_networkmanagersecuritygroupitem.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_networkmanagersecuritygroupitem.go deleted file mode 100644 index 6457c3d0001..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/model_networkmanagersecuritygroupitem.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerSecurityGroupItem struct { - NetworkGroupId string `json:"networkGroupId"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/version.go b/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/version.go deleted file mode 100644 index 0821c652b49..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanageractiveconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/README.md b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/README.md deleted file mode 100644 index 4735003f72a..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations` Documentation - -The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations" -``` - - -### Client Initialization - -```go -client := networkmanageractiveconnectivityconfigurations.NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerActiveConnectivityConfigurationsClient.ListActiveConnectivityConfigurations` - -```go -ctx := context.TODO() -id := networkmanageractiveconnectivityconfigurations.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanageractiveconnectivityconfigurations.ActiveConfigurationParameter{ - // ... -} - - -read, err := client.ListActiveConnectivityConfigurations(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/client.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/client.go deleted file mode 100644 index 23ed55c7d15..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerActiveConnectivityConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI(api environments.Api) (*NetworkManagerActiveConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerActiveConnectivityConfigurationsClient: %+v", err) - } - - return &NetworkManagerActiveConnectivityConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/constants.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/constants.go deleted file mode 100644 index ce9e85b744a..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/constants.go +++ /dev/null @@ -1,262 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityTopology string - -const ( - ConnectivityTopologyHubAndSpoke ConnectivityTopology = "HubAndSpoke" - ConnectivityTopologyMesh ConnectivityTopology = "Mesh" -) - -func PossibleValuesForConnectivityTopology() []string { - return []string{ - string(ConnectivityTopologyHubAndSpoke), - string(ConnectivityTopologyMesh), - } -} - -func (s *ConnectivityTopology) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectivityTopology(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectivityTopology(input string) (*ConnectivityTopology, error) { - vals := map[string]ConnectivityTopology{ - "hubandspoke": ConnectivityTopologyHubAndSpoke, - "mesh": ConnectivityTopologyMesh, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectivityTopology(input) - return &out, nil -} - -type DeleteExistingPeering string - -const ( - DeleteExistingPeeringFalse DeleteExistingPeering = "False" - DeleteExistingPeeringTrue DeleteExistingPeering = "True" -) - -func PossibleValuesForDeleteExistingPeering() []string { - return []string{ - string(DeleteExistingPeeringFalse), - string(DeleteExistingPeeringTrue), - } -} - -func (s *DeleteExistingPeering) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteExistingPeering(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteExistingPeering(input string) (*DeleteExistingPeering, error) { - vals := map[string]DeleteExistingPeering{ - "false": DeleteExistingPeeringFalse, - "true": DeleteExistingPeeringTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteExistingPeering(input) - return &out, nil -} - -type GroupConnectivity string - -const ( - GroupConnectivityDirectlyConnected GroupConnectivity = "DirectlyConnected" - GroupConnectivityNone GroupConnectivity = "None" -) - -func PossibleValuesForGroupConnectivity() []string { - return []string{ - string(GroupConnectivityDirectlyConnected), - string(GroupConnectivityNone), - } -} - -func (s *GroupConnectivity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGroupConnectivity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGroupConnectivity(input string) (*GroupConnectivity, error) { - vals := map[string]GroupConnectivity{ - "directlyconnected": GroupConnectivityDirectlyConnected, - "none": GroupConnectivityNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GroupConnectivity(input) - return &out, nil -} - -type IsGlobal string - -const ( - IsGlobalFalse IsGlobal = "False" - IsGlobalTrue IsGlobal = "True" -) - -func PossibleValuesForIsGlobal() []string { - return []string{ - string(IsGlobalFalse), - string(IsGlobalTrue), - } -} - -func (s *IsGlobal) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsGlobal(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsGlobal(input string) (*IsGlobal, error) { - vals := map[string]IsGlobal{ - "false": IsGlobalFalse, - "true": IsGlobalTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsGlobal(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type UseHubGateway string - -const ( - UseHubGatewayFalse UseHubGateway = "False" - UseHubGatewayTrue UseHubGateway = "True" -) - -func PossibleValuesForUseHubGateway() []string { - return []string{ - string(UseHubGatewayFalse), - string(UseHubGatewayTrue), - } -} - -func (s *UseHubGateway) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUseHubGateway(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUseHubGateway(input string) (*UseHubGateway, error) { - vals := map[string]UseHubGateway{ - "false": UseHubGatewayFalse, - "true": UseHubGatewayTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UseHubGateway(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go deleted file mode 100644 index 6f686aaaba2..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager_test.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager_test.go deleted file mode 100644 index af6ac289100..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go deleted file mode 100644 index e97620ff035..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListActiveConnectivityConfigurationsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ActiveConnectivityConfigurationsListResult -} - -// ListActiveConnectivityConfigurations ... -func (c NetworkManagerActiveConnectivityConfigurationsClient) ListActiveConnectivityConfigurations(ctx context.Context, id NetworkManagerId, input ActiveConfigurationParameter) (result ListActiveConnectivityConfigurationsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listActiveConnectivityConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconfigurationparameter.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconfigurationparameter.go deleted file mode 100644 index 835513d64ee..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconfigurationparameter.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveConfigurationParameter struct { - Regions *[]string `json:"regions,omitempty"` - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfiguration.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfiguration.go deleted file mode 100644 index b836614744d..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfiguration.go +++ /dev/null @@ -1,30 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveConnectivityConfiguration struct { - CommitTime *string `json:"commitTime,omitempty"` - ConfigurationGroups *[]ConfigurationGroup `json:"configurationGroups,omitempty"` - Id *string `json:"id,omitempty"` - Properties *ConnectivityConfigurationProperties `json:"properties,omitempty"` - Region *string `json:"region,omitempty"` -} - -func (o *ActiveConnectivityConfiguration) GetCommitTimeAsTime() (*time.Time, error) { - if o.CommitTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ActiveConnectivityConfiguration) SetCommitTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTime = &formatted -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfigurationslistresult.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfigurationslistresult.go deleted file mode 100644 index 6fbfafeb4f7..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfigurationslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveConnectivityConfigurationsListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]ActiveConnectivityConfiguration `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_configurationgroup.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_configurationgroup.go deleted file mode 100644 index 2f7ac6eb77f..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_configurationgroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationGroup struct { - Id *string `json:"id,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_connectivityconfigurationproperties.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_connectivityconfigurationproperties.go deleted file mode 100644 index dccea295bae..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_connectivityconfigurationproperties.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationProperties struct { - AppliesToGroups []ConnectivityGroupItem `json:"appliesToGroups"` - ConnectivityTopology ConnectivityTopology `json:"connectivityTopology"` - DeleteExistingPeering *DeleteExistingPeering `json:"deleteExistingPeering,omitempty"` - Description *string `json:"description,omitempty"` - Hubs *[]Hub `json:"hubs,omitempty"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_connectivitygroupitem.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_connectivitygroupitem.go deleted file mode 100644 index 18571eaa75f..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_connectivitygroupitem.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityGroupItem struct { - GroupConnectivity GroupConnectivity `json:"groupConnectivity"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - NetworkGroupId string `json:"networkGroupId"` - UseHubGateway *UseHubGateway `json:"useHubGateway,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_hub.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_hub.go deleted file mode 100644 index 6d2eef46795..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_hub.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Hub struct { - ResourceId *string `json:"resourceId,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_networkgroupproperties.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_networkgroupproperties.go deleted file mode 100644 index a52d39a784c..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/version.go b/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/version.go deleted file mode 100644 index 62741726867..00000000000 --- a/resource-manager/network/2022-09-01/networkmanageractiveconnectivityconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/README.md b/resource-manager/network/2022-09-01/networkmanagerconnections/README.md deleted file mode 100644 index 0af50aab40b..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/README.md +++ /dev/null @@ -1,160 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagerconnections` Documentation - -The `networkmanagerconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagerconnections" -``` - - -### Client Initialization - -```go -client := networkmanagerconnections.NewNetworkManagerConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue") - -payload := networkmanagerconnections.NetworkManagerConnection{ - // ... -} - - -read, err := client.ManagementGroupNetworkManagerConnectionsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsDelete` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue") - -read, err := client.ManagementGroupNetworkManagerConnectionsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsGet` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue") - -read, err := client.ManagementGroupNetworkManagerConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsList` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewManagementGroupID("groupIdValue") - -// alternatively `client.ManagementGroupNetworkManagerConnectionsList(ctx, id, networkmanagerconnections.DefaultManagementGroupNetworkManagerConnectionsListOperationOptions())` can be used to do batched pagination -items, err := client.ManagementGroupNetworkManagerConnectionsListComplete(ctx, id, networkmanagerconnections.DefaultManagementGroupNetworkManagerConnectionsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue") - -payload := networkmanagerconnections.NetworkManagerConnection{ - // ... -} - - -read, err := client.SubscriptionNetworkManagerConnectionsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsDelete` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue") - -read, err := client.SubscriptionNetworkManagerConnectionsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsGet` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue") - -read, err := client.SubscriptionNetworkManagerConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsList` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.SubscriptionNetworkManagerConnectionsList(ctx, id, networkmanagerconnections.DefaultSubscriptionNetworkManagerConnectionsListOperationOptions())` can be used to do batched pagination -items, err := client.SubscriptionNetworkManagerConnectionsListComplete(ctx, id, networkmanagerconnections.DefaultSubscriptionNetworkManagerConnectionsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/client.go b/resource-manager/network/2022-09-01/networkmanagerconnections/client.go deleted file mode 100644 index 6e918e232b8..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanagerconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerConnectionsClientWithBaseURI(api environments.Api) (*NetworkManagerConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanagerconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerConnectionsClient: %+v", err) - } - - return &NetworkManagerConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/constants.go b/resource-manager/network/2022-09-01/networkmanagerconnections/constants.go deleted file mode 100644 index 47d6adfd207..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/constants.go +++ /dev/null @@ -1,60 +0,0 @@ -package networkmanagerconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionState string - -const ( - ScopeConnectionStateConflict ScopeConnectionState = "Conflict" - ScopeConnectionStateConnected ScopeConnectionState = "Connected" - ScopeConnectionStatePending ScopeConnectionState = "Pending" - ScopeConnectionStateRejected ScopeConnectionState = "Rejected" - ScopeConnectionStateRevoked ScopeConnectionState = "Revoked" -) - -func PossibleValuesForScopeConnectionState() []string { - return []string{ - string(ScopeConnectionStateConflict), - string(ScopeConnectionStateConnected), - string(ScopeConnectionStatePending), - string(ScopeConnectionStateRejected), - string(ScopeConnectionStateRevoked), - } -} - -func (s *ScopeConnectionState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScopeConnectionState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScopeConnectionState(input string) (*ScopeConnectionState, error) { - vals := map[string]ScopeConnectionState{ - "conflict": ScopeConnectionStateConflict, - "connected": ScopeConnectionStateConnected, - "pending": ScopeConnectionStatePending, - "rejected": ScopeConnectionStateRejected, - "revoked": ScopeConnectionStateRevoked, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScopeConnectionState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/id_networkmanagerconnection.go b/resource-manager/network/2022-09-01/networkmanagerconnections/id_networkmanagerconnection.go deleted file mode 100644 index 257d0dbb580..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/id_networkmanagerconnection.go +++ /dev/null @@ -1,114 +0,0 @@ -package networkmanagerconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerConnectionId{} - -// NetworkManagerConnectionId is a struct representing the Resource ID for a Network Manager Connection -type NetworkManagerConnectionId struct { - SubscriptionId string - NetworkManagerConnectionName string -} - -// NewNetworkManagerConnectionID returns a new NetworkManagerConnectionId struct -func NewNetworkManagerConnectionID(subscriptionId string, networkManagerConnectionName string) NetworkManagerConnectionId { - return NetworkManagerConnectionId{ - SubscriptionId: subscriptionId, - NetworkManagerConnectionName: networkManagerConnectionName, - } -} - -// ParseNetworkManagerConnectionID parses 'input' into a NetworkManagerConnectionId -func ParseNetworkManagerConnectionID(input string) (*NetworkManagerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerConnectionIDInsensitively parses 'input' case-insensitively into a NetworkManagerConnectionId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerConnectionIDInsensitively(input string) (*NetworkManagerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerConnectionID checks that 'input' can be parsed as a Network Manager Connection ID -func ValidateNetworkManagerConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager Connection ID -func (id NetworkManagerConnectionId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/networkManagerConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.NetworkManagerConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager Connection ID -func (id NetworkManagerConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagerConnections", "networkManagerConnections", "networkManagerConnections"), - resourceids.UserSpecifiedSegment("networkManagerConnectionName", "networkManagerConnectionValue"), - } -} - -// String returns a human-readable description of this Network Manager Connection ID -func (id NetworkManagerConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Network Manager Connection Name: %q", id.NetworkManagerConnectionName), - } - return fmt.Sprintf("Network Manager Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/id_networkmanagerconnection_test.go b/resource-manager/network/2022-09-01/networkmanagerconnections/id_networkmanagerconnection_test.go deleted file mode 100644 index 4f522e2f228..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/id_networkmanagerconnection_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package networkmanagerconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerConnectionId{} - -func TestNewNetworkManagerConnectionID(t *testing.T) { - id := NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.NetworkManagerConnectionName != "networkManagerConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerConnectionName'", id.NetworkManagerConnectionName, "networkManagerConnectionValue") - } -} - -func TestFormatNetworkManagerConnectionID(t *testing.T) { - actual := NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue", - Expected: &NetworkManagerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkManagerConnectionName: "networkManagerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.NetworkManagerConnectionName != v.Expected.NetworkManagerConnectionName { - t.Fatalf("Expected %q but got %q for NetworkManagerConnectionName", v.Expected.NetworkManagerConnectionName, actual.NetworkManagerConnectionName) - } - - } -} - -func TestParseNetworkManagerConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue", - Expected: &NetworkManagerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkManagerConnectionName: "networkManagerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs/nEtWoRkMaNaGeRcOnNeCtIoNvAlUe", - Expected: &NetworkManagerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkManagerConnectionName: "nEtWoRkMaNaGeRcOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs/nEtWoRkMaNaGeRcOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.NetworkManagerConnectionName != v.Expected.NetworkManagerConnectionName { - t.Fatalf("Expected %q but got %q for NetworkManagerConnectionName", v.Expected.NetworkManagerConnectionName, actual.NetworkManagerConnectionName) - } - - } -} - -func TestSegmentsForNetworkManagerConnectionId(t *testing.T) { - segments := NetworkManagerConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/id_providers2networkmanagerconnection.go b/resource-manager/network/2022-09-01/networkmanagerconnections/id_providers2networkmanagerconnection.go deleted file mode 100644 index eb0ead3de30..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/id_providers2networkmanagerconnection.go +++ /dev/null @@ -1,116 +0,0 @@ -package networkmanagerconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = Providers2NetworkManagerConnectionId{} - -// Providers2NetworkManagerConnectionId is a struct representing the Resource ID for a Providers 2 Network Manager Connection -type Providers2NetworkManagerConnectionId struct { - ManagementGroupId string - NetworkManagerConnectionName string -} - -// NewProviders2NetworkManagerConnectionID returns a new Providers2NetworkManagerConnectionId struct -func NewProviders2NetworkManagerConnectionID(managementGroupId string, networkManagerConnectionName string) Providers2NetworkManagerConnectionId { - return Providers2NetworkManagerConnectionId{ - ManagementGroupId: managementGroupId, - NetworkManagerConnectionName: networkManagerConnectionName, - } -} - -// ParseProviders2NetworkManagerConnectionID parses 'input' into a Providers2NetworkManagerConnectionId -func ParseProviders2NetworkManagerConnectionID(input string) (*Providers2NetworkManagerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(Providers2NetworkManagerConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := Providers2NetworkManagerConnectionId{} - - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) - } - - return &id, nil -} - -// ParseProviders2NetworkManagerConnectionIDInsensitively parses 'input' case-insensitively into a Providers2NetworkManagerConnectionId -// note: this method should only be used for API response data and not user input -func ParseProviders2NetworkManagerConnectionIDInsensitively(input string) (*Providers2NetworkManagerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(Providers2NetworkManagerConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := Providers2NetworkManagerConnectionId{} - - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateProviders2NetworkManagerConnectionID checks that 'input' can be parsed as a Providers 2 Network Manager Connection ID -func ValidateProviders2NetworkManagerConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviders2NetworkManagerConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Providers 2 Network Manager Connection ID -func (id Providers2NetworkManagerConnectionId) ID() string { - fmtString := "/providers/Microsoft.Management/managementGroups/%s/providers/Microsoft.Network/networkManagerConnections/%s" - return fmt.Sprintf(fmtString, id.ManagementGroupId, id.NetworkManagerConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Providers 2 Network Manager Connection ID -func (id Providers2NetworkManagerConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftManagement", "Microsoft.Management", "Microsoft.Management"), - resourceids.StaticSegment("staticManagementGroups", "managementGroups", "managementGroups"), - resourceids.UserSpecifiedSegment("managementGroupId", "managementGroupIdValue"), - resourceids.StaticSegment("staticProviders2", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagerConnections", "networkManagerConnections", "networkManagerConnections"), - resourceids.UserSpecifiedSegment("networkManagerConnectionName", "networkManagerConnectionValue"), - } -} - -// String returns a human-readable description of this Providers 2 Network Manager Connection ID -func (id Providers2NetworkManagerConnectionId) String() string { - components := []string{ - fmt.Sprintf("Management Group: %q", id.ManagementGroupId), - fmt.Sprintf("Network Manager Connection Name: %q", id.NetworkManagerConnectionName), - } - return fmt.Sprintf("Providers 2 Network Manager Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/id_providers2networkmanagerconnection_test.go b/resource-manager/network/2022-09-01/networkmanagerconnections/id_providers2networkmanagerconnection_test.go deleted file mode 100644 index c1797aa521e..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/id_providers2networkmanagerconnection_test.go +++ /dev/null @@ -1,267 +0,0 @@ -package networkmanagerconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = Providers2NetworkManagerConnectionId{} - -func TestNewProviders2NetworkManagerConnectionID(t *testing.T) { - id := NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue") - - if id.ManagementGroupId != "managementGroupIdValue" { - t.Fatalf("Expected %q but got %q for Segment 'ManagementGroupId'", id.ManagementGroupId, "managementGroupIdValue") - } - - if id.NetworkManagerConnectionName != "networkManagerConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerConnectionName'", id.NetworkManagerConnectionName, "networkManagerConnectionValue") - } -} - -func TestFormatProviders2NetworkManagerConnectionID(t *testing.T) { - actual := NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue").ID() - expected := "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviders2NetworkManagerConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *Providers2NetworkManagerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections", - Error: true, - }, - { - // Valid URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue", - Expected: &Providers2NetworkManagerConnectionId{ - ManagementGroupId: "managementGroupIdValue", - NetworkManagerConnectionName: "networkManagerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviders2NetworkManagerConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.ManagementGroupId != v.Expected.ManagementGroupId { - t.Fatalf("Expected %q but got %q for ManagementGroupId", v.Expected.ManagementGroupId, actual.ManagementGroupId) - } - - if actual.NetworkManagerConnectionName != v.Expected.NetworkManagerConnectionName { - t.Fatalf("Expected %q but got %q for NetworkManagerConnectionName", v.Expected.NetworkManagerConnectionName, actual.NetworkManagerConnectionName) - } - - } -} - -func TestParseProviders2NetworkManagerConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *Providers2NetworkManagerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue", - Expected: &Providers2NetworkManagerConnectionId{ - ManagementGroupId: "managementGroupIdValue", - NetworkManagerConnectionName: "networkManagerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs/nEtWoRkMaNaGeRcOnNeCtIoNvAlUe", - Expected: &Providers2NetworkManagerConnectionId{ - ManagementGroupId: "mAnAgEmEnTgRoUpIdVaLuE", - NetworkManagerConnectionName: "nEtWoRkMaNaGeRcOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs/nEtWoRkMaNaGeRcOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviders2NetworkManagerConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.ManagementGroupId != v.Expected.ManagementGroupId { - t.Fatalf("Expected %q but got %q for ManagementGroupId", v.Expected.ManagementGroupId, actual.ManagementGroupId) - } - - if actual.NetworkManagerConnectionName != v.Expected.NetworkManagerConnectionName { - t.Fatalf("Expected %q but got %q for NetworkManagerConnectionName", v.Expected.NetworkManagerConnectionName, actual.NetworkManagerConnectionName) - } - - } -} - -func TestSegmentsForProviders2NetworkManagerConnectionId(t *testing.T) { - segments := Providers2NetworkManagerConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("Providers2NetworkManagerConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go deleted file mode 100644 index 2a5cdf38de1..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagementGroupNetworkManagerConnectionsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerConnection -} - -// ManagementGroupNetworkManagerConnectionsCreateOrUpdate ... -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsCreateOrUpdate(ctx context.Context, id Providers2NetworkManagerConnectionId, input NetworkManagerConnection) (result ManagementGroupNetworkManagerConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsdelete.go b/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsdelete.go deleted file mode 100644 index 83c0e93f95b..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagementGroupNetworkManagerConnectionsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// ManagementGroupNetworkManagerConnectionsDelete ... -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsDelete(ctx context.Context, id Providers2NetworkManagerConnectionId) (result ManagementGroupNetworkManagerConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go b/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go deleted file mode 100644 index 8222ba28b95..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagementGroupNetworkManagerConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerConnection -} - -// ManagementGroupNetworkManagerConnectionsGet ... -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsGet(ctx context.Context, id Providers2NetworkManagerConnectionId) (result ManagementGroupNetworkManagerConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go b/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go deleted file mode 100644 index e6fa96ef069..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagementGroupNetworkManagerConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkManagerConnection -} - -type ManagementGroupNetworkManagerConnectionsListCompleteResult struct { - Items []NetworkManagerConnection -} - -type ManagementGroupNetworkManagerConnectionsListOperationOptions struct { - Top *int64 -} - -func DefaultManagementGroupNetworkManagerConnectionsListOperationOptions() ManagementGroupNetworkManagerConnectionsListOperationOptions { - return ManagementGroupNetworkManagerConnectionsListOperationOptions{} -} - -func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// ManagementGroupNetworkManagerConnectionsList ... -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsList(ctx context.Context, id commonids.ManagementGroupId, options ManagementGroupNetworkManagerConnectionsListOperationOptions) (result ManagementGroupNetworkManagerConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkManagerConnections", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkManagerConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ManagementGroupNetworkManagerConnectionsListComplete retrieves all the results into a single object -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsListComplete(ctx context.Context, id commonids.ManagementGroupId, options ManagementGroupNetworkManagerConnectionsListOperationOptions) (ManagementGroupNetworkManagerConnectionsListCompleteResult, error) { - return c.ManagementGroupNetworkManagerConnectionsListCompleteMatchingPredicate(ctx, id, options, NetworkManagerConnectionOperationPredicate{}) -} - -// ManagementGroupNetworkManagerConnectionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsListCompleteMatchingPredicate(ctx context.Context, id commonids.ManagementGroupId, options ManagementGroupNetworkManagerConnectionsListOperationOptions, predicate NetworkManagerConnectionOperationPredicate) (result ManagementGroupNetworkManagerConnectionsListCompleteResult, err error) { - items := make([]NetworkManagerConnection, 0) - - resp, err := c.ManagementGroupNetworkManagerConnectionsList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ManagementGroupNetworkManagerConnectionsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go deleted file mode 100644 index 40590270d62..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubscriptionNetworkManagerConnectionsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerConnection -} - -// SubscriptionNetworkManagerConnectionsCreateOrUpdate ... -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsCreateOrUpdate(ctx context.Context, id NetworkManagerConnectionId, input NetworkManagerConnection) (result SubscriptionNetworkManagerConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsdelete.go b/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsdelete.go deleted file mode 100644 index 43ebf8bb5e4..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubscriptionNetworkManagerConnectionsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// SubscriptionNetworkManagerConnectionsDelete ... -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsDelete(ctx context.Context, id NetworkManagerConnectionId) (result SubscriptionNetworkManagerConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go b/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go deleted file mode 100644 index fd274a1db9f..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubscriptionNetworkManagerConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerConnection -} - -// SubscriptionNetworkManagerConnectionsGet ... -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsGet(ctx context.Context, id NetworkManagerConnectionId) (result SubscriptionNetworkManagerConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go b/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go deleted file mode 100644 index 44e7eb5799f..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubscriptionNetworkManagerConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkManagerConnection -} - -type SubscriptionNetworkManagerConnectionsListCompleteResult struct { - Items []NetworkManagerConnection -} - -type SubscriptionNetworkManagerConnectionsListOperationOptions struct { - Top *int64 -} - -func DefaultSubscriptionNetworkManagerConnectionsListOperationOptions() SubscriptionNetworkManagerConnectionsListOperationOptions { - return SubscriptionNetworkManagerConnectionsListOperationOptions{} -} - -func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// SubscriptionNetworkManagerConnectionsList ... -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsList(ctx context.Context, id commonids.SubscriptionId, options SubscriptionNetworkManagerConnectionsListOperationOptions) (result SubscriptionNetworkManagerConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkManagerConnections", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkManagerConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// SubscriptionNetworkManagerConnectionsListComplete retrieves all the results into a single object -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsListComplete(ctx context.Context, id commonids.SubscriptionId, options SubscriptionNetworkManagerConnectionsListOperationOptions) (SubscriptionNetworkManagerConnectionsListCompleteResult, error) { - return c.SubscriptionNetworkManagerConnectionsListCompleteMatchingPredicate(ctx, id, options, NetworkManagerConnectionOperationPredicate{}) -} - -// SubscriptionNetworkManagerConnectionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options SubscriptionNetworkManagerConnectionsListOperationOptions, predicate NetworkManagerConnectionOperationPredicate) (result SubscriptionNetworkManagerConnectionsListCompleteResult, err error) { - items := make([]NetworkManagerConnection, 0) - - resp, err := c.SubscriptionNetworkManagerConnectionsList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = SubscriptionNetworkManagerConnectionsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/model_networkmanagerconnection.go b/resource-manager/network/2022-09-01/networkmanagerconnections/model_networkmanagerconnection.go deleted file mode 100644 index a7548b73699..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/model_networkmanagerconnection.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkmanagerconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkManagerConnectionProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/model_networkmanagerconnectionproperties.go b/resource-manager/network/2022-09-01/networkmanagerconnections/model_networkmanagerconnectionproperties.go deleted file mode 100644 index faec43c2f30..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/model_networkmanagerconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagerconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerConnectionProperties struct { - ConnectionState *ScopeConnectionState `json:"connectionState,omitempty"` - Description *string `json:"description,omitempty"` - NetworkManagerId *string `json:"networkManagerId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/predicates.go b/resource-manager/network/2022-09-01/networkmanagerconnections/predicates.go deleted file mode 100644 index 145b7b7261a..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package networkmanagerconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p NetworkManagerConnectionOperationPredicate) Matches(input NetworkManagerConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/networkmanagerconnections/version.go b/resource-manager/network/2022-09-01/networkmanagerconnections/version.go deleted file mode 100644 index cc0f9ed8149..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagerconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanagerconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagerconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/README.md b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/README.md deleted file mode 100644 index 7c8f76adc2a..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration` Documentation - -The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration" -``` - - -### Client Initialization - -```go -client := networkmanagereffectiveconnectivityconfiguration.NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerEffectiveConnectivityConfigurationClient.ListNetworkManagerEffectiveConnectivityConfigurations` - -```go -ctx := context.TODO() -id := networkmanagereffectiveconnectivityconfiguration.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -payload := networkmanagereffectiveconnectivityconfiguration.QueryRequestOptions{ - // ... -} - - -read, err := client.ListNetworkManagerEffectiveConnectivityConfigurations(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/client.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/client.go deleted file mode 100644 index e1cc279732c..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerEffectiveConnectivityConfigurationClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI(api environments.Api) (*NetworkManagerEffectiveConnectivityConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerEffectiveConnectivityConfigurationClient: %+v", err) - } - - return &NetworkManagerEffectiveConnectivityConfigurationClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/constants.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/constants.go deleted file mode 100644 index 06b5b5629ff..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/constants.go +++ /dev/null @@ -1,262 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityTopology string - -const ( - ConnectivityTopologyHubAndSpoke ConnectivityTopology = "HubAndSpoke" - ConnectivityTopologyMesh ConnectivityTopology = "Mesh" -) - -func PossibleValuesForConnectivityTopology() []string { - return []string{ - string(ConnectivityTopologyHubAndSpoke), - string(ConnectivityTopologyMesh), - } -} - -func (s *ConnectivityTopology) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectivityTopology(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectivityTopology(input string) (*ConnectivityTopology, error) { - vals := map[string]ConnectivityTopology{ - "hubandspoke": ConnectivityTopologyHubAndSpoke, - "mesh": ConnectivityTopologyMesh, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectivityTopology(input) - return &out, nil -} - -type DeleteExistingPeering string - -const ( - DeleteExistingPeeringFalse DeleteExistingPeering = "False" - DeleteExistingPeeringTrue DeleteExistingPeering = "True" -) - -func PossibleValuesForDeleteExistingPeering() []string { - return []string{ - string(DeleteExistingPeeringFalse), - string(DeleteExistingPeeringTrue), - } -} - -func (s *DeleteExistingPeering) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteExistingPeering(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteExistingPeering(input string) (*DeleteExistingPeering, error) { - vals := map[string]DeleteExistingPeering{ - "false": DeleteExistingPeeringFalse, - "true": DeleteExistingPeeringTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteExistingPeering(input) - return &out, nil -} - -type GroupConnectivity string - -const ( - GroupConnectivityDirectlyConnected GroupConnectivity = "DirectlyConnected" - GroupConnectivityNone GroupConnectivity = "None" -) - -func PossibleValuesForGroupConnectivity() []string { - return []string{ - string(GroupConnectivityDirectlyConnected), - string(GroupConnectivityNone), - } -} - -func (s *GroupConnectivity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGroupConnectivity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGroupConnectivity(input string) (*GroupConnectivity, error) { - vals := map[string]GroupConnectivity{ - "directlyconnected": GroupConnectivityDirectlyConnected, - "none": GroupConnectivityNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GroupConnectivity(input) - return &out, nil -} - -type IsGlobal string - -const ( - IsGlobalFalse IsGlobal = "False" - IsGlobalTrue IsGlobal = "True" -) - -func PossibleValuesForIsGlobal() []string { - return []string{ - string(IsGlobalFalse), - string(IsGlobalTrue), - } -} - -func (s *IsGlobal) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsGlobal(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsGlobal(input string) (*IsGlobal, error) { - vals := map[string]IsGlobal{ - "false": IsGlobalFalse, - "true": IsGlobalTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsGlobal(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type UseHubGateway string - -const ( - UseHubGatewayFalse UseHubGateway = "False" - UseHubGatewayTrue UseHubGateway = "True" -) - -func PossibleValuesForUseHubGateway() []string { - return []string{ - string(UseHubGatewayFalse), - string(UseHubGatewayTrue), - } -} - -func (s *UseHubGateway) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUseHubGateway(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUseHubGateway(input string) (*UseHubGateway, error) { - vals := map[string]UseHubGateway{ - "false": UseHubGatewayFalse, - "true": UseHubGatewayTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UseHubGateway(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go deleted file mode 100644 index fab3b67c949..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go +++ /dev/null @@ -1,57 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListNetworkManagerEffectiveConnectivityConfigurationsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerEffectiveConnectivityConfigurationListResult -} - -// ListNetworkManagerEffectiveConnectivityConfigurations ... -func (c NetworkManagerEffectiveConnectivityConfigurationClient) ListNetworkManagerEffectiveConnectivityConfigurations(ctx context.Context, id commonids.VirtualNetworkId, input QueryRequestOptions) (result ListNetworkManagerEffectiveConnectivityConfigurationsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listNetworkManagerEffectiveConnectivityConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_configurationgroup.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_configurationgroup.go deleted file mode 100644 index 219b2fe208e..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_configurationgroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationGroup struct { - Id *string `json:"id,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_connectivityconfigurationproperties.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_connectivityconfigurationproperties.go deleted file mode 100644 index b765b64e708..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_connectivityconfigurationproperties.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationProperties struct { - AppliesToGroups []ConnectivityGroupItem `json:"appliesToGroups"` - ConnectivityTopology ConnectivityTopology `json:"connectivityTopology"` - DeleteExistingPeering *DeleteExistingPeering `json:"deleteExistingPeering,omitempty"` - Description *string `json:"description,omitempty"` - Hubs *[]Hub `json:"hubs,omitempty"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_connectivitygroupitem.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_connectivitygroupitem.go deleted file mode 100644 index d034adb388c..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_connectivitygroupitem.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityGroupItem struct { - GroupConnectivity GroupConnectivity `json:"groupConnectivity"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - NetworkGroupId string `json:"networkGroupId"` - UseHubGateway *UseHubGateway `json:"useHubGateway,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_effectiveconnectivityconfiguration.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_effectiveconnectivityconfiguration.go deleted file mode 100644 index ace2b882974..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_effectiveconnectivityconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveConnectivityConfiguration struct { - ConfigurationGroups *[]ConfigurationGroup `json:"configurationGroups,omitempty"` - Id *string `json:"id,omitempty"` - Properties *ConnectivityConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_hub.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_hub.go deleted file mode 100644 index 5564a1b1595..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_hub.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Hub struct { - ResourceId *string `json:"resourceId,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_networkgroupproperties.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_networkgroupproperties.go deleted file mode 100644 index 5b7bec9e8e6..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_networkmanagereffectiveconnectivityconfigurationlistresult.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_networkmanagereffectiveconnectivityconfigurationlistresult.go deleted file mode 100644 index 566b11872ea..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_networkmanagereffectiveconnectivityconfigurationlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerEffectiveConnectivityConfigurationListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]EffectiveConnectivityConfiguration `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_queryrequestoptions.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_queryrequestoptions.go deleted file mode 100644 index b861fc62fb3..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/model_queryrequestoptions.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryRequestOptions struct { - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/version.go b/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/version.go deleted file mode 100644 index 2282712f9ce..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectiveconnectivityconfiguration/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/README.md b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/README.md deleted file mode 100644 index 5c5250e3433..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules` Documentation - -The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules" -``` - - -### Client Initialization - -```go -client := networkmanagereffectivesecurityadminrules.NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerEffectiveSecurityAdminRulesClient.ListNetworkManagerEffectiveSecurityAdminRules` - -```go -ctx := context.TODO() -id := networkmanagereffectivesecurityadminrules.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -payload := networkmanagereffectivesecurityadminrules.QueryRequestOptions{ - // ... -} - - -read, err := client.ListNetworkManagerEffectiveSecurityAdminRules(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/client.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/client.go deleted file mode 100644 index ea0d80cd16d..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerEffectiveSecurityAdminRulesClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI(api environments.Api) (*NetworkManagerEffectiveSecurityAdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanagereffectivesecurityadminrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerEffectiveSecurityAdminRulesClient: %+v", err) - } - - return &NetworkManagerEffectiveSecurityAdminRulesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/constants.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/constants.go deleted file mode 100644 index 280bd1bc97d..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/constants.go +++ /dev/null @@ -1,277 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixType string - -const ( - AddressPrefixTypeIPPrefix AddressPrefixType = "IPPrefix" - AddressPrefixTypeServiceTag AddressPrefixType = "ServiceTag" -) - -func PossibleValuesForAddressPrefixType() []string { - return []string{ - string(AddressPrefixTypeIPPrefix), - string(AddressPrefixTypeServiceTag), - } -} - -func (s *AddressPrefixType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAddressPrefixType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAddressPrefixType(input string) (*AddressPrefixType, error) { - vals := map[string]AddressPrefixType{ - "ipprefix": AddressPrefixTypeIPPrefix, - "servicetag": AddressPrefixTypeServiceTag, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AddressPrefixType(input) - return &out, nil -} - -type EffectiveAdminRuleKind string - -const ( - EffectiveAdminRuleKindCustom EffectiveAdminRuleKind = "Custom" - EffectiveAdminRuleKindDefault EffectiveAdminRuleKind = "Default" -) - -func PossibleValuesForEffectiveAdminRuleKind() []string { - return []string{ - string(EffectiveAdminRuleKindCustom), - string(EffectiveAdminRuleKindDefault), - } -} - -func (s *EffectiveAdminRuleKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveAdminRuleKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveAdminRuleKind(input string) (*EffectiveAdminRuleKind, error) { - vals := map[string]EffectiveAdminRuleKind{ - "custom": EffectiveAdminRuleKindCustom, - "default": EffectiveAdminRuleKindDefault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveAdminRuleKind(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityConfigurationRuleAccess string - -const ( - SecurityConfigurationRuleAccessAllow SecurityConfigurationRuleAccess = "Allow" - SecurityConfigurationRuleAccessAlwaysAllow SecurityConfigurationRuleAccess = "AlwaysAllow" - SecurityConfigurationRuleAccessDeny SecurityConfigurationRuleAccess = "Deny" -) - -func PossibleValuesForSecurityConfigurationRuleAccess() []string { - return []string{ - string(SecurityConfigurationRuleAccessAllow), - string(SecurityConfigurationRuleAccessAlwaysAllow), - string(SecurityConfigurationRuleAccessDeny), - } -} - -func (s *SecurityConfigurationRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleAccess(input string) (*SecurityConfigurationRuleAccess, error) { - vals := map[string]SecurityConfigurationRuleAccess{ - "allow": SecurityConfigurationRuleAccessAllow, - "alwaysallow": SecurityConfigurationRuleAccessAlwaysAllow, - "deny": SecurityConfigurationRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleAccess(input) - return &out, nil -} - -type SecurityConfigurationRuleDirection string - -const ( - SecurityConfigurationRuleDirectionInbound SecurityConfigurationRuleDirection = "Inbound" - SecurityConfigurationRuleDirectionOutbound SecurityConfigurationRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityConfigurationRuleDirection() []string { - return []string{ - string(SecurityConfigurationRuleDirectionInbound), - string(SecurityConfigurationRuleDirectionOutbound), - } -} - -func (s *SecurityConfigurationRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleDirection(input string) (*SecurityConfigurationRuleDirection, error) { - vals := map[string]SecurityConfigurationRuleDirection{ - "inbound": SecurityConfigurationRuleDirectionInbound, - "outbound": SecurityConfigurationRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleDirection(input) - return &out, nil -} - -type SecurityConfigurationRuleProtocol string - -const ( - SecurityConfigurationRuleProtocolAh SecurityConfigurationRuleProtocol = "Ah" - SecurityConfigurationRuleProtocolAny SecurityConfigurationRuleProtocol = "Any" - SecurityConfigurationRuleProtocolEsp SecurityConfigurationRuleProtocol = "Esp" - SecurityConfigurationRuleProtocolIcmp SecurityConfigurationRuleProtocol = "Icmp" - SecurityConfigurationRuleProtocolTcp SecurityConfigurationRuleProtocol = "Tcp" - SecurityConfigurationRuleProtocolUdp SecurityConfigurationRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityConfigurationRuleProtocol() []string { - return []string{ - string(SecurityConfigurationRuleProtocolAh), - string(SecurityConfigurationRuleProtocolAny), - string(SecurityConfigurationRuleProtocolEsp), - string(SecurityConfigurationRuleProtocolIcmp), - string(SecurityConfigurationRuleProtocolTcp), - string(SecurityConfigurationRuleProtocolUdp), - } -} - -func (s *SecurityConfigurationRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleProtocol(input string) (*SecurityConfigurationRuleProtocol, error) { - vals := map[string]SecurityConfigurationRuleProtocol{ - "ah": SecurityConfigurationRuleProtocolAh, - "any": SecurityConfigurationRuleProtocolAny, - "esp": SecurityConfigurationRuleProtocolEsp, - "icmp": SecurityConfigurationRuleProtocolIcmp, - "tcp": SecurityConfigurationRuleProtocolTcp, - "udp": SecurityConfigurationRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleProtocol(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go deleted file mode 100644 index e39204d0b70..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go +++ /dev/null @@ -1,57 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListNetworkManagerEffectiveSecurityAdminRulesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerEffectiveSecurityAdminRulesListResult -} - -// ListNetworkManagerEffectiveSecurityAdminRules ... -func (c NetworkManagerEffectiveSecurityAdminRulesClient) ListNetworkManagerEffectiveSecurityAdminRules(ctx context.Context, id commonids.VirtualNetworkId, input QueryRequestOptions) (result ListNetworkManagerEffectiveSecurityAdminRulesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listNetworkManagerEffectiveSecurityAdminRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_addressprefixitem.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_addressprefixitem.go deleted file mode 100644 index 36a40aa2b75..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_addressprefixitem.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixItem struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixType *AddressPrefixType `json:"addressPrefixType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_adminpropertiesformat.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_adminpropertiesformat.go deleted file mode 100644 index b76a52edb2e..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_adminpropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminPropertiesFormat struct { - Access SecurityConfigurationRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction SecurityConfigurationRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityConfigurationRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_configurationgroup.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_configurationgroup.go deleted file mode 100644 index bfc45b0ab70..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_configurationgroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationGroup struct { - Id *string `json:"id,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_defaultadminpropertiesformat.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_defaultadminpropertiesformat.go deleted file mode 100644 index 190203916a6..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_defaultadminpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultAdminPropertiesFormat struct { - Access *SecurityConfigurationRuleAccess `json:"access,omitempty"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction *SecurityConfigurationRuleDirection `json:"direction,omitempty"` - Flag *string `json:"flag,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *SecurityConfigurationRuleProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go deleted file mode 100644 index 7d79d1d14bd..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveBaseSecurityAdminRule interface { -} - -func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling EffectiveBaseSecurityAdminRule into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Default") { - var out EffectiveDefaultSecurityAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into EffectiveDefaultSecurityAdminRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Custom") { - var out EffectiveSecurityAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into EffectiveSecurityAdminRule: %+v", err) - } - return out, nil - } - - type RawEffectiveBaseSecurityAdminRuleImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawEffectiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go deleted file mode 100644 index 17d5e7fdeb7..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go +++ /dev/null @@ -1,46 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ EffectiveBaseSecurityAdminRule = EffectiveDefaultSecurityAdminRule{} - -type EffectiveDefaultSecurityAdminRule struct { - Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from EffectiveBaseSecurityAdminRule - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - Id *string `json:"id,omitempty"` - RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -var _ json.Marshaler = EffectiveDefaultSecurityAdminRule{} - -func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { - type wrapper EffectiveDefaultSecurityAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling EffectiveDefaultSecurityAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling EffectiveDefaultSecurityAdminRule: %+v", err) - } - decoded["kind"] = "Default" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling EffectiveDefaultSecurityAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go deleted file mode 100644 index ae90f9154f9..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go +++ /dev/null @@ -1,46 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ EffectiveBaseSecurityAdminRule = EffectiveSecurityAdminRule{} - -type EffectiveSecurityAdminRule struct { - Properties *AdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from EffectiveBaseSecurityAdminRule - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - Id *string `json:"id,omitempty"` - RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -var _ json.Marshaler = EffectiveSecurityAdminRule{} - -func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { - type wrapper EffectiveSecurityAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling EffectiveSecurityAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling EffectiveSecurityAdminRule: %+v", err) - } - decoded["kind"] = "Custom" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling EffectiveSecurityAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkgroupproperties.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkgroupproperties.go deleted file mode 100644 index 0f51af45445..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go deleted file mode 100644 index 941c8a93ed6..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go +++ /dev/null @@ -1,49 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerEffectiveSecurityAdminRulesListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]EffectiveBaseSecurityAdminRule `json:"value,omitempty"` -} - -var _ json.Unmarshaler = &NetworkManagerEffectiveSecurityAdminRulesListResult{} - -func (s *NetworkManagerEffectiveSecurityAdminRulesListResult) UnmarshalJSON(bytes []byte) error { - type alias NetworkManagerEffectiveSecurityAdminRulesListResult - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into NetworkManagerEffectiveSecurityAdminRulesListResult: %+v", err) - } - - s.SkipToken = decoded.SkipToken - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling NetworkManagerEffectiveSecurityAdminRulesListResult into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]EffectiveBaseSecurityAdminRule, 0) - for i, val := range listTemp { - impl, err := unmarshalEffectiveBaseSecurityAdminRuleImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'NetworkManagerEffectiveSecurityAdminRulesListResult': %+v", i, err) - } - output = append(output, impl) - } - s.Value = &output - } - return nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagersecuritygroupitem.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagersecuritygroupitem.go deleted file mode 100644 index 47b6055e402..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_networkmanagersecuritygroupitem.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerSecurityGroupItem struct { - NetworkGroupId string `json:"networkGroupId"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_queryrequestoptions.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_queryrequestoptions.go deleted file mode 100644 index 21a08175183..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/model_queryrequestoptions.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryRequestOptions struct { - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/version.go b/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/version.go deleted file mode 100644 index 0f0cbaa1360..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagereffectivesecurityadminrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/README.md b/resource-manager/network/2022-09-01/networkmanagers/README.md deleted file mode 100644 index 9a2c91b9892..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/README.md +++ /dev/null @@ -1,162 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagers` Documentation - -The `networkmanagers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkmanagers" -``` - - -### Client Initialization - -```go -client := networkmanagers.NewNetworkManagersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanagers.NetworkManager{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagersClient.Delete` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -if err := client.DeleteThenPoll(ctx, id, networkmanagers.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkManagersClient.Get` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagersClient.List` - -```go -ctx := context.TODO() -id := networkmanagers.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id, networkmanagers.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, networkmanagers.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkManagersClient.ListBySubscription` - -```go -ctx := context.TODO() -id := networkmanagers.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id, networkmanagers.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id, networkmanagers.DefaultListBySubscriptionOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkManagersClient.NetworkManagerCommitsPost` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanagers.NetworkManagerCommit{ - // ... -} - - -if err := client.NetworkManagerCommitsPostThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkManagersClient.NetworkManagerDeploymentStatusList` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanagers.NetworkManagerDeploymentStatusParameter{ - // ... -} - - -read, err := client.NetworkManagerDeploymentStatusList(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagersClient.Patch` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanagers.PatchObject{ - // ... -} - - -read, err := client.Patch(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/networkmanagers/client.go b/resource-manager/network/2022-09-01/networkmanagers/client.go deleted file mode 100644 index d3cd73d8b1c..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanagers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagersClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagersClientWithBaseURI(api environments.Api) (*NetworkManagersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanagers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagersClient: %+v", err) - } - - return &NetworkManagersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/constants.go b/resource-manager/network/2022-09-01/networkmanagers/constants.go deleted file mode 100644 index 2aa86ac1963..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/constants.go +++ /dev/null @@ -1,145 +0,0 @@ -package networkmanagers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationType string - -const ( - ConfigurationTypeConnectivity ConfigurationType = "Connectivity" - ConfigurationTypeSecurityAdmin ConfigurationType = "SecurityAdmin" -) - -func PossibleValuesForConfigurationType() []string { - return []string{ - string(ConfigurationTypeConnectivity), - string(ConfigurationTypeSecurityAdmin), - } -} - -func (s *ConfigurationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfigurationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfigurationType(input string) (*ConfigurationType, error) { - vals := map[string]ConfigurationType{ - "connectivity": ConfigurationTypeConnectivity, - "securityadmin": ConfigurationTypeSecurityAdmin, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfigurationType(input) - return &out, nil -} - -type DeploymentStatus string - -const ( - DeploymentStatusDeployed DeploymentStatus = "Deployed" - DeploymentStatusDeploying DeploymentStatus = "Deploying" - DeploymentStatusFailed DeploymentStatus = "Failed" - DeploymentStatusNotStarted DeploymentStatus = "NotStarted" -) - -func PossibleValuesForDeploymentStatus() []string { - return []string{ - string(DeploymentStatusDeployed), - string(DeploymentStatusDeploying), - string(DeploymentStatusFailed), - string(DeploymentStatusNotStarted), - } -} - -func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeploymentStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeploymentStatus(input string) (*DeploymentStatus, error) { - vals := map[string]DeploymentStatus{ - "deployed": DeploymentStatusDeployed, - "deploying": DeploymentStatusDeploying, - "failed": DeploymentStatusFailed, - "notstarted": DeploymentStatusNotStarted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeploymentStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/id_networkmanager.go b/resource-manager/network/2022-09-01/networkmanagers/id_networkmanager.go deleted file mode 100644 index fa90a755a35..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkmanagers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/id_networkmanager_test.go b/resource-manager/network/2022-09-01/networkmanagers/id_networkmanager_test.go deleted file mode 100644 index c20acc4e730..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkmanagers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/method_createorupdate.go b/resource-manager/network/2022-09-01/networkmanagers/method_createorupdate.go deleted file mode 100644 index 69ede157544..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManager -} - -// CreateOrUpdate ... -func (c NetworkManagersClient) CreateOrUpdate(ctx context.Context, id NetworkManagerId, input NetworkManager) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/method_delete.go b/resource-manager/network/2022-09-01/networkmanagers/method_delete.go deleted file mode 100644 index ec825f20cb1..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c NetworkManagersClient) Delete(ctx context.Context, id NetworkManagerId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkManagersClient) DeleteThenPoll(ctx context.Context, id NetworkManagerId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/method_get.go b/resource-manager/network/2022-09-01/networkmanagers/method_get.go deleted file mode 100644 index 99b0c352ea5..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkmanagers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManager -} - -// Get ... -func (c NetworkManagersClient) Get(ctx context.Context, id NetworkManagerId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/method_list.go b/resource-manager/network/2022-09-01/networkmanagers/method_list.go deleted file mode 100644 index 59bd8501371..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/method_list.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkManager -} - -type ListCompleteResult struct { - Items []NetworkManager -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c NetworkManagersClient) List(ctx context.Context, id commonids.ResourceGroupId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkManagers", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkManager `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkManagersClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, NetworkManagerOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkManagersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListOperationOptions, predicate NetworkManagerOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkManager, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/method_listbysubscription.go b/resource-manager/network/2022-09-01/networkmanagers/method_listbysubscription.go deleted file mode 100644 index 55778d0cc05..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/method_listbysubscription.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkManager -} - -type ListBySubscriptionCompleteResult struct { - Items []NetworkManager -} - -type ListBySubscriptionOperationOptions struct { - Top *int64 -} - -func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions { - return ListBySubscriptionOperationOptions{} -} - -func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListBySubscriptionOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// ListBySubscription ... -func (c NetworkManagersClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkManagers", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkManager `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c NetworkManagersClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, NetworkManagerOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkManagersClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate NetworkManagerOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]NetworkManager, 0) - - resp, err := c.ListBySubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/method_networkmanagercommitspost.go b/resource-manager/network/2022-09-01/networkmanagers/method_networkmanagercommitspost.go deleted file mode 100644 index b315295f9ed..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/method_networkmanagercommitspost.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerCommitsPostOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NetworkManagerCommitsPost ... -func (c NetworkManagersClient) NetworkManagerCommitsPost(ctx context.Context, id NetworkManagerId, input NetworkManagerCommit) (result NetworkManagerCommitsPostOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/commit", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NetworkManagerCommitsPostThenPoll performs NetworkManagerCommitsPost then polls until it's completed -func (c NetworkManagersClient) NetworkManagerCommitsPostThenPoll(ctx context.Context, id NetworkManagerId, input NetworkManagerCommit) error { - result, err := c.NetworkManagerCommitsPost(ctx, id, input) - if err != nil { - return fmt.Errorf("performing NetworkManagerCommitsPost: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NetworkManagerCommitsPost: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go b/resource-manager/network/2022-09-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go deleted file mode 100644 index a3aa6c82b2d..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerDeploymentStatusListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerDeploymentStatusListResult -} - -// NetworkManagerDeploymentStatusList ... -func (c NetworkManagersClient) NetworkManagerDeploymentStatusList(ctx context.Context, id NetworkManagerId, input NetworkManagerDeploymentStatusParameter) (result NetworkManagerDeploymentStatusListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listDeploymentStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/method_patch.go b/resource-manager/network/2022-09-01/networkmanagers/method_patch.go deleted file mode 100644 index fa842a793d9..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/method_patch.go +++ /dev/null @@ -1,55 +0,0 @@ -package networkmanagers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PatchOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManager -} - -// Patch ... -func (c NetworkManagersClient) Patch(ctx context.Context, id NetworkManagerId, input PatchObject) (result PatchOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/model_crosstenantscopes.go b/resource-manager/network/2022-09-01/networkmanagers/model_crosstenantscopes.go deleted file mode 100644 index 537d9c70d4a..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/model_crosstenantscopes.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CrossTenantScopes struct { - ManagementGroups *[]string `json:"managementGroups,omitempty"` - Subscriptions *[]string `json:"subscriptions,omitempty"` - TenantId *string `json:"tenantId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanager.go b/resource-manager/network/2022-09-01/networkmanagers/model_networkmanager.go deleted file mode 100644 index 8f98dec3ed2..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanager.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkmanagers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManager struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkManagerProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagercommit.go b/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagercommit.go deleted file mode 100644 index 8649d0c0da8..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagercommit.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerCommit struct { - CommitId *string `json:"commitId,omitempty"` - CommitType ConfigurationType `json:"commitType"` - ConfigurationIds *[]string `json:"configurationIds,omitempty"` - TargetLocations []string `json:"targetLocations"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatus.go b/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatus.go deleted file mode 100644 index 5727d45e848..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatus.go +++ /dev/null @@ -1,31 +0,0 @@ -package networkmanagers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerDeploymentStatus struct { - CommitTime *string `json:"commitTime,omitempty"` - ConfigurationIds *[]string `json:"configurationIds,omitempty"` - DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` - DeploymentType *ConfigurationType `json:"deploymentType,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` - Region *string `json:"region,omitempty"` -} - -func (o *NetworkManagerDeploymentStatus) GetCommitTimeAsTime() (*time.Time, error) { - if o.CommitTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *NetworkManagerDeploymentStatus) SetCommitTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTime = &formatted -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatuslistresult.go b/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatuslistresult.go deleted file mode 100644 index 26a44c297a2..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatuslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerDeploymentStatusListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]NetworkManagerDeploymentStatus `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatusparameter.go b/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatusparameter.go deleted file mode 100644 index 1eb70a07ac3..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerdeploymentstatusparameter.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerDeploymentStatusParameter struct { - DeploymentTypes *[]ConfigurationType `json:"deploymentTypes,omitempty"` - Regions *[]string `json:"regions,omitempty"` - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerproperties.go b/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerproperties.go deleted file mode 100644 index 08fbfdbe8aa..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerProperties struct { - Description *string `json:"description,omitempty"` - NetworkManagerScopeAccesses []ConfigurationType `json:"networkManagerScopeAccesses"` - NetworkManagerScopes NetworkManagerPropertiesNetworkManagerScopes `json:"networkManagerScopes"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerpropertiesnetworkmanagerscopes.go b/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerpropertiesnetworkmanagerscopes.go deleted file mode 100644 index 2a91fc5b601..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/model_networkmanagerpropertiesnetworkmanagerscopes.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerPropertiesNetworkManagerScopes struct { - CrossTenantScopes *[]CrossTenantScopes `json:"crossTenantScopes,omitempty"` - ManagementGroups *[]string `json:"managementGroups,omitempty"` - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/model_patchobject.go b/resource-manager/network/2022-09-01/networkmanagers/model_patchobject.go deleted file mode 100644 index 775ef598685..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/model_patchobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PatchObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/predicates.go b/resource-manager/network/2022-09-01/networkmanagers/predicates.go deleted file mode 100644 index 7c1597c2666..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkManagerOperationPredicate) Matches(input NetworkManager) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/networkmanagers/version.go b/resource-manager/network/2022-09-01/networkmanagers/version.go deleted file mode 100644 index e6778d9f137..00000000000 --- a/resource-manager/network/2022-09-01/networkmanagers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanagers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagers/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/README.md b/resource-manager/network/2022-09-01/networkprofiles/README.md deleted file mode 100644 index 3d0fe43ba74..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/README.md +++ /dev/null @@ -1,124 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkprofiles` Documentation - -The `networkprofiles` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkprofiles" -``` - - -### Client Initialization - -```go -client := networkprofiles.NewNetworkProfilesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkProfilesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkprofiles.NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - -payload := networkprofiles.NetworkProfile{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkProfilesClient.Delete` - -```go -ctx := context.TODO() -id := networkprofiles.NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkProfilesClient.Get` - -```go -ctx := context.TODO() -id := networkprofiles.NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - -read, err := client.Get(ctx, id, networkprofiles.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkProfilesClient.List` - -```go -ctx := context.TODO() -id := networkprofiles.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkProfilesClient.ListAll` - -```go -ctx := context.TODO() -id := networkprofiles.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkProfilesClient.UpdateTags` - -```go -ctx := context.TODO() -id := networkprofiles.NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - -payload := networkprofiles.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/networkprofiles/client.go b/resource-manager/network/2022-09-01/networkprofiles/client.go deleted file mode 100644 index c0d65005107..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkprofiles - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkProfilesClient struct { - Client *resourcemanager.Client -} - -func NewNetworkProfilesClientWithBaseURI(api environments.Api) (*NetworkProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkprofiles", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkProfilesClient: %+v", err) - } - - return &NetworkProfilesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/constants.go b/resource-manager/network/2022-09-01/networkprofiles/constants.go deleted file mode 100644 index bed0530f6ae..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package networkprofiles - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/id_networkprofile.go b/resource-manager/network/2022-09-01/networkprofiles/id_networkprofile.go deleted file mode 100644 index 0cacfb77d6a..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/id_networkprofile.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkprofiles - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkProfileId{} - -// NetworkProfileId is a struct representing the Resource ID for a Network Profile -type NetworkProfileId struct { - SubscriptionId string - ResourceGroupName string - NetworkProfileName string -} - -// NewNetworkProfileID returns a new NetworkProfileId struct -func NewNetworkProfileID(subscriptionId string, resourceGroupName string, networkProfileName string) NetworkProfileId { - return NetworkProfileId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkProfileName: networkProfileName, - } -} - -// ParseNetworkProfileID parses 'input' into a NetworkProfileId -func ParseNetworkProfileID(input string) (*NetworkProfileId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkProfileId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkProfileName, ok = parsed.Parsed["networkProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkProfileName", *parsed) - } - - return &id, nil -} - -// ParseNetworkProfileIDInsensitively parses 'input' case-insensitively into a NetworkProfileId -// note: this method should only be used for API response data and not user input -func ParseNetworkProfileIDInsensitively(input string) (*NetworkProfileId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkProfileId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkProfileName, ok = parsed.Parsed["networkProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkProfileName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkProfileID checks that 'input' can be parsed as a Network Profile ID -func ValidateNetworkProfileID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkProfileID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Profile ID -func (id NetworkProfileId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkProfiles/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkProfileName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Profile ID -func (id NetworkProfileId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkProfiles", "networkProfiles", "networkProfiles"), - resourceids.UserSpecifiedSegment("networkProfileName", "networkProfileValue"), - } -} - -// String returns a human-readable description of this Network Profile ID -func (id NetworkProfileId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Profile Name: %q", id.NetworkProfileName), - } - return fmt.Sprintf("Network Profile (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/id_networkprofile_test.go b/resource-manager/network/2022-09-01/networkprofiles/id_networkprofile_test.go deleted file mode 100644 index d5bf7814b6d..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/id_networkprofile_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkprofiles - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkProfileId{} - -func TestNewNetworkProfileID(t *testing.T) { - id := NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkProfileName != "networkProfileValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkProfileName'", id.NetworkProfileName, "networkProfileValue") - } -} - -func TestFormatNetworkProfileID(t *testing.T) { - actual := NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkProfileID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkProfileId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue", - Expected: &NetworkProfileId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkProfileName: "networkProfileValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkProfileID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkProfileName != v.Expected.NetworkProfileName { - t.Fatalf("Expected %q but got %q for NetworkProfileName", v.Expected.NetworkProfileName, actual.NetworkProfileName) - } - - } -} - -func TestParseNetworkProfileIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkProfileId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkPrOfIlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue", - Expected: &NetworkProfileId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkProfileName: "networkProfileValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkPrOfIlEs/nEtWoRkPrOfIlEvAlUe", - Expected: &NetworkProfileId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkProfileName: "nEtWoRkPrOfIlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkPrOfIlEs/nEtWoRkPrOfIlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkProfileIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkProfileName != v.Expected.NetworkProfileName { - t.Fatalf("Expected %q but got %q for NetworkProfileName", v.Expected.NetworkProfileName, actual.NetworkProfileName) - } - - } -} - -func TestSegmentsForNetworkProfileId(t *testing.T) { - segments := NetworkProfileId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkProfileId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/method_createorupdate.go b/resource-manager/network/2022-09-01/networkprofiles/method_createorupdate.go deleted file mode 100644 index cd2ab2921ac..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkprofiles - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkProfile -} - -// CreateOrUpdate ... -func (c NetworkProfilesClient) CreateOrUpdate(ctx context.Context, id NetworkProfileId, input NetworkProfile) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/method_delete.go b/resource-manager/network/2022-09-01/networkprofiles/method_delete.go deleted file mode 100644 index c5564f89c85..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package networkprofiles - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkProfilesClient) Delete(ctx context.Context, id NetworkProfileId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkProfilesClient) DeleteThenPoll(ctx context.Context, id NetworkProfileId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/method_get.go b/resource-manager/network/2022-09-01/networkprofiles/method_get.go deleted file mode 100644 index ed06c4e9d88..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package networkprofiles - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkProfile -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NetworkProfilesClient) Get(ctx context.Context, id NetworkProfileId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/method_list.go b/resource-manager/network/2022-09-01/networkprofiles/method_list.go deleted file mode 100644 index bd5d5250f77..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkprofiles - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkProfile -} - -type ListCompleteResult struct { - Items []NetworkProfile -} - -// List ... -func (c NetworkProfilesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkProfiles", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkProfile `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkProfilesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkProfileOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkProfilesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkProfileOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkProfile, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/method_listall.go b/resource-manager/network/2022-09-01/networkprofiles/method_listall.go deleted file mode 100644 index ae400cdd0fc..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkprofiles - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkProfile -} - -type ListAllCompleteResult struct { - Items []NetworkProfile -} - -// ListAll ... -func (c NetworkProfilesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkProfiles", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkProfile `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c NetworkProfilesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, NetworkProfileOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkProfilesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkProfileOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]NetworkProfile, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/method_updatetags.go b/resource-manager/network/2022-09-01/networkprofiles/method_updatetags.go deleted file mode 100644 index bf26d755460..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package networkprofiles - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkProfile -} - -// UpdateTags ... -func (c NetworkProfilesClient) UpdateTags(ctx context.Context, id NetworkProfileId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 0452928be63..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 03bee9ad4ae..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 7a1eea7761a..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 4e9c7a30701..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index b3a527e5678..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/networkprofiles/model_applicationsecuritygroup.go deleted file mode 100644 index a3c9e8c4026..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 962d80f7a83..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_backendaddresspool.go b/resource-manager/network/2022-09-01/networkprofiles/model_backendaddresspool.go deleted file mode 100644 index b7491b172ed..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 9d09d64790b..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterface.go b/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterface.go deleted file mode 100644 index 8319fdf7442..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterface.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterface struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceconfiguration.go b/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceconfiguration.go deleted file mode 100644 index 1d0f89e15b4..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfaceConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceconfigurationpropertiesformat.go deleted file mode 100644 index 1e85f54153a..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceconfigurationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { - ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"` - IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceipconfiguration.go deleted file mode 100644 index e74b8c6d59e..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 07db6c62c7a..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfacepropertiesformat.go deleted file mode 100644 index 1c1efc89484..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_containernetworkinterfacepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfacePropertiesFormat struct { - Container *SubResource `json:"container,omitempty"` - ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"` - IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 4860aa0e2f3..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_ddossettings.go b/resource-manager/network/2022-09-01/networkprofiles/model_ddossettings.go deleted file mode 100644 index c5dc78bcc06..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_delegation.go b/resource-manager/network/2022-09-01/networkprofiles/model_delegation.go deleted file mode 100644 index 0195b7d30c3..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_flowlog.go b/resource-manager/network/2022-09-01/networkprofiles/model_flowlog.go deleted file mode 100644 index f60e3c562cb..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/networkprofiles/model_flowlogformatparameters.go deleted file mode 100644 index b92557232ff..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_flowlogpropertiesformat.go deleted file mode 100644 index adaaab9bc0c..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/networkprofiles/model_frontendipconfiguration.go deleted file mode 100644 index db5d6938998..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 82aea183299..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/networkprofiles/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index cb7a2956f0e..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_inboundnatrule.go b/resource-manager/network/2022-09-01/networkprofiles/model_inboundnatrule.go deleted file mode 100644 index 6b089d6c65c..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 0a3a0779932..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_ipconfiguration.go b/resource-manager/network/2022-09-01/networkprofiles/model_ipconfiguration.go deleted file mode 100644 index 940760b2c92..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationprofile.go deleted file mode 100644 index 373777029b1..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index ad8fa03c4f4..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index b90aa191e92..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_iptag.go b/resource-manager/network/2022-09-01/networkprofiles/model_iptag.go deleted file mode 100644 index 2e45e454060..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/networkprofiles/model_loadbalancerbackendaddress.go deleted file mode 100644 index 4484795804f..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 203a8fab13e..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_natgateway.go b/resource-manager/network/2022-09-01/networkprofiles/model_natgateway.go deleted file mode 100644 index 6197c623763..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_natgatewaypropertiesformat.go deleted file mode 100644 index 1c1b918fa25..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_natgatewaysku.go b/resource-manager/network/2022-09-01/networkprofiles/model_natgatewaysku.go deleted file mode 100644 index c3c91d290f2..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_natruleportmapping.go b/resource-manager/network/2022-09-01/networkprofiles/model_natruleportmapping.go deleted file mode 100644 index 033011c8a8b..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterface.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkinterface.go deleted file mode 100644 index 68e610eeff9..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacednssettings.go deleted file mode 100644 index 8451913a32f..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 139342da931..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 2456f55b927..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 2d7d8aa1bc8..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 1ea75a21d1e..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacetapconfiguration.go deleted file mode 100644 index daf580431c6..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 8a7e2121888..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkprofile.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkprofile.go deleted file mode 100644 index b11865bfdd6..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkprofile.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkProfilePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networkprofilepropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_networkprofilepropertiesformat.go deleted file mode 100644 index cf66d34892c..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networkprofilepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkProfilePropertiesFormat struct { - ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"` - ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/networkprofiles/model_networksecuritygroup.go deleted file mode 100644 index b24d89a9bdf..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 4a7e6641883..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpoint.go b/resource-manager/network/2022-09-01/networkprofiles/model_privateendpoint.go deleted file mode 100644 index 5fcc4823c22..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointconnection.go deleted file mode 100644 index 5ef26aa759d..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointconnectionproperties.go deleted file mode 100644 index 80bdd4f7f51..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointipconfiguration.go deleted file mode 100644 index eb56313d0fe..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index c252cc443f7..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointproperties.go deleted file mode 100644 index d63068a30ea..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkservice.go b/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkservice.go deleted file mode 100644 index 13e1f313103..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnection.go deleted file mode 100644 index f7c7b981511..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 36ba1ab614d..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 6c4d7083fb9..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 556206b6040..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 7cdb9347d51..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceproperties.go deleted file mode 100644 index bc001bea3c0..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddress.go b/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddress.go deleted file mode 100644 index 040a0bb56e8..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddressdnssettings.go deleted file mode 100644 index 0aabf1df8a7..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 9e8c3ce846b..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddresssku.go deleted file mode 100644 index af7b63fcdc5..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/networkprofiles/model_resourcenavigationlink.go deleted file mode 100644 index d8706b6bc4d..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_resourcenavigationlinkformat.go deleted file mode 100644 index b9a518cd2ae..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_resourceset.go b/resource-manager/network/2022-09-01/networkprofiles/model_resourceset.go deleted file mode 100644 index 028384b4467..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/networkprofiles/model_retentionpolicyparameters.go deleted file mode 100644 index a39da241fee..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_route.go b/resource-manager/network/2022-09-01/networkprofiles/model_route.go deleted file mode 100644 index 01d1b1aee3b..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_routepropertiesformat.go deleted file mode 100644 index a0fba15da36..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_routetable.go b/resource-manager/network/2022-09-01/networkprofiles/model_routetable.go deleted file mode 100644 index e98510e4a99..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_routetablepropertiesformat.go deleted file mode 100644 index d3d001ea19c..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_securityrule.go b/resource-manager/network/2022-09-01/networkprofiles/model_securityrule.go deleted file mode 100644 index d3a303b69a8..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_securityrulepropertiesformat.go deleted file mode 100644 index 5a6f0550760..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/networkprofiles/model_serviceassociationlink.go deleted file mode 100644 index 185baa31acb..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index a8ddcda5b29..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_servicedelegationpropertiesformat.go deleted file mode 100644 index bbe89cb1074..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicy.go deleted file mode 100644 index fc7682e49f7..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 49d3abcfdf1..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 59c9a98a4df..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index c41bd5c801b..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpropertiesformat.go deleted file mode 100644 index e791f2598de..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_subnet.go b/resource-manager/network/2022-09-01/networkprofiles/model_subnet.go deleted file mode 100644 index 92e0d90839e..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_subnetpropertiesformat.go deleted file mode 100644 index bccc38cd921..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_subresource.go b/resource-manager/network/2022-09-01/networkprofiles/model_subresource.go deleted file mode 100644 index e7710003aae..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_tagsobject.go b/resource-manager/network/2022-09-01/networkprofiles/model_tagsobject.go deleted file mode 100644 index 4b300699106..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/networkprofiles/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 43e8bd0f29a..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/networkprofiles/model_trafficanalyticsproperties.go deleted file mode 100644 index 67da0952e73..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/networkprofiles/model_virtualnetworktap.go deleted file mode 100644 index 21bb960f571..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/networkprofiles/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 3e8521e5beb..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/predicates.go b/resource-manager/network/2022-09-01/networkprofiles/predicates.go deleted file mode 100644 index c8b72ff46b2..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkProfileOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkProfileOperationPredicate) Matches(input NetworkProfile) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/networkprofiles/version.go b/resource-manager/network/2022-09-01/networkprofiles/version.go deleted file mode 100644 index 15811e6b81a..00000000000 --- a/resource-manager/network/2022-09-01/networkprofiles/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkprofiles/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/README.md b/resource-manager/network/2022-09-01/networksecuritygroups/README.md deleted file mode 100644 index 87179cad23d..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networksecuritygroups` Documentation - -The `networksecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networksecuritygroups" -``` - - -### Client Initialization - -```go -client := networksecuritygroups.NewNetworkSecurityGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkSecurityGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -payload := networksecuritygroups.NetworkSecurityGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.Delete` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.Get` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -read, err := client.Get(ctx, id, networksecuritygroups.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.List` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.ListAll` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.UpdateTags` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -payload := networksecuritygroups.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/client.go b/resource-manager/network/2022-09-01/networksecuritygroups/client.go deleted file mode 100644 index a297cbae4a7..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networksecuritygroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkSecurityGroupsClientWithBaseURI(api environments.Api) (*NetworkSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networksecuritygroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkSecurityGroupsClient: %+v", err) - } - - return &NetworkSecurityGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/constants.go b/resource-manager/network/2022-09-01/networksecuritygroups/constants.go deleted file mode 100644 index 420a7fb5fc6..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package networksecuritygroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/id_networksecuritygroup.go b/resource-manager/network/2022-09-01/networksecuritygroups/id_networksecuritygroup.go deleted file mode 100644 index 976358d972c..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/id_networksecuritygroup.go +++ /dev/null @@ -1,127 +0,0 @@ -package networksecuritygroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkSecurityGroupId{} - -// NetworkSecurityGroupId is a struct representing the Resource ID for a Network Security Group -type NetworkSecurityGroupId struct { - SubscriptionId string - ResourceGroupName string - NetworkSecurityGroupName string -} - -// NewNetworkSecurityGroupID returns a new NetworkSecurityGroupId struct -func NewNetworkSecurityGroupID(subscriptionId string, resourceGroupName string, networkSecurityGroupName string) NetworkSecurityGroupId { - return NetworkSecurityGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkSecurityGroupName: networkSecurityGroupName, - } -} - -// ParseNetworkSecurityGroupID parses 'input' into a NetworkSecurityGroupId -func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkSecurityGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ParseNetworkSecurityGroupIDInsensitively parses 'input' case-insensitively into a NetworkSecurityGroupId -// note: this method should only be used for API response data and not user input -func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkSecurityGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkSecurityGroupID checks that 'input' can be parsed as a Network Security Group ID -func ValidateNetworkSecurityGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkSecurityGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Security Group ID -func (id NetworkSecurityGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkSecurityGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Security Group ID -func (id NetworkSecurityGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkSecurityGroups", "networkSecurityGroups", "networkSecurityGroups"), - resourceids.UserSpecifiedSegment("networkSecurityGroupName", "networkSecurityGroupValue"), - } -} - -// String returns a human-readable description of this Network Security Group ID -func (id NetworkSecurityGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Security Group Name: %q", id.NetworkSecurityGroupName), - } - return fmt.Sprintf("Network Security Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/id_networksecuritygroup_test.go b/resource-manager/network/2022-09-01/networksecuritygroups/id_networksecuritygroup_test.go deleted file mode 100644 index bb481c980cc..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/id_networksecuritygroup_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networksecuritygroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkSecurityGroupId{} - -func TestNewNetworkSecurityGroupID(t *testing.T) { - id := NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkSecurityGroupName != "networkSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkSecurityGroupName'", id.NetworkSecurityGroupName, "networkSecurityGroupValue") - } -} - -func TestFormatNetworkSecurityGroupID(t *testing.T) { - actual := NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkSecurityGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkSecurityGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - } -} - -func TestParseNetworkSecurityGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkSecurityGroupName: "nEtWoRkSeCuRiTyGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkSecurityGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - } -} - -func TestSegmentsForNetworkSecurityGroupId(t *testing.T) { - segments := NetworkSecurityGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkSecurityGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/method_createorupdate.go b/resource-manager/network/2022-09-01/networksecuritygroups/method_createorupdate.go deleted file mode 100644 index 177cdcd4d7b..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c NetworkSecurityGroupsClient) CreateOrUpdate(ctx context.Context, id NetworkSecurityGroupId, input NetworkSecurityGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c NetworkSecurityGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id NetworkSecurityGroupId, input NetworkSecurityGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/method_delete.go b/resource-manager/network/2022-09-01/networksecuritygroups/method_delete.go deleted file mode 100644 index 103ca330a5b..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkSecurityGroupsClient) Delete(ctx context.Context, id NetworkSecurityGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkSecurityGroupsClient) DeleteThenPoll(ctx context.Context, id NetworkSecurityGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/method_get.go b/resource-manager/network/2022-09-01/networksecuritygroups/method_get.go deleted file mode 100644 index 7eeb1b8f506..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkSecurityGroup -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NetworkSecurityGroupsClient) Get(ctx context.Context, id NetworkSecurityGroupId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/method_list.go b/resource-manager/network/2022-09-01/networksecuritygroups/method_list.go deleted file mode 100644 index aa3cb9f49b4..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkSecurityGroup -} - -type ListCompleteResult struct { - Items []NetworkSecurityGroup -} - -// List ... -func (c NetworkSecurityGroupsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkSecurityGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkSecurityGroupsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkSecurityGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkSecurityGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkSecurityGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkSecurityGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/method_listall.go b/resource-manager/network/2022-09-01/networksecuritygroups/method_listall.go deleted file mode 100644 index 55f720f0ff8..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkSecurityGroup -} - -type ListAllCompleteResult struct { - Items []NetworkSecurityGroup -} - -// ListAll ... -func (c NetworkSecurityGroupsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkSecurityGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c NetworkSecurityGroupsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, NetworkSecurityGroupOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkSecurityGroupsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkSecurityGroupOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]NetworkSecurityGroup, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/method_updatetags.go b/resource-manager/network/2022-09-01/networksecuritygroups/method_updatetags.go deleted file mode 100644 index 005851871a6..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkSecurityGroup -} - -// UpdateTags ... -func (c NetworkSecurityGroupsClient) UpdateTags(ctx context.Context, id NetworkSecurityGroupId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 62c1c3109c0..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 17bf1792be8..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index d96a3011a25..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewayipconfiguration.go deleted file mode 100644 index ebf65a382d3..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index e6f11b94c01..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationsecuritygroup.go deleted file mode 100644 index 50a0b0f53a7..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 5443c32837a..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_backendaddresspool.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_backendaddresspool.go deleted file mode 100644 index 0a216964329..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 31e2ba392e4..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index d6dd55786fc..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_ddossettings.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_ddossettings.go deleted file mode 100644 index 4b0d4e3dc9b..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_delegation.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_delegation.go deleted file mode 100644 index 42805b01ada..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_flowlog.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_flowlog.go deleted file mode 100644 index eee82c2d3b6..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_flowlogformatparameters.go deleted file mode 100644 index fdad354f6b8..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_flowlogpropertiesformat.go deleted file mode 100644 index bab4d923b54..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_frontendipconfiguration.go deleted file mode 100644 index 24b23145d47..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 5322ea68f34..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index fff6be9708f..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_inboundnatrule.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_inboundnatrule.go deleted file mode 100644 index 6391fbf065c..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 725fec85751..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfiguration.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfiguration.go deleted file mode 100644 index b9eec53b855..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationprofile.go deleted file mode 100644 index 4885926d9aa..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index ec7f93c0f2b..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index ca12abb4992..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_iptag.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_iptag.go deleted file mode 100644 index 3f5348f3776..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_loadbalancerbackendaddress.go deleted file mode 100644 index 8c8a91a5d1f..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 1843fe9fb85..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_natgateway.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_natgateway.go deleted file mode 100644 index 8d6ecb14bc5..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_natgatewaypropertiesformat.go deleted file mode 100644 index 389e752880f..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_natgatewaysku.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_natgatewaysku.go deleted file mode 100644 index 5e842304f20..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_natruleportmapping.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_natruleportmapping.go deleted file mode 100644 index 30f812c7c78..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterface.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterface.go deleted file mode 100644 index a4a62c2d6ea..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacednssettings.go deleted file mode 100644 index f3819f01474..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 40cf733a9f0..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index caa03f6e413..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 4199a4aa864..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacepropertiesformat.go deleted file mode 100644 index e351f4494cc..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 5e60c1bbfc4..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index d110d193645..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networksecuritygroup.go deleted file mode 100644 index dd84b3efc89..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 704a86496f2..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpoint.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpoint.go deleted file mode 100644 index 753cd13341b..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointconnection.go deleted file mode 100644 index b28eaa1a213..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointconnectionproperties.go deleted file mode 100644 index fd29dace286..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointipconfiguration.go deleted file mode 100644 index af86de8f897..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 550ef75ec1d..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointproperties.go deleted file mode 100644 index 36ad3ca4ffb..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkservice.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkservice.go deleted file mode 100644 index f880da9d89d..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnection.go deleted file mode 100644 index 3a721ae3637..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 50b8f7e352f..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 619e38d131d..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index dcbf418522b..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index abc8d2f4904..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceproperties.go deleted file mode 100644 index 5d51b182a49..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddress.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddress.go deleted file mode 100644 index 7b797b006f5..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddressdnssettings.go deleted file mode 100644 index 9f75eb76e1f..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddresspropertiesformat.go deleted file mode 100644 index cac3fce28ce..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddresssku.go deleted file mode 100644 index 24fe5573abd..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_resourcenavigationlink.go deleted file mode 100644 index 8d6ec604942..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_resourcenavigationlinkformat.go deleted file mode 100644 index 0bf207481cb..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_resourceset.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_resourceset.go deleted file mode 100644 index 751d06dd732..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_retentionpolicyparameters.go deleted file mode 100644 index b1e9035c2f8..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_route.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_route.go deleted file mode 100644 index 9b712ab4e81..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_routepropertiesformat.go deleted file mode 100644 index 3225a4673f2..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_routetable.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_routetable.go deleted file mode 100644 index 9aff39efe9e..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_routetablepropertiesformat.go deleted file mode 100644 index 5eee448b410..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_securityrule.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_securityrule.go deleted file mode 100644 index 1119115e9eb..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_securityrulepropertiesformat.go deleted file mode 100644 index 01270911682..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceassociationlink.go deleted file mode 100644 index 050ee6cb43f..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 81a4ac35e4a..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 089e2e1dc0c..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicy.go deleted file mode 100644 index 6ca2d4bff53..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 2a8648b7931..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index c70380704b7..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 3000410cde3..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 299fb5fdadb..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_subnet.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_subnet.go deleted file mode 100644 index 499cc289ec3..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_subnetpropertiesformat.go deleted file mode 100644 index 210e772e083..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_subresource.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_subresource.go deleted file mode 100644 index 8fa7fe6b59d..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_tagsobject.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_tagsobject.go deleted file mode 100644 index bb9ad0a6373..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index ddb354c4a7c..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_trafficanalyticsproperties.go deleted file mode 100644 index f74d8a12ecb..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_virtualnetworktap.go deleted file mode 100644 index cfc1b073467..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/networksecuritygroups/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 01620fae8c8..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/predicates.go b/resource-manager/network/2022-09-01/networksecuritygroups/predicates.go deleted file mode 100644 index b9f6d3f3df5..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkSecurityGroupOperationPredicate) Matches(input NetworkSecurityGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/networksecuritygroups/version.go b/resource-manager/network/2022-09-01/networksecuritygroups/version.go deleted file mode 100644 index 285df7a9ba5..00000000000 --- a/resource-manager/network/2022-09-01/networksecuritygroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecuritygroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/README.md b/resource-manager/network/2022-09-01/networkvirtualappliances/README.md deleted file mode 100644 index 4cece92d20c..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/README.md +++ /dev/null @@ -1,137 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkvirtualappliances` Documentation - -The `networkvirtualappliances` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkvirtualappliances" -``` - - -### Client Initialization - -```go -client := networkvirtualappliances.NewNetworkVirtualAppliancesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -payload := networkvirtualappliances.NetworkVirtualAppliance{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.Delete` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.Get` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -read, err := client.Get(ctx, id, networkvirtualappliances.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.InboundSecurityRuleCreateOrUpdate` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewInboundSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "inboundSecurityRuleValue") - -payload := networkvirtualappliances.InboundSecurityRule{ - // ... -} - - -if err := client.InboundSecurityRuleCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.List` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.UpdateTags` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -payload := networkvirtualappliances.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/client.go b/resource-manager/network/2022-09-01/networkvirtualappliances/client.go deleted file mode 100644 index 78dbf8c120b..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkvirtualappliances - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualAppliancesClient struct { - Client *resourcemanager.Client -} - -func NewNetworkVirtualAppliancesClientWithBaseURI(api environments.Api) (*NetworkVirtualAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkvirtualappliances", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkVirtualAppliancesClient: %+v", err) - } - - return &NetworkVirtualAppliancesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/constants.go b/resource-manager/network/2022-09-01/networkvirtualappliances/constants.go deleted file mode 100644 index d744d8f8da2..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package networkvirtualappliances - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRulesProtocol string - -const ( - InboundSecurityRulesProtocolTCP InboundSecurityRulesProtocol = "TCP" - InboundSecurityRulesProtocolUDP InboundSecurityRulesProtocol = "UDP" -) - -func PossibleValuesForInboundSecurityRulesProtocol() []string { - return []string{ - string(InboundSecurityRulesProtocolTCP), - string(InboundSecurityRulesProtocolUDP), - } -} - -func (s *InboundSecurityRulesProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseInboundSecurityRulesProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseInboundSecurityRulesProtocol(input string) (*InboundSecurityRulesProtocol, error) { - vals := map[string]InboundSecurityRulesProtocol{ - "tcp": InboundSecurityRulesProtocolTCP, - "udp": InboundSecurityRulesProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := InboundSecurityRulesProtocol(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/id_inboundsecurityrule.go b/resource-manager/network/2022-09-01/networkvirtualappliances/id_inboundsecurityrule.go deleted file mode 100644 index 57ed3f89cae..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/id_inboundsecurityrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkvirtualappliances - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = InboundSecurityRuleId{} - -// InboundSecurityRuleId is a struct representing the Resource ID for a Inbound Security Rule -type InboundSecurityRuleId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string - InboundSecurityRuleName string -} - -// NewInboundSecurityRuleID returns a new InboundSecurityRuleId struct -func NewInboundSecurityRuleID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string, inboundSecurityRuleName string) InboundSecurityRuleId { - return InboundSecurityRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - InboundSecurityRuleName: inboundSecurityRuleName, - } -} - -// ParseInboundSecurityRuleID parses 'input' into a InboundSecurityRuleId -func ParseInboundSecurityRuleID(input string) (*InboundSecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(InboundSecurityRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := InboundSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.InboundSecurityRuleName, ok = parsed.Parsed["inboundSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundSecurityRuleName", *parsed) - } - - return &id, nil -} - -// ParseInboundSecurityRuleIDInsensitively parses 'input' case-insensitively into a InboundSecurityRuleId -// note: this method should only be used for API response data and not user input -func ParseInboundSecurityRuleIDInsensitively(input string) (*InboundSecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(InboundSecurityRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := InboundSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.InboundSecurityRuleName, ok = parsed.Parsed["inboundSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundSecurityRuleName", *parsed) - } - - return &id, nil -} - -// ValidateInboundSecurityRuleID checks that 'input' can be parsed as a Inbound Security Rule ID -func ValidateInboundSecurityRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseInboundSecurityRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Inbound Security Rule ID -func (id InboundSecurityRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s/inboundSecurityRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName, id.InboundSecurityRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Inbound Security Rule ID -func (id InboundSecurityRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - resourceids.StaticSegment("staticInboundSecurityRules", "inboundSecurityRules", "inboundSecurityRules"), - resourceids.UserSpecifiedSegment("inboundSecurityRuleName", "inboundSecurityRuleValue"), - } -} - -// String returns a human-readable description of this Inbound Security Rule ID -func (id InboundSecurityRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - fmt.Sprintf("Inbound Security Rule Name: %q", id.InboundSecurityRuleName), - } - return fmt.Sprintf("Inbound Security Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/id_inboundsecurityrule_test.go b/resource-manager/network/2022-09-01/networkvirtualappliances/id_inboundsecurityrule_test.go deleted file mode 100644 index dc2ebe0d44c..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/id_inboundsecurityrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkvirtualappliances - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = InboundSecurityRuleId{} - -func TestNewInboundSecurityRuleID(t *testing.T) { - id := NewInboundSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "inboundSecurityRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } - - if id.InboundSecurityRuleName != "inboundSecurityRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'InboundSecurityRuleName'", id.InboundSecurityRuleName, "inboundSecurityRuleValue") - } -} - -func TestFormatInboundSecurityRuleID(t *testing.T) { - actual := NewInboundSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "inboundSecurityRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseInboundSecurityRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *InboundSecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue", - Expected: &InboundSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - InboundSecurityRuleName: "inboundSecurityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseInboundSecurityRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.InboundSecurityRuleName != v.Expected.InboundSecurityRuleName { - t.Fatalf("Expected %q but got %q for InboundSecurityRuleName", v.Expected.InboundSecurityRuleName, actual.InboundSecurityRuleName) - } - - } -} - -func TestParseInboundSecurityRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *InboundSecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/iNbOuNdSeCuRiTyRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue", - Expected: &InboundSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - InboundSecurityRuleName: "inboundSecurityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/iNbOuNdSeCuRiTyRuLeS/iNbOuNdSeCuRiTyRuLeVaLuE", - Expected: &InboundSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - InboundSecurityRuleName: "iNbOuNdSeCuRiTyRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/iNbOuNdSeCuRiTyRuLeS/iNbOuNdSeCuRiTyRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseInboundSecurityRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.InboundSecurityRuleName != v.Expected.InboundSecurityRuleName { - t.Fatalf("Expected %q but got %q for InboundSecurityRuleName", v.Expected.InboundSecurityRuleName, actual.InboundSecurityRuleName) - } - - } -} - -func TestSegmentsForInboundSecurityRuleId(t *testing.T) { - segments := InboundSecurityRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("InboundSecurityRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/id_networkvirtualappliance.go b/resource-manager/network/2022-09-01/networkvirtualappliances/id_networkvirtualappliance.go deleted file mode 100644 index c4feaf36235..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/id_networkvirtualappliance.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkvirtualappliances - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -// NetworkVirtualApplianceId is a struct representing the Resource ID for a Network Virtual Appliance -type NetworkVirtualApplianceId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string -} - -// NewNetworkVirtualApplianceID returns a new NetworkVirtualApplianceId struct -func NewNetworkVirtualApplianceID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string) NetworkVirtualApplianceId { - return NetworkVirtualApplianceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - } -} - -// ParseNetworkVirtualApplianceID parses 'input' into a NetworkVirtualApplianceId -func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ParseNetworkVirtualApplianceIDInsensitively parses 'input' case-insensitively into a NetworkVirtualApplianceId -// note: this method should only be used for API response data and not user input -func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkVirtualApplianceID checks that 'input' can be parsed as a Network Virtual Appliance ID -func ValidateNetworkVirtualApplianceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkVirtualApplianceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - } -} - -// String returns a human-readable description of this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - } - return fmt.Sprintf("Network Virtual Appliance (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/id_networkvirtualappliance_test.go b/resource-manager/network/2022-09-01/networkvirtualappliances/id_networkvirtualappliance_test.go deleted file mode 100644 index 3d16176db6a..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/id_networkvirtualappliance_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkvirtualappliances - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -func TestNewNetworkVirtualApplianceID(t *testing.T) { - id := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } -} - -func TestFormatNetworkVirtualApplianceID(t *testing.T) { - actual := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkVirtualApplianceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestParseNetworkVirtualApplianceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestSegmentsForNetworkVirtualApplianceId(t *testing.T) { - segments := NetworkVirtualApplianceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkVirtualApplianceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/method_createorupdate.go b/resource-manager/network/2022-09-01/networkvirtualappliances/method_createorupdate.go deleted file mode 100644 index 1730b596e66..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c NetworkVirtualAppliancesClient) CreateOrUpdate(ctx context.Context, id NetworkVirtualApplianceId, input NetworkVirtualAppliance) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c NetworkVirtualAppliancesClient) CreateOrUpdateThenPoll(ctx context.Context, id NetworkVirtualApplianceId, input NetworkVirtualAppliance) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/method_delete.go b/resource-manager/network/2022-09-01/networkvirtualappliances/method_delete.go deleted file mode 100644 index 9eb9b6f13ac..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkVirtualAppliancesClient) Delete(ctx context.Context, id NetworkVirtualApplianceId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkVirtualAppliancesClient) DeleteThenPoll(ctx context.Context, id NetworkVirtualApplianceId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/method_get.go b/resource-manager/network/2022-09-01/networkvirtualappliances/method_get.go deleted file mode 100644 index e750e7bc23c..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkVirtualAppliance -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NetworkVirtualAppliancesClient) Get(ctx context.Context, id NetworkVirtualApplianceId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/method_inboundsecurityrulecreateorupdate.go b/resource-manager/network/2022-09-01/networkvirtualappliances/method_inboundsecurityrulecreateorupdate.go deleted file mode 100644 index d7c19477e5b..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/method_inboundsecurityrulecreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRuleCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// InboundSecurityRuleCreateOrUpdate ... -func (c NetworkVirtualAppliancesClient) InboundSecurityRuleCreateOrUpdate(ctx context.Context, id InboundSecurityRuleId, input InboundSecurityRule) (result InboundSecurityRuleCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// InboundSecurityRuleCreateOrUpdateThenPoll performs InboundSecurityRuleCreateOrUpdate then polls until it's completed -func (c NetworkVirtualAppliancesClient) InboundSecurityRuleCreateOrUpdateThenPoll(ctx context.Context, id InboundSecurityRuleId, input InboundSecurityRule) error { - result, err := c.InboundSecurityRuleCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing InboundSecurityRuleCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after InboundSecurityRuleCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/method_list.go b/resource-manager/network/2022-09-01/networkvirtualappliances/method_list.go deleted file mode 100644 index a9d87cc79e6..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkVirtualAppliance -} - -type ListCompleteResult struct { - Items []NetworkVirtualAppliance -} - -// List ... -func (c NetworkVirtualAppliancesClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkVirtualAppliances", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkVirtualAppliance `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkVirtualAppliancesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkVirtualApplianceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkVirtualAppliancesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkVirtualApplianceOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkVirtualAppliance, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/networkvirtualappliances/method_listbyresourcegroup.go deleted file mode 100644 index 57def9f778d..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkVirtualAppliance -} - -type ListByResourceGroupCompleteResult struct { - Items []NetworkVirtualAppliance -} - -// ListByResourceGroup ... -func (c NetworkVirtualAppliancesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkVirtualAppliances", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkVirtualAppliance `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c NetworkVirtualAppliancesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, NetworkVirtualApplianceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkVirtualAppliancesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkVirtualApplianceOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]NetworkVirtualAppliance, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/method_updatetags.go b/resource-manager/network/2022-09-01/networkvirtualappliances/method_updatetags.go deleted file mode 100644 index c79705d335a..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkVirtualAppliance -} - -// UpdateTags ... -func (c NetworkVirtualAppliancesClient) UpdateTags(ctx context.Context, id NetworkVirtualApplianceId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_delegationproperties.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_delegationproperties.go deleted file mode 100644 index cf2170e1c38..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_delegationproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DelegationProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityrule.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityrule.go deleted file mode 100644 index f921a8c6534..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundSecurityRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityruleproperties.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityruleproperties.go deleted file mode 100644 index 11569615b5c..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityruleproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRuleProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]InboundSecurityRules `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityrules.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityrules.go deleted file mode 100644 index c03db57794b..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_inboundsecurityrules.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRules struct { - DestinationPortRange *int64 `json:"destinationPortRange,omitempty"` - Protocol *InboundSecurityRulesProtocol `json:"protocol,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_networkvirtualappliance.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_networkvirtualappliance.go deleted file mode 100644 index 03612c989df..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_networkvirtualappliance.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkvirtualappliances - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualAppliance struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkVirtualAppliancePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_networkvirtualappliancepropertiesformat.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_networkvirtualappliancepropertiesformat.go deleted file mode 100644 index bbc1a4b7361..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_networkvirtualappliancepropertiesformat.go +++ /dev/null @@ -1,22 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualAppliancePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - BootStrapConfigurationBlobs *[]string `json:"bootStrapConfigurationBlobs,omitempty"` - CloudInitConfiguration *string `json:"cloudInitConfiguration,omitempty"` - CloudInitConfigurationBlobs *[]string `json:"cloudInitConfigurationBlobs,omitempty"` - Delegation *DelegationProperties `json:"delegation,omitempty"` - DeploymentType *string `json:"deploymentType,omitempty"` - InboundSecurityRules *[]SubResource `json:"inboundSecurityRules,omitempty"` - NvaSku *VirtualApplianceSkuProperties `json:"nvaSku,omitempty"` - PartnerManagedResource *PartnerManagedResourceProperties `json:"partnerManagedResource,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SshPublicKey *string `json:"sshPublicKey,omitempty"` - VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"` - VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"` - VirtualApplianceSites *[]SubResource `json:"virtualApplianceSites,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_partnermanagedresourceproperties.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_partnermanagedresourceproperties.go deleted file mode 100644 index e89793be377..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_partnermanagedresourceproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PartnerManagedResourceProperties struct { - Id *string `json:"id,omitempty"` - InternalLoadBalancerId *string `json:"internalLoadBalancerId,omitempty"` - StandardLoadBalancerId *string `json:"standardLoadBalancerId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_subresource.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_subresource.go deleted file mode 100644 index 8df29cf1031..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_tagsobject.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_tagsobject.go deleted file mode 100644 index 3ad1ec8468c..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_virtualappliancenicproperties.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_virtualappliancenicproperties.go deleted file mode 100644 index ebb4129b0ee..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_virtualappliancenicproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceNicProperties struct { - Name *string `json:"name,omitempty"` - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/model_virtualapplianceskuproperties.go b/resource-manager/network/2022-09-01/networkvirtualappliances/model_virtualapplianceskuproperties.go deleted file mode 100644 index b194523806f..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/model_virtualapplianceskuproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSkuProperties struct { - BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"` - MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/predicates.go b/resource-manager/network/2022-09-01/networkvirtualappliances/predicates.go deleted file mode 100644 index 676b2af6c25..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkVirtualApplianceOperationPredicate) Matches(input NetworkVirtualAppliance) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/networkvirtualappliances/version.go b/resource-manager/network/2022-09-01/networkvirtualappliances/version.go deleted file mode 100644 index 48f2bbf65f2..00000000000 --- a/resource-manager/network/2022-09-01/networkvirtualappliances/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkvirtualappliances - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkvirtualappliances/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/README.md b/resource-manager/network/2022-09-01/networkwatchers/README.md deleted file mode 100644 index d1654803f5d..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/README.md +++ /dev/null @@ -1,330 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkwatchers` Documentation - -The `networkwatchers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/networkwatchers" -``` - - -### Client Initialization - -```go -client := networkwatchers.NewNetworkWatchersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkWatchersClient.CheckConnectivity` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.ConnectivityParameters{ - // ... -} - - -if err := client.CheckConnectivityThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.NetworkWatcher{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.Delete` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.Get` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.GetAzureReachabilityReport` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.AzureReachabilityReportParameters{ - // ... -} - - -if err := client.GetAzureReachabilityReportThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetFlowLogStatus` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.FlowLogStatusParameters{ - // ... -} - - -if err := client.GetFlowLogStatusThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetNetworkConfigurationDiagnostic` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.NetworkConfigurationDiagnosticParameters{ - // ... -} - - -if err := client.GetNetworkConfigurationDiagnosticThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetNextHop` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.NextHopParameters{ - // ... -} - - -if err := client.GetNextHopThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetTopology` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.TopologyParameters{ - // ... -} - - -read, err := client.GetTopology(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.GetTroubleshooting` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.TroubleshootingParameters{ - // ... -} - - -if err := client.GetTroubleshootingThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetTroubleshootingResult` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.QueryTroubleshootingParameters{ - // ... -} - - -if err := client.GetTroubleshootingResultThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetVMSecurityRules` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.SecurityGroupViewParameters{ - // ... -} - - -if err := client.GetVMSecurityRulesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.List` - -```go -ctx := context.TODO() -id := networkwatchers.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.ListAll` - -```go -ctx := context.TODO() -id := networkwatchers.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAll(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.ListAvailableProviders` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.AvailableProvidersListParameters{ - // ... -} - - -if err := client.ListAvailableProvidersThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.SetFlowLogConfiguration` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.FlowLogInformation{ - // ... -} - - -if err := client.SetFlowLogConfigurationThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.UpdateTags` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.VerifyIPFlow` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.VerificationIPFlowParameters{ - // ... -} - - -if err := client.VerifyIPFlowThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/networkwatchers/client.go b/resource-manager/network/2022-09-01/networkwatchers/client.go deleted file mode 100644 index d0f44155ba5..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkwatchers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatchersClient struct { - Client *resourcemanager.Client -} - -func NewNetworkWatchersClientWithBaseURI(api environments.Api) (*NetworkWatchersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkwatchers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkWatchersClient: %+v", err) - } - - return &NetworkWatchersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/constants.go b/resource-manager/network/2022-09-01/networkwatchers/constants.go deleted file mode 100644 index 2e400cad0f7..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/constants.go +++ /dev/null @@ -1,855 +0,0 @@ -package networkwatchers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Access string - -const ( - AccessAllow Access = "Allow" - AccessDeny Access = "Deny" -) - -func PossibleValuesForAccess() []string { - return []string{ - string(AccessAllow), - string(AccessDeny), - } -} - -func (s *Access) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAccess(input string) (*Access, error) { - vals := map[string]Access{ - "allow": AccessAllow, - "deny": AccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Access(input) - return &out, nil -} - -type AssociationType string - -const ( - AssociationTypeAssociated AssociationType = "Associated" - AssociationTypeContains AssociationType = "Contains" -) - -func PossibleValuesForAssociationType() []string { - return []string{ - string(AssociationTypeAssociated), - string(AssociationTypeContains), - } -} - -func (s *AssociationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAssociationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAssociationType(input string) (*AssociationType, error) { - vals := map[string]AssociationType{ - "associated": AssociationTypeAssociated, - "contains": AssociationTypeContains, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AssociationType(input) - return &out, nil -} - -type ConnectionStatus string - -const ( - ConnectionStatusConnected ConnectionStatus = "Connected" - ConnectionStatusDegraded ConnectionStatus = "Degraded" - ConnectionStatusDisconnected ConnectionStatus = "Disconnected" - ConnectionStatusUnknown ConnectionStatus = "Unknown" -) - -func PossibleValuesForConnectionStatus() []string { - return []string{ - string(ConnectionStatusConnected), - string(ConnectionStatusDegraded), - string(ConnectionStatusDisconnected), - string(ConnectionStatusUnknown), - } -} - -func (s *ConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionStatus(input string) (*ConnectionStatus, error) { - vals := map[string]ConnectionStatus{ - "connected": ConnectionStatusConnected, - "degraded": ConnectionStatusDegraded, - "disconnected": ConnectionStatusDisconnected, - "unknown": ConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionStatus(input) - return &out, nil -} - -type Direction string - -const ( - DirectionInbound Direction = "Inbound" - DirectionOutbound Direction = "Outbound" -) - -func PossibleValuesForDirection() []string { - return []string{ - string(DirectionInbound), - string(DirectionOutbound), - } -} - -func (s *Direction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDirection(input string) (*Direction, error) { - vals := map[string]Direction{ - "inbound": DirectionInbound, - "outbound": DirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Direction(input) - return &out, nil -} - -type EffectiveSecurityRuleProtocol string - -const ( - EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" - EffectiveSecurityRuleProtocolTcp EffectiveSecurityRuleProtocol = "Tcp" - EffectiveSecurityRuleProtocolUdp EffectiveSecurityRuleProtocol = "Udp" -) - -func PossibleValuesForEffectiveSecurityRuleProtocol() []string { - return []string{ - string(EffectiveSecurityRuleProtocolAll), - string(EffectiveSecurityRuleProtocolTcp), - string(EffectiveSecurityRuleProtocolUdp), - } -} - -func (s *EffectiveSecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveSecurityRuleProtocol(input string) (*EffectiveSecurityRuleProtocol, error) { - vals := map[string]EffectiveSecurityRuleProtocol{ - "all": EffectiveSecurityRuleProtocolAll, - "tcp": EffectiveSecurityRuleProtocolTcp, - "udp": EffectiveSecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveSecurityRuleProtocol(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type HTTPMethod string - -const ( - HTTPMethodGet HTTPMethod = "Get" -) - -func PossibleValuesForHTTPMethod() []string { - return []string{ - string(HTTPMethodGet), - } -} - -func (s *HTTPMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHTTPMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHTTPMethod(input string) (*HTTPMethod, error) { - vals := map[string]HTTPMethod{ - "get": HTTPMethodGet, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HTTPMethod(input) - return &out, nil -} - -type IPFlowProtocol string - -const ( - IPFlowProtocolTCP IPFlowProtocol = "TCP" - IPFlowProtocolUDP IPFlowProtocol = "UDP" -) - -func PossibleValuesForIPFlowProtocol() []string { - return []string{ - string(IPFlowProtocolTCP), - string(IPFlowProtocolUDP), - } -} - -func (s *IPFlowProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPFlowProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPFlowProtocol(input string) (*IPFlowProtocol, error) { - vals := map[string]IPFlowProtocol{ - "tcp": IPFlowProtocolTCP, - "udp": IPFlowProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPFlowProtocol(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type IssueType string - -const ( - IssueTypeAgentStopped IssueType = "AgentStopped" - IssueTypeDnsResolution IssueType = "DnsResolution" - IssueTypeGuestFirewall IssueType = "GuestFirewall" - IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" - IssueTypePlatform IssueType = "Platform" - IssueTypePortThrottled IssueType = "PortThrottled" - IssueTypeSocketBind IssueType = "SocketBind" - IssueTypeUnknown IssueType = "Unknown" - IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" -) - -func PossibleValuesForIssueType() []string { - return []string{ - string(IssueTypeAgentStopped), - string(IssueTypeDnsResolution), - string(IssueTypeGuestFirewall), - string(IssueTypeNetworkSecurityRule), - string(IssueTypePlatform), - string(IssueTypePortThrottled), - string(IssueTypeSocketBind), - string(IssueTypeUnknown), - string(IssueTypeUserDefinedRoute), - } -} - -func (s *IssueType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIssueType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIssueType(input string) (*IssueType, error) { - vals := map[string]IssueType{ - "agentstopped": IssueTypeAgentStopped, - "dnsresolution": IssueTypeDnsResolution, - "guestfirewall": IssueTypeGuestFirewall, - "networksecurityrule": IssueTypeNetworkSecurityRule, - "platform": IssueTypePlatform, - "portthrottled": IssueTypePortThrottled, - "socketbind": IssueTypeSocketBind, - "unknown": IssueTypeUnknown, - "userdefinedroute": IssueTypeUserDefinedRoute, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IssueType(input) - return &out, nil -} - -type NextHopType string - -const ( - NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" - NextHopTypeInternet NextHopType = "Internet" - NextHopTypeNone NextHopType = "None" - NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" - NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" - NextHopTypeVnetLocal NextHopType = "VnetLocal" -) - -func PossibleValuesForNextHopType() []string { - return []string{ - string(NextHopTypeHyperNetGateway), - string(NextHopTypeInternet), - string(NextHopTypeNone), - string(NextHopTypeVirtualAppliance), - string(NextHopTypeVirtualNetworkGateway), - string(NextHopTypeVnetLocal), - } -} - -func (s *NextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNextHopType(input string) (*NextHopType, error) { - vals := map[string]NextHopType{ - "hypernetgateway": NextHopTypeHyperNetGateway, - "internet": NextHopTypeInternet, - "none": NextHopTypeNone, - "virtualappliance": NextHopTypeVirtualAppliance, - "virtualnetworkgateway": NextHopTypeVirtualNetworkGateway, - "vnetlocal": NextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NextHopType(input) - return &out, nil -} - -type Origin string - -const ( - OriginInbound Origin = "Inbound" - OriginLocal Origin = "Local" - OriginOutbound Origin = "Outbound" -) - -func PossibleValuesForOrigin() []string { - return []string{ - string(OriginInbound), - string(OriginLocal), - string(OriginOutbound), - } -} - -func (s *Origin) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOrigin(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOrigin(input string) (*Origin, error) { - vals := map[string]Origin{ - "inbound": OriginInbound, - "local": OriginLocal, - "outbound": OriginOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Origin(input) - return &out, nil -} - -type Protocol string - -const ( - ProtocolHTTP Protocol = "Http" - ProtocolHTTPS Protocol = "Https" - ProtocolIcmp Protocol = "Icmp" - ProtocolTcp Protocol = "Tcp" -) - -func PossibleValuesForProtocol() []string { - return []string{ - string(ProtocolHTTP), - string(ProtocolHTTPS), - string(ProtocolIcmp), - string(ProtocolTcp), - } -} - -func (s *Protocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProtocol(input string) (*Protocol, error) { - vals := map[string]Protocol{ - "http": ProtocolHTTP, - "https": ProtocolHTTPS, - "icmp": ProtocolIcmp, - "tcp": ProtocolTcp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Protocol(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type Severity string - -const ( - SeverityError Severity = "Error" - SeverityWarning Severity = "Warning" -) - -func PossibleValuesForSeverity() []string { - return []string{ - string(SeverityError), - string(SeverityWarning), - } -} - -func (s *Severity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSeverity(input string) (*Severity, error) { - vals := map[string]Severity{ - "error": SeverityError, - "warning": SeverityWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Severity(input) - return &out, nil -} - -type VerbosityLevel string - -const ( - VerbosityLevelFull VerbosityLevel = "Full" - VerbosityLevelMinimum VerbosityLevel = "Minimum" - VerbosityLevelNormal VerbosityLevel = "Normal" -) - -func PossibleValuesForVerbosityLevel() []string { - return []string{ - string(VerbosityLevelFull), - string(VerbosityLevelMinimum), - string(VerbosityLevelNormal), - } -} - -func (s *VerbosityLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVerbosityLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVerbosityLevel(input string) (*VerbosityLevel, error) { - vals := map[string]VerbosityLevel{ - "full": VerbosityLevelFull, - "minimum": VerbosityLevelMinimum, - "normal": VerbosityLevelNormal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VerbosityLevel(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/id_networkwatcher.go b/resource-manager/network/2022-09-01/networkwatchers/id_networkwatcher.go deleted file mode 100644 index 2cb57313a16..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkwatchers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/id_networkwatcher_test.go b/resource-manager/network/2022-09-01/networkwatchers/id_networkwatcher_test.go deleted file mode 100644 index 685f32fd1ec..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkwatchers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_checkconnectivity.go b/resource-manager/network/2022-09-01/networkwatchers/method_checkconnectivity.go deleted file mode 100644 index a73f25552b5..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_checkconnectivity.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckConnectivityOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CheckConnectivity ... -func (c NetworkWatchersClient) CheckConnectivity(ctx context.Context, id NetworkWatcherId, input ConnectivityParameters) (result CheckConnectivityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/connectivityCheck", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CheckConnectivityThenPoll performs CheckConnectivity then polls until it's completed -func (c NetworkWatchersClient) CheckConnectivityThenPoll(ctx context.Context, id NetworkWatcherId, input ConnectivityParameters) error { - result, err := c.CheckConnectivity(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CheckConnectivity: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CheckConnectivity: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_createorupdate.go b/resource-manager/network/2022-09-01/networkwatchers/method_createorupdate.go deleted file mode 100644 index 71f8f61017f..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkwatchers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcher -} - -// CreateOrUpdate ... -func (c NetworkWatchersClient) CreateOrUpdate(ctx context.Context, id NetworkWatcherId, input NetworkWatcher) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_delete.go b/resource-manager/network/2022-09-01/networkwatchers/method_delete.go deleted file mode 100644 index 4c59058ef03..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_delete.go +++ /dev/null @@ -1,70 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkWatchersClient) Delete(ctx context.Context, id NetworkWatcherId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkWatchersClient) DeleteThenPoll(ctx context.Context, id NetworkWatcherId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_get.go b/resource-manager/network/2022-09-01/networkwatchers/method_get.go deleted file mode 100644 index 02bf5a8e953..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkwatchers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcher -} - -// Get ... -func (c NetworkWatchersClient) Get(ctx context.Context, id NetworkWatcherId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_getazurereachabilityreport.go b/resource-manager/network/2022-09-01/networkwatchers/method_getazurereachabilityreport.go deleted file mode 100644 index dd101399d96..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_getazurereachabilityreport.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetAzureReachabilityReportOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetAzureReachabilityReport ... -func (c NetworkWatchersClient) GetAzureReachabilityReport(ctx context.Context, id NetworkWatcherId, input AzureReachabilityReportParameters) (result GetAzureReachabilityReportOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/azureReachabilityReport", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetAzureReachabilityReportThenPoll performs GetAzureReachabilityReport then polls until it's completed -func (c NetworkWatchersClient) GetAzureReachabilityReportThenPoll(ctx context.Context, id NetworkWatcherId, input AzureReachabilityReportParameters) error { - result, err := c.GetAzureReachabilityReport(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetAzureReachabilityReport: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetAzureReachabilityReport: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_getflowlogstatus.go b/resource-manager/network/2022-09-01/networkwatchers/method_getflowlogstatus.go deleted file mode 100644 index 940c5651390..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_getflowlogstatus.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetFlowLogStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetFlowLogStatus ... -func (c NetworkWatchersClient) GetFlowLogStatus(ctx context.Context, id NetworkWatcherId, input FlowLogStatusParameters) (result GetFlowLogStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryFlowLogStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetFlowLogStatusThenPoll performs GetFlowLogStatus then polls until it's completed -func (c NetworkWatchersClient) GetFlowLogStatusThenPoll(ctx context.Context, id NetworkWatcherId, input FlowLogStatusParameters) error { - result, err := c.GetFlowLogStatus(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetFlowLogStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetFlowLogStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_getnetworkconfigurationdiagnostic.go b/resource-manager/network/2022-09-01/networkwatchers/method_getnetworkconfigurationdiagnostic.go deleted file mode 100644 index 8a2434e53ae..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_getnetworkconfigurationdiagnostic.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetNetworkConfigurationDiagnosticOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetNetworkConfigurationDiagnostic ... -func (c NetworkWatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Context, id NetworkWatcherId, input NetworkConfigurationDiagnosticParameters) (result GetNetworkConfigurationDiagnosticOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/networkConfigurationDiagnostic", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetNetworkConfigurationDiagnosticThenPoll performs GetNetworkConfigurationDiagnostic then polls until it's completed -func (c NetworkWatchersClient) GetNetworkConfigurationDiagnosticThenPoll(ctx context.Context, id NetworkWatcherId, input NetworkConfigurationDiagnosticParameters) error { - result, err := c.GetNetworkConfigurationDiagnostic(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetNetworkConfigurationDiagnostic: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetNetworkConfigurationDiagnostic: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_getnexthop.go b/resource-manager/network/2022-09-01/networkwatchers/method_getnexthop.go deleted file mode 100644 index 4926381ad22..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_getnexthop.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetNextHopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetNextHop ... -func (c NetworkWatchersClient) GetNextHop(ctx context.Context, id NetworkWatcherId, input NextHopParameters) (result GetNextHopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/nextHop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetNextHopThenPoll performs GetNextHop then polls until it's completed -func (c NetworkWatchersClient) GetNextHopThenPoll(ctx context.Context, id NetworkWatcherId, input NextHopParameters) error { - result, err := c.GetNextHop(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetNextHop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetNextHop: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_gettopology.go b/resource-manager/network/2022-09-01/networkwatchers/method_gettopology.go deleted file mode 100644 index 7dd011942f7..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_gettopology.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTopologyOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Topology -} - -// GetTopology ... -func (c NetworkWatchersClient) GetTopology(ctx context.Context, id NetworkWatcherId, input TopologyParameters) (result GetTopologyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/topology", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_gettroubleshooting.go b/resource-manager/network/2022-09-01/networkwatchers/method_gettroubleshooting.go deleted file mode 100644 index 603907c72b4..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_gettroubleshooting.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTroubleshootingOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetTroubleshooting ... -func (c NetworkWatchersClient) GetTroubleshooting(ctx context.Context, id NetworkWatcherId, input TroubleshootingParameters) (result GetTroubleshootingOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/troubleshoot", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetTroubleshootingThenPoll performs GetTroubleshooting then polls until it's completed -func (c NetworkWatchersClient) GetTroubleshootingThenPoll(ctx context.Context, id NetworkWatcherId, input TroubleshootingParameters) error { - result, err := c.GetTroubleshooting(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetTroubleshooting: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetTroubleshooting: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_gettroubleshootingresult.go b/resource-manager/network/2022-09-01/networkwatchers/method_gettroubleshootingresult.go deleted file mode 100644 index 280ad2a6f75..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_gettroubleshootingresult.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTroubleshootingResultOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetTroubleshootingResult ... -func (c NetworkWatchersClient) GetTroubleshootingResult(ctx context.Context, id NetworkWatcherId, input QueryTroubleshootingParameters) (result GetTroubleshootingResultOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryTroubleshootResult", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetTroubleshootingResultThenPoll performs GetTroubleshootingResult then polls until it's completed -func (c NetworkWatchersClient) GetTroubleshootingResultThenPoll(ctx context.Context, id NetworkWatcherId, input QueryTroubleshootingParameters) error { - result, err := c.GetTroubleshootingResult(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetTroubleshootingResult: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetTroubleshootingResult: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_getvmsecurityrules.go b/resource-manager/network/2022-09-01/networkwatchers/method_getvmsecurityrules.go deleted file mode 100644 index 3fc37816b2b..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_getvmsecurityrules.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVMSecurityRulesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetVMSecurityRules ... -func (c NetworkWatchersClient) GetVMSecurityRules(ctx context.Context, id NetworkWatcherId, input SecurityGroupViewParameters) (result GetVMSecurityRulesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/securityGroupView", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetVMSecurityRulesThenPoll performs GetVMSecurityRules then polls until it's completed -func (c NetworkWatchersClient) GetVMSecurityRulesThenPoll(ctx context.Context, id NetworkWatcherId, input SecurityGroupViewParameters) error { - result, err := c.GetVMSecurityRules(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetVMSecurityRules: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetVMSecurityRules: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_list.go b/resource-manager/network/2022-09-01/networkwatchers/method_list.go deleted file mode 100644 index 6cb2b3f378e..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_list.go +++ /dev/null @@ -1,53 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcherListResult -} - -// List ... -func (c NetworkWatchersClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkWatchers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_listall.go b/resource-manager/network/2022-09-01/networkwatchers/method_listall.go deleted file mode 100644 index b50a401a869..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_listall.go +++ /dev/null @@ -1,53 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcherListResult -} - -// ListAll ... -func (c NetworkWatchersClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkWatchers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_listavailableproviders.go b/resource-manager/network/2022-09-01/networkwatchers/method_listavailableproviders.go deleted file mode 100644 index aa0f4603a3d..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_listavailableproviders.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableProvidersOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ListAvailableProviders ... -func (c NetworkWatchersClient) ListAvailableProviders(ctx context.Context, id NetworkWatcherId, input AvailableProvidersListParameters) (result ListAvailableProvidersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/availableProvidersList", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ListAvailableProvidersThenPoll performs ListAvailableProviders then polls until it's completed -func (c NetworkWatchersClient) ListAvailableProvidersThenPoll(ctx context.Context, id NetworkWatcherId, input AvailableProvidersListParameters) error { - result, err := c.ListAvailableProviders(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ListAvailableProviders: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ListAvailableProviders: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_setflowlogconfiguration.go b/resource-manager/network/2022-09-01/networkwatchers/method_setflowlogconfiguration.go deleted file mode 100644 index 49ad85bd00e..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_setflowlogconfiguration.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SetFlowLogConfigurationOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SetFlowLogConfiguration ... -func (c NetworkWatchersClient) SetFlowLogConfiguration(ctx context.Context, id NetworkWatcherId, input FlowLogInformation) (result SetFlowLogConfigurationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/configureFlowLog", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SetFlowLogConfigurationThenPoll performs SetFlowLogConfiguration then polls until it's completed -func (c NetworkWatchersClient) SetFlowLogConfigurationThenPoll(ctx context.Context, id NetworkWatcherId, input FlowLogInformation) error { - result, err := c.SetFlowLogConfiguration(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SetFlowLogConfiguration: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SetFlowLogConfiguration: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_updatetags.go b/resource-manager/network/2022-09-01/networkwatchers/method_updatetags.go deleted file mode 100644 index 6033f1aea8a..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package networkwatchers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcher -} - -// UpdateTags ... -func (c NetworkWatchersClient) UpdateTags(ctx context.Context, id NetworkWatcherId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/method_verifyipflow.go b/resource-manager/network/2022-09-01/networkwatchers/method_verifyipflow.go deleted file mode 100644 index 9ffd4b8b7f6..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/method_verifyipflow.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VerifyIPFlowOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VerifyIPFlow ... -func (c NetworkWatchersClient) VerifyIPFlow(ctx context.Context, id NetworkWatcherId, input VerificationIPFlowParameters) (result VerifyIPFlowOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/ipFlowVerify", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VerifyIPFlowThenPoll performs VerifyIPFlow then polls until it's completed -func (c NetworkWatchersClient) VerifyIPFlowThenPoll(ctx context.Context, id NetworkWatcherId, input VerificationIPFlowParameters) error { - result, err := c.VerifyIPFlow(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VerifyIPFlow: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VerifyIPFlow: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/networkwatchers/model_applicationsecuritygroup.go deleted file mode 100644 index d93456b39dc..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/networkwatchers/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 1edb4c6e9fd..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslist.go b/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslist.go deleted file mode 100644 index f97306f3eb4..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslist.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersList struct { - Countries []AvailableProvidersListCountry `json:"countries"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistcity.go b/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistcity.go deleted file mode 100644 index ad5727a8ad0..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistcity.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersListCity struct { - CityName *string `json:"cityName,omitempty"` - Providers *[]string `json:"providers,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistcountry.go b/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistcountry.go deleted file mode 100644 index 98f3996ac17..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistcountry.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersListCountry struct { - CountryName *string `json:"countryName,omitempty"` - Providers *[]string `json:"providers,omitempty"` - States *[]AvailableProvidersListState `json:"states,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistparameters.go deleted file mode 100644 index e884f5cdb40..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_availableproviderslistparameters.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersListParameters struct { - AzureLocations *[]string `json:"azureLocations,omitempty"` - City *string `json:"city,omitempty"` - Country *string `json:"country,omitempty"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_availableprovidersliststate.go b/resource-manager/network/2022-09-01/networkwatchers/model_availableprovidersliststate.go deleted file mode 100644 index 3504bafbcf0..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_availableprovidersliststate.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersListState struct { - Cities *[]AvailableProvidersListCity `json:"cities,omitempty"` - Providers *[]string `json:"providers,omitempty"` - StateName *string `json:"stateName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreport.go b/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreport.go deleted file mode 100644 index e045a1522bc..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreport.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReport struct { - AggregationLevel string `json:"aggregationLevel"` - ProviderLocation AzureReachabilityReportLocation `json:"providerLocation"` - ReachabilityReport []AzureReachabilityReportItem `json:"reachabilityReport"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportitem.go b/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportitem.go deleted file mode 100644 index 50e7da37b25..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportitem.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReportItem struct { - AzureLocation *string `json:"azureLocation,omitempty"` - Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` - Provider *string `json:"provider,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportlatencyinfo.go b/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportlatencyinfo.go deleted file mode 100644 index 6755737d707..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportlatencyinfo.go +++ /dev/null @@ -1,27 +0,0 @@ -package networkwatchers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReportLatencyInfo struct { - Score *int64 `json:"score,omitempty"` - TimeStamp *string `json:"timeStamp,omitempty"` -} - -func (o *AzureReachabilityReportLatencyInfo) GetTimeStampAsTime() (*time.Time, error) { - if o.TimeStamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.TimeStamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *AzureReachabilityReportLatencyInfo) SetTimeStampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.TimeStamp = &formatted -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportlocation.go b/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportlocation.go deleted file mode 100644 index 15b7ba2a6ee..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportlocation.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReportLocation struct { - City *string `json:"city,omitempty"` - Country string `json:"country"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportparameters.go deleted file mode 100644 index 81d91ee2074..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_azurereachabilityreportparameters.go +++ /dev/null @@ -1,36 +0,0 @@ -package networkwatchers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReportParameters struct { - AzureLocations *[]string `json:"azureLocations,omitempty"` - EndTime string `json:"endTime"` - ProviderLocation AzureReachabilityReportLocation `json:"providerLocation"` - Providers *[]string `json:"providers,omitempty"` - StartTime string `json:"startTime"` -} - -func (o *AzureReachabilityReportParameters) GetEndTimeAsTime() (*time.Time, error) { - return dates.ParseAsFormat(&o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AzureReachabilityReportParameters) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = formatted -} - -func (o *AzureReachabilityReportParameters) GetStartTimeAsTime() (*time.Time, error) { - return dates.ParseAsFormat(&o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AzureReachabilityReportParameters) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = formatted -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_connectivitydestination.go b/resource-manager/network/2022-09-01/networkwatchers/model_connectivitydestination.go deleted file mode 100644 index fd92ab947d7..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_connectivitydestination.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityDestination struct { - Address *string `json:"address,omitempty"` - Port *int64 `json:"port,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_connectivityhop.go b/resource-manager/network/2022-09-01/networkwatchers/model_connectivityhop.go deleted file mode 100644 index b199aef7d99..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_connectivityhop.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityHop struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` - Issues *[]ConnectivityIssue `json:"issues,omitempty"` - Links *[]HopLink `json:"links,omitempty"` - NextHopIds *[]string `json:"nextHopIds,omitempty"` - PreviousHopIds *[]string `json:"previousHopIds,omitempty"` - PreviousLinks *[]HopLink `json:"previousLinks,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_connectivityinformation.go b/resource-manager/network/2022-09-01/networkwatchers/model_connectivityinformation.go deleted file mode 100644 index 0ce37ca8e82..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_connectivityinformation.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityInformation struct { - AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty"` - ConnectionStatus *ConnectionStatus `json:"connectionStatus,omitempty"` - Hops *[]ConnectivityHop `json:"hops,omitempty"` - MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty"` - MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty"` - ProbesFailed *int64 `json:"probesFailed,omitempty"` - ProbesSent *int64 `json:"probesSent,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_connectivityissue.go b/resource-manager/network/2022-09-01/networkwatchers/model_connectivityissue.go deleted file mode 100644 index ba9f23e149c..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_connectivityissue.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityIssue struct { - Context *[]map[string]string `json:"context,omitempty"` - Origin *Origin `json:"origin,omitempty"` - Severity *Severity `json:"severity,omitempty"` - Type *IssueType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_connectivityparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_connectivityparameters.go deleted file mode 100644 index 2fd0eea7e96..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_connectivityparameters.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityParameters struct { - Destination ConnectivityDestination `json:"destination"` - PreferredIPVersion *IPVersion `json:"preferredIPVersion,omitempty"` - Protocol *Protocol `json:"protocol,omitempty"` - ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` - Source ConnectivitySource `json:"source"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_connectivitysource.go b/resource-manager/network/2022-09-01/networkwatchers/model_connectivitysource.go deleted file mode 100644 index 471f2e79c48..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_connectivitysource.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivitySource struct { - Port *int64 `json:"port,omitempty"` - ResourceId string `json:"resourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_effectivenetworksecurityrule.go b/resource-manager/network/2022-09-01/networkwatchers/model_effectivenetworksecurityrule.go deleted file mode 100644 index 738fb4c583d..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_effectivenetworksecurityrule.go +++ /dev/null @@ -1,22 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityRule struct { - Access *SecurityRuleAccess `json:"access,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction *SecurityRuleDirection `json:"direction,omitempty"` - ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` - ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_evaluatednetworksecuritygroup.go b/resource-manager/network/2022-09-01/networkwatchers/model_evaluatednetworksecuritygroup.go deleted file mode 100644 index c471d60f7c3..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_evaluatednetworksecuritygroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EvaluatedNetworkSecurityGroup struct { - AppliedTo *string `json:"appliedTo,omitempty"` - MatchedRule *MatchedRule `json:"matchedRule,omitempty"` - NetworkSecurityGroupId *string `json:"networkSecurityGroupId,omitempty"` - RulesEvaluationResult *[]NetworkSecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_flowlogformatparameters.go deleted file mode 100644 index 804e14368ee..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_flowloginformation.go b/resource-manager/network/2022-09-01/networkwatchers/model_flowloginformation.go deleted file mode 100644 index e624cdf59fe..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_flowloginformation.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogInformation struct { - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Properties FlowLogProperties `json:"properties"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_flowlogproperties.go b/resource-manager/network/2022-09-01/networkwatchers/model_flowlogproperties.go deleted file mode 100644 index c51e0fd967e..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_flowlogproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogProperties struct { - Enabled bool `json:"enabled"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_flowlogstatusparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_flowlogstatusparameters.go deleted file mode 100644 index 7adddbce138..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_flowlogstatusparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogStatusParameters struct { - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_hoplink.go b/resource-manager/network/2022-09-01/networkwatchers/model_hoplink.go deleted file mode 100644 index ad0c1a88c32..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_hoplink.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HopLink struct { - Context *map[string]string `json:"context,omitempty"` - Issues *[]ConnectivityIssue `json:"issues,omitempty"` - LinkType *string `json:"linkType,omitempty"` - NextHopId *string `json:"nextHopId,omitempty"` - Properties *HopLinkProperties `json:"properties,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_hoplinkproperties.go b/resource-manager/network/2022-09-01/networkwatchers/model_hoplinkproperties.go deleted file mode 100644 index efce6d24581..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_hoplinkproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HopLinkProperties struct { - RoundTripTimeAvg *int64 `json:"roundTripTimeAvg,omitempty"` - RoundTripTimeMax *int64 `json:"roundTripTimeMax,omitempty"` - RoundTripTimeMin *int64 `json:"roundTripTimeMin,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_httpconfiguration.go b/resource-manager/network/2022-09-01/networkwatchers/model_httpconfiguration.go deleted file mode 100644 index e469c4b2e2a..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_httpconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HTTPConfiguration struct { - Headers *[]HTTPHeader `json:"headers,omitempty"` - Method *HTTPMethod `json:"method,omitempty"` - ValidStatusCodes *[]int64 `json:"validStatusCodes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_httpheader.go b/resource-manager/network/2022-09-01/networkwatchers/model_httpheader.go deleted file mode 100644 index 5f0b41332f3..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_httpheader.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HTTPHeader struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_matchedrule.go b/resource-manager/network/2022-09-01/networkwatchers/model_matchedrule.go deleted file mode 100644 index 7ccb0bf4ff1..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_matchedrule.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MatchedRule struct { - Action *string `json:"action,omitempty"` - RuleName *string `json:"ruleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticparameters.go deleted file mode 100644 index 62d57417ce8..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkConfigurationDiagnosticParameters struct { - Profiles []NetworkConfigurationDiagnosticProfile `json:"profiles"` - TargetResourceId string `json:"targetResourceId"` - VerbosityLevel *VerbosityLevel `json:"verbosityLevel,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticprofile.go b/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticprofile.go deleted file mode 100644 index 2591d3cb1bc..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkConfigurationDiagnosticProfile struct { - Destination string `json:"destination"` - DestinationPort string `json:"destinationPort"` - Direction Direction `json:"direction"` - Protocol string `json:"protocol"` - Source string `json:"source"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticresponse.go b/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticresponse.go deleted file mode 100644 index a30c9686e57..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkConfigurationDiagnosticResponse struct { - Results *[]NetworkConfigurationDiagnosticResult `json:"results,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticresult.go b/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticresult.go deleted file mode 100644 index c0c796377f7..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networkconfigurationdiagnosticresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkConfigurationDiagnosticResult struct { - NetworkSecurityGroupResult *NetworkSecurityGroupResult `json:"networkSecurityGroupResult,omitempty"` - Profile *NetworkConfigurationDiagnosticProfile `json:"profile,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networkinterfaceassociation.go b/resource-manager/network/2022-09-01/networkwatchers/model_networkinterfaceassociation.go deleted file mode 100644 index 0583e0225fd..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networkinterfaceassociation.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceAssociation struct { - Id *string `json:"id,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networksecuritygroupresult.go b/resource-manager/network/2022-09-01/networkwatchers/model_networksecuritygroupresult.go deleted file mode 100644 index 60f125dff53..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networksecuritygroupresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupResult struct { - EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"` - SecurityRuleAccessResult *SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networksecurityrulesevaluationresult.go b/resource-manager/network/2022-09-01/networkwatchers/model_networksecurityrulesevaluationresult.go deleted file mode 100644 index c54e4c0dc86..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networksecurityrulesevaluationresult.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityRulesEvaluationResult struct { - DestinationMatched *bool `json:"destinationMatched,omitempty"` - DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"` - Name *string `json:"name,omitempty"` - ProtocolMatched *bool `json:"protocolMatched,omitempty"` - SourceMatched *bool `json:"sourceMatched,omitempty"` - SourcePortMatched *bool `json:"sourcePortMatched,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networkwatcher.go b/resource-manager/network/2022-09-01/networkwatchers/model_networkwatcher.go deleted file mode 100644 index 4f58f1863d8..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networkwatcher.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatcher struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkWatcherPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networkwatcherlistresult.go b/resource-manager/network/2022-09-01/networkwatchers/model_networkwatcherlistresult.go deleted file mode 100644 index b78fc59bf86..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networkwatcherlistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatcherListResult struct { - Value *[]NetworkWatcher `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_networkwatcherpropertiesformat.go b/resource-manager/network/2022-09-01/networkwatchers/model_networkwatcherpropertiesformat.go deleted file mode 100644 index d0d1c07ed9e..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_networkwatcherpropertiesformat.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatcherPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_nexthopparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_nexthopparameters.go deleted file mode 100644 index b8a7b00f4f3..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_nexthopparameters.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NextHopParameters struct { - DestinationIPAddress string `json:"destinationIPAddress"` - SourceIPAddress string `json:"sourceIPAddress"` - TargetNicResourceId *string `json:"targetNicResourceId,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_nexthopresult.go b/resource-manager/network/2022-09-01/networkwatchers/model_nexthopresult.go deleted file mode 100644 index a8a2ba32b01..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_nexthopresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NextHopResult struct { - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType *NextHopType `json:"nextHopType,omitempty"` - RouteTableId *string `json:"routeTableId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_protocolconfiguration.go b/resource-manager/network/2022-09-01/networkwatchers/model_protocolconfiguration.go deleted file mode 100644 index e4592ed2fe5..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_protocolconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProtocolConfiguration struct { - HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_querytroubleshootingparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_querytroubleshootingparameters.go deleted file mode 100644 index d6bf4abce2c..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_querytroubleshootingparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryTroubleshootingParameters struct { - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_retentionpolicyparameters.go deleted file mode 100644 index 64b952abec0..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_securitygroupnetworkinterface.go b/resource-manager/network/2022-09-01/networkwatchers/model_securitygroupnetworkinterface.go deleted file mode 100644 index e22bcd0a9ed..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_securitygroupnetworkinterface.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupNetworkInterface struct { - Id *string `json:"id,omitempty"` - SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_securitygroupviewparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_securitygroupviewparameters.go deleted file mode 100644 index 9cbdf854c96..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_securitygroupviewparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupViewParameters struct { - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_securitygroupviewresult.go b/resource-manager/network/2022-09-01/networkwatchers/model_securitygroupviewresult.go deleted file mode 100644 index eff95f05919..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_securitygroupviewresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupViewResult struct { - NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_securityrule.go b/resource-manager/network/2022-09-01/networkwatchers/model_securityrule.go deleted file mode 100644 index c1dded9fca0..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_securityruleassociations.go b/resource-manager/network/2022-09-01/networkwatchers/model_securityruleassociations.go deleted file mode 100644 index 0ce7cc68a9c..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_securityruleassociations.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRuleAssociations struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` - NetworkInterfaceAssociation *NetworkInterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` - SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/networkwatchers/model_securityrulepropertiesformat.go deleted file mode 100644 index ae100c6915e..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_subnetassociation.go b/resource-manager/network/2022-09-01/networkwatchers/model_subnetassociation.go deleted file mode 100644 index 8b89222ca9e..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_subnetassociation.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetAssociation struct { - Id *string `json:"id,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_subresource.go b/resource-manager/network/2022-09-01/networkwatchers/model_subresource.go deleted file mode 100644 index b98b68a29dd..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_tagsobject.go b/resource-manager/network/2022-09-01/networkwatchers/model_tagsobject.go deleted file mode 100644 index f022d1785d9..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_topology.go b/resource-manager/network/2022-09-01/networkwatchers/model_topology.go deleted file mode 100644 index c582a36ae6c..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_topology.go +++ /dev/null @@ -1,41 +0,0 @@ -package networkwatchers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Topology struct { - CreatedDateTime *string `json:"createdDateTime,omitempty"` - Id *string `json:"id,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - Resources *[]TopologyResource `json:"resources,omitempty"` -} - -func (o *Topology) GetCreatedDateTimeAsTime() (*time.Time, error) { - if o.CreatedDateTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedDateTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *Topology) SetCreatedDateTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedDateTime = &formatted -} - -func (o *Topology) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *Topology) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_topologyassociation.go b/resource-manager/network/2022-09-01/networkwatchers/model_topologyassociation.go deleted file mode 100644 index 9607c85650b..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_topologyassociation.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TopologyAssociation struct { - AssociationType *AssociationType `json:"associationType,omitempty"` - Name *string `json:"name,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_topologyparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_topologyparameters.go deleted file mode 100644 index 25bc77b5345..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_topologyparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TopologyParameters struct { - TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` - TargetSubnet *SubResource `json:"targetSubnet,omitempty"` - TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_topologyresource.go b/resource-manager/network/2022-09-01/networkwatchers/model_topologyresource.go deleted file mode 100644 index e126c541c8e..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_topologyresource.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TopologyResource struct { - Associations *[]TopologyAssociation `json:"associations,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/networkwatchers/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 63df321f46e..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/networkwatchers/model_trafficanalyticsproperties.go deleted file mode 100644 index 415ca1a8f5e..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingdetails.go b/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingdetails.go deleted file mode 100644 index 2bc7443b168..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingdetails.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingDetails struct { - Detail *string `json:"detail,omitempty"` - Id *string `json:"id,omitempty"` - ReasonType *string `json:"reasonType,omitempty"` - RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` - Summary *string `json:"summary,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingparameters.go deleted file mode 100644 index 5ee881c84a7..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingParameters struct { - Properties TroubleshootingProperties `json:"properties"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingproperties.go b/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingproperties.go deleted file mode 100644 index 8d187050a32..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingProperties struct { - StorageId string `json:"storageId"` - StoragePath string `json:"storagePath"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingrecommendedactions.go b/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingrecommendedactions.go deleted file mode 100644 index c4e5781e659..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingrecommendedactions.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingRecommendedActions struct { - ActionId *string `json:"actionId,omitempty"` - ActionText *string `json:"actionText,omitempty"` - ActionUri *string `json:"actionUri,omitempty"` - ActionUriText *string `json:"actionUriText,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingresult.go b/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingresult.go deleted file mode 100644 index 62df62353d2..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_troubleshootingresult.go +++ /dev/null @@ -1,41 +0,0 @@ -package networkwatchers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingResult struct { - Code *string `json:"code,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Results *[]TroubleshootingDetails `json:"results,omitempty"` - StartTime *string `json:"startTime,omitempty"` -} - -func (o *TroubleshootingResult) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *TroubleshootingResult) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *TroubleshootingResult) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *TroubleshootingResult) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_verificationipflowparameters.go b/resource-manager/network/2022-09-01/networkwatchers/model_verificationipflowparameters.go deleted file mode 100644 index 05165f3ed26..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_verificationipflowparameters.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VerificationIPFlowParameters struct { - Direction Direction `json:"direction"` - LocalIPAddress string `json:"localIPAddress"` - LocalPort string `json:"localPort"` - Protocol IPFlowProtocol `json:"protocol"` - RemoteIPAddress string `json:"remoteIPAddress"` - RemotePort string `json:"remotePort"` - TargetNicResourceId *string `json:"targetNicResourceId,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/model_verificationipflowresult.go b/resource-manager/network/2022-09-01/networkwatchers/model_verificationipflowresult.go deleted file mode 100644 index 97318928bd8..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/model_verificationipflowresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VerificationIPFlowResult struct { - Access *Access `json:"access,omitempty"` - RuleName *string `json:"ruleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/networkwatchers/version.go b/resource-manager/network/2022-09-01/networkwatchers/version.go deleted file mode 100644 index 65c6d6ae4ef..00000000000 --- a/resource-manager/network/2022-09-01/networkwatchers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkwatchers/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/README.md b/resource-manager/network/2022-09-01/p2svpngateways/README.md deleted file mode 100644 index 3ce8fece5b5..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/README.md +++ /dev/null @@ -1,112 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/p2svpngateways` Documentation - -The `p2svpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/p2svpngateways" -``` - - -### Client Initialization - -```go -client := p2svpngateways.NewP2sVpnGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `P2sVpnGatewaysClient.DisconnectP2sVpnConnections` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := p2svpngateways.P2SVpnConnectionRequest{ - // ... -} - - -if err := client.DisconnectP2sVpnConnectionsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.GenerateVpnProfile` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := p2svpngateways.P2SVpnProfileParameters{ - // ... -} - - -if err := client.GenerateVpnProfileThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.GetP2sVpnConnectionHealth` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -if err := client.GetP2sVpnConnectionHealthThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.GetP2sVpnConnectionHealthDetailed` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := p2svpngateways.P2SVpnConnectionHealthRequest{ - // ... -} - - -if err := client.GetP2sVpnConnectionHealthDetailedThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.Reset` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -if err := client.ResetThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := p2svpngateways.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/p2svpngateways/client.go b/resource-manager/network/2022-09-01/p2svpngateways/client.go deleted file mode 100644 index 893958568c2..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package p2svpngateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewP2sVpnGatewaysClientWithBaseURI(api environments.Api) (*P2sVpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "p2svpngateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating P2sVpnGatewaysClient: %+v", err) - } - - return &P2sVpnGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/constants.go b/resource-manager/network/2022-09-01/p2svpngateways/constants.go deleted file mode 100644 index e0d727fd608..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/constants.go +++ /dev/null @@ -1,183 +0,0 @@ -package p2svpngateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationMethod string - -const ( - AuthenticationMethodEAPMSCHAPvTwo AuthenticationMethod = "EAPMSCHAPv2" - AuthenticationMethodEAPTLS AuthenticationMethod = "EAPTLS" -) - -func PossibleValuesForAuthenticationMethod() []string { - return []string{ - string(AuthenticationMethodEAPMSCHAPvTwo), - string(AuthenticationMethodEAPTLS), - } -} - -func (s *AuthenticationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationMethod(input string) (*AuthenticationMethod, error) { - vals := map[string]AuthenticationMethod{ - "eapmschapv2": AuthenticationMethodEAPMSCHAPvTwo, - "eaptls": AuthenticationMethodEAPTLS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationMethod(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/method_disconnectp2svpnconnections.go b/resource-manager/network/2022-09-01/p2svpngateways/method_disconnectp2svpnconnections.go deleted file mode 100644 index c7746ee57d0..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/method_disconnectp2svpnconnections.go +++ /dev/null @@ -1,75 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DisconnectP2sVpnConnectionsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DisconnectP2sVpnConnections ... -func (c P2sVpnGatewaysClient) DisconnectP2sVpnConnections(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnConnectionRequest) (result DisconnectP2sVpnConnectionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/disconnectP2sVpnConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DisconnectP2sVpnConnectionsThenPoll performs DisconnectP2sVpnConnections then polls until it's completed -func (c P2sVpnGatewaysClient) DisconnectP2sVpnConnectionsThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnConnectionRequest) error { - result, err := c.DisconnectP2sVpnConnections(ctx, id, input) - if err != nil { - return fmt.Errorf("performing DisconnectP2sVpnConnections: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DisconnectP2sVpnConnections: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/method_generatevpnprofile.go b/resource-manager/network/2022-09-01/p2svpngateways/method_generatevpnprofile.go deleted file mode 100644 index 3370a813619..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/method_generatevpnprofile.go +++ /dev/null @@ -1,75 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateVpnProfileOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GenerateVpnProfile ... -func (c P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnProfileParameters) (result GenerateVpnProfileOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generatevpnprofile", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GenerateVpnProfileThenPoll performs GenerateVpnProfile then polls until it's completed -func (c P2sVpnGatewaysClient) GenerateVpnProfileThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnProfileParameters) error { - result, err := c.GenerateVpnProfile(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GenerateVpnProfile: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GenerateVpnProfile: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/method_getp2svpnconnectionhealth.go b/resource-manager/network/2022-09-01/p2svpngateways/method_getp2svpnconnectionhealth.go deleted file mode 100644 index cb52ffa29e7..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/method_getp2svpnconnectionhealth.go +++ /dev/null @@ -1,71 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetP2sVpnConnectionHealthOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetP2sVpnConnectionHealth ... -func (c P2sVpnGatewaysClient) GetP2sVpnConnectionHealth(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) (result GetP2sVpnConnectionHealthOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getP2sVpnConnectionHealth", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetP2sVpnConnectionHealthThenPoll performs GetP2sVpnConnectionHealth then polls until it's completed -func (c P2sVpnGatewaysClient) GetP2sVpnConnectionHealthThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) error { - result, err := c.GetP2sVpnConnectionHealth(ctx, id) - if err != nil { - return fmt.Errorf("performing GetP2sVpnConnectionHealth: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetP2sVpnConnectionHealth: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/method_getp2svpnconnectionhealthdetailed.go b/resource-manager/network/2022-09-01/p2svpngateways/method_getp2svpnconnectionhealthdetailed.go deleted file mode 100644 index 4d77cdd5c2f..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/method_getp2svpnconnectionhealthdetailed.go +++ /dev/null @@ -1,75 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetP2sVpnConnectionHealthDetailedOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetP2sVpnConnectionHealthDetailed ... -func (c P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailed(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnConnectionHealthRequest) (result GetP2sVpnConnectionHealthDetailedOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getP2sVpnConnectionHealthDetailed", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetP2sVpnConnectionHealthDetailedThenPoll performs GetP2sVpnConnectionHealthDetailed then polls until it's completed -func (c P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnConnectionHealthRequest) error { - result, err := c.GetP2sVpnConnectionHealthDetailed(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetP2sVpnConnectionHealthDetailed: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetP2sVpnConnectionHealthDetailed: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/method_reset.go b/resource-manager/network/2022-09-01/p2svpngateways/method_reset.go deleted file mode 100644 index 0c1edf99dbe..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/method_reset.go +++ /dev/null @@ -1,71 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Reset ... -func (c P2sVpnGatewaysClient) Reset(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) (result ResetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/reset", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetThenPoll performs Reset then polls until it's completed -func (c P2sVpnGatewaysClient) ResetThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) error { - result, err := c.Reset(ctx, id) - if err != nil { - return fmt.Errorf("performing Reset: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Reset: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/method_updatetags.go b/resource-manager/network/2022-09-01/p2svpngateways/method_updatetags.go deleted file mode 100644 index 09fa908bc39..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/method_updatetags.go +++ /dev/null @@ -1,75 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c P2sVpnGatewaysClient) UpdateTags(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c P2sVpnGatewaysClient) UpdateTagsThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_addressspace.go b/resource-manager/network/2022-09-01/p2svpngateways/model_addressspace.go deleted file mode 100644 index 7c79876f047..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_p2sconnectionconfiguration.go b/resource-manager/network/2022-09-01/p2svpngateways/model_p2sconnectionconfiguration.go deleted file mode 100644 index 278f2d7145d..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_p2sconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *P2SConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_p2sconnectionconfigurationproperties.go b/resource-manager/network/2022-09-01/p2svpngateways/model_p2sconnectionconfigurationproperties.go deleted file mode 100644 index 33a16482774..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_p2sconnectionconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfigurationProperties struct { - ConfigurationPolicyGroupAssociations *[]SubResource `json:"configurationPolicyGroupAssociations,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - PreviousConfigurationPolicyGroupAssociations *[]VpnServerConfigurationPolicyGroup `json:"previousConfigurationPolicyGroupAssociations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionhealth.go b/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionhealth.go deleted file mode 100644 index 42b227bbf63..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionhealth.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnConnectionHealth struct { - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionhealthrequest.go b/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionhealthrequest.go deleted file mode 100644 index d0cd806bd05..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionhealthrequest.go +++ /dev/null @@ -1,9 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnConnectionHealthRequest struct { - OutputBlobSasUrl *string `json:"outputBlobSasUrl,omitempty"` - VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionrequest.go b/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionrequest.go deleted file mode 100644 index f7b746fc648..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnconnectionrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnConnectionRequest struct { - VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpngateway.go b/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpngateway.go deleted file mode 100644 index 9dfde1858d2..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *P2SVpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpngatewayproperties.go b/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpngatewayproperties.go deleted file mode 100644 index 6099821abd6..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpngatewayproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGatewayProperties struct { - CustomDnsServers *[]string `json:"customDnsServers,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` - VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnprofileparameters.go b/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnprofileparameters.go deleted file mode 100644 index 7f798f2ae40..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_p2svpnprofileparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnProfileParameters struct { - AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_propagatedroutetable.go b/resource-manager/network/2022-09-01/p2svpngateways/model_propagatedroutetable.go deleted file mode 100644 index f137f52cc84..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_routingconfiguration.go b/resource-manager/network/2022-09-01/p2svpngateways/model_routingconfiguration.go deleted file mode 100644 index abe87c9515c..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_staticroute.go b/resource-manager/network/2022-09-01/p2svpngateways/model_staticroute.go deleted file mode 100644 index 0a7ee0c9c99..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_staticroutesconfig.go b/resource-manager/network/2022-09-01/p2svpngateways/model_staticroutesconfig.go deleted file mode 100644 index 063926c25d3..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_subresource.go b/resource-manager/network/2022-09-01/p2svpngateways/model_subresource.go deleted file mode 100644 index 80d7b205b99..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_tagsobject.go b/resource-manager/network/2022-09-01/p2svpngateways/model_tagsobject.go deleted file mode 100644 index f314ca6d15c..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_vnetroute.go b/resource-manager/network/2022-09-01/p2svpngateways/model_vnetroute.go deleted file mode 100644 index 445ec97bfa1..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnclientconnectionhealth.go b/resource-manager/network/2022-09-01/p2svpngateways/model_vpnclientconnectionhealth.go deleted file mode 100644 index fb3596341d9..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnclientconnectionhealth.go +++ /dev/null @@ -1,11 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealth struct { - AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"` - TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"` - TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"` - VpnClientConnectionsCount *int64 `json:"vpnClientConnectionsCount,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnprofileresponse.go b/resource-manager/network/2022-09-01/p2svpngateways/model_vpnprofileresponse.go deleted file mode 100644 index 55f4d81d16c..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnprofileresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnProfileResponse struct { - ProfileUrl *string `json:"profileUrl,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroup.go b/resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroup.go deleted file mode 100644 index fe026c0a264..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationPolicyGroupProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroupmember.go b/resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroupmember.go deleted file mode 100644 index cebb5053164..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroupproperties.go b/resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroupproperties.go deleted file mode 100644 index f7a9edb1a56..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/model_vpnserverconfigurationpolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupProperties struct { - IsDefault *bool `json:"isDefault,omitempty"` - P2SConnectionConfigurations *[]SubResource `json:"p2SConnectionConfigurations,omitempty"` - PolicyMembers *[]VpnServerConfigurationPolicyGroupMember `json:"policyMembers,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/p2svpngateways/version.go b/resource-manager/network/2022-09-01/p2svpngateways/version.go deleted file mode 100644 index 05293460342..00000000000 --- a/resource-manager/network/2022-09-01/p2svpngateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package p2svpngateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/p2svpngateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/README.md b/resource-manager/network/2022-09-01/packetcaptures/README.md deleted file mode 100644 index e33736810fd..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/README.md +++ /dev/null @@ -1,105 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/packetcaptures` Documentation - -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/packetcaptures" -``` - - -### Client Initialization - -```go -client := packetcaptures.NewPacketCapturesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PacketCapturesClient.Create` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -payload := packetcaptures.PacketCapture{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PacketCapturesClient.Delete` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PacketCapturesClient.Get` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PacketCapturesClient.GetStatus` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -if err := client.GetStatusThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PacketCapturesClient.List` - -```go -ctx := context.TODO() -id := packetcaptures.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PacketCapturesClient.Stop` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/packetcaptures/client.go b/resource-manager/network/2022-09-01/packetcaptures/client.go deleted file mode 100644 index 0a4a3398869..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package packetcaptures - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCapturesClient struct { - Client *resourcemanager.Client -} - -func NewPacketCapturesClientWithBaseURI(api environments.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "packetcaptures", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) - } - - return &PacketCapturesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/constants.go b/resource-manager/network/2022-09-01/packetcaptures/constants.go deleted file mode 100644 index 52471a03c9e..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/constants.go +++ /dev/null @@ -1,242 +0,0 @@ -package packetcaptures - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureTargetType string - -const ( - PacketCaptureTargetTypeAzureVM PacketCaptureTargetType = "AzureVM" - PacketCaptureTargetTypeAzureVMSS PacketCaptureTargetType = "AzureVMSS" -) - -func PossibleValuesForPacketCaptureTargetType() []string { - return []string{ - string(PacketCaptureTargetTypeAzureVM), - string(PacketCaptureTargetTypeAzureVMSS), - } -} - -func (s *PacketCaptureTargetType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePacketCaptureTargetType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePacketCaptureTargetType(input string) (*PacketCaptureTargetType, error) { - vals := map[string]PacketCaptureTargetType{ - "azurevm": PacketCaptureTargetTypeAzureVM, - "azurevmss": PacketCaptureTargetTypeAzureVMSS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PacketCaptureTargetType(input) - return &out, nil -} - -type PcError string - -const ( - PcErrorAgentStopped PcError = "AgentStopped" - PcErrorCaptureFailed PcError = "CaptureFailed" - PcErrorInternalError PcError = "InternalError" - PcErrorLocalFileFailed PcError = "LocalFileFailed" - PcErrorStorageFailed PcError = "StorageFailed" -) - -func PossibleValuesForPcError() []string { - return []string{ - string(PcErrorAgentStopped), - string(PcErrorCaptureFailed), - string(PcErrorInternalError), - string(PcErrorLocalFileFailed), - string(PcErrorStorageFailed), - } -} - -func (s *PcError) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePcError(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePcError(input string) (*PcError, error) { - vals := map[string]PcError{ - "agentstopped": PcErrorAgentStopped, - "capturefailed": PcErrorCaptureFailed, - "internalerror": PcErrorInternalError, - "localfilefailed": PcErrorLocalFileFailed, - "storagefailed": PcErrorStorageFailed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PcError(input) - return &out, nil -} - -type PcProtocol string - -const ( - PcProtocolAny PcProtocol = "Any" - PcProtocolTCP PcProtocol = "TCP" - PcProtocolUDP PcProtocol = "UDP" -) - -func PossibleValuesForPcProtocol() []string { - return []string{ - string(PcProtocolAny), - string(PcProtocolTCP), - string(PcProtocolUDP), - } -} - -func (s *PcProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePcProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePcProtocol(input string) (*PcProtocol, error) { - vals := map[string]PcProtocol{ - "any": PcProtocolAny, - "tcp": PcProtocolTCP, - "udp": PcProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PcProtocol(input) - return &out, nil -} - -type PcStatus string - -const ( - PcStatusError PcStatus = "Error" - PcStatusNotStarted PcStatus = "NotStarted" - PcStatusRunning PcStatus = "Running" - PcStatusStopped PcStatus = "Stopped" - PcStatusUnknown PcStatus = "Unknown" -) - -func PossibleValuesForPcStatus() []string { - return []string{ - string(PcStatusError), - string(PcStatusNotStarted), - string(PcStatusRunning), - string(PcStatusStopped), - string(PcStatusUnknown), - } -} - -func (s *PcStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePcStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePcStatus(input string) (*PcStatus, error) { - vals := map[string]PcStatus{ - "error": PcStatusError, - "notstarted": PcStatusNotStarted, - "running": PcStatusRunning, - "stopped": PcStatusStopped, - "unknown": PcStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PcStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/id_networkwatcher.go b/resource-manager/network/2022-09-01/packetcaptures/id_networkwatcher.go deleted file mode 100644 index b5478e241e2..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package packetcaptures - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/id_networkwatcher_test.go b/resource-manager/network/2022-09-01/packetcaptures/id_networkwatcher_test.go deleted file mode 100644 index fa74ce013ea..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package packetcaptures - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/id_packetcapture.go b/resource-manager/network/2022-09-01/packetcaptures/id_packetcapture.go deleted file mode 100644 index 57e35d5f1f2..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/id_packetcapture.go +++ /dev/null @@ -1,140 +0,0 @@ -package packetcaptures - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PacketCaptureId{} - -// PacketCaptureId is a struct representing the Resource ID for a Packet Capture -type PacketCaptureId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string - PacketCaptureName string -} - -// NewPacketCaptureID returns a new PacketCaptureId struct -func NewPacketCaptureID(subscriptionId string, resourceGroupName string, networkWatcherName string, packetCaptureName string) PacketCaptureId { - return PacketCaptureId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - PacketCaptureName: packetCaptureName, - } -} - -// ParsePacketCaptureID parses 'input' into a PacketCaptureId -func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { - parser := resourceids.NewParserFromResourceIdType(PacketCaptureId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PacketCaptureId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.PacketCaptureName, ok = parsed.Parsed["packetCaptureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCaptureName", *parsed) - } - - return &id, nil -} - -// ParsePacketCaptureIDInsensitively parses 'input' case-insensitively into a PacketCaptureId -// note: this method should only be used for API response data and not user input -func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { - parser := resourceids.NewParserFromResourceIdType(PacketCaptureId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PacketCaptureId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.PacketCaptureName, ok = parsed.Parsed["packetCaptureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCaptureName", *parsed) - } - - return &id, nil -} - -// ValidatePacketCaptureID checks that 'input' can be parsed as a Packet Capture ID -func ValidatePacketCaptureID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePacketCaptureID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Packet Capture ID -func (id PacketCaptureId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s/packetCaptures/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName, id.PacketCaptureName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Packet Capture ID -func (id PacketCaptureId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - resourceids.StaticSegment("staticPacketCaptures", "packetCaptures", "packetCaptures"), - resourceids.UserSpecifiedSegment("packetCaptureName", "packetCaptureValue"), - } -} - -// String returns a human-readable description of this Packet Capture ID -func (id PacketCaptureId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - fmt.Sprintf("Packet Capture Name: %q", id.PacketCaptureName), - } - return fmt.Sprintf("Packet Capture (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/id_packetcapture_test.go b/resource-manager/network/2022-09-01/packetcaptures/id_packetcapture_test.go deleted file mode 100644 index 2e4a39e0952..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/id_packetcapture_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package packetcaptures - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PacketCaptureId{} - -func TestNewPacketCaptureID(t *testing.T) { - id := NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } - - if id.PacketCaptureName != "packetCaptureValue" { - t.Fatalf("Expected %q but got %q for Segment 'PacketCaptureName'", id.PacketCaptureName, "packetCaptureValue") - } -} - -func TestFormatPacketCaptureID(t *testing.T) { - actual := NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePacketCaptureID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PacketCaptureId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue", - Expected: &PacketCaptureId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - PacketCaptureName: "packetCaptureValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePacketCaptureID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.PacketCaptureName != v.Expected.PacketCaptureName { - t.Fatalf("Expected %q but got %q for PacketCaptureName", v.Expected.PacketCaptureName, actual.PacketCaptureName) - } - - } -} - -func TestParsePacketCaptureIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PacketCaptureId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/pAcKeTcApTuReS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue", - Expected: &PacketCaptureId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - PacketCaptureName: "packetCaptureValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/pAcKeTcApTuReS/pAcKeTcApTuReVaLuE", - Expected: &PacketCaptureId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - PacketCaptureName: "pAcKeTcApTuReVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/pAcKeTcApTuReS/pAcKeTcApTuReVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePacketCaptureIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.PacketCaptureName != v.Expected.PacketCaptureName { - t.Fatalf("Expected %q but got %q for PacketCaptureName", v.Expected.PacketCaptureName, actual.PacketCaptureName) - } - - } -} - -func TestSegmentsForPacketCaptureId(t *testing.T) { - segments := PacketCaptureId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PacketCaptureId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/method_create.go b/resource-manager/network/2022-09-01/packetcaptures/method_create.go deleted file mode 100644 index bdb1568fae7..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/method_create.go +++ /dev/null @@ -1,73 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Create ... -func (c PacketCapturesClient) Create(ctx context.Context, id PacketCaptureId, input PacketCapture) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c PacketCapturesClient) CreateThenPoll(ctx context.Context, id PacketCaptureId, input PacketCapture) error { - result, err := c.Create(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/method_delete.go b/resource-manager/network/2022-09-01/packetcaptures/method_delete.go deleted file mode 100644 index d35a3b48efa..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/method_delete.go +++ /dev/null @@ -1,70 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PacketCapturesClient) Delete(ctx context.Context, id PacketCaptureId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PacketCapturesClient) DeleteThenPoll(ctx context.Context, id PacketCaptureId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/method_get.go b/resource-manager/network/2022-09-01/packetcaptures/method_get.go deleted file mode 100644 index 4f97c6ab835..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package packetcaptures - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PacketCaptureResult -} - -// Get ... -func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/method_getstatus.go b/resource-manager/network/2022-09-01/packetcaptures/method_getstatus.go deleted file mode 100644 index 19bf63cc79d..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/method_getstatus.go +++ /dev/null @@ -1,70 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetStatus ... -func (c PacketCapturesClient) GetStatus(ctx context.Context, id PacketCaptureId) (result GetStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetStatusThenPoll performs GetStatus then polls until it's completed -func (c PacketCapturesClient) GetStatusThenPoll(ctx context.Context, id PacketCaptureId) error { - result, err := c.GetStatus(ctx, id) - if err != nil { - return fmt.Errorf("performing GetStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/method_list.go b/resource-manager/network/2022-09-01/packetcaptures/method_list.go deleted file mode 100644 index 5f4d9a97536..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/method_list.go +++ /dev/null @@ -1,52 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PacketCaptureListResult -} - -// List ... -func (c PacketCapturesClient) List(ctx context.Context, id NetworkWatcherId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/packetCaptures", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/method_stop.go b/resource-manager/network/2022-09-01/packetcaptures/method_stop.go deleted file mode 100644 index 31a3b050169..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/method_stop.go +++ /dev/null @@ -1,70 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c PacketCapturesClient) Stop(ctx context.Context, id PacketCaptureId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c PacketCapturesClient) StopThenPoll(ctx context.Context, id PacketCaptureId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapture.go b/resource-manager/network/2022-09-01/packetcaptures/model_packetcapture.go deleted file mode 100644 index 592cd89a6e7..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapture.go +++ /dev/null @@ -1,8 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCapture struct { - Properties PacketCaptureParameters `json:"properties"` -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturefilter.go b/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturefilter.go deleted file mode 100644 index fb301880566..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturefilter.go +++ /dev/null @@ -1,12 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureFilter struct { - LocalIPAddress *string `json:"localIPAddress,omitempty"` - LocalPort *string `json:"localPort,omitempty"` - Protocol *PcProtocol `json:"protocol,omitempty"` - RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` - RemotePort *string `json:"remotePort,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturelistresult.go b/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturelistresult.go deleted file mode 100644 index 54c50c44871..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturelistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureListResult struct { - Value *[]PacketCaptureResult `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturemachinescope.go b/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturemachinescope.go deleted file mode 100644 index 99b476671ba..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturemachinescope.go +++ /dev/null @@ -1,9 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureMachineScope struct { - Exclude *[]string `json:"exclude,omitempty"` - Include *[]string `json:"include,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureparameters.go b/resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureparameters.go deleted file mode 100644 index dd18ed71be2..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureparameters.go +++ /dev/null @@ -1,15 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureParameters struct { - BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"` - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` - Scope *PacketCaptureMachineScope `json:"scope,omitempty"` - StorageLocation PacketCaptureStorageLocation `json:"storageLocation"` - Target string `json:"target"` - TargetType *PacketCaptureTargetType `json:"targetType,omitempty"` - TimeLimitInSeconds *int64 `json:"timeLimitInSeconds,omitempty"` - TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturequerystatusresult.go b/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturequerystatusresult.go deleted file mode 100644 index edea164feae..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturequerystatusresult.go +++ /dev/null @@ -1,31 +0,0 @@ -package packetcaptures - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureQueryStatusResult struct { - CaptureStartTime *string `json:"captureStartTime,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` - PacketCaptureStatus *PcStatus `json:"packetCaptureStatus,omitempty"` - StopReason *string `json:"stopReason,omitempty"` -} - -func (o *PacketCaptureQueryStatusResult) GetCaptureStartTimeAsTime() (*time.Time, error) { - if o.CaptureStartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CaptureStartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *PacketCaptureQueryStatusResult) SetCaptureStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CaptureStartTime = &formatted -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureresult.go b/resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureresult.go deleted file mode 100644 index a2e7cd88e02..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureResult struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PacketCaptureResultProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureresultproperties.go b/resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureresultproperties.go deleted file mode 100644 index 61dbaf130bb..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/model_packetcaptureresultproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureResultProperties struct { - BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"` - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Scope *PacketCaptureMachineScope `json:"scope,omitempty"` - StorageLocation PacketCaptureStorageLocation `json:"storageLocation"` - Target string `json:"target"` - TargetType *PacketCaptureTargetType `json:"targetType,omitempty"` - TimeLimitInSeconds *int64 `json:"timeLimitInSeconds,omitempty"` - TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturestoragelocation.go b/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturestoragelocation.go deleted file mode 100644 index 5cbd5d6b25e..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/model_packetcapturestoragelocation.go +++ /dev/null @@ -1,10 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureStorageLocation struct { - FilePath *string `json:"filePath,omitempty"` - StorageId *string `json:"storageId,omitempty"` - StoragePath *string `json:"storagePath,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/packetcaptures/version.go b/resource-manager/network/2022-09-01/packetcaptures/version.go deleted file mode 100644 index a9aa3ec50d0..00000000000 --- a/resource-manager/network/2022-09-01/packetcaptures/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package packetcaptures - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/README.md b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/README.md deleted file mode 100644 index b80032bf363..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections` Documentation - -The `peerexpressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections" -``` - - -### Client Initialization - -```go -client := peerexpressroutecircuitconnections.NewPeerExpressRouteCircuitConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PeerExpressRouteCircuitConnectionsClient.Get` - -```go -ctx := context.TODO() -id := peerexpressroutecircuitconnections.NewPeerConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "peerConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PeerExpressRouteCircuitConnectionsClient.List` - -```go -ctx := context.TODO() -id := peerexpressroutecircuitconnections.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/client.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/client.go deleted file mode 100644 index c153e5d3b4a..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(api environments.Api) (*PeerExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "peerexpressroutecircuitconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PeerExpressRouteCircuitConnectionsClient: %+v", err) - } - - return &PeerExpressRouteCircuitConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/constants.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/constants.go deleted file mode 100644 index eda70745480..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/constants.go +++ /dev/null @@ -1,101 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/id_peerconnection.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/id_peerconnection.go deleted file mode 100644 index 9e974b3fad5..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/id_peerconnection.go +++ /dev/null @@ -1,153 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeerConnectionId{} - -// PeerConnectionId is a struct representing the Resource ID for a Peer Connection -type PeerConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - PeerConnectionName string -} - -// NewPeerConnectionID returns a new PeerConnectionId struct -func NewPeerConnectionID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, peerConnectionName string) PeerConnectionId { - return PeerConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - PeerConnectionName: peerConnectionName, - } -} - -// ParsePeerConnectionID parses 'input' into a PeerConnectionId -func ParsePeerConnectionID(input string) (*PeerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PeerConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.PeerConnectionName, ok = parsed.Parsed["peerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peerConnectionName", *parsed) - } - - return &id, nil -} - -// ParsePeerConnectionIDInsensitively parses 'input' case-insensitively into a PeerConnectionId -// note: this method should only be used for API response data and not user input -func ParsePeerConnectionIDInsensitively(input string) (*PeerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PeerConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.PeerConnectionName, ok = parsed.Parsed["peerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peerConnectionName", *parsed) - } - - return &id, nil -} - -// ValidatePeerConnectionID checks that 'input' can be parsed as a Peer Connection ID -func ValidatePeerConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeerConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peer Connection ID -func (id PeerConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/peerConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.PeerConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peer Connection ID -func (id PeerConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticPeerConnections", "peerConnections", "peerConnections"), - resourceids.UserSpecifiedSegment("peerConnectionName", "peerConnectionValue"), - } -} - -// String returns a human-readable description of this Peer Connection ID -func (id PeerConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Peer Connection Name: %q", id.PeerConnectionName), - } - return fmt.Sprintf("Peer Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/id_peerconnection_test.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/id_peerconnection_test.go deleted file mode 100644 index 1539f6e6033..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/id_peerconnection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeerConnectionId{} - -func TestNewPeerConnectionID(t *testing.T) { - id := NewPeerConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "peerConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.PeerConnectionName != "peerConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeerConnectionName'", id.PeerConnectionName, "peerConnectionValue") - } -} - -func TestFormatPeerConnectionID(t *testing.T) { - actual := NewPeerConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "peerConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeerConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue", - Expected: &PeerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - PeerConnectionName: "peerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeerConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.PeerConnectionName != v.Expected.PeerConnectionName { - t.Fatalf("Expected %q but got %q for PeerConnectionName", v.Expected.PeerConnectionName, actual.PeerConnectionName) - } - - } -} - -func TestParsePeerConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/pEeRcOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue", - Expected: &PeerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - PeerConnectionName: "peerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/pEeRcOnNeCtIoNs/pEeRcOnNeCtIoNvAlUe", - Expected: &PeerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - PeerConnectionName: "pEeRcOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/pEeRcOnNeCtIoNs/pEeRcOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeerConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.PeerConnectionName != v.Expected.PeerConnectionName { - t.Fatalf("Expected %q but got %q for PeerConnectionName", v.Expected.PeerConnectionName, actual.PeerConnectionName) - } - - } -} - -func TestSegmentsForPeerConnectionId(t *testing.T) { - segments := PeerConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeerConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/method_get.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/method_get.go deleted file mode 100644 index 1865b66be51..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PeerExpressRouteCircuitConnection -} - -// Get ... -func (c PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id PeerConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/method_list.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/method_list.go deleted file mode 100644 index ea092d55ca6..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PeerExpressRouteCircuitConnection -} - -type ListCompleteResult struct { - Items []PeerExpressRouteCircuitConnection -} - -// List ... -func (c PeerExpressRouteCircuitConnectionsClient) List(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/peerConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PeerExpressRouteCircuitConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PeerExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PeerExpressRouteCircuitConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PeerExpressRouteCircuitConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId, predicate PeerExpressRouteCircuitConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PeerExpressRouteCircuitConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnection.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnection.go deleted file mode 100644 index 0ba2f68f213..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package peerexpressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index c4a72c247d0..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package peerexpressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthResourceGuid *string `json:"authResourceGuid,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ConnectionName *string `json:"connectionName,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_subresource.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_subresource.go deleted file mode 100644 index da8f131efb2..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package peerexpressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/predicates.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/predicates.go deleted file mode 100644 index c0766bb2d18..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package peerexpressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p PeerExpressRouteCircuitConnectionOperationPredicate) Matches(input PeerExpressRouteCircuitConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/version.go b/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/version.go deleted file mode 100644 index 2e8e1504206..00000000000 --- a/resource-manager/network/2022-09-01/peerexpressroutecircuitconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package peerexpressroutecircuitconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/README.md b/resource-manager/network/2022-09-01/privatednszonegroups/README.md deleted file mode 100644 index 38ab67f20c8..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privatednszonegroups` Documentation - -The `privatednszonegroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privatednszonegroups" -``` - - -### Client Initialization - -```go -client := privatednszonegroups.NewPrivateDnsZoneGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateDnsZoneGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := privatednszonegroups.NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue") - -payload := privatednszonegroups.PrivateDnsZoneGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateDnsZoneGroupsClient.Delete` - -```go -ctx := context.TODO() -id := privatednszonegroups.NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateDnsZoneGroupsClient.Get` - -```go -ctx := context.TODO() -id := privatednszonegroups.NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateDnsZoneGroupsClient.List` - -```go -ctx := context.TODO() -id := privatednszonegroups.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/client.go b/resource-manager/network/2022-09-01/privatednszonegroups/client.go deleted file mode 100644 index 872a0ea57cd..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatednszonegroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneGroupsClient struct { - Client *resourcemanager.Client -} - -func NewPrivateDnsZoneGroupsClientWithBaseURI(api environments.Api) (*PrivateDnsZoneGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "privatednszonegroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateDnsZoneGroupsClient: %+v", err) - } - - return &PrivateDnsZoneGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/constants.go b/resource-manager/network/2022-09-01/privatednszonegroups/constants.go deleted file mode 100644 index a68ae3a4523..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package privatednszonegroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/id_privatednszonegroup.go b/resource-manager/network/2022-09-01/privatednszonegroups/id_privatednszonegroup.go deleted file mode 100644 index 532e498e159..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/id_privatednszonegroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package privatednszonegroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateDnsZoneGroupId{} - -// PrivateDnsZoneGroupId is a struct representing the Resource ID for a Private Dns Zone Group -type PrivateDnsZoneGroupId struct { - SubscriptionId string - ResourceGroupName string - PrivateEndpointName string - PrivateDnsZoneGroupName string -} - -// NewPrivateDnsZoneGroupID returns a new PrivateDnsZoneGroupId struct -func NewPrivateDnsZoneGroupID(subscriptionId string, resourceGroupName string, privateEndpointName string, privateDnsZoneGroupName string) PrivateDnsZoneGroupId { - return PrivateDnsZoneGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateEndpointName: privateEndpointName, - PrivateDnsZoneGroupName: privateDnsZoneGroupName, - } -} - -// ParsePrivateDnsZoneGroupID parses 'input' into a PrivateDnsZoneGroupId -func ParsePrivateDnsZoneGroupID(input string) (*PrivateDnsZoneGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateDnsZoneGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateDnsZoneGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - if id.PrivateDnsZoneGroupName, ok = parsed.Parsed["privateDnsZoneGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneGroupName", *parsed) - } - - return &id, nil -} - -// ParsePrivateDnsZoneGroupIDInsensitively parses 'input' case-insensitively into a PrivateDnsZoneGroupId -// note: this method should only be used for API response data and not user input -func ParsePrivateDnsZoneGroupIDInsensitively(input string) (*PrivateDnsZoneGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateDnsZoneGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateDnsZoneGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - if id.PrivateDnsZoneGroupName, ok = parsed.Parsed["privateDnsZoneGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneGroupName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateDnsZoneGroupID checks that 'input' can be parsed as a Private Dns Zone Group ID -func ValidatePrivateDnsZoneGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateDnsZoneGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Dns Zone Group ID -func (id PrivateDnsZoneGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateEndpoints/%s/privateDnsZoneGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateEndpointName, id.PrivateDnsZoneGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Dns Zone Group ID -func (id PrivateDnsZoneGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateEndpoints", "privateEndpoints", "privateEndpoints"), - resourceids.UserSpecifiedSegment("privateEndpointName", "privateEndpointValue"), - resourceids.StaticSegment("staticPrivateDnsZoneGroups", "privateDnsZoneGroups", "privateDnsZoneGroups"), - resourceids.UserSpecifiedSegment("privateDnsZoneGroupName", "privateDnsZoneGroupValue"), - } -} - -// String returns a human-readable description of this Private Dns Zone Group ID -func (id PrivateDnsZoneGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Endpoint Name: %q", id.PrivateEndpointName), - fmt.Sprintf("Private Dns Zone Group Name: %q", id.PrivateDnsZoneGroupName), - } - return fmt.Sprintf("Private Dns Zone Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/id_privatednszonegroup_test.go b/resource-manager/network/2022-09-01/privatednszonegroups/id_privatednszonegroup_test.go deleted file mode 100644 index 0c58fbbf7fe..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/id_privatednszonegroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package privatednszonegroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateDnsZoneGroupId{} - -func TestNewPrivateDnsZoneGroupID(t *testing.T) { - id := NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateEndpointName != "privateEndpointValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointName'", id.PrivateEndpointName, "privateEndpointValue") - } - - if id.PrivateDnsZoneGroupName != "privateDnsZoneGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateDnsZoneGroupName'", id.PrivateDnsZoneGroupName, "privateDnsZoneGroupValue") - } -} - -func TestFormatPrivateDnsZoneGroupID(t *testing.T) { - actual := NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateDnsZoneGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateDnsZoneGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue", - Expected: &PrivateDnsZoneGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - PrivateDnsZoneGroupName: "privateDnsZoneGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateDnsZoneGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - if actual.PrivateDnsZoneGroupName != v.Expected.PrivateDnsZoneGroupName { - t.Fatalf("Expected %q but got %q for PrivateDnsZoneGroupName", v.Expected.PrivateDnsZoneGroupName, actual.PrivateDnsZoneGroupName) - } - - } -} - -func TestParsePrivateDnsZoneGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateDnsZoneGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/pRiVaTeDnSzOnEgRoUpS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue", - Expected: &PrivateDnsZoneGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - PrivateDnsZoneGroupName: "privateDnsZoneGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/pRiVaTeDnSzOnEgRoUpS/pRiVaTeDnSzOnEgRoUpVaLuE", - Expected: &PrivateDnsZoneGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateEndpointName: "pRiVaTeEnDpOiNtVaLuE", - PrivateDnsZoneGroupName: "pRiVaTeDnSzOnEgRoUpVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/pRiVaTeDnSzOnEgRoUpS/pRiVaTeDnSzOnEgRoUpVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateDnsZoneGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - if actual.PrivateDnsZoneGroupName != v.Expected.PrivateDnsZoneGroupName { - t.Fatalf("Expected %q but got %q for PrivateDnsZoneGroupName", v.Expected.PrivateDnsZoneGroupName, actual.PrivateDnsZoneGroupName) - } - - } -} - -func TestSegmentsForPrivateDnsZoneGroupId(t *testing.T) { - segments := PrivateDnsZoneGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateDnsZoneGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/id_privateendpoint.go b/resource-manager/network/2022-09-01/privatednszonegroups/id_privateendpoint.go deleted file mode 100644 index a547392c0f3..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/id_privateendpoint.go +++ /dev/null @@ -1,127 +0,0 @@ -package privatednszonegroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointId{} - -// PrivateEndpointId is a struct representing the Resource ID for a Private Endpoint -type PrivateEndpointId struct { - SubscriptionId string - ResourceGroupName string - PrivateEndpointName string -} - -// NewPrivateEndpointID returns a new PrivateEndpointId struct -func NewPrivateEndpointID(subscriptionId string, resourceGroupName string, privateEndpointName string) PrivateEndpointId { - return PrivateEndpointId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateEndpointName: privateEndpointName, - } -} - -// ParsePrivateEndpointID parses 'input' into a PrivateEndpointId -func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - return &id, nil -} - -// ParsePrivateEndpointIDInsensitively parses 'input' case-insensitively into a PrivateEndpointId -// note: this method should only be used for API response data and not user input -func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateEndpointID checks that 'input' can be parsed as a Private Endpoint ID -func ValidatePrivateEndpointID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateEndpointID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Endpoint ID -func (id PrivateEndpointId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateEndpoints/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateEndpointName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint ID -func (id PrivateEndpointId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateEndpoints", "privateEndpoints", "privateEndpoints"), - resourceids.UserSpecifiedSegment("privateEndpointName", "privateEndpointValue"), - } -} - -// String returns a human-readable description of this Private Endpoint ID -func (id PrivateEndpointId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Endpoint Name: %q", id.PrivateEndpointName), - } - return fmt.Sprintf("Private Endpoint (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/id_privateendpoint_test.go b/resource-manager/network/2022-09-01/privatednszonegroups/id_privateendpoint_test.go deleted file mode 100644 index d91c7053eb8..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/id_privateendpoint_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privatednszonegroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointId{} - -func TestNewPrivateEndpointID(t *testing.T) { - id := NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateEndpointName != "privateEndpointValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointName'", id.PrivateEndpointName, "privateEndpointValue") - } -} - -func TestFormatPrivateEndpointID(t *testing.T) { - actual := NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateEndpointID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - } -} - -func TestParsePrivateEndpointIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateEndpointName: "pRiVaTeEnDpOiNtVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - } -} - -func TestSegmentsForPrivateEndpointId(t *testing.T) { - segments := PrivateEndpointId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateEndpointId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/method_createorupdate.go b/resource-manager/network/2022-09-01/privatednszonegroups/method_createorupdate.go deleted file mode 100644 index 446e42244fc..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package privatednszonegroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PrivateDnsZoneGroupsClient) CreateOrUpdate(ctx context.Context, id PrivateDnsZoneGroupId, input PrivateDnsZoneGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PrivateDnsZoneGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateDnsZoneGroupId, input PrivateDnsZoneGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/method_delete.go b/resource-manager/network/2022-09-01/privatednszonegroups/method_delete.go deleted file mode 100644 index cdf382f2686..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package privatednszonegroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PrivateDnsZoneGroupsClient) Delete(ctx context.Context, id PrivateDnsZoneGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PrivateDnsZoneGroupsClient) DeleteThenPoll(ctx context.Context, id PrivateDnsZoneGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/method_get.go b/resource-manager/network/2022-09-01/privatednszonegroups/method_get.go deleted file mode 100644 index 8588f80e9e1..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package privatednszonegroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateDnsZoneGroup -} - -// Get ... -func (c PrivateDnsZoneGroupsClient) Get(ctx context.Context, id PrivateDnsZoneGroupId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/method_list.go b/resource-manager/network/2022-09-01/privatednszonegroups/method_list.go deleted file mode 100644 index 1a9b85295d0..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package privatednszonegroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateDnsZoneGroup -} - -type ListCompleteResult struct { - Items []PrivateDnsZoneGroup -} - -// List ... -func (c PrivateDnsZoneGroupsClient) List(ctx context.Context, id PrivateEndpointId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateDnsZoneGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateDnsZoneGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PrivateDnsZoneGroupsClient) ListComplete(ctx context.Context, id PrivateEndpointId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PrivateDnsZoneGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateDnsZoneGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateEndpointId, predicate PrivateDnsZoneGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PrivateDnsZoneGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszoneconfig.go b/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszoneconfig.go deleted file mode 100644 index e44ef143e5c..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszoneconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneConfig struct { - Name *string `json:"name,omitempty"` - Properties *PrivateDnsZonePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonegroup.go b/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonegroup.go deleted file mode 100644 index 75533fc47a5..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonegroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateDnsZoneGroupPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonegrouppropertiesformat.go b/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonegrouppropertiesformat.go deleted file mode 100644 index f892f554965..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonegrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneGroupPropertiesFormat struct { - PrivateDnsZoneConfigs *[]PrivateDnsZoneConfig `json:"privateDnsZoneConfigs,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonepropertiesformat.go b/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonepropertiesformat.go deleted file mode 100644 index 33858bfe24e..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/model_privatednszonepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZonePropertiesFormat struct { - PrivateDnsZoneId *string `json:"privateDnsZoneId,omitempty"` - RecordSets *[]RecordSet `json:"recordSets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/model_recordset.go b/resource-manager/network/2022-09-01/privatednszonegroups/model_recordset.go deleted file mode 100644 index 4a39969425d..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/model_recordset.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RecordSet struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RecordSetName *string `json:"recordSetName,omitempty"` - RecordType *string `json:"recordType,omitempty"` - Ttl *int64 `json:"ttl,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/predicates.go b/resource-manager/network/2022-09-01/privatednszonegroups/predicates.go deleted file mode 100644 index 4d27803d6e2..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneGroupOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p PrivateDnsZoneGroupOperationPredicate) Matches(input PrivateDnsZoneGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/privatednszonegroups/version.go b/resource-manager/network/2022-09-01/privatednszonegroups/version.go deleted file mode 100644 index 76ffc9d1098..00000000000 --- a/resource-manager/network/2022-09-01/privatednszonegroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatednszonegroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatednszonegroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/README.md b/resource-manager/network/2022-09-01/privateendpoints/README.md deleted file mode 100644 index 39077c9c4a4..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/README.md +++ /dev/null @@ -1,133 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privateendpoints` Documentation - -The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privateendpoints" -``` - - -### Client Initialization - -```go -client := privateendpoints.NewPrivateEndpointsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateEndpointsClient.AvailablePrivateEndpointTypesList` - -```go -ctx := context.TODO() -id := privateendpoints.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailablePrivateEndpointTypesList(ctx, id)` can be used to do batched pagination -items, err := client.AvailablePrivateEndpointTypesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointsClient.AvailablePrivateEndpointTypesListByResourceGroup` - -```go -ctx := context.TODO() -id := privateendpoints.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -// alternatively `client.AvailablePrivateEndpointTypesListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.AvailablePrivateEndpointTypesListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -payload := privateendpoints.PrivateEndpoint{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateEndpointsClient.Delete` - -```go -ctx := context.TODO() -id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateEndpointsClient.Get` - -```go -ctx := context.TODO() -id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -read, err := client.Get(ctx, id, privateendpoints.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateEndpointsClient.List` - -```go -ctx := context.TODO() -id := privateendpoints.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointsClient.ListBySubscription` - -```go -ctx := context.TODO() -id := privateendpoints.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/privateendpoints/client.go b/resource-manager/network/2022-09-01/privateendpoints/client.go deleted file mode 100644 index 8ef83ec0060..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privateendpoints - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointsClient struct { - Client *resourcemanager.Client -} - -func NewPrivateEndpointsClientWithBaseURI(api environments.Api) (*PrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "privateendpoints", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) - } - - return &PrivateEndpointsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/constants.go b/resource-manager/network/2022-09-01/privateendpoints/constants.go deleted file mode 100644 index 2436e142c98..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package privateendpoints - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/id_location.go b/resource-manager/network/2022-09-01/privateendpoints/id_location.go deleted file mode 100644 index 146a6110738..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package privateendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/id_location_test.go b/resource-manager/network/2022-09-01/privateendpoints/id_location_test.go deleted file mode 100644 index 0309ae8635e..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package privateendpoints - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/id_privateendpoint.go b/resource-manager/network/2022-09-01/privateendpoints/id_privateendpoint.go deleted file mode 100644 index 219fe0f7906..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/id_privateendpoint.go +++ /dev/null @@ -1,127 +0,0 @@ -package privateendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointId{} - -// PrivateEndpointId is a struct representing the Resource ID for a Private Endpoint -type PrivateEndpointId struct { - SubscriptionId string - ResourceGroupName string - PrivateEndpointName string -} - -// NewPrivateEndpointID returns a new PrivateEndpointId struct -func NewPrivateEndpointID(subscriptionId string, resourceGroupName string, privateEndpointName string) PrivateEndpointId { - return PrivateEndpointId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateEndpointName: privateEndpointName, - } -} - -// ParsePrivateEndpointID parses 'input' into a PrivateEndpointId -func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - return &id, nil -} - -// ParsePrivateEndpointIDInsensitively parses 'input' case-insensitively into a PrivateEndpointId -// note: this method should only be used for API response data and not user input -func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateEndpointID checks that 'input' can be parsed as a Private Endpoint ID -func ValidatePrivateEndpointID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateEndpointID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Endpoint ID -func (id PrivateEndpointId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateEndpoints/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateEndpointName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint ID -func (id PrivateEndpointId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateEndpoints", "privateEndpoints", "privateEndpoints"), - resourceids.UserSpecifiedSegment("privateEndpointName", "privateEndpointValue"), - } -} - -// String returns a human-readable description of this Private Endpoint ID -func (id PrivateEndpointId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Endpoint Name: %q", id.PrivateEndpointName), - } - return fmt.Sprintf("Private Endpoint (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/id_privateendpoint_test.go b/resource-manager/network/2022-09-01/privateendpoints/id_privateendpoint_test.go deleted file mode 100644 index c03cea2e814..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/id_privateendpoint_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privateendpoints - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointId{} - -func TestNewPrivateEndpointID(t *testing.T) { - id := NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateEndpointName != "privateEndpointValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointName'", id.PrivateEndpointName, "privateEndpointValue") - } -} - -func TestFormatPrivateEndpointID(t *testing.T) { - actual := NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateEndpointID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - } -} - -func TestParsePrivateEndpointIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateEndpointName: "pRiVaTeEnDpOiNtVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - } -} - -func TestSegmentsForPrivateEndpointId(t *testing.T) { - segments := PrivateEndpointId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateEndpointId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/id_providerlocation.go b/resource-manager/network/2022-09-01/privateendpoints/id_providerlocation.go deleted file mode 100644 index bdc082c0530..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/id_providerlocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package privateendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -// ProviderLocationId is a struct representing the Resource ID for a Provider Location -type ProviderLocationId struct { - SubscriptionId string - ResourceGroupName string - LocationName string -} - -// NewProviderLocationID returns a new ProviderLocationId struct -func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { - return ProviderLocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocationName: locationName, - } -} - -// ParseProviderLocationID parses 'input' into a ProviderLocationId -func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId -// note: this method should only be used for API response data and not user input -func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID -func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Location ID -func (id ProviderLocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID -func (id ProviderLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Provider Location ID -func (id ProviderLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/id_providerlocation_test.go b/resource-manager/network/2022-09-01/privateendpoints/id_providerlocation_test.go deleted file mode 100644 index 02c60f97242..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/id_providerlocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privateendpoints - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -func TestNewProviderLocationID(t *testing.T) { - id := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatProviderLocationID(t *testing.T) { - actual := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseProviderLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForProviderLocationId(t *testing.T) { - segments := ProviderLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/method_availableprivateendpointtypeslist.go b/resource-manager/network/2022-09-01/privateendpoints/method_availableprivateendpointtypeslist.go deleted file mode 100644 index 2cb59080a74..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/method_availableprivateendpointtypeslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointTypesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailablePrivateEndpointType -} - -type AvailablePrivateEndpointTypesListCompleteResult struct { - Items []AvailablePrivateEndpointType -} - -// AvailablePrivateEndpointTypesList ... -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesList(ctx context.Context, id LocationId) (result AvailablePrivateEndpointTypesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availablePrivateEndpointTypes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailablePrivateEndpointType `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailablePrivateEndpointTypesListComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListComplete(ctx context.Context, id LocationId) (AvailablePrivateEndpointTypesListCompleteResult, error) { - return c.AvailablePrivateEndpointTypesListCompleteMatchingPredicate(ctx, id, AvailablePrivateEndpointTypeOperationPredicate{}) -} - -// AvailablePrivateEndpointTypesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AvailablePrivateEndpointTypeOperationPredicate) (result AvailablePrivateEndpointTypesListCompleteResult, err error) { - items := make([]AvailablePrivateEndpointType, 0) - - resp, err := c.AvailablePrivateEndpointTypesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailablePrivateEndpointTypesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go b/resource-manager/network/2022-09-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go deleted file mode 100644 index d819f6c432c..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go +++ /dev/null @@ -1,89 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointTypesListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailablePrivateEndpointType -} - -type AvailablePrivateEndpointTypesListByResourceGroupCompleteResult struct { - Items []AvailablePrivateEndpointType -} - -// AvailablePrivateEndpointTypesListByResourceGroup ... -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroup(ctx context.Context, id ProviderLocationId) (result AvailablePrivateEndpointTypesListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availablePrivateEndpointTypes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailablePrivateEndpointType `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailablePrivateEndpointTypesListByResourceGroupComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroupComplete(ctx context.Context, id ProviderLocationId) (AvailablePrivateEndpointTypesListByResourceGroupCompleteResult, error) { - return c.AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate(ctx, id, AvailablePrivateEndpointTypeOperationPredicate{}) -} - -// AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AvailablePrivateEndpointTypeOperationPredicate) (result AvailablePrivateEndpointTypesListByResourceGroupCompleteResult, err error) { - items := make([]AvailablePrivateEndpointType, 0) - - resp, err := c.AvailablePrivateEndpointTypesListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailablePrivateEndpointTypesListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/method_createorupdate.go b/resource-manager/network/2022-09-01/privateendpoints/method_createorupdate.go deleted file mode 100644 index 04fee084ffc..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, id PrivateEndpointId, input PrivateEndpoint) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PrivateEndpointsClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateEndpointId, input PrivateEndpoint) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/method_delete.go b/resource-manager/network/2022-09-01/privateendpoints/method_delete.go deleted file mode 100644 index 70f382bf8e3..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PrivateEndpointsClient) Delete(ctx context.Context, id PrivateEndpointId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PrivateEndpointsClient) DeleteThenPoll(ctx context.Context, id PrivateEndpointId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/method_get.go b/resource-manager/network/2022-09-01/privateendpoints/method_get.go deleted file mode 100644 index 3530642f24e..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpoint -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c PrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/method_list.go b/resource-manager/network/2022-09-01/privateendpoints/method_list.go deleted file mode 100644 index 8191e9553b0..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateEndpoint -} - -type ListCompleteResult struct { - Items []PrivateEndpoint -} - -// List ... -func (c PrivateEndpointsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PrivateEndpointOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PrivateEndpointOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PrivateEndpoint, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/method_listbysubscription.go b/resource-manager/network/2022-09-01/privateendpoints/method_listbysubscription.go deleted file mode 100644 index 52761988c2d..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/method_listbysubscription.go +++ /dev/null @@ -1,90 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateEndpoint -} - -type ListBySubscriptionCompleteResult struct { - Items []PrivateEndpoint -} - -// ListBySubscription ... -func (c PrivateEndpointsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, PrivateEndpointOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PrivateEndpointOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]PrivateEndpoint, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddress.go deleted file mode 100644 index b8767a924d3..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index faea7af9635..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index bc45532ef99..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewayipconfiguration.go deleted file mode 100644 index d7b619385a0..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 0975b3a3c18..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/privateendpoints/model_applicationsecuritygroup.go deleted file mode 100644 index b514ce65a10..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index c505be8adad..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_availableprivateendpointtype.go b/resource-manager/network/2022-09-01/privateendpoints/model_availableprivateendpointtype.go deleted file mode 100644 index c6aa8839dc1..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_availableprivateendpointtype.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointType struct { - DisplayName *string `json:"displayName,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ResourceName *string `json:"resourceName,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_backendaddresspool.go b/resource-manager/network/2022-09-01/privateendpoints/model_backendaddresspool.go deleted file mode 100644 index afaee89cd0a..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 9c21e3e14cb..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index a078479b1cf..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_ddossettings.go b/resource-manager/network/2022-09-01/privateendpoints/model_ddossettings.go deleted file mode 100644 index 6253ff1e5a4..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_delegation.go b/resource-manager/network/2022-09-01/privateendpoints/model_delegation.go deleted file mode 100644 index fd6104e1e68..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_flowlog.go b/resource-manager/network/2022-09-01/privateendpoints/model_flowlog.go deleted file mode 100644 index bce1bcfe8ad..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/privateendpoints/model_flowlogformatparameters.go deleted file mode 100644 index a15c48049c6..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_flowlogpropertiesformat.go deleted file mode 100644 index 6f45378b9d1..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/privateendpoints/model_frontendipconfiguration.go deleted file mode 100644 index 3dcb8560fec..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 8980fc3756f..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index dde47c23fb2..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_inboundnatrule.go b/resource-manager/network/2022-09-01/privateendpoints/model_inboundnatrule.go deleted file mode 100644 index 38c0ffd6728..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index b952302ddeb..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_ipconfiguration.go b/resource-manager/network/2022-09-01/privateendpoints/model_ipconfiguration.go deleted file mode 100644 index cf18ee9415b..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationprofile.go deleted file mode 100644 index d493529c992..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index dabdbd7c841..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index fdfdcd1d175..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_iptag.go b/resource-manager/network/2022-09-01/privateendpoints/model_iptag.go deleted file mode 100644 index 83206500edc..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/privateendpoints/model_loadbalancerbackendaddress.go deleted file mode 100644 index ee77fec93c3..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 9be73b64841..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_natgateway.go b/resource-manager/network/2022-09-01/privateendpoints/model_natgateway.go deleted file mode 100644 index e197bcd7ada..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_natgatewaypropertiesformat.go deleted file mode 100644 index fc0ee1ef6da..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_natgatewaysku.go b/resource-manager/network/2022-09-01/privateendpoints/model_natgatewaysku.go deleted file mode 100644 index c0b2d583e49..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_natruleportmapping.go b/resource-manager/network/2022-09-01/privateendpoints/model_natruleportmapping.go deleted file mode 100644 index 07eeaf979f4..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterface.go b/resource-manager/network/2022-09-01/privateendpoints/model_networkinterface.go deleted file mode 100644 index 9e9c7fcfa82..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacednssettings.go deleted file mode 100644 index 5182d846bf1..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfiguration.go deleted file mode 100644 index e41eb348a7b..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index ac6a234dd34..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index cacb1e17719..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 33a69210c93..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacetapconfiguration.go deleted file mode 100644 index ebe35c0a178..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 54e437f339f..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/privateendpoints/model_networksecuritygroup.go deleted file mode 100644 index cb420b60990..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index b03a951faff..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpoint.go b/resource-manager/network/2022-09-01/privateendpoints/model_privateendpoint.go deleted file mode 100644 index 5e9da21fedb..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointconnection.go deleted file mode 100644 index 5bd8301f4f3..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointconnectionproperties.go deleted file mode 100644 index 5c9fea54ead..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointipconfiguration.go deleted file mode 100644 index 1fbe08553f6..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 3772b023f53..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointproperties.go deleted file mode 100644 index ac88e7637f3..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkservice.go b/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkservice.go deleted file mode 100644 index e4c8723fc8b..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnection.go deleted file mode 100644 index be10aca683d..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index da2a7ed3871..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 1d19bec0830..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 358ee0e7450..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 81634dd44b1..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceproperties.go deleted file mode 100644 index d246ec00f40..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddress.go b/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddress.go deleted file mode 100644 index eeca2133c31..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddressdnssettings.go deleted file mode 100644 index 1ef8cb3fc5f..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddresspropertiesformat.go deleted file mode 100644 index bed9d0ba8d7..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddresssku.go deleted file mode 100644 index 2bbd107f243..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/privateendpoints/model_resourcenavigationlink.go deleted file mode 100644 index d8890442923..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_resourcenavigationlinkformat.go deleted file mode 100644 index 281da0ffc97..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_resourceset.go b/resource-manager/network/2022-09-01/privateendpoints/model_resourceset.go deleted file mode 100644 index 999b1817a30..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/privateendpoints/model_retentionpolicyparameters.go deleted file mode 100644 index b3df6ba5fd1..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_route.go b/resource-manager/network/2022-09-01/privateendpoints/model_route.go deleted file mode 100644 index 98c7a5ae476..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_routepropertiesformat.go deleted file mode 100644 index ca3956916f3..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_routetable.go b/resource-manager/network/2022-09-01/privateendpoints/model_routetable.go deleted file mode 100644 index e1f695300d8..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_routetablepropertiesformat.go deleted file mode 100644 index 4976a28f0ea..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_securityrule.go b/resource-manager/network/2022-09-01/privateendpoints/model_securityrule.go deleted file mode 100644 index ccfc50b4a7e..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_securityrulepropertiesformat.go deleted file mode 100644 index 2b19d6a628d..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/privateendpoints/model_serviceassociationlink.go deleted file mode 100644 index a88015b02e1..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 7a779312074..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 84e538e8350..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicy.go deleted file mode 100644 index ea8ff121174..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicydefinition.go deleted file mode 100644 index cc2054776fa..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 8355dfbaae0..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index dbdcdea1442..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5b54f3ef673..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_subnet.go b/resource-manager/network/2022-09-01/privateendpoints/model_subnet.go deleted file mode 100644 index 1eee73db2bd..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_subnetpropertiesformat.go deleted file mode 100644 index 01c2d0455ce..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_subresource.go b/resource-manager/network/2022-09-01/privateendpoints/model_subresource.go deleted file mode 100644 index 134c4f66102..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index fc7cf55257e..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/privateendpoints/model_trafficanalyticsproperties.go deleted file mode 100644 index 8a4f6042fa4..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/privateendpoints/model_virtualnetworktap.go deleted file mode 100644 index 99fe7d7fe1d..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/privateendpoints/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index c7fa6565e0f..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/predicates.go b/resource-manager/network/2022-09-01/privateendpoints/predicates.go deleted file mode 100644 index c99098d0163..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/predicates.go +++ /dev/null @@ -1,70 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointTypeOperationPredicate struct { - DisplayName *string - Id *string - Name *string - ResourceName *string - Type *string -} - -func (p AvailablePrivateEndpointTypeOperationPredicate) Matches(input AvailablePrivateEndpointType) bool { - - if p.DisplayName != nil && (input.DisplayName == nil || *p.DisplayName != *input.DisplayName) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.ResourceName != nil && (input.ResourceName == nil || *p.ResourceName != *input.ResourceName) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type PrivateEndpointOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PrivateEndpointOperationPredicate) Matches(input PrivateEndpoint) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/privateendpoints/version.go b/resource-manager/network/2022-09-01/privateendpoints/version.go deleted file mode 100644 index d65860904c8..00000000000 --- a/resource-manager/network/2022-09-01/privateendpoints/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpoints/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/README.md b/resource-manager/network/2022-09-01/privatelinkservice/README.md deleted file mode 100644 index 08de55c0a2f..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privatelinkservice` Documentation - -The `privatelinkservice` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privatelinkservice" -``` - - -### Client Initialization - -```go -client := privatelinkservice.NewPrivateLinkServiceClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateLinkServiceClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := privatelinkservice.NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - -payload := privatelinkservice.PrivateLinkService{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/privatelinkservice/client.go b/resource-manager/network/2022-09-01/privatelinkservice/client.go deleted file mode 100644 index b2b1cce0fce..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatelinkservice - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceClient struct { - Client *resourcemanager.Client -} - -func NewPrivateLinkServiceClientWithBaseURI(api environments.Api) (*PrivateLinkServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "privatelinkservice", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateLinkServiceClient: %+v", err) - } - - return &PrivateLinkServiceClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/constants.go b/resource-manager/network/2022-09-01/privatelinkservice/constants.go deleted file mode 100644 index 242e416e631..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package privatelinkservice - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/id_privatelinkservice.go b/resource-manager/network/2022-09-01/privatelinkservice/id_privatelinkservice.go deleted file mode 100644 index 1565b227dbd..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/id_privatelinkservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package privatelinkservice - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateLinkServiceId{} - -// PrivateLinkServiceId is a struct representing the Resource ID for a Private Link Service -type PrivateLinkServiceId struct { - SubscriptionId string - ResourceGroupName string - PrivateLinkServiceName string -} - -// NewPrivateLinkServiceID returns a new PrivateLinkServiceId struct -func NewPrivateLinkServiceID(subscriptionId string, resourceGroupName string, privateLinkServiceName string) PrivateLinkServiceId { - return PrivateLinkServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateLinkServiceName: privateLinkServiceName, - } -} - -// ParsePrivateLinkServiceID parses 'input' into a PrivateLinkServiceId -func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - return &id, nil -} - -// ParsePrivateLinkServiceIDInsensitively parses 'input' case-insensitively into a PrivateLinkServiceId -// note: this method should only be used for API response data and not user input -func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateLinkServiceID checks that 'input' can be parsed as a Private Link Service ID -func ValidatePrivateLinkServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateLinkServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Link Service ID -func (id PrivateLinkServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateLinkServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Link Service ID -func (id PrivateLinkServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateLinkServices", "privateLinkServices", "privateLinkServices"), - resourceids.UserSpecifiedSegment("privateLinkServiceName", "privateLinkServiceValue"), - } -} - -// String returns a human-readable description of this Private Link Service ID -func (id PrivateLinkServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Link Service Name: %q", id.PrivateLinkServiceName), - } - return fmt.Sprintf("Private Link Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/id_privatelinkservice_test.go b/resource-manager/network/2022-09-01/privatelinkservice/id_privatelinkservice_test.go deleted file mode 100644 index 76b34d6fdf8..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/id_privatelinkservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privatelinkservice - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateLinkServiceId{} - -func TestNewPrivateLinkServiceID(t *testing.T) { - id := NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateLinkServiceName != "privateLinkServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateLinkServiceName'", id.PrivateLinkServiceName, "privateLinkServiceValue") - } -} - -func TestFormatPrivateLinkServiceID(t *testing.T) { - actual := NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateLinkServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateLinkServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateLinkServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - } -} - -func TestParsePrivateLinkServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateLinkServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateLinkServiceName: "pRiVaTeLiNkSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateLinkServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - } -} - -func TestSegmentsForPrivateLinkServiceId(t *testing.T) { - segments := PrivateLinkServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateLinkServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/method_createorupdate.go b/resource-manager/network/2022-09-01/privatelinkservice/method_createorupdate.go deleted file mode 100644 index 89d7e625a08..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package privatelinkservice - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PrivateLinkServiceClient) CreateOrUpdate(ctx context.Context, id PrivateLinkServiceId, input PrivateLinkService) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PrivateLinkServiceClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateLinkServiceId, input PrivateLinkService) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 37bf309268d..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 727bb2c29ae..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index ce6b69f5f1c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 8eb6892414c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 08c65321f9b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/privatelinkservice/model_applicationsecuritygroup.go deleted file mode 100644 index 65af972a908..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 7053e6085f8..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_backendaddresspool.go b/resource-manager/network/2022-09-01/privatelinkservice/model_backendaddresspool.go deleted file mode 100644 index 4605353c0e8..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index b63d022cddb..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 64fa8c44b23..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_ddossettings.go b/resource-manager/network/2022-09-01/privatelinkservice/model_ddossettings.go deleted file mode 100644 index 5e258a59dcf..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_delegation.go b/resource-manager/network/2022-09-01/privatelinkservice/model_delegation.go deleted file mode 100644 index 38895e795b0..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_flowlog.go b/resource-manager/network/2022-09-01/privatelinkservice/model_flowlog.go deleted file mode 100644 index 368d825fd7e..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/privatelinkservice/model_flowlogformatparameters.go deleted file mode 100644 index 75ef563d7b2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_flowlogpropertiesformat.go deleted file mode 100644 index 47d0ad02b7b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservice/model_frontendipconfiguration.go deleted file mode 100644 index b2284248cab..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index e2ab5bed55b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/privatelinkservice/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index b0e2ec4fe5b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_inboundnatrule.go b/resource-manager/network/2022-09-01/privatelinkservice/model_inboundnatrule.go deleted file mode 100644 index 68fa8ece3f2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index a54a17cf8a7..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfiguration.go deleted file mode 100644 index dd6a48d0e5b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationprofile.go deleted file mode 100644 index 5e226d14d4d..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 554fee929b4..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 62a93ec4c44..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_iptag.go b/resource-manager/network/2022-09-01/privatelinkservice/model_iptag.go deleted file mode 100644 index 7131a53eded..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/privatelinkservice/model_loadbalancerbackendaddress.go deleted file mode 100644 index 6ce64f5f2e6..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 9abe2a4572f..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_natgateway.go b/resource-manager/network/2022-09-01/privatelinkservice/model_natgateway.go deleted file mode 100644 index f9980bf5e6c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_natgatewaypropertiesformat.go deleted file mode 100644 index 7d3be08b309..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_natgatewaysku.go b/resource-manager/network/2022-09-01/privatelinkservice/model_natgatewaysku.go deleted file mode 100644 index a7a67521076..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_natruleportmapping.go b/resource-manager/network/2022-09-01/privatelinkservice/model_natruleportmapping.go deleted file mode 100644 index 1c0a32d9e67..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterface.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterface.go deleted file mode 100644 index 4df820c2913..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacednssettings.go deleted file mode 100644 index 16bd0705ad7..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 48b4f130f1a..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index b649c26692b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 0f1de88a39a..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 54e9855adc3..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 3e58e2268a1..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index d9c267e2c48..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networksecuritygroup.go deleted file mode 100644 index bc7b4758c7c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 6a30ce3d224..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpoint.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpoint.go deleted file mode 100644 index 60ed6db0b7b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointconnection.go deleted file mode 100644 index 6564f05bf19..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointconnectionproperties.go deleted file mode 100644 index e4de876b752..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointipconfiguration.go deleted file mode 100644 index f4a1b24ff36..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 14abbc46b00..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointproperties.go deleted file mode 100644 index ca2dc587f19..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkservice.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkservice.go deleted file mode 100644 index 84ab357bba4..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnection.go deleted file mode 100644 index 0ab35853be3..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index bc13ca31ec4..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index b11296ec55c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 06cf43e9c19..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index e9a6be5f6ba..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceproperties.go deleted file mode 100644 index d23a2b93b7d..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddress.go b/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddress.go deleted file mode 100644 index 10ad261e57f..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddressdnssettings.go deleted file mode 100644 index f36270d84f9..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 4597323a4ee..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddresssku.go deleted file mode 100644 index 17a772dc295..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/privatelinkservice/model_resourcenavigationlink.go deleted file mode 100644 index 04005314e56..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_resourcenavigationlinkformat.go deleted file mode 100644 index db56f8f9a50..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_resourceset.go b/resource-manager/network/2022-09-01/privatelinkservice/model_resourceset.go deleted file mode 100644 index 8244a36994e..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/privatelinkservice/model_retentionpolicyparameters.go deleted file mode 100644 index a0d81108fdc..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_route.go b/resource-manager/network/2022-09-01/privatelinkservice/model_route.go deleted file mode 100644 index 7d46047e973..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_routepropertiesformat.go deleted file mode 100644 index 55a0f3dc715..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_routetable.go b/resource-manager/network/2022-09-01/privatelinkservice/model_routetable.go deleted file mode 100644 index 11ada0b3ad6..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_routetablepropertiesformat.go deleted file mode 100644 index 9231c6ea535..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_securityrule.go b/resource-manager/network/2022-09-01/privatelinkservice/model_securityrule.go deleted file mode 100644 index a6fef4ca3ef..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_securityrulepropertiesformat.go deleted file mode 100644 index 141c746c9fc..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/privatelinkservice/model_serviceassociationlink.go deleted file mode 100644 index 6d4f38c281f..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 6e34df786f4..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_servicedelegationpropertiesformat.go deleted file mode 100644 index df4acacdfe6..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicy.go deleted file mode 100644 index 164ba053a63..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicydefinition.go deleted file mode 100644 index b85a151c4ba..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 3357b4cc130..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 8094ad8968c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 8278551c833..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_subnet.go b/resource-manager/network/2022-09-01/privatelinkservice/model_subnet.go deleted file mode 100644 index 53bbcfc93b9..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_subnetpropertiesformat.go deleted file mode 100644 index d0603886fd8..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_subresource.go b/resource-manager/network/2022-09-01/privatelinkservice/model_subresource.go deleted file mode 100644 index 2295e457c86..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/privatelinkservice/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 04a2870aab9..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/privatelinkservice/model_trafficanalyticsproperties.go deleted file mode 100644 index 14cea562579..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/privatelinkservice/model_virtualnetworktap.go deleted file mode 100644 index 75924e524e2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservice/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 0425352fa06..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservice/version.go b/resource-manager/network/2022-09-01/privatelinkservice/version.go deleted file mode 100644 index 3b6f24c50e1..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservice/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkservice/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/README.md b/resource-manager/network/2022-09-01/privatelinkservices/README.md deleted file mode 100644 index 762a13cde1b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/README.md +++ /dev/null @@ -1,216 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privatelinkservices` Documentation - -The `privatelinkservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/privatelinkservices" -``` - - -### Client Initialization - -```go -client := privatelinkservices.NewPrivateLinkServicesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility` - -```go -ctx := context.TODO() -id := privatelinkservices.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -payload := privatelinkservices.CheckPrivateLinkServiceVisibilityRequest{ - // ... -} - - -if err := client.CheckPrivateLinkServiceVisibilityThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup` - -```go -ctx := context.TODO() -id := privatelinkservices.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -payload := privatelinkservices.CheckPrivateLinkServiceVisibilityRequest{ - // ... -} - - -if err := client.CheckPrivateLinkServiceVisibilityByResourceGroupThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateLinkServicesClient.Delete` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateLinkServicesClient.DeletePrivateEndpointConnection` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue") - -if err := client.DeletePrivateEndpointConnectionThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateLinkServicesClient.Get` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - -read, err := client.Get(ctx, id, privatelinkservices.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateLinkServicesClient.GetPrivateEndpointConnection` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue") - -read, err := client.GetPrivateEndpointConnection(ctx, id, privatelinkservices.DefaultGetPrivateEndpointConnectionOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateLinkServicesClient.List` - -```go -ctx := context.TODO() -id := privatelinkservices.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices` - -```go -ctx := context.TODO() -id := privatelinkservices.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.ListAutoApprovedPrivateLinkServices(ctx, id)` can be used to do batched pagination -items, err := client.ListAutoApprovedPrivateLinkServicesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup` - -```go -ctx := context.TODO() -id := privatelinkservices.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -// alternatively `client.ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.ListBySubscription` - -```go -ctx := context.TODO() -id := privatelinkservices.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.ListPrivateEndpointConnections` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - -// alternatively `client.ListPrivateEndpointConnections(ctx, id)` can be used to do batched pagination -items, err := client.ListPrivateEndpointConnectionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.UpdatePrivateEndpointConnection` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue") - -payload := privatelinkservices.PrivateEndpointConnection{ - // ... -} - - -read, err := client.UpdatePrivateEndpointConnection(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/privatelinkservices/client.go b/resource-manager/network/2022-09-01/privatelinkservices/client.go deleted file mode 100644 index ef379b0edb5..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServicesClient struct { - Client *resourcemanager.Client -} - -func NewPrivateLinkServicesClientWithBaseURI(api environments.Api) (*PrivateLinkServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "privatelinkservices", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateLinkServicesClient: %+v", err) - } - - return &PrivateLinkServicesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/constants.go b/resource-manager/network/2022-09-01/privatelinkservices/constants.go deleted file mode 100644 index d3781dc06a5..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package privatelinkservices - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/id_location.go b/resource-manager/network/2022-09-01/privatelinkservices/id_location.go deleted file mode 100644 index 24e86662059..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/id_location_test.go b/resource-manager/network/2022-09-01/privatelinkservices/id_location_test.go deleted file mode 100644 index 52940b50853..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package privatelinkservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/id_privateendpointconnection.go b/resource-manager/network/2022-09-01/privatelinkservices/id_privateendpointconnection.go deleted file mode 100644 index d6a66965d1b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/id_privateendpointconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointConnectionId{} - -// PrivateEndpointConnectionId is a struct representing the Resource ID for a Private Endpoint Connection -type PrivateEndpointConnectionId struct { - SubscriptionId string - ResourceGroupName string - PrivateLinkServiceName string - PrivateEndpointConnectionName string -} - -// NewPrivateEndpointConnectionID returns a new PrivateEndpointConnectionId struct -func NewPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, privateLinkServiceName string, privateEndpointConnectionName string) PrivateEndpointConnectionId { - return PrivateEndpointConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateLinkServiceName: privateLinkServiceName, - PrivateEndpointConnectionName: privateEndpointConnectionName, - } -} - -// ParsePrivateEndpointConnectionID parses 'input' into a PrivateEndpointConnectionId -func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) - } - - return &id, nil -} - -// ParsePrivateEndpointConnectionIDInsensitively parses 'input' case-insensitively into a PrivateEndpointConnectionId -// note: this method should only be used for API response data and not user input -func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID -func ValidatePrivateEndpointConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateEndpointConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Endpoint Connection ID -func (id PrivateEndpointConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateLinkServices/%s/privateEndpointConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkServiceName, id.PrivateEndpointConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint Connection ID -func (id PrivateEndpointConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateLinkServices", "privateLinkServices", "privateLinkServices"), - resourceids.UserSpecifiedSegment("privateLinkServiceName", "privateLinkServiceValue"), - resourceids.StaticSegment("staticPrivateEndpointConnections", "privateEndpointConnections", "privateEndpointConnections"), - resourceids.UserSpecifiedSegment("privateEndpointConnectionName", "privateEndpointConnectionValue"), - } -} - -// String returns a human-readable description of this Private Endpoint Connection ID -func (id PrivateEndpointConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Link Service Name: %q", id.PrivateLinkServiceName), - fmt.Sprintf("Private Endpoint Connection Name: %q", id.PrivateEndpointConnectionName), - } - return fmt.Sprintf("Private Endpoint Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/id_privateendpointconnection_test.go b/resource-manager/network/2022-09-01/privatelinkservices/id_privateendpointconnection_test.go deleted file mode 100644 index 90b8124dd93..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/id_privateendpointconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package privatelinkservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointConnectionId{} - -func TestNewPrivateEndpointConnectionID(t *testing.T) { - id := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateLinkServiceName != "privateLinkServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateLinkServiceName'", id.PrivateLinkServiceName, "privateLinkServiceValue") - } - - if id.PrivateEndpointConnectionName != "privateEndpointConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointConnectionName'", id.PrivateEndpointConnectionName, "privateEndpointConnectionValue") - } -} - -func TestFormatPrivateEndpointConnectionID(t *testing.T) { - actual := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateEndpointConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue", - Expected: &PrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - PrivateEndpointConnectionName: "privateEndpointConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { - t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) - } - - } -} - -func TestParsePrivateEndpointConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue", - Expected: &PrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - PrivateEndpointConnectionName: "privateEndpointConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", - Expected: &PrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateLinkServiceName: "pRiVaTeLiNkSeRvIcEvAlUe", - PrivateEndpointConnectionName: "pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { - t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) - } - - } -} - -func TestSegmentsForPrivateEndpointConnectionId(t *testing.T) { - segments := PrivateEndpointConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateEndpointConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/id_privatelinkservice.go b/resource-manager/network/2022-09-01/privatelinkservices/id_privatelinkservice.go deleted file mode 100644 index 94f3432277b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/id_privatelinkservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateLinkServiceId{} - -// PrivateLinkServiceId is a struct representing the Resource ID for a Private Link Service -type PrivateLinkServiceId struct { - SubscriptionId string - ResourceGroupName string - PrivateLinkServiceName string -} - -// NewPrivateLinkServiceID returns a new PrivateLinkServiceId struct -func NewPrivateLinkServiceID(subscriptionId string, resourceGroupName string, privateLinkServiceName string) PrivateLinkServiceId { - return PrivateLinkServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateLinkServiceName: privateLinkServiceName, - } -} - -// ParsePrivateLinkServiceID parses 'input' into a PrivateLinkServiceId -func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - return &id, nil -} - -// ParsePrivateLinkServiceIDInsensitively parses 'input' case-insensitively into a PrivateLinkServiceId -// note: this method should only be used for API response data and not user input -func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateLinkServiceID checks that 'input' can be parsed as a Private Link Service ID -func ValidatePrivateLinkServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateLinkServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Link Service ID -func (id PrivateLinkServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateLinkServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Link Service ID -func (id PrivateLinkServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateLinkServices", "privateLinkServices", "privateLinkServices"), - resourceids.UserSpecifiedSegment("privateLinkServiceName", "privateLinkServiceValue"), - } -} - -// String returns a human-readable description of this Private Link Service ID -func (id PrivateLinkServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Link Service Name: %q", id.PrivateLinkServiceName), - } - return fmt.Sprintf("Private Link Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/id_privatelinkservice_test.go b/resource-manager/network/2022-09-01/privatelinkservices/id_privatelinkservice_test.go deleted file mode 100644 index 44ba3293fa9..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/id_privatelinkservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privatelinkservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateLinkServiceId{} - -func TestNewPrivateLinkServiceID(t *testing.T) { - id := NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateLinkServiceName != "privateLinkServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateLinkServiceName'", id.PrivateLinkServiceName, "privateLinkServiceValue") - } -} - -func TestFormatPrivateLinkServiceID(t *testing.T) { - actual := NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateLinkServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateLinkServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateLinkServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - } -} - -func TestParsePrivateLinkServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateLinkServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateLinkServiceName: "pRiVaTeLiNkSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateLinkServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - } -} - -func TestSegmentsForPrivateLinkServiceId(t *testing.T) { - segments := PrivateLinkServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateLinkServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/id_providerlocation.go b/resource-manager/network/2022-09-01/privatelinkservices/id_providerlocation.go deleted file mode 100644 index 2b075dec749..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/id_providerlocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -// ProviderLocationId is a struct representing the Resource ID for a Provider Location -type ProviderLocationId struct { - SubscriptionId string - ResourceGroupName string - LocationName string -} - -// NewProviderLocationID returns a new ProviderLocationId struct -func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { - return ProviderLocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocationName: locationName, - } -} - -// ParseProviderLocationID parses 'input' into a ProviderLocationId -func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId -// note: this method should only be used for API response data and not user input -func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID -func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Location ID -func (id ProviderLocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID -func (id ProviderLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Provider Location ID -func (id ProviderLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/id_providerlocation_test.go b/resource-manager/network/2022-09-01/privatelinkservices/id_providerlocation_test.go deleted file mode 100644 index 8ee36f53716..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/id_providerlocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privatelinkservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -func TestNewProviderLocationID(t *testing.T) { - id := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatProviderLocationID(t *testing.T) { - actual := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseProviderLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForProviderLocationId(t *testing.T) { - segments := ProviderLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_checkprivatelinkservicevisibility.go b/resource-manager/network/2022-09-01/privatelinkservices/method_checkprivatelinkservicevisibility.go deleted file mode 100644 index 900260bc29f..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_checkprivatelinkservicevisibility.go +++ /dev/null @@ -1,74 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckPrivateLinkServiceVisibilityOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CheckPrivateLinkServiceVisibility ... -func (c PrivateLinkServicesClient) CheckPrivateLinkServiceVisibility(ctx context.Context, id LocationId, input CheckPrivateLinkServiceVisibilityRequest) (result CheckPrivateLinkServiceVisibilityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/checkPrivateLinkServiceVisibility", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CheckPrivateLinkServiceVisibilityThenPoll performs CheckPrivateLinkServiceVisibility then polls until it's completed -func (c PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityThenPoll(ctx context.Context, id LocationId, input CheckPrivateLinkServiceVisibilityRequest) error { - result, err := c.CheckPrivateLinkServiceVisibility(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CheckPrivateLinkServiceVisibility: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CheckPrivateLinkServiceVisibility: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_checkprivatelinkservicevisibilitybyresourcegroup.go b/resource-manager/network/2022-09-01/privatelinkservices/method_checkprivatelinkservicevisibilitybyresourcegroup.go deleted file mode 100644 index b42f3afbe23..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_checkprivatelinkservicevisibilitybyresourcegroup.go +++ /dev/null @@ -1,74 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckPrivateLinkServiceVisibilityByResourceGroupOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CheckPrivateLinkServiceVisibilityByResourceGroup ... -func (c PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, id ProviderLocationId, input CheckPrivateLinkServiceVisibilityRequest) (result CheckPrivateLinkServiceVisibilityByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/checkPrivateLinkServiceVisibility", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CheckPrivateLinkServiceVisibilityByResourceGroupThenPoll performs CheckPrivateLinkServiceVisibilityByResourceGroup then polls until it's completed -func (c PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupThenPoll(ctx context.Context, id ProviderLocationId, input CheckPrivateLinkServiceVisibilityRequest) error { - result, err := c.CheckPrivateLinkServiceVisibilityByResourceGroup(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CheckPrivateLinkServiceVisibilityByResourceGroup: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CheckPrivateLinkServiceVisibilityByResourceGroup: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_delete.go b/resource-manager/network/2022-09-01/privatelinkservices/method_delete.go deleted file mode 100644 index d518ac5aede..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PrivateLinkServicesClient) Delete(ctx context.Context, id PrivateLinkServiceId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PrivateLinkServicesClient) DeleteThenPoll(ctx context.Context, id PrivateLinkServiceId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_deleteprivateendpointconnection.go b/resource-manager/network/2022-09-01/privatelinkservices/method_deleteprivateendpointconnection.go deleted file mode 100644 index 92593766f11..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_deleteprivateendpointconnection.go +++ /dev/null @@ -1,71 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeletePrivateEndpointConnectionOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DeletePrivateEndpointConnection ... -func (c PrivateLinkServicesClient) DeletePrivateEndpointConnection(ctx context.Context, id PrivateEndpointConnectionId) (result DeletePrivateEndpointConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeletePrivateEndpointConnectionThenPoll performs DeletePrivateEndpointConnection then polls until it's completed -func (c PrivateLinkServicesClient) DeletePrivateEndpointConnectionThenPoll(ctx context.Context, id PrivateEndpointConnectionId) error { - result, err := c.DeletePrivateEndpointConnection(ctx, id) - if err != nil { - return fmt.Errorf("performing DeletePrivateEndpointConnection: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DeletePrivateEndpointConnection: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_get.go b/resource-manager/network/2022-09-01/privatelinkservices/method_get.go deleted file mode 100644 index 8445d2bb96a..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateLinkService -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c PrivateLinkServicesClient) Get(ctx context.Context, id PrivateLinkServiceId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_getprivateendpointconnection.go b/resource-manager/network/2022-09-01/privatelinkservices/method_getprivateendpointconnection.go deleted file mode 100644 index 768c4254d14..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_getprivateendpointconnection.go +++ /dev/null @@ -1,80 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetPrivateEndpointConnectionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpointConnection -} - -type GetPrivateEndpointConnectionOperationOptions struct { - Expand *string -} - -func DefaultGetPrivateEndpointConnectionOperationOptions() GetPrivateEndpointConnectionOperationOptions { - return GetPrivateEndpointConnectionOperationOptions{} -} - -func (o GetPrivateEndpointConnectionOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetPrivateEndpointConnectionOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetPrivateEndpointConnectionOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// GetPrivateEndpointConnection ... -func (c PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Context, id PrivateEndpointConnectionId, options GetPrivateEndpointConnectionOperationOptions) (result GetPrivateEndpointConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_list.go b/resource-manager/network/2022-09-01/privatelinkservices/method_list.go deleted file mode 100644 index 5b6a32bc705..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateLinkService -} - -type ListCompleteResult struct { - Items []PrivateLinkService -} - -// List ... -func (c PrivateLinkServicesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateLinkServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateLinkService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PrivateLinkServiceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PrivateLinkServiceOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PrivateLinkService, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_listautoapprovedprivatelinkservices.go b/resource-manager/network/2022-09-01/privatelinkservices/method_listautoapprovedprivatelinkservices.go deleted file mode 100644 index 5ab44e05b50..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_listautoapprovedprivatelinkservices.go +++ /dev/null @@ -1,89 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAutoApprovedPrivateLinkServicesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AutoApprovedPrivateLinkService -} - -type ListAutoApprovedPrivateLinkServicesCompleteResult struct { - Items []AutoApprovedPrivateLinkService -} - -// ListAutoApprovedPrivateLinkServices ... -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServices(ctx context.Context, id LocationId) (result ListAutoApprovedPrivateLinkServicesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/autoApprovedPrivateLinkServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AutoApprovedPrivateLinkService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAutoApprovedPrivateLinkServicesComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesComplete(ctx context.Context, id LocationId) (ListAutoApprovedPrivateLinkServicesCompleteResult, error) { - return c.ListAutoApprovedPrivateLinkServicesCompleteMatchingPredicate(ctx, id, AutoApprovedPrivateLinkServiceOperationPredicate{}) -} - -// ListAutoApprovedPrivateLinkServicesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AutoApprovedPrivateLinkServiceOperationPredicate) (result ListAutoApprovedPrivateLinkServicesCompleteResult, err error) { - items := make([]AutoApprovedPrivateLinkService, 0) - - resp, err := c.ListAutoApprovedPrivateLinkServices(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAutoApprovedPrivateLinkServicesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_listautoapprovedprivatelinkservicesbyresourcegroup.go b/resource-manager/network/2022-09-01/privatelinkservices/method_listautoapprovedprivatelinkservicesbyresourcegroup.go deleted file mode 100644 index f8031ba6846..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_listautoapprovedprivatelinkservicesbyresourcegroup.go +++ /dev/null @@ -1,89 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAutoApprovedPrivateLinkServicesByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AutoApprovedPrivateLinkService -} - -type ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteResult struct { - Items []AutoApprovedPrivateLinkService -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroup ... -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx context.Context, id ProviderLocationId) (result ListAutoApprovedPrivateLinkServicesByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/autoApprovedPrivateLinkServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AutoApprovedPrivateLinkService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroupComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupComplete(ctx context.Context, id ProviderLocationId) (ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteResult, error) { - return c.ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteMatchingPredicate(ctx, id, AutoApprovedPrivateLinkServiceOperationPredicate{}) -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AutoApprovedPrivateLinkServiceOperationPredicate) (result ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteResult, err error) { - items := make([]AutoApprovedPrivateLinkService, 0) - - resp, err := c.ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_listbysubscription.go b/resource-manager/network/2022-09-01/privatelinkservices/method_listbysubscription.go deleted file mode 100644 index 0db89a408f2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_listbysubscription.go +++ /dev/null @@ -1,90 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateLinkService -} - -type ListBySubscriptionCompleteResult struct { - Items []PrivateLinkService -} - -// ListBySubscription ... -func (c PrivateLinkServicesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateLinkServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateLinkService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, PrivateLinkServiceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PrivateLinkServiceOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]PrivateLinkService, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_listprivateendpointconnections.go b/resource-manager/network/2022-09-01/privatelinkservices/method_listprivateendpointconnections.go deleted file mode 100644 index 721080febb4..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_listprivateendpointconnections.go +++ /dev/null @@ -1,89 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListPrivateEndpointConnectionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateEndpointConnection -} - -type ListPrivateEndpointConnectionsCompleteResult struct { - Items []PrivateEndpointConnection -} - -// ListPrivateEndpointConnections ... -func (c PrivateLinkServicesClient) ListPrivateEndpointConnections(ctx context.Context, id PrivateLinkServiceId) (result ListPrivateEndpointConnectionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateEndpointConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateEndpointConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListPrivateEndpointConnectionsComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListPrivateEndpointConnectionsComplete(ctx context.Context, id PrivateLinkServiceId) (ListPrivateEndpointConnectionsCompleteResult, error) { - return c.ListPrivateEndpointConnectionsCompleteMatchingPredicate(ctx, id, PrivateEndpointConnectionOperationPredicate{}) -} - -// ListPrivateEndpointConnectionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListPrivateEndpointConnectionsCompleteMatchingPredicate(ctx context.Context, id PrivateLinkServiceId, predicate PrivateEndpointConnectionOperationPredicate) (result ListPrivateEndpointConnectionsCompleteResult, err error) { - items := make([]PrivateEndpointConnection, 0) - - resp, err := c.ListPrivateEndpointConnections(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListPrivateEndpointConnectionsCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/method_updateprivateendpointconnection.go b/resource-manager/network/2022-09-01/privatelinkservices/method_updateprivateendpointconnection.go deleted file mode 100644 index 861e164e7d2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/method_updateprivateendpointconnection.go +++ /dev/null @@ -1,55 +0,0 @@ -package privatelinkservices - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdatePrivateEndpointConnectionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpointConnection -} - -// UpdatePrivateEndpointConnection ... -func (c PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) (result UpdatePrivateEndpointConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 6e064132ab8..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 2b8b30f76cf..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 687ec802ef4..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 23747316443..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index bc231fd9d60..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/privatelinkservices/model_applicationsecuritygroup.go deleted file mode 100644 index 102038ead97..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index b9a224260e0..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_autoapprovedprivatelinkservice.go b/resource-manager/network/2022-09-01/privatelinkservices/model_autoapprovedprivatelinkservice.go deleted file mode 100644 index e8eb368b9fd..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_autoapprovedprivatelinkservice.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoApprovedPrivateLinkService struct { - PrivateLinkService *string `json:"privateLinkService,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_backendaddresspool.go b/resource-manager/network/2022-09-01/privatelinkservices/model_backendaddresspool.go deleted file mode 100644 index e621fc409e7..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 10ee2869126..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_checkprivatelinkservicevisibilityrequest.go b/resource-manager/network/2022-09-01/privatelinkservices/model_checkprivatelinkservicevisibilityrequest.go deleted file mode 100644 index d338d570a52..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_checkprivatelinkservicevisibilityrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckPrivateLinkServiceVisibilityRequest struct { - PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 5bb831424b8..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_ddossettings.go b/resource-manager/network/2022-09-01/privatelinkservices/model_ddossettings.go deleted file mode 100644 index a88f6af3346..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_delegation.go b/resource-manager/network/2022-09-01/privatelinkservices/model_delegation.go deleted file mode 100644 index 861d7dccc33..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_flowlog.go b/resource-manager/network/2022-09-01/privatelinkservices/model_flowlog.go deleted file mode 100644 index b57c99ff1b7..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/privatelinkservices/model_flowlogformatparameters.go deleted file mode 100644 index e5d4b9b0d2f..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_flowlogpropertiesformat.go deleted file mode 100644 index 477b2ca2cb0..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservices/model_frontendipconfiguration.go deleted file mode 100644 index c4908a4dc2b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 2a655d02dfc..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/privatelinkservices/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 57e817e63b2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_inboundnatrule.go b/resource-manager/network/2022-09-01/privatelinkservices/model_inboundnatrule.go deleted file mode 100644 index acd7d0aa709..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 8bf73e3faf8..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfiguration.go deleted file mode 100644 index 3ad6065a48e..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationprofile.go deleted file mode 100644 index 0b4a7cbc860..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index f1bae207cc2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 2852a27e2c3..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_iptag.go b/resource-manager/network/2022-09-01/privatelinkservices/model_iptag.go deleted file mode 100644 index a7e33392ad2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/privatelinkservices/model_loadbalancerbackendaddress.go deleted file mode 100644 index 09bc3c7f06c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index a567721ac6c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_natgateway.go b/resource-manager/network/2022-09-01/privatelinkservices/model_natgateway.go deleted file mode 100644 index 077d2bc5d5f..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_natgatewaypropertiesformat.go deleted file mode 100644 index 85150f10453..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_natgatewaysku.go b/resource-manager/network/2022-09-01/privatelinkservices/model_natgatewaysku.go deleted file mode 100644 index ceae4c33372..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_natruleportmapping.go b/resource-manager/network/2022-09-01/privatelinkservices/model_natruleportmapping.go deleted file mode 100644 index e081a336375..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterface.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterface.go deleted file mode 100644 index 6ac282778d7..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacednssettings.go deleted file mode 100644 index b7993919c62..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 766f136f852..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 4e4cefa66b4..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 82f5e6747c6..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacepropertiesformat.go deleted file mode 100644 index e095e2da96a..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 66b7aeeab62..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 307c8944af0..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networksecuritygroup.go deleted file mode 100644 index 1a2792e0f88..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 7990d29a1bb..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpoint.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpoint.go deleted file mode 100644 index d3a77eea754..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointconnection.go deleted file mode 100644 index bb755a70536..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointconnectionproperties.go deleted file mode 100644 index 79d83621937..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointipconfiguration.go deleted file mode 100644 index 6327ca28ff1..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 5e70530aabf..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointproperties.go deleted file mode 100644 index 4d6d18b46a5..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkservice.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkservice.go deleted file mode 100644 index 4a672116bc2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnection.go deleted file mode 100644 index eb5e26941fd..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index a991f868fe8..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index f227e3d5e6c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index de38cfbbde6..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index b1809f0d71c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceproperties.go deleted file mode 100644 index cc7c8cdc0f0..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkservicevisibility.go b/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkservicevisibility.go deleted file mode 100644 index 38f95ae51a1..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_privatelinkservicevisibility.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceVisibility struct { - Visible *bool `json:"visible,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddress.go b/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddress.go deleted file mode 100644 index cdcddd86935..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddressdnssettings.go deleted file mode 100644 index 36ed651b7ec..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 2b9a811495b..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddresssku.go deleted file mode 100644 index 80c5ef44ece..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/privatelinkservices/model_resourcenavigationlink.go deleted file mode 100644 index 68ad67e053e..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_resourcenavigationlinkformat.go deleted file mode 100644 index 57d6954d294..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_resourceset.go b/resource-manager/network/2022-09-01/privatelinkservices/model_resourceset.go deleted file mode 100644 index e923870d39f..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/privatelinkservices/model_retentionpolicyparameters.go deleted file mode 100644 index 96f98884163..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_route.go b/resource-manager/network/2022-09-01/privatelinkservices/model_route.go deleted file mode 100644 index 901d0eadcc6..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_routepropertiesformat.go deleted file mode 100644 index 12088248968..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_routetable.go b/resource-manager/network/2022-09-01/privatelinkservices/model_routetable.go deleted file mode 100644 index 8afe228ccfd..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_routetablepropertiesformat.go deleted file mode 100644 index 6377cd08fd9..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_securityrule.go b/resource-manager/network/2022-09-01/privatelinkservices/model_securityrule.go deleted file mode 100644 index df53714a81c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_securityrulepropertiesformat.go deleted file mode 100644 index 52b151efed9..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/privatelinkservices/model_serviceassociationlink.go deleted file mode 100644 index 5f9234cbb82..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 87f29c8ca65..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 2ad5375c2ca..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicy.go deleted file mode 100644 index c93c759f93a..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicydefinition.go deleted file mode 100644 index d1116eb2a61..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 7f68e9513e3..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 5af6f94d80f..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 65b0e07a1a8..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_subnet.go b/resource-manager/network/2022-09-01/privatelinkservices/model_subnet.go deleted file mode 100644 index afb102ed10a..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_subnetpropertiesformat.go deleted file mode 100644 index c45ef181de2..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_subresource.go b/resource-manager/network/2022-09-01/privatelinkservices/model_subresource.go deleted file mode 100644 index b9dcdcf56bf..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/privatelinkservices/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index c500218a37c..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/privatelinkservices/model_trafficanalyticsproperties.go deleted file mode 100644 index b98eb28874d..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/privatelinkservices/model_virtualnetworktap.go deleted file mode 100644 index 8dbee65a21a..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/privatelinkservices/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 4fb395dbc76..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/predicates.go b/resource-manager/network/2022-09-01/privatelinkservices/predicates.go deleted file mode 100644 index f7e18f9feee..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/predicates.go +++ /dev/null @@ -1,78 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoApprovedPrivateLinkServiceOperationPredicate struct { - PrivateLinkService *string -} - -func (p AutoApprovedPrivateLinkServiceOperationPredicate) Matches(input AutoApprovedPrivateLinkService) bool { - - if p.PrivateLinkService != nil && (input.PrivateLinkService == nil || *p.PrivateLinkService != *input.PrivateLinkService) { - return false - } - - return true -} - -type PrivateEndpointConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p PrivateEndpointConnectionOperationPredicate) Matches(input PrivateEndpointConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type PrivateLinkServiceOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PrivateLinkServiceOperationPredicate) Matches(input PrivateLinkService) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/privatelinkservices/version.go b/resource-manager/network/2022-09-01/privatelinkservices/version.go deleted file mode 100644 index 86799494087..00000000000 --- a/resource-manager/network/2022-09-01/privatelinkservices/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkservices/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/README.md b/resource-manager/network/2022-09-01/publicipaddresses/README.md deleted file mode 100644 index 312310a5280..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/README.md +++ /dev/null @@ -1,132 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/publicipaddresses` Documentation - -The `publicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/publicipaddresses" -``` - - -### Client Initialization - -```go -client := publicipaddresses.NewPublicIPAddressesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PublicIPAddressesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -payload := publicipaddresses.PublicIPAddress{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPAddressesClient.DdosProtectionStatus` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -if err := client.DdosProtectionStatusThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPAddressesClient.Delete` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPAddressesClient.Get` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -read, err := client.Get(ctx, id, publicipaddresses.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PublicIPAddressesClient.List` - -```go -ctx := context.TODO() -id := publicipaddresses.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PublicIPAddressesClient.ListAll` - -```go -ctx := context.TODO() -id := publicipaddresses.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PublicIPAddressesClient.UpdateTags` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -payload := publicipaddresses.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/publicipaddresses/client.go b/resource-manager/network/2022-09-01/publicipaddresses/client.go deleted file mode 100644 index 58a629943e3..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package publicipaddresses - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesClient struct { - Client *resourcemanager.Client -} - -func NewPublicIPAddressesClientWithBaseURI(api environments.Api) (*PublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "publicipaddresses", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PublicIPAddressesClient: %+v", err) - } - - return &PublicIPAddressesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/constants.go b/resource-manager/network/2022-09-01/publicipaddresses/constants.go deleted file mode 100644 index e6528ab4517..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/constants.go +++ /dev/null @@ -1,1054 +0,0 @@ -package publicipaddresses - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type IsWorkloadProtected string - -const ( - IsWorkloadProtectedFalse IsWorkloadProtected = "False" - IsWorkloadProtectedTrue IsWorkloadProtected = "True" -) - -func PossibleValuesForIsWorkloadProtected() []string { - return []string{ - string(IsWorkloadProtectedFalse), - string(IsWorkloadProtectedTrue), - } -} - -func (s *IsWorkloadProtected) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsWorkloadProtected(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsWorkloadProtected(input string) (*IsWorkloadProtected, error) { - vals := map[string]IsWorkloadProtected{ - "false": IsWorkloadProtectedFalse, - "true": IsWorkloadProtectedTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsWorkloadProtected(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/method_createorupdate.go b/resource-manager/network/2022-09-01/publicipaddresses/method_createorupdate.go deleted file mode 100644 index 06166709826..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, id commonids.PublicIPAddressId, input PublicIPAddress) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PublicIPAddressesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.PublicIPAddressId, input PublicIPAddress) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/method_ddosprotectionstatus.go b/resource-manager/network/2022-09-01/publicipaddresses/method_ddosprotectionstatus.go deleted file mode 100644 index be7c136a8e9..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/method_ddosprotectionstatus.go +++ /dev/null @@ -1,71 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DdosProtectionStatus ... -func (c PublicIPAddressesClient) DdosProtectionStatus(ctx context.Context, id commonids.PublicIPAddressId) (result DdosProtectionStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/ddosProtectionStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DdosProtectionStatusThenPoll performs DdosProtectionStatus then polls until it's completed -func (c PublicIPAddressesClient) DdosProtectionStatusThenPoll(ctx context.Context, id commonids.PublicIPAddressId) error { - result, err := c.DdosProtectionStatus(ctx, id) - if err != nil { - return fmt.Errorf("performing DdosProtectionStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DdosProtectionStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/method_delete.go b/resource-manager/network/2022-09-01/publicipaddresses/method_delete.go deleted file mode 100644 index 20c57a22e75..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PublicIPAddressesClient) Delete(ctx context.Context, id commonids.PublicIPAddressId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PublicIPAddressesClient) DeleteThenPoll(ctx context.Context, id commonids.PublicIPAddressId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/method_get.go b/resource-manager/network/2022-09-01/publicipaddresses/method_get.go deleted file mode 100644 index 735f68ae936..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/method_get.go +++ /dev/null @@ -1,81 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPAddress -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c PublicIPAddressesClient) Get(ctx context.Context, id commonids.PublicIPAddressId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/method_list.go b/resource-manager/network/2022-09-01/publicipaddresses/method_list.go deleted file mode 100644 index 553a59afb95..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type ListCompleteResult struct { - Items []PublicIPAddress -} - -// List ... -func (c PublicIPAddressesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PublicIPAddressesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PublicIPAddressesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PublicIPAddressOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/method_listall.go b/resource-manager/network/2022-09-01/publicipaddresses/method_listall.go deleted file mode 100644 index 90d65200741..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type ListAllCompleteResult struct { - Items []PublicIPAddress -} - -// ListAll ... -func (c PublicIPAddressesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c PublicIPAddressesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PublicIPAddressesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PublicIPAddressOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/method_updatetags.go b/resource-manager/network/2022-09-01/publicipaddresses/method_updatetags.go deleted file mode 100644 index 2338b85adda..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/method_updatetags.go +++ /dev/null @@ -1,56 +0,0 @@ -package publicipaddresses - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPAddress -} - -// UpdateTags ... -func (c PublicIPAddressesClient) UpdateTags(ctx context.Context, id commonids.PublicIPAddressId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddress.go deleted file mode 100644 index d89d17bbae7..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 433f6b69df9..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 14750d210a4..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 33311f968a8..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 69ba272007f..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/publicipaddresses/model_applicationsecuritygroup.go deleted file mode 100644 index 7ab7c1cc362..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 3de744e7bae..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_backendaddresspool.go b/resource-manager/network/2022-09-01/publicipaddresses/model_backendaddresspool.go deleted file mode 100644 index c693d24a91b..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index d18a26b3c77..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 2bbec7ab523..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_ddossettings.go b/resource-manager/network/2022-09-01/publicipaddresses/model_ddossettings.go deleted file mode 100644 index 360538854a2..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_delegation.go b/resource-manager/network/2022-09-01/publicipaddresses/model_delegation.go deleted file mode 100644 index 1036beaaf72..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_flowlog.go b/resource-manager/network/2022-09-01/publicipaddresses/model_flowlog.go deleted file mode 100644 index 3ab56bececf..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/publicipaddresses/model_flowlogformatparameters.go deleted file mode 100644 index 28da49ecc43..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_flowlogpropertiesformat.go deleted file mode 100644 index 6690c7ec880..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/publicipaddresses/model_frontendipconfiguration.go deleted file mode 100644 index 72aec2b5437..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 2d86f96cffb..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/publicipaddresses/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 9d2c813c821..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_inboundnatrule.go b/resource-manager/network/2022-09-01/publicipaddresses/model_inboundnatrule.go deleted file mode 100644 index bd6a9711828..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 320809245cf..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfiguration.go b/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfiguration.go deleted file mode 100644 index 398840974cd..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationprofile.go deleted file mode 100644 index 1bf1de27441..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1523f28e63d..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index bb4f647f729..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_iptag.go b/resource-manager/network/2022-09-01/publicipaddresses/model_iptag.go deleted file mode 100644 index 7ea58148bb2..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/publicipaddresses/model_loadbalancerbackendaddress.go deleted file mode 100644 index e427662f2a6..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 349c22b64f5..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_natgateway.go b/resource-manager/network/2022-09-01/publicipaddresses/model_natgateway.go deleted file mode 100644 index fc10c7874b7..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_natgatewaypropertiesformat.go deleted file mode 100644 index 3a740fb997b..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_natgatewaysku.go b/resource-manager/network/2022-09-01/publicipaddresses/model_natgatewaysku.go deleted file mode 100644 index 764ce1ec4aa..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_natruleportmapping.go b/resource-manager/network/2022-09-01/publicipaddresses/model_natruleportmapping.go deleted file mode 100644 index 8c9fe6cf53d..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterface.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterface.go deleted file mode 100644 index 5297e480153..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacednssettings.go deleted file mode 100644 index b5db798efaa..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 9840f48b636..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 7815eb1f03a..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index d4350e06603..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 657ab7001b4..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 060a9d5285a..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index d229b2dfb8d..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networksecuritygroup.go deleted file mode 100644 index 485cb7f8e07..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 8fef2ca403a..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpoint.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpoint.go deleted file mode 100644 index dd63348ae6f..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointconnection.go deleted file mode 100644 index b449098f79d..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointconnectionproperties.go deleted file mode 100644 index 1f2a5ecad88..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointipconfiguration.go deleted file mode 100644 index e75d758ed00..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 42574e02e61..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointproperties.go deleted file mode 100644 index a0108e9c621..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkservice.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkservice.go deleted file mode 100644 index b4d87fc1513..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnection.go deleted file mode 100644 index 2039fef8e1a..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 37f23eb3b44..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index ee170e64109..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 8dce57f93b6..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 17839c3231f..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceproperties.go deleted file mode 100644 index 7307dfa6a24..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddress.go b/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddress.go deleted file mode 100644 index 6be86648487..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddressdnssettings.go deleted file mode 100644 index 44d46e7b532..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 90c1d772012..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddresssku.go deleted file mode 100644 index af0178060c9..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipddosprotectionstatusresult.go b/resource-manager/network/2022-09-01/publicipaddresses/model_publicipddosprotectionstatusresult.go deleted file mode 100644 index dbf51354f05..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_publicipddosprotectionstatusresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPDdosProtectionStatusResult struct { - DdosProtectionPlanId *string `json:"ddosProtectionPlanId,omitempty"` - IsWorkloadProtected *IsWorkloadProtected `json:"isWorkloadProtected,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` - PublicIPAddressId *string `json:"publicIpAddressId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/publicipaddresses/model_resourcenavigationlink.go deleted file mode 100644 index 8df0e65c796..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_resourcenavigationlinkformat.go deleted file mode 100644 index 912dad5e9b9..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_resourceset.go b/resource-manager/network/2022-09-01/publicipaddresses/model_resourceset.go deleted file mode 100644 index eb4ec2e13c4..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/publicipaddresses/model_retentionpolicyparameters.go deleted file mode 100644 index 57e746e6800..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_route.go b/resource-manager/network/2022-09-01/publicipaddresses/model_route.go deleted file mode 100644 index 6aaf9130e49..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_routepropertiesformat.go deleted file mode 100644 index 19e40f46ddb..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_routetable.go b/resource-manager/network/2022-09-01/publicipaddresses/model_routetable.go deleted file mode 100644 index eed83ddcb84..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_routetablepropertiesformat.go deleted file mode 100644 index f408090b5c7..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_securityrule.go b/resource-manager/network/2022-09-01/publicipaddresses/model_securityrule.go deleted file mode 100644 index 056a5506bcc..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_securityrulepropertiesformat.go deleted file mode 100644 index e076569ccb4..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/publicipaddresses/model_serviceassociationlink.go deleted file mode 100644 index 80405186b49..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index e0afefd43a1..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_servicedelegationpropertiesformat.go deleted file mode 100644 index dfdf08665d4..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicy.go deleted file mode 100644 index 2937667f2df..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicydefinition.go deleted file mode 100644 index a5c2fb10189..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 6eae5a09363..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 77840b5f2bd..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 8d53fbdcd1e..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_subnet.go b/resource-manager/network/2022-09-01/publicipaddresses/model_subnet.go deleted file mode 100644 index 4dc6901bd98..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_subnetpropertiesformat.go deleted file mode 100644 index 97b1a3a4493..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_subresource.go b/resource-manager/network/2022-09-01/publicipaddresses/model_subresource.go deleted file mode 100644 index f4a7d6a3248..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_tagsobject.go b/resource-manager/network/2022-09-01/publicipaddresses/model_tagsobject.go deleted file mode 100644 index 717ed6f5d3d..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/publicipaddresses/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index f3cbae91cdc..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/publicipaddresses/model_trafficanalyticsproperties.go deleted file mode 100644 index 4e34016e12e..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/publicipaddresses/model_virtualnetworktap.go deleted file mode 100644 index b4791998c22..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/publicipaddresses/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 4f32bce3226..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/predicates.go b/resource-manager/network/2022-09-01/publicipaddresses/predicates.go deleted file mode 100644 index 07d29ffa733..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PublicIPAddressOperationPredicate) Matches(input PublicIPAddress) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/publicipaddresses/version.go b/resource-manager/network/2022-09-01/publicipaddresses/version.go deleted file mode 100644 index 2aec414ffcf..00000000000 --- a/resource-manager/network/2022-09-01/publicipaddresses/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipaddresses/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/README.md b/resource-manager/network/2022-09-01/publicipprefixes/README.md deleted file mode 100644 index 85868377e02..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/publicipprefixes` Documentation - -The `publicipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/publicipprefixes" -``` - - -### Client Initialization - -```go -client := publicipprefixes.NewPublicIPPrefixesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PublicIPPrefixesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := publicipprefixes.NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - -payload := publicipprefixes.PublicIPPrefix{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPPrefixesClient.Delete` - -```go -ctx := context.TODO() -id := publicipprefixes.NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPPrefixesClient.Get` - -```go -ctx := context.TODO() -id := publicipprefixes.NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - -read, err := client.Get(ctx, id, publicipprefixes.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PublicIPPrefixesClient.List` - -```go -ctx := context.TODO() -id := publicipprefixes.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PublicIPPrefixesClient.ListAll` - -```go -ctx := context.TODO() -id := publicipprefixes.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PublicIPPrefixesClient.UpdateTags` - -```go -ctx := context.TODO() -id := publicipprefixes.NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - -payload := publicipprefixes.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/publicipprefixes/client.go b/resource-manager/network/2022-09-01/publicipprefixes/client.go deleted file mode 100644 index 9a1637fc3ce..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package publicipprefixes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefixesClient struct { - Client *resourcemanager.Client -} - -func NewPublicIPPrefixesClientWithBaseURI(api environments.Api) (*PublicIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "publicipprefixes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PublicIPPrefixesClient: %+v", err) - } - - return &PublicIPPrefixesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/constants.go b/resource-manager/network/2022-09-01/publicipprefixes/constants.go deleted file mode 100644 index a8c1328b07b..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/constants.go +++ /dev/null @@ -1,215 +0,0 @@ -package publicipprefixes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPPrefixSkuName string - -const ( - PublicIPPrefixSkuNameStandard PublicIPPrefixSkuName = "Standard" -) - -func PossibleValuesForPublicIPPrefixSkuName() []string { - return []string{ - string(PublicIPPrefixSkuNameStandard), - } -} - -func (s *PublicIPPrefixSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPPrefixSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPPrefixSkuName(input string) (*PublicIPPrefixSkuName, error) { - vals := map[string]PublicIPPrefixSkuName{ - "standard": PublicIPPrefixSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPPrefixSkuName(input) - return &out, nil -} - -type PublicIPPrefixSkuTier string - -const ( - PublicIPPrefixSkuTierGlobal PublicIPPrefixSkuTier = "Global" - PublicIPPrefixSkuTierRegional PublicIPPrefixSkuTier = "Regional" -) - -func PossibleValuesForPublicIPPrefixSkuTier() []string { - return []string{ - string(PublicIPPrefixSkuTierGlobal), - string(PublicIPPrefixSkuTierRegional), - } -} - -func (s *PublicIPPrefixSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPPrefixSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPPrefixSkuTier(input string) (*PublicIPPrefixSkuTier, error) { - vals := map[string]PublicIPPrefixSkuTier{ - "global": PublicIPPrefixSkuTierGlobal, - "regional": PublicIPPrefixSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPPrefixSkuTier(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/id_publicipprefix.go b/resource-manager/network/2022-09-01/publicipprefixes/id_publicipprefix.go deleted file mode 100644 index 545d5140e51..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/id_publicipprefix.go +++ /dev/null @@ -1,127 +0,0 @@ -package publicipprefixes - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PublicIPPrefixId{} - -// PublicIPPrefixId is a struct representing the Resource ID for a Public I P Prefix -type PublicIPPrefixId struct { - SubscriptionId string - ResourceGroupName string - PublicIPPrefixName string -} - -// NewPublicIPPrefixID returns a new PublicIPPrefixId struct -func NewPublicIPPrefixID(subscriptionId string, resourceGroupName string, publicIPPrefixName string) PublicIPPrefixId { - return PublicIPPrefixId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PublicIPPrefixName: publicIPPrefixName, - } -} - -// ParsePublicIPPrefixID parses 'input' into a PublicIPPrefixId -func ParsePublicIPPrefixID(input string) (*PublicIPPrefixId, error) { - parser := resourceids.NewParserFromResourceIdType(PublicIPPrefixId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PublicIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PublicIPPrefixName, ok = parsed.Parsed["publicIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publicIPPrefixName", *parsed) - } - - return &id, nil -} - -// ParsePublicIPPrefixIDInsensitively parses 'input' case-insensitively into a PublicIPPrefixId -// note: this method should only be used for API response data and not user input -func ParsePublicIPPrefixIDInsensitively(input string) (*PublicIPPrefixId, error) { - parser := resourceids.NewParserFromResourceIdType(PublicIPPrefixId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PublicIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PublicIPPrefixName, ok = parsed.Parsed["publicIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publicIPPrefixName", *parsed) - } - - return &id, nil -} - -// ValidatePublicIPPrefixID checks that 'input' can be parsed as a Public I P Prefix ID -func ValidatePublicIPPrefixID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePublicIPPrefixID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Public I P Prefix ID -func (id PublicIPPrefixId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPPrefixes/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PublicIPPrefixName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Public I P Prefix ID -func (id PublicIPPrefixId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPublicIPPrefixes", "publicIPPrefixes", "publicIPPrefixes"), - resourceids.UserSpecifiedSegment("publicIPPrefixName", "publicIPPrefixValue"), - } -} - -// String returns a human-readable description of this Public I P Prefix ID -func (id PublicIPPrefixId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Public I P Prefix Name: %q", id.PublicIPPrefixName), - } - return fmt.Sprintf("Public I P Prefix (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/id_publicipprefix_test.go b/resource-manager/network/2022-09-01/publicipprefixes/id_publicipprefix_test.go deleted file mode 100644 index e8109504ea5..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/id_publicipprefix_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package publicipprefixes - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PublicIPPrefixId{} - -func TestNewPublicIPPrefixID(t *testing.T) { - id := NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PublicIPPrefixName != "publicIPPrefixValue" { - t.Fatalf("Expected %q but got %q for Segment 'PublicIPPrefixName'", id.PublicIPPrefixName, "publicIPPrefixValue") - } -} - -func TestFormatPublicIPPrefixID(t *testing.T) { - actual := NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePublicIPPrefixID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PublicIPPrefixId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue", - Expected: &PublicIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PublicIPPrefixName: "publicIPPrefixValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePublicIPPrefixID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PublicIPPrefixName != v.Expected.PublicIPPrefixName { - t.Fatalf("Expected %q but got %q for PublicIPPrefixName", v.Expected.PublicIPPrefixName, actual.PublicIPPrefixName) - } - - } -} - -func TestParsePublicIPPrefixIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PublicIPPrefixId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pUbLiCiPpReFiXeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue", - Expected: &PublicIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PublicIPPrefixName: "publicIPPrefixValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pUbLiCiPpReFiXeS/pUbLiCiPpReFiXvAlUe", - Expected: &PublicIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PublicIPPrefixName: "pUbLiCiPpReFiXvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pUbLiCiPpReFiXeS/pUbLiCiPpReFiXvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePublicIPPrefixIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PublicIPPrefixName != v.Expected.PublicIPPrefixName { - t.Fatalf("Expected %q but got %q for PublicIPPrefixName", v.Expected.PublicIPPrefixName, actual.PublicIPPrefixName) - } - - } -} - -func TestSegmentsForPublicIPPrefixId(t *testing.T) { - segments := PublicIPPrefixId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PublicIPPrefixId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/method_createorupdate.go b/resource-manager/network/2022-09-01/publicipprefixes/method_createorupdate.go deleted file mode 100644 index a1ec59b764b..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, id PublicIPPrefixId, input PublicIPPrefix) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PublicIPPrefixesClient) CreateOrUpdateThenPoll(ctx context.Context, id PublicIPPrefixId, input PublicIPPrefix) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/method_delete.go b/resource-manager/network/2022-09-01/publicipprefixes/method_delete.go deleted file mode 100644 index 4ef74511d04..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PublicIPPrefixesClient) Delete(ctx context.Context, id PublicIPPrefixId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PublicIPPrefixesClient) DeleteThenPoll(ctx context.Context, id PublicIPPrefixId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/method_get.go b/resource-manager/network/2022-09-01/publicipprefixes/method_get.go deleted file mode 100644 index f36b44de97b..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPPrefix -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c PublicIPPrefixesClient) Get(ctx context.Context, id PublicIPPrefixId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/method_list.go b/resource-manager/network/2022-09-01/publicipprefixes/method_list.go deleted file mode 100644 index 4e1577bfc9b..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPPrefix -} - -type ListCompleteResult struct { - Items []PublicIPPrefix -} - -// List ... -func (c PublicIPPrefixesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/publicIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPPrefix `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PublicIPPrefixesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PublicIPPrefixOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PublicIPPrefixesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PublicIPPrefixOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PublicIPPrefix, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/method_listall.go b/resource-manager/network/2022-09-01/publicipprefixes/method_listall.go deleted file mode 100644 index cd56ffc13cf..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPPrefix -} - -type ListAllCompleteResult struct { - Items []PublicIPPrefix -} - -// ListAll ... -func (c PublicIPPrefixesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/publicIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPPrefix `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c PublicIPPrefixesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, PublicIPPrefixOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PublicIPPrefixesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PublicIPPrefixOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]PublicIPPrefix, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/method_updatetags.go b/resource-manager/network/2022-09-01/publicipprefixes/method_updatetags.go deleted file mode 100644 index 421bdd50b7f..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package publicipprefixes - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPPrefix -} - -// UpdateTags ... -func (c PublicIPPrefixesClient) UpdateTags(ctx context.Context, id PublicIPPrefixId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_iptag.go b/resource-manager/network/2022-09-01/publicipprefixes/model_iptag.go deleted file mode 100644 index e1bbbc73a6e..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_natgateway.go b/resource-manager/network/2022-09-01/publicipprefixes/model_natgateway.go deleted file mode 100644 index 170eeff6848..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package publicipprefixes - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/publicipprefixes/model_natgatewaypropertiesformat.go deleted file mode 100644 index 5c1f46d3737..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_natgatewaysku.go b/resource-manager/network/2022-09-01/publicipprefixes/model_natgatewaysku.go deleted file mode 100644 index 465e471e903..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefix.go b/resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefix.go deleted file mode 100644 index 6679bada47d..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefix.go +++ /dev/null @@ -1,22 +0,0 @@ -package publicipprefixes - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefix struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPPrefixPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPPrefixSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefixpropertiesformat.go b/resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefixpropertiesformat.go deleted file mode 100644 index 32b58a818b3..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefixpropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefixPropertiesFormat struct { - CustomIPPrefix *SubResource `json:"customIPPrefix,omitempty"` - IPPrefix *string `json:"ipPrefix,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - PrefixLength *int64 `json:"prefixLength,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefixsku.go b/resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefixsku.go deleted file mode 100644 index 0737b92dee1..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_publicipprefixsku.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefixSku struct { - Name *PublicIPPrefixSkuName `json:"name,omitempty"` - Tier *PublicIPPrefixSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_referencedpublicipaddress.go b/resource-manager/network/2022-09-01/publicipprefixes/model_referencedpublicipaddress.go deleted file mode 100644 index 26027a800a2..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_referencedpublicipaddress.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReferencedPublicIPAddress struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_subresource.go b/resource-manager/network/2022-09-01/publicipprefixes/model_subresource.go deleted file mode 100644 index 53e3c780cbf..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/model_tagsobject.go b/resource-manager/network/2022-09-01/publicipprefixes/model_tagsobject.go deleted file mode 100644 index 6a82f86f28f..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/predicates.go b/resource-manager/network/2022-09-01/publicipprefixes/predicates.go deleted file mode 100644 index 7deb3ca2bbf..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefixOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PublicIPPrefixOperationPredicate) Matches(input PublicIPPrefix) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/publicipprefixes/version.go b/resource-manager/network/2022-09-01/publicipprefixes/version.go deleted file mode 100644 index 286d6f1367b..00000000000 --- a/resource-manager/network/2022-09-01/publicipprefixes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipprefixes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipprefixes/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/README.md b/resource-manager/network/2022-09-01/routefilterrules/README.md deleted file mode 100644 index 8bd84c2f3aa..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routefilterrules` Documentation - -The `routefilterrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routefilterrules" -``` - - -### Client Initialization - -```go -client := routefilterrules.NewRouteFilterRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RouteFilterRulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := routefilterrules.NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue") - -payload := routefilterrules.RouteFilterRule{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteFilterRulesClient.Delete` - -```go -ctx := context.TODO() -id := routefilterrules.NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteFilterRulesClient.Get` - -```go -ctx := context.TODO() -id := routefilterrules.NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RouteFilterRulesClient.ListByRouteFilter` - -```go -ctx := context.TODO() -id := routefilterrules.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -// alternatively `client.ListByRouteFilter(ctx, id)` can be used to do batched pagination -items, err := client.ListByRouteFilterComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/routefilterrules/client.go b/resource-manager/network/2022-09-01/routefilterrules/client.go deleted file mode 100644 index 44483c23138..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package routefilterrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRulesClient struct { - Client *resourcemanager.Client -} - -func NewRouteFilterRulesClientWithBaseURI(api environments.Api) (*RouteFilterRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "routefilterrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating RouteFilterRulesClient: %+v", err) - } - - return &RouteFilterRulesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/constants.go b/resource-manager/network/2022-09-01/routefilterrules/constants.go deleted file mode 100644 index cf65052c645..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/constants.go +++ /dev/null @@ -1,136 +0,0 @@ -package routefilterrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Access string - -const ( - AccessAllow Access = "Allow" - AccessDeny Access = "Deny" -) - -func PossibleValuesForAccess() []string { - return []string{ - string(AccessAllow), - string(AccessDeny), - } -} - -func (s *Access) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAccess(input string) (*Access, error) { - vals := map[string]Access{ - "allow": AccessAllow, - "deny": AccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Access(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type RouteFilterRuleType string - -const ( - RouteFilterRuleTypeCommunity RouteFilterRuleType = "Community" -) - -func PossibleValuesForRouteFilterRuleType() []string { - return []string{ - string(RouteFilterRuleTypeCommunity), - } -} - -func (s *RouteFilterRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteFilterRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteFilterRuleType(input string) (*RouteFilterRuleType, error) { - vals := map[string]RouteFilterRuleType{ - "community": RouteFilterRuleTypeCommunity, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteFilterRuleType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/id_routefilter.go b/resource-manager/network/2022-09-01/routefilterrules/id_routefilter.go deleted file mode 100644 index 6ada8a037fc..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/id_routefilter.go +++ /dev/null @@ -1,127 +0,0 @@ -package routefilterrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterId{} - -// RouteFilterId is a struct representing the Resource ID for a Route Filter -type RouteFilterId struct { - SubscriptionId string - ResourceGroupName string - RouteFilterName string -} - -// NewRouteFilterID returns a new RouteFilterId struct -func NewRouteFilterID(subscriptionId string, resourceGroupName string, routeFilterName string) RouteFilterId { - return RouteFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteFilterName: routeFilterName, - } -} - -// ParseRouteFilterID parses 'input' into a RouteFilterId -func ParseRouteFilterID(input string) (*RouteFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - return &id, nil -} - -// ParseRouteFilterIDInsensitively parses 'input' case-insensitively into a RouteFilterId -// note: this method should only be used for API response data and not user input -func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - return &id, nil -} - -// ValidateRouteFilterID checks that 'input' can be parsed as a Route Filter ID -func ValidateRouteFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Filter ID -func (id RouteFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Filter ID -func (id RouteFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteFilters", "routeFilters", "routeFilters"), - resourceids.UserSpecifiedSegment("routeFilterName", "routeFilterValue"), - } -} - -// String returns a human-readable description of this Route Filter ID -func (id RouteFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Filter Name: %q", id.RouteFilterName), - } - return fmt.Sprintf("Route Filter (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/id_routefilter_test.go b/resource-manager/network/2022-09-01/routefilterrules/id_routefilter_test.go deleted file mode 100644 index 2a03535f87c..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/id_routefilter_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package routefilterrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterId{} - -func TestNewRouteFilterID(t *testing.T) { - id := NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteFilterName != "routeFilterValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteFilterName'", id.RouteFilterName, "routeFilterValue") - } -} - -func TestFormatRouteFilterID(t *testing.T) { - actual := NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteFilterID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - } -} - -func TestParseRouteFilterIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteFilterName: "rOuTeFiLtErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - } -} - -func TestSegmentsForRouteFilterId(t *testing.T) { - segments := RouteFilterId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteFilterId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/id_routefilterrule.go b/resource-manager/network/2022-09-01/routefilterrules/id_routefilterrule.go deleted file mode 100644 index e4cf470acdc..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/id_routefilterrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package routefilterrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterRuleId{} - -// RouteFilterRuleId is a struct representing the Resource ID for a Route Filter Rule -type RouteFilterRuleId struct { - SubscriptionId string - ResourceGroupName string - RouteFilterName string - RouteFilterRuleName string -} - -// NewRouteFilterRuleID returns a new RouteFilterRuleId struct -func NewRouteFilterRuleID(subscriptionId string, resourceGroupName string, routeFilterName string, routeFilterRuleName string) RouteFilterRuleId { - return RouteFilterRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteFilterName: routeFilterName, - RouteFilterRuleName: routeFilterRuleName, - } -} - -// ParseRouteFilterRuleID parses 'input' into a RouteFilterRuleId -func ParseRouteFilterRuleID(input string) (*RouteFilterRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - if id.RouteFilterRuleName, ok = parsed.Parsed["routeFilterRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterRuleName", *parsed) - } - - return &id, nil -} - -// ParseRouteFilterRuleIDInsensitively parses 'input' case-insensitively into a RouteFilterRuleId -// note: this method should only be used for API response data and not user input -func ParseRouteFilterRuleIDInsensitively(input string) (*RouteFilterRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - if id.RouteFilterRuleName, ok = parsed.Parsed["routeFilterRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterRuleName", *parsed) - } - - return &id, nil -} - -// ValidateRouteFilterRuleID checks that 'input' can be parsed as a Route Filter Rule ID -func ValidateRouteFilterRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteFilterRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Filter Rule ID -func (id RouteFilterRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeFilters/%s/routeFilterRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteFilterName, id.RouteFilterRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Filter Rule ID -func (id RouteFilterRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteFilters", "routeFilters", "routeFilters"), - resourceids.UserSpecifiedSegment("routeFilterName", "routeFilterValue"), - resourceids.StaticSegment("staticRouteFilterRules", "routeFilterRules", "routeFilterRules"), - resourceids.UserSpecifiedSegment("routeFilterRuleName", "routeFilterRuleValue"), - } -} - -// String returns a human-readable description of this Route Filter Rule ID -func (id RouteFilterRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Filter Name: %q", id.RouteFilterName), - fmt.Sprintf("Route Filter Rule Name: %q", id.RouteFilterRuleName), - } - return fmt.Sprintf("Route Filter Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/id_routefilterrule_test.go b/resource-manager/network/2022-09-01/routefilterrules/id_routefilterrule_test.go deleted file mode 100644 index 6e486f9df91..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/id_routefilterrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package routefilterrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterRuleId{} - -func TestNewRouteFilterRuleID(t *testing.T) { - id := NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteFilterName != "routeFilterValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteFilterName'", id.RouteFilterName, "routeFilterValue") - } - - if id.RouteFilterRuleName != "routeFilterRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteFilterRuleName'", id.RouteFilterRuleName, "routeFilterRuleValue") - } -} - -func TestFormatRouteFilterRuleID(t *testing.T) { - actual := NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteFilterRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue", - Expected: &RouteFilterRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - RouteFilterRuleName: "routeFilterRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - if actual.RouteFilterRuleName != v.Expected.RouteFilterRuleName { - t.Fatalf("Expected %q but got %q for RouteFilterRuleName", v.Expected.RouteFilterRuleName, actual.RouteFilterRuleName) - } - - } -} - -func TestParseRouteFilterRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/rOuTeFiLtErRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue", - Expected: &RouteFilterRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - RouteFilterRuleName: "routeFilterRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/rOuTeFiLtErRuLeS/rOuTeFiLtErRuLeVaLuE", - Expected: &RouteFilterRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteFilterName: "rOuTeFiLtErVaLuE", - RouteFilterRuleName: "rOuTeFiLtErRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/rOuTeFiLtErRuLeS/rOuTeFiLtErRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - if actual.RouteFilterRuleName != v.Expected.RouteFilterRuleName { - t.Fatalf("Expected %q but got %q for RouteFilterRuleName", v.Expected.RouteFilterRuleName, actual.RouteFilterRuleName) - } - - } -} - -func TestSegmentsForRouteFilterRuleId(t *testing.T) { - segments := RouteFilterRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteFilterRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/method_createorupdate.go b/resource-manager/network/2022-09-01/routefilterrules/method_createorupdate.go deleted file mode 100644 index d9ea66e2dd4..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package routefilterrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, id RouteFilterRuleId, input RouteFilterRule) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c RouteFilterRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id RouteFilterRuleId, input RouteFilterRule) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/method_delete.go b/resource-manager/network/2022-09-01/routefilterrules/method_delete.go deleted file mode 100644 index bbac130984b..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package routefilterrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c RouteFilterRulesClient) Delete(ctx context.Context, id RouteFilterRuleId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c RouteFilterRulesClient) DeleteThenPoll(ctx context.Context, id RouteFilterRuleId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/method_get.go b/resource-manager/network/2022-09-01/routefilterrules/method_get.go deleted file mode 100644 index f3c2de77462..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package routefilterrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteFilterRule -} - -// Get ... -func (c RouteFilterRulesClient) Get(ctx context.Context, id RouteFilterRuleId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/method_listbyroutefilter.go b/resource-manager/network/2022-09-01/routefilterrules/method_listbyroutefilter.go deleted file mode 100644 index 2496369e0e3..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/method_listbyroutefilter.go +++ /dev/null @@ -1,89 +0,0 @@ -package routefilterrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByRouteFilterOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteFilterRule -} - -type ListByRouteFilterCompleteResult struct { - Items []RouteFilterRule -} - -// ListByRouteFilter ... -func (c RouteFilterRulesClient) ListByRouteFilter(ctx context.Context, id RouteFilterId) (result ListByRouteFilterOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routeFilterRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteFilterRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByRouteFilterComplete retrieves all the results into a single object -func (c RouteFilterRulesClient) ListByRouteFilterComplete(ctx context.Context, id RouteFilterId) (ListByRouteFilterCompleteResult, error) { - return c.ListByRouteFilterCompleteMatchingPredicate(ctx, id, RouteFilterRuleOperationPredicate{}) -} - -// ListByRouteFilterCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteFilterRulesClient) ListByRouteFilterCompleteMatchingPredicate(ctx context.Context, id RouteFilterId, predicate RouteFilterRuleOperationPredicate) (result ListByRouteFilterCompleteResult, err error) { - items := make([]RouteFilterRule, 0) - - resp, err := c.ListByRouteFilter(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByRouteFilterCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/model_routefilterrule.go b/resource-manager/network/2022-09-01/routefilterrules/model_routefilterrule.go deleted file mode 100644 index d3ad4488a83..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/model_routefilterrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilterrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/model_routefilterrulepropertiesformat.go b/resource-manager/network/2022-09-01/routefilterrules/model_routefilterrulepropertiesformat.go deleted file mode 100644 index e59fbff04f1..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/model_routefilterrulepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package routefilterrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRulePropertiesFormat struct { - Access Access `json:"access"` - Communities []string `json:"communities"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilterRuleType RouteFilterRuleType `json:"routeFilterRuleType"` -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/predicates.go b/resource-manager/network/2022-09-01/routefilterrules/predicates.go deleted file mode 100644 index 3067b052089..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package routefilterrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRuleOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string -} - -func (p RouteFilterRuleOperationPredicate) Matches(input RouteFilterRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/routefilterrules/version.go b/resource-manager/network/2022-09-01/routefilterrules/version.go deleted file mode 100644 index a889f447bdb..00000000000 --- a/resource-manager/network/2022-09-01/routefilterrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilterrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilterrules/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/routefilters/README.md b/resource-manager/network/2022-09-01/routefilters/README.md deleted file mode 100644 index 8df48c4673e..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routefilters` Documentation - -The `routefilters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routefilters" -``` - - -### Client Initialization - -```go -client := routefilters.NewRouteFiltersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RouteFiltersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := routefilters.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -payload := routefilters.RouteFilter{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteFiltersClient.Delete` - -```go -ctx := context.TODO() -id := routefilters.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteFiltersClient.Get` - -```go -ctx := context.TODO() -id := routefilters.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -read, err := client.Get(ctx, id, routefilters.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RouteFiltersClient.List` - -```go -ctx := context.TODO() -id := routefilters.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RouteFiltersClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := routefilters.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RouteFiltersClient.UpdateTags` - -```go -ctx := context.TODO() -id := routefilters.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -payload := routefilters.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/routefilters/client.go b/resource-manager/network/2022-09-01/routefilters/client.go deleted file mode 100644 index e233141d003..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package routefilters - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFiltersClient struct { - Client *resourcemanager.Client -} - -func NewRouteFiltersClientWithBaseURI(api environments.Api) (*RouteFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "routefilters", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating RouteFiltersClient: %+v", err) - } - - return &RouteFiltersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/routefilters/constants.go b/resource-manager/network/2022-09-01/routefilters/constants.go deleted file mode 100644 index 47cec86d290..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/constants.go +++ /dev/null @@ -1,353 +0,0 @@ -package routefilters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Access string - -const ( - AccessAllow Access = "Allow" - AccessDeny Access = "Deny" -) - -func PossibleValuesForAccess() []string { - return []string{ - string(AccessAllow), - string(AccessDeny), - } -} - -func (s *Access) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAccess(input string) (*Access, error) { - vals := map[string]Access{ - "allow": AccessAllow, - "deny": AccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Access(input) - return &out, nil -} - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type RouteFilterRuleType string - -const ( - RouteFilterRuleTypeCommunity RouteFilterRuleType = "Community" -) - -func PossibleValuesForRouteFilterRuleType() []string { - return []string{ - string(RouteFilterRuleTypeCommunity), - } -} - -func (s *RouteFilterRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteFilterRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteFilterRuleType(input string) (*RouteFilterRuleType, error) { - vals := map[string]RouteFilterRuleType{ - "community": RouteFilterRuleTypeCommunity, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteFilterRuleType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/routefilters/id_routefilter.go b/resource-manager/network/2022-09-01/routefilters/id_routefilter.go deleted file mode 100644 index 0d539e18cc3..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/id_routefilter.go +++ /dev/null @@ -1,127 +0,0 @@ -package routefilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterId{} - -// RouteFilterId is a struct representing the Resource ID for a Route Filter -type RouteFilterId struct { - SubscriptionId string - ResourceGroupName string - RouteFilterName string -} - -// NewRouteFilterID returns a new RouteFilterId struct -func NewRouteFilterID(subscriptionId string, resourceGroupName string, routeFilterName string) RouteFilterId { - return RouteFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteFilterName: routeFilterName, - } -} - -// ParseRouteFilterID parses 'input' into a RouteFilterId -func ParseRouteFilterID(input string) (*RouteFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - return &id, nil -} - -// ParseRouteFilterIDInsensitively parses 'input' case-insensitively into a RouteFilterId -// note: this method should only be used for API response data and not user input -func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - return &id, nil -} - -// ValidateRouteFilterID checks that 'input' can be parsed as a Route Filter ID -func ValidateRouteFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Filter ID -func (id RouteFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Filter ID -func (id RouteFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteFilters", "routeFilters", "routeFilters"), - resourceids.UserSpecifiedSegment("routeFilterName", "routeFilterValue"), - } -} - -// String returns a human-readable description of this Route Filter ID -func (id RouteFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Filter Name: %q", id.RouteFilterName), - } - return fmt.Sprintf("Route Filter (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/routefilters/id_routefilter_test.go b/resource-manager/network/2022-09-01/routefilters/id_routefilter_test.go deleted file mode 100644 index 82418c4d29e..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/id_routefilter_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package routefilters - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterId{} - -func TestNewRouteFilterID(t *testing.T) { - id := NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteFilterName != "routeFilterValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteFilterName'", id.RouteFilterName, "routeFilterValue") - } -} - -func TestFormatRouteFilterID(t *testing.T) { - actual := NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteFilterID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - } -} - -func TestParseRouteFilterIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteFilterName: "rOuTeFiLtErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - } -} - -func TestSegmentsForRouteFilterId(t *testing.T) { - segments := RouteFilterId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteFilterId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/routefilters/method_createorupdate.go b/resource-manager/network/2022-09-01/routefilters/method_createorupdate.go deleted file mode 100644 index 9bcba818d23..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c RouteFiltersClient) CreateOrUpdate(ctx context.Context, id RouteFilterId, input RouteFilter) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c RouteFiltersClient) CreateOrUpdateThenPoll(ctx context.Context, id RouteFilterId, input RouteFilter) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/routefilters/method_delete.go b/resource-manager/network/2022-09-01/routefilters/method_delete.go deleted file mode 100644 index 1a389b5108c..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c RouteFiltersClient) Delete(ctx context.Context, id RouteFilterId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c RouteFiltersClient) DeleteThenPoll(ctx context.Context, id RouteFilterId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/routefilters/method_get.go b/resource-manager/network/2022-09-01/routefilters/method_get.go deleted file mode 100644 index 780247673d5..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteFilter -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c RouteFiltersClient) Get(ctx context.Context, id RouteFilterId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/routefilters/method_list.go b/resource-manager/network/2022-09-01/routefilters/method_list.go deleted file mode 100644 index 54448a67f8d..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteFilter -} - -type ListCompleteResult struct { - Items []RouteFilter -} - -// List ... -func (c RouteFiltersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/routeFilters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteFilter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c RouteFiltersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, RouteFilterOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteFiltersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RouteFilterOperationPredicate) (result ListCompleteResult, err error) { - items := make([]RouteFilter, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/routefilters/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/routefilters/method_listbyresourcegroup.go deleted file mode 100644 index 938f6ef5830..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteFilter -} - -type ListByResourceGroupCompleteResult struct { - Items []RouteFilter -} - -// ListByResourceGroup ... -func (c RouteFiltersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/routeFilters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteFilter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c RouteFiltersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, RouteFilterOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteFiltersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate RouteFilterOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]RouteFilter, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/routefilters/method_updatetags.go b/resource-manager/network/2022-09-01/routefilters/method_updatetags.go deleted file mode 100644 index a36ab91797b..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package routefilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteFilter -} - -// UpdateTags ... -func (c RouteFiltersClient) UpdateTags(ctx context.Context, id RouteFilterId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitconnection.go b/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitconnection.go deleted file mode 100644 index b4ee9836dca..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index 2e9948e07f4..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeering.go b/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeering.go deleted file mode 100644 index 79ef27f6ed8..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 43de7805714..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeeringpropertiesformat.go b/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeeringpropertiesformat.go deleted file mode 100644 index 1f5f8e7a726..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitpeeringpropertiesformat.go +++ /dev/null @@ -1,27 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringPropertiesFormat struct { - AzureASN *int64 `json:"azureASN,omitempty"` - Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` - ExpressRouteConnection *ExpressRouteConnectionId `json:"expressRouteConnection,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitstats.go b/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitstats.go deleted file mode 100644 index b57109bba40..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_expressroutecircuitstats.go +++ /dev/null @@ -1,11 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStats struct { - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_expressrouteconnectionid.go b/resource-manager/network/2022-09-01/routefilters/model_expressrouteconnectionid.go deleted file mode 100644 index 8d033b8e0e1..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_expressrouteconnectionid.go +++ /dev/null @@ -1,8 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_ipv6circuitconnectionconfig.go b/resource-manager/network/2022-09-01/routefilters/model_ipv6circuitconnectionconfig.go deleted file mode 100644 index 036a19fa8aa..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_ipv6circuitconnectionconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6CircuitConnectionConfig struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-09-01/routefilters/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index 66f1810d2ef..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_peerexpressroutecircuitconnection.go b/resource-manager/network/2022-09-01/routefilters/model_peerexpressroutecircuitconnection.go deleted file mode 100644 index 1cceefb8321..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_peerexpressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_peerexpressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-09-01/routefilters/model_peerexpressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index ae3652f5c1b..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_peerexpressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthResourceGuid *string `json:"authResourceGuid,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ConnectionName *string `json:"connectionName,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_routefilter.go b/resource-manager/network/2022-09-01/routefilters/model_routefilter.go deleted file mode 100644 index 1a6d290ed31..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_routefilter.go +++ /dev/null @@ -1,14 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilter struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *RouteFilterPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_routefilterpropertiesformat.go b/resource-manager/network/2022-09-01/routefilters/model_routefilterpropertiesformat.go deleted file mode 100644 index 3442c803e11..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_routefilterpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterPropertiesFormat struct { - IPv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"` - Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]RouteFilterRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_routefilterrule.go b/resource-manager/network/2022-09-01/routefilters/model_routefilterrule.go deleted file mode 100644 index 7bce6e5cdbc..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_routefilterrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_routefilterrulepropertiesformat.go b/resource-manager/network/2022-09-01/routefilters/model_routefilterrulepropertiesformat.go deleted file mode 100644 index 70f71e0d28d..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_routefilterrulepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRulePropertiesFormat struct { - Access Access `json:"access"` - Communities []string `json:"communities"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilterRuleType RouteFilterRuleType `json:"routeFilterRuleType"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_subresource.go b/resource-manager/network/2022-09-01/routefilters/model_subresource.go deleted file mode 100644 index 18344aa65b5..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/model_tagsobject.go b/resource-manager/network/2022-09-01/routefilters/model_tagsobject.go deleted file mode 100644 index 7657d1402ea..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routefilters/predicates.go b/resource-manager/network/2022-09-01/routefilters/predicates.go deleted file mode 100644 index 62b69547730..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p RouteFilterOperationPredicate) Matches(input RouteFilter) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/routefilters/version.go b/resource-manager/network/2022-09-01/routefilters/version.go deleted file mode 100644 index 94d0eb90cff..00000000000 --- a/resource-manager/network/2022-09-01/routefilters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilters/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/routes/README.md b/resource-manager/network/2022-09-01/routes/README.md deleted file mode 100644 index 883ae3f22e7..00000000000 --- a/resource-manager/network/2022-09-01/routes/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routes` Documentation - -The `routes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routes" -``` - - -### Client Initialization - -```go -client := routes.NewRoutesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RoutesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue") - -payload := routes.Route{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RoutesClient.Delete` - -```go -ctx := context.TODO() -id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `RoutesClient.Get` - -```go -ctx := context.TODO() -id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RoutesClient.List` - -```go -ctx := context.TODO() -id := routes.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/routes/client.go b/resource-manager/network/2022-09-01/routes/client.go deleted file mode 100644 index d82a569dd0e..00000000000 --- a/resource-manager/network/2022-09-01/routes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package routes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutesClient struct { - Client *resourcemanager.Client -} - -func NewRoutesClientWithBaseURI(api environments.Api) (*RoutesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "routes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating RoutesClient: %+v", err) - } - - return &RoutesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/routes/constants.go b/resource-manager/network/2022-09-01/routes/constants.go deleted file mode 100644 index e26bed906c5..00000000000 --- a/resource-manager/network/2022-09-01/routes/constants.go +++ /dev/null @@ -1,107 +0,0 @@ -package routes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/routes/id_route.go b/resource-manager/network/2022-09-01/routes/id_route.go deleted file mode 100644 index f2bbb0efdb5..00000000000 --- a/resource-manager/network/2022-09-01/routes/id_route.go +++ /dev/null @@ -1,140 +0,0 @@ -package routes - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteId{} - -// RouteId is a struct representing the Resource ID for a Route -type RouteId struct { - SubscriptionId string - ResourceGroupName string - RouteTableName string - RouteName string -} - -// NewRouteID returns a new RouteId struct -func NewRouteID(subscriptionId string, resourceGroupName string, routeTableName string, routeName string) RouteId { - return RouteId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteTableName: routeTableName, - RouteName: routeName, - } -} - -// ParseRouteID parses 'input' into a RouteId -func ParseRouteID(input string) (*RouteId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - if id.RouteName, ok = parsed.Parsed["routeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeName", *parsed) - } - - return &id, nil -} - -// ParseRouteIDInsensitively parses 'input' case-insensitively into a RouteId -// note: this method should only be used for API response data and not user input -func ParseRouteIDInsensitively(input string) (*RouteId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - if id.RouteName, ok = parsed.Parsed["routeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeName", *parsed) - } - - return &id, nil -} - -// ValidateRouteID checks that 'input' can be parsed as a Route ID -func ValidateRouteID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route ID -func (id RouteId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeTables/%s/routes/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteTableName, id.RouteName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route ID -func (id RouteId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - resourceids.StaticSegment("staticRoutes", "routes", "routes"), - resourceids.UserSpecifiedSegment("routeName", "routeValue"), - } -} - -// String returns a human-readable description of this Route ID -func (id RouteId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - fmt.Sprintf("Route Name: %q", id.RouteName), - } - return fmt.Sprintf("Route (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/routes/id_route_test.go b/resource-manager/network/2022-09-01/routes/id_route_test.go deleted file mode 100644 index cc9559ee238..00000000000 --- a/resource-manager/network/2022-09-01/routes/id_route_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package routes - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteId{} - -func TestNewRouteID(t *testing.T) { - id := NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } - - if id.RouteName != "routeValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteName'", id.RouteName, "routeValue") - } -} - -func TestFormatRouteID(t *testing.T) { - actual := NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue", - Expected: &RouteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - RouteName: "routeValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - if actual.RouteName != v.Expected.RouteName { - t.Fatalf("Expected %q but got %q for RouteName", v.Expected.RouteName, actual.RouteName) - } - - } -} - -func TestParseRouteIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/rOuTeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue", - Expected: &RouteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - RouteName: "routeValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/rOuTeS/rOuTeVaLuE", - Expected: &RouteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteTableName: "rOuTeTaBlEvAlUe", - RouteName: "rOuTeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/rOuTeS/rOuTeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - if actual.RouteName != v.Expected.RouteName { - t.Fatalf("Expected %q but got %q for RouteName", v.Expected.RouteName, actual.RouteName) - } - - } -} - -func TestSegmentsForRouteId(t *testing.T) { - segments := RouteId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/routes/id_routetable.go b/resource-manager/network/2022-09-01/routes/id_routetable.go deleted file mode 100644 index c8aadc85160..00000000000 --- a/resource-manager/network/2022-09-01/routes/id_routetable.go +++ /dev/null @@ -1,127 +0,0 @@ -package routes - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTableId{} - -// RouteTableId is a struct representing the Resource ID for a Route Table -type RouteTableId struct { - SubscriptionId string - ResourceGroupName string - RouteTableName string -} - -// NewRouteTableID returns a new RouteTableId struct -func NewRouteTableID(subscriptionId string, resourceGroupName string, routeTableName string) RouteTableId { - return RouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteTableName: routeTableName, - } -} - -// ParseRouteTableID parses 'input' into a RouteTableId -func ParseRouteTableID(input string) (*RouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParseRouteTableIDInsensitively parses 'input' case-insensitively into a RouteTableId -// note: this method should only be used for API response data and not user input -func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidateRouteTableID checks that 'input' can be parsed as a Route Table ID -func ValidateRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Table ID -func (id RouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Table ID -func (id RouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Route Table ID -func (id RouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/routes/id_routetable_test.go b/resource-manager/network/2022-09-01/routes/id_routetable_test.go deleted file mode 100644 index d4e8b54b32b..00000000000 --- a/resource-manager/network/2022-09-01/routes/id_routetable_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package routes - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTableId{} - -func TestNewRouteTableID(t *testing.T) { - id := NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatRouteTableID(t *testing.T) { - actual := NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParseRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForRouteTableId(t *testing.T) { - segments := RouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/routes/method_createorupdate.go b/resource-manager/network/2022-09-01/routes/method_createorupdate.go deleted file mode 100644 index c48c20f8ef7..00000000000 --- a/resource-manager/network/2022-09-01/routes/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package routes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c RoutesClient) CreateOrUpdate(ctx context.Context, id RouteId, input Route) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c RoutesClient) CreateOrUpdateThenPoll(ctx context.Context, id RouteId, input Route) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/routes/method_delete.go b/resource-manager/network/2022-09-01/routes/method_delete.go deleted file mode 100644 index f6cee23c133..00000000000 --- a/resource-manager/network/2022-09-01/routes/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package routes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c RoutesClient) Delete(ctx context.Context, id RouteId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c RoutesClient) DeleteThenPoll(ctx context.Context, id RouteId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/routes/method_get.go b/resource-manager/network/2022-09-01/routes/method_get.go deleted file mode 100644 index afe6e4a6434..00000000000 --- a/resource-manager/network/2022-09-01/routes/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package routes - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Route -} - -// Get ... -func (c RoutesClient) Get(ctx context.Context, id RouteId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/routes/method_list.go b/resource-manager/network/2022-09-01/routes/method_list.go deleted file mode 100644 index c2d72c97aa3..00000000000 --- a/resource-manager/network/2022-09-01/routes/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package routes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Route -} - -type ListCompleteResult struct { - Items []Route -} - -// List ... -func (c RoutesClient) List(ctx context.Context, id RouteTableId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Route `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c RoutesClient) ListComplete(ctx context.Context, id RouteTableId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, RouteOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RoutesClient) ListCompleteMatchingPredicate(ctx context.Context, id RouteTableId, predicate RouteOperationPredicate) (result ListCompleteResult, err error) { - items := make([]Route, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/routes/model_route.go b/resource-manager/network/2022-09-01/routes/model_route.go deleted file mode 100644 index 364b3bb3322..00000000000 --- a/resource-manager/network/2022-09-01/routes/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package routes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routes/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/routes/model_routepropertiesformat.go deleted file mode 100644 index 82a30d0f4e0..00000000000 --- a/resource-manager/network/2022-09-01/routes/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routes/predicates.go b/resource-manager/network/2022-09-01/routes/predicates.go deleted file mode 100644 index b0ff24a6573..00000000000 --- a/resource-manager/network/2022-09-01/routes/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package routes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p RouteOperationPredicate) Matches(input Route) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/routes/version.go b/resource-manager/network/2022-09-01/routes/version.go deleted file mode 100644 index 3b82ec46d4e..00000000000 --- a/resource-manager/network/2022-09-01/routes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package routes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routes/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/routetables/README.md b/resource-manager/network/2022-09-01/routetables/README.md deleted file mode 100644 index c4a0fe72d29..00000000000 --- a/resource-manager/network/2022-09-01/routetables/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routetables` Documentation - -The `routetables` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/routetables" -``` - - -### Client Initialization - -```go -client := routetables.NewRouteTablesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RouteTablesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := routetables.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -payload := routetables.RouteTable{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteTablesClient.Delete` - -```go -ctx := context.TODO() -id := routetables.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteTablesClient.Get` - -```go -ctx := context.TODO() -id := routetables.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -read, err := client.Get(ctx, id, routetables.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RouteTablesClient.List` - -```go -ctx := context.TODO() -id := routetables.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RouteTablesClient.ListAll` - -```go -ctx := context.TODO() -id := routetables.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RouteTablesClient.UpdateTags` - -```go -ctx := context.TODO() -id := routetables.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -payload := routetables.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/routetables/client.go b/resource-manager/network/2022-09-01/routetables/client.go deleted file mode 100644 index 98894d48e67..00000000000 --- a/resource-manager/network/2022-09-01/routetables/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package routetables - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablesClient struct { - Client *resourcemanager.Client -} - -func NewRouteTablesClientWithBaseURI(api environments.Api) (*RouteTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "routetables", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating RouteTablesClient: %+v", err) - } - - return &RouteTablesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/routetables/constants.go b/resource-manager/network/2022-09-01/routetables/constants.go deleted file mode 100644 index 9f8d2c5a432..00000000000 --- a/resource-manager/network/2022-09-01/routetables/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package routetables - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/routetables/id_routetable.go b/resource-manager/network/2022-09-01/routetables/id_routetable.go deleted file mode 100644 index 15838ef16b1..00000000000 --- a/resource-manager/network/2022-09-01/routetables/id_routetable.go +++ /dev/null @@ -1,127 +0,0 @@ -package routetables - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTableId{} - -// RouteTableId is a struct representing the Resource ID for a Route Table -type RouteTableId struct { - SubscriptionId string - ResourceGroupName string - RouteTableName string -} - -// NewRouteTableID returns a new RouteTableId struct -func NewRouteTableID(subscriptionId string, resourceGroupName string, routeTableName string) RouteTableId { - return RouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteTableName: routeTableName, - } -} - -// ParseRouteTableID parses 'input' into a RouteTableId -func ParseRouteTableID(input string) (*RouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParseRouteTableIDInsensitively parses 'input' case-insensitively into a RouteTableId -// note: this method should only be used for API response data and not user input -func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidateRouteTableID checks that 'input' can be parsed as a Route Table ID -func ValidateRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Table ID -func (id RouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Table ID -func (id RouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Route Table ID -func (id RouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/routetables/id_routetable_test.go b/resource-manager/network/2022-09-01/routetables/id_routetable_test.go deleted file mode 100644 index 6d79f18c17a..00000000000 --- a/resource-manager/network/2022-09-01/routetables/id_routetable_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package routetables - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTableId{} - -func TestNewRouteTableID(t *testing.T) { - id := NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatRouteTableID(t *testing.T) { - actual := NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParseRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForRouteTableId(t *testing.T) { - segments := RouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/routetables/method_createorupdate.go b/resource-manager/network/2022-09-01/routetables/method_createorupdate.go deleted file mode 100644 index 513a723fa59..00000000000 --- a/resource-manager/network/2022-09-01/routetables/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c RouteTablesClient) CreateOrUpdate(ctx context.Context, id RouteTableId, input RouteTable) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c RouteTablesClient) CreateOrUpdateThenPoll(ctx context.Context, id RouteTableId, input RouteTable) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/routetables/method_delete.go b/resource-manager/network/2022-09-01/routetables/method_delete.go deleted file mode 100644 index 6ef6e0e531d..00000000000 --- a/resource-manager/network/2022-09-01/routetables/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c RouteTablesClient) Delete(ctx context.Context, id RouteTableId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c RouteTablesClient) DeleteThenPoll(ctx context.Context, id RouteTableId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/routetables/method_get.go b/resource-manager/network/2022-09-01/routetables/method_get.go deleted file mode 100644 index 982dfc8c9bb..00000000000 --- a/resource-manager/network/2022-09-01/routetables/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteTable -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c RouteTablesClient) Get(ctx context.Context, id RouteTableId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/routetables/method_list.go b/resource-manager/network/2022-09-01/routetables/method_list.go deleted file mode 100644 index fe8b71a9bb8..00000000000 --- a/resource-manager/network/2022-09-01/routetables/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteTable -} - -type ListCompleteResult struct { - Items []RouteTable -} - -// List ... -func (c RouteTablesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/routeTables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteTable `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c RouteTablesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, RouteTableOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteTablesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate RouteTableOperationPredicate) (result ListCompleteResult, err error) { - items := make([]RouteTable, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/routetables/method_listall.go b/resource-manager/network/2022-09-01/routetables/method_listall.go deleted file mode 100644 index be85d8a046c..00000000000 --- a/resource-manager/network/2022-09-01/routetables/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteTable -} - -type ListAllCompleteResult struct { - Items []RouteTable -} - -// ListAll ... -func (c RouteTablesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/routeTables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteTable `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c RouteTablesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, RouteTableOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteTablesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RouteTableOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]RouteTable, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/routetables/method_updatetags.go b/resource-manager/network/2022-09-01/routetables/method_updatetags.go deleted file mode 100644 index 796310232ed..00000000000 --- a/resource-manager/network/2022-09-01/routetables/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package routetables - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteTable -} - -// UpdateTags ... -func (c RouteTablesClient) UpdateTags(ctx context.Context, id RouteTableId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 3f1666af192..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index aa535e08a6a..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 26b2afe4fb6..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/routetables/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 2474ea7f89e..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index b0ea966f8a5..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/routetables/model_applicationsecuritygroup.go deleted file mode 100644 index da94563b915..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index d270ac905b2..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_backendaddresspool.go b/resource-manager/network/2022-09-01/routetables/model_backendaddresspool.go deleted file mode 100644 index 90a55576b63..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index c1ff3fcd065..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index d85f90834ef..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_ddossettings.go b/resource-manager/network/2022-09-01/routetables/model_ddossettings.go deleted file mode 100644 index ffd9663e361..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_delegation.go b/resource-manager/network/2022-09-01/routetables/model_delegation.go deleted file mode 100644 index 2098ca8ace8..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_flowlog.go b/resource-manager/network/2022-09-01/routetables/model_flowlog.go deleted file mode 100644 index cea97564b72..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/routetables/model_flowlogformatparameters.go deleted file mode 100644 index 46d83a48283..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_flowlogpropertiesformat.go deleted file mode 100644 index 23f3648b1da..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/routetables/model_frontendipconfiguration.go deleted file mode 100644 index 15308372f3a..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index c3ba5e8cb16..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/routetables/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index f99a910776d..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_inboundnatrule.go b/resource-manager/network/2022-09-01/routetables/model_inboundnatrule.go deleted file mode 100644 index b540b7a4ff5..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 5fa1c54256c..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_ipconfiguration.go b/resource-manager/network/2022-09-01/routetables/model_ipconfiguration.go deleted file mode 100644 index 7f86bd442fd..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/routetables/model_ipconfigurationprofile.go deleted file mode 100644 index 10063b56d94..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 8be23ea8407..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 33538e3da04..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_iptag.go b/resource-manager/network/2022-09-01/routetables/model_iptag.go deleted file mode 100644 index 0591a6fbb81..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/routetables/model_loadbalancerbackendaddress.go deleted file mode 100644 index 6eb63262bd2..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index b4070586d52..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_natgateway.go b/resource-manager/network/2022-09-01/routetables/model_natgateway.go deleted file mode 100644 index cdcecbfa098..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_natgatewaypropertiesformat.go deleted file mode 100644 index dd643c79c79..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_natgatewaysku.go b/resource-manager/network/2022-09-01/routetables/model_natgatewaysku.go deleted file mode 100644 index 8e15e8b1250..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_natruleportmapping.go b/resource-manager/network/2022-09-01/routetables/model_natruleportmapping.go deleted file mode 100644 index 665d5f253ce..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networkinterface.go b/resource-manager/network/2022-09-01/routetables/model_networkinterface.go deleted file mode 100644 index fac5f0869e6..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/routetables/model_networkinterfacednssettings.go deleted file mode 100644 index 9d476ca2642..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 7db216219a1..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 60fdba4dd13..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 3f36842e1f3..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_networkinterfacepropertiesformat.go deleted file mode 100644 index cc03b90ede8..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/routetables/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 6f876f8ce53..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index fbd84b3af86..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/routetables/model_networksecuritygroup.go deleted file mode 100644 index 84c0fadac17..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 633f7012e04..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privateendpoint.go b/resource-manager/network/2022-09-01/routetables/model_privateendpoint.go deleted file mode 100644 index 80308b3a2a6..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/routetables/model_privateendpointconnection.go deleted file mode 100644 index 0e503458e9c..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/routetables/model_privateendpointconnectionproperties.go deleted file mode 100644 index 4e270701e21..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/routetables/model_privateendpointipconfiguration.go deleted file mode 100644 index de4e0254405..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/routetables/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 1ba73d98f4a..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/routetables/model_privateendpointproperties.go deleted file mode 100644 index 3d92a4a92e1..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privatelinkservice.go b/resource-manager/network/2022-09-01/routetables/model_privatelinkservice.go deleted file mode 100644 index 29bf0cf5834..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnection.go deleted file mode 100644 index 4adf690c566..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 063a4faec37..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 3b1634cb059..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index e3ad61faa8f..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 430eebd19ae..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceproperties.go deleted file mode 100644 index 9e26fa01a75..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_publicipaddress.go b/resource-manager/network/2022-09-01/routetables/model_publicipaddress.go deleted file mode 100644 index 8248c499a22..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/routetables/model_publicipaddressdnssettings.go deleted file mode 100644 index d3414edd7f7..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_publicipaddresspropertiesformat.go deleted file mode 100644 index ba0c692ec23..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/routetables/model_publicipaddresssku.go deleted file mode 100644 index 956c758896f..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/routetables/model_resourcenavigationlink.go deleted file mode 100644 index c5d74e0472b..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/routetables/model_resourcenavigationlinkformat.go deleted file mode 100644 index eca6b593c69..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_resourceset.go b/resource-manager/network/2022-09-01/routetables/model_resourceset.go deleted file mode 100644 index 8a57a8fb40d..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/routetables/model_retentionpolicyparameters.go deleted file mode 100644 index 37bad49cdcb..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_route.go b/resource-manager/network/2022-09-01/routetables/model_route.go deleted file mode 100644 index 10c17005b28..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_routepropertiesformat.go deleted file mode 100644 index 028abe93e73..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_routetable.go b/resource-manager/network/2022-09-01/routetables/model_routetable.go deleted file mode 100644 index 1b2bb754997..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_routetablepropertiesformat.go deleted file mode 100644 index 64470e39699..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_securityrule.go b/resource-manager/network/2022-09-01/routetables/model_securityrule.go deleted file mode 100644 index ab6f4a35210..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_securityrulepropertiesformat.go deleted file mode 100644 index 636af5195f0..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/routetables/model_serviceassociationlink.go deleted file mode 100644 index 682b3659989..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 7ed4a93de00..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_servicedelegationpropertiesformat.go deleted file mode 100644 index fba1a21dc46..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicy.go deleted file mode 100644 index c941578ec3f..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 6a6135ec206..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index a9fcdcec846..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 25a22cda3fd..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_serviceendpointpropertiesformat.go deleted file mode 100644 index ffdfaa0569b..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_subnet.go b/resource-manager/network/2022-09-01/routetables/model_subnet.go deleted file mode 100644 index 949e07613d6..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_subnetpropertiesformat.go deleted file mode 100644 index 95f54741d81..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_subresource.go b/resource-manager/network/2022-09-01/routetables/model_subresource.go deleted file mode 100644 index eab315946e0..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_tagsobject.go b/resource-manager/network/2022-09-01/routetables/model_tagsobject.go deleted file mode 100644 index 61b33687ad4..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/routetables/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index e02ff0c097e..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/routetables/model_trafficanalyticsproperties.go deleted file mode 100644 index d88b7ea067e..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/routetables/model_virtualnetworktap.go deleted file mode 100644 index 7551bed07c8..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/routetables/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 2094070851f..00000000000 --- a/resource-manager/network/2022-09-01/routetables/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/routetables/predicates.go b/resource-manager/network/2022-09-01/routetables/predicates.go deleted file mode 100644 index e1d89b9fbd4..00000000000 --- a/resource-manager/network/2022-09-01/routetables/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTableOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p RouteTableOperationPredicate) Matches(input RouteTable) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/routetables/version.go b/resource-manager/network/2022-09-01/routetables/version.go deleted file mode 100644 index a91575f6354..00000000000 --- a/resource-manager/network/2022-09-01/routetables/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routetables/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/README.md b/resource-manager/network/2022-09-01/scopeconnections/README.md deleted file mode 100644 index bf68f8ec346..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/README.md +++ /dev/null @@ -1,90 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/scopeconnections` Documentation - -The `scopeconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/scopeconnections" -``` - - -### Client Initialization - -```go -client := scopeconnections.NewScopeConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ScopeConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := scopeconnections.NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue") - -payload := scopeconnections.ScopeConnection{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ScopeConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := scopeconnections.NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ScopeConnectionsClient.Get` - -```go -ctx := context.TODO() -id := scopeconnections.NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ScopeConnectionsClient.List` - -```go -ctx := context.TODO() -id := scopeconnections.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -// alternatively `client.List(ctx, id, scopeconnections.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, scopeconnections.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/scopeconnections/client.go b/resource-manager/network/2022-09-01/scopeconnections/client.go deleted file mode 100644 index 65a0f58dd04..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package scopeconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewScopeConnectionsClientWithBaseURI(api environments.Api) (*ScopeConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "scopeconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ScopeConnectionsClient: %+v", err) - } - - return &ScopeConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/constants.go b/resource-manager/network/2022-09-01/scopeconnections/constants.go deleted file mode 100644 index 24a9bb99e3a..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/constants.go +++ /dev/null @@ -1,60 +0,0 @@ -package scopeconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionState string - -const ( - ScopeConnectionStateConflict ScopeConnectionState = "Conflict" - ScopeConnectionStateConnected ScopeConnectionState = "Connected" - ScopeConnectionStatePending ScopeConnectionState = "Pending" - ScopeConnectionStateRejected ScopeConnectionState = "Rejected" - ScopeConnectionStateRevoked ScopeConnectionState = "Revoked" -) - -func PossibleValuesForScopeConnectionState() []string { - return []string{ - string(ScopeConnectionStateConflict), - string(ScopeConnectionStateConnected), - string(ScopeConnectionStatePending), - string(ScopeConnectionStateRejected), - string(ScopeConnectionStateRevoked), - } -} - -func (s *ScopeConnectionState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScopeConnectionState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScopeConnectionState(input string) (*ScopeConnectionState, error) { - vals := map[string]ScopeConnectionState{ - "conflict": ScopeConnectionStateConflict, - "connected": ScopeConnectionStateConnected, - "pending": ScopeConnectionStatePending, - "rejected": ScopeConnectionStateRejected, - "revoked": ScopeConnectionStateRevoked, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScopeConnectionState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/id_networkmanager.go b/resource-manager/network/2022-09-01/scopeconnections/id_networkmanager.go deleted file mode 100644 index 8e518126e3d..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package scopeconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/id_networkmanager_test.go b/resource-manager/network/2022-09-01/scopeconnections/id_networkmanager_test.go deleted file mode 100644 index 876b6320d1e..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package scopeconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/id_scopeconnection.go b/resource-manager/network/2022-09-01/scopeconnections/id_scopeconnection.go deleted file mode 100644 index dbc1fb7a7a7..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/id_scopeconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package scopeconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ScopeConnectionId{} - -// ScopeConnectionId is a struct representing the Resource ID for a Scope Connection -type ScopeConnectionId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - ScopeConnectionName string -} - -// NewScopeConnectionID returns a new ScopeConnectionId struct -func NewScopeConnectionID(subscriptionId string, resourceGroupName string, networkManagerName string, scopeConnectionName string) ScopeConnectionId { - return ScopeConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - ScopeConnectionName: scopeConnectionName, - } -} - -// ParseScopeConnectionID parses 'input' into a ScopeConnectionId -func ParseScopeConnectionID(input string) (*ScopeConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ScopeConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ScopeConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ScopeConnectionName, ok = parsed.Parsed["scopeConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeConnectionName", *parsed) - } - - return &id, nil -} - -// ParseScopeConnectionIDInsensitively parses 'input' case-insensitively into a ScopeConnectionId -// note: this method should only be used for API response data and not user input -func ParseScopeConnectionIDInsensitively(input string) (*ScopeConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ScopeConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ScopeConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ScopeConnectionName, ok = parsed.Parsed["scopeConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateScopeConnectionID checks that 'input' can be parsed as a Scope Connection ID -func ValidateScopeConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseScopeConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Scope Connection ID -func (id ScopeConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/scopeConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.ScopeConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Scope Connection ID -func (id ScopeConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticScopeConnections", "scopeConnections", "scopeConnections"), - resourceids.UserSpecifiedSegment("scopeConnectionName", "scopeConnectionValue"), - } -} - -// String returns a human-readable description of this Scope Connection ID -func (id ScopeConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Scope Connection Name: %q", id.ScopeConnectionName), - } - return fmt.Sprintf("Scope Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/id_scopeconnection_test.go b/resource-manager/network/2022-09-01/scopeconnections/id_scopeconnection_test.go deleted file mode 100644 index beaf9da865e..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/id_scopeconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package scopeconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ScopeConnectionId{} - -func TestNewScopeConnectionID(t *testing.T) { - id := NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.ScopeConnectionName != "scopeConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ScopeConnectionName'", id.ScopeConnectionName, "scopeConnectionValue") - } -} - -func TestFormatScopeConnectionID(t *testing.T) { - actual := NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseScopeConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ScopeConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue", - Expected: &ScopeConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - ScopeConnectionName: "scopeConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseScopeConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.ScopeConnectionName != v.Expected.ScopeConnectionName { - t.Fatalf("Expected %q but got %q for ScopeConnectionName", v.Expected.ScopeConnectionName, actual.ScopeConnectionName) - } - - } -} - -func TestParseScopeConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ScopeConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sCoPeCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue", - Expected: &ScopeConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - ScopeConnectionName: "scopeConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sCoPeCoNnEcTiOnS/sCoPeCoNnEcTiOnVaLuE", - Expected: &ScopeConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - ScopeConnectionName: "sCoPeCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sCoPeCoNnEcTiOnS/sCoPeCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseScopeConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.ScopeConnectionName != v.Expected.ScopeConnectionName { - t.Fatalf("Expected %q but got %q for ScopeConnectionName", v.Expected.ScopeConnectionName, actual.ScopeConnectionName) - } - - } -} - -func TestSegmentsForScopeConnectionId(t *testing.T) { - segments := ScopeConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ScopeConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/method_createorupdate.go b/resource-manager/network/2022-09-01/scopeconnections/method_createorupdate.go deleted file mode 100644 index 7501f601353..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package scopeconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ScopeConnection -} - -// CreateOrUpdate ... -func (c ScopeConnectionsClient) CreateOrUpdate(ctx context.Context, id ScopeConnectionId, input ScopeConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/method_delete.go b/resource-manager/network/2022-09-01/scopeconnections/method_delete.go deleted file mode 100644 index 0ef9f60e8f6..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/method_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package scopeconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ScopeConnectionsClient) Delete(ctx context.Context, id ScopeConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/method_get.go b/resource-manager/network/2022-09-01/scopeconnections/method_get.go deleted file mode 100644 index a6a23e9f8f3..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package scopeconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ScopeConnection -} - -// Get ... -func (c ScopeConnectionsClient) Get(ctx context.Context, id ScopeConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/method_list.go b/resource-manager/network/2022-09-01/scopeconnections/method_list.go deleted file mode 100644 index 1d069906d4c..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package scopeconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ScopeConnection -} - -type ListCompleteResult struct { - Items []ScopeConnection -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c ScopeConnectionsClient) List(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/scopeConnections", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ScopeConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ScopeConnectionsClient) ListComplete(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, ScopeConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ScopeConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate ScopeConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ScopeConnection, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/model_scopeconnection.go b/resource-manager/network/2022-09-01/scopeconnections/model_scopeconnection.go deleted file mode 100644 index ddb7dcfd3ff..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/model_scopeconnection.go +++ /dev/null @@ -1,17 +0,0 @@ -package scopeconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ScopeConnectionProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/model_scopeconnectionproperties.go b/resource-manager/network/2022-09-01/scopeconnections/model_scopeconnectionproperties.go deleted file mode 100644 index 0997147a2a9..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/model_scopeconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package scopeconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionProperties struct { - ConnectionState *ScopeConnectionState `json:"connectionState,omitempty"` - Description *string `json:"description,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - TenantId *string `json:"tenantId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/predicates.go b/resource-manager/network/2022-09-01/scopeconnections/predicates.go deleted file mode 100644 index eda309664f4..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package scopeconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ScopeConnectionOperationPredicate) Matches(input ScopeConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/scopeconnections/version.go b/resource-manager/network/2022-09-01/scopeconnections/version.go deleted file mode 100644 index 322f8301f2c..00000000000 --- a/resource-manager/network/2022-09-01/scopeconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package scopeconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopeconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/README.md b/resource-manager/network/2022-09-01/securityadminconfigurations/README.md deleted file mode 100644 index ed2d85baf54..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/securityadminconfigurations` Documentation - -The `securityadminconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/securityadminconfigurations" -``` - - -### Client Initialization - -```go -client := securityadminconfigurations.NewSecurityAdminConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SecurityAdminConfigurationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := securityadminconfigurations.NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - -payload := securityadminconfigurations.SecurityAdminConfiguration{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityAdminConfigurationsClient.Delete` - -```go -ctx := context.TODO() -id := securityadminconfigurations.NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - -if err := client.DeleteThenPoll(ctx, id, securityadminconfigurations.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityAdminConfigurationsClient.Get` - -```go -ctx := context.TODO() -id := securityadminconfigurations.NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityAdminConfigurationsClient.List` - -```go -ctx := context.TODO() -id := securityadminconfigurations.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -// alternatively `client.List(ctx, id, securityadminconfigurations.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, securityadminconfigurations.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/client.go b/resource-manager/network/2022-09-01/securityadminconfigurations/client.go deleted file mode 100644 index 4462d9db2c9..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package securityadminconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAdminConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewSecurityAdminConfigurationsClientWithBaseURI(api environments.Api) (*SecurityAdminConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "securityadminconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating SecurityAdminConfigurationsClient: %+v", err) - } - - return &SecurityAdminConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/constants.go b/resource-manager/network/2022-09-01/securityadminconfigurations/constants.go deleted file mode 100644 index bfadf6115a8..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/constants.go +++ /dev/null @@ -1,101 +0,0 @@ -package securityadminconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkIntentPolicyBasedService string - -const ( - NetworkIntentPolicyBasedServiceAll NetworkIntentPolicyBasedService = "All" - NetworkIntentPolicyBasedServiceAllowRulesOnly NetworkIntentPolicyBasedService = "AllowRulesOnly" - NetworkIntentPolicyBasedServiceNone NetworkIntentPolicyBasedService = "None" -) - -func PossibleValuesForNetworkIntentPolicyBasedService() []string { - return []string{ - string(NetworkIntentPolicyBasedServiceAll), - string(NetworkIntentPolicyBasedServiceAllowRulesOnly), - string(NetworkIntentPolicyBasedServiceNone), - } -} - -func (s *NetworkIntentPolicyBasedService) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkIntentPolicyBasedService(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkIntentPolicyBasedService(input string) (*NetworkIntentPolicyBasedService, error) { - vals := map[string]NetworkIntentPolicyBasedService{ - "all": NetworkIntentPolicyBasedServiceAll, - "allowrulesonly": NetworkIntentPolicyBasedServiceAllowRulesOnly, - "none": NetworkIntentPolicyBasedServiceNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkIntentPolicyBasedService(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/id_networkmanager.go b/resource-manager/network/2022-09-01/securityadminconfigurations/id_networkmanager.go deleted file mode 100644 index aec8d0fdd53..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package securityadminconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/id_networkmanager_test.go b/resource-manager/network/2022-09-01/securityadminconfigurations/id_networkmanager_test.go deleted file mode 100644 index 3cb74c96600..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package securityadminconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/id_securityadminconfiguration.go b/resource-manager/network/2022-09-01/securityadminconfigurations/id_securityadminconfiguration.go deleted file mode 100644 index 3c2a8543126..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/id_securityadminconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package securityadminconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityAdminConfigurationId{} - -// SecurityAdminConfigurationId is a struct representing the Resource ID for a Security Admin Configuration -type SecurityAdminConfigurationId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string -} - -// NewSecurityAdminConfigurationID returns a new SecurityAdminConfigurationId struct -func NewSecurityAdminConfigurationID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string) SecurityAdminConfigurationId { - return SecurityAdminConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - } -} - -// ParseSecurityAdminConfigurationID parses 'input' into a SecurityAdminConfigurationId -func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityAdminConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseSecurityAdminConfigurationIDInsensitively parses 'input' case-insensitively into a SecurityAdminConfigurationId -// note: this method should only be used for API response data and not user input -func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdminConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityAdminConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateSecurityAdminConfigurationID checks that 'input' can be parsed as a Security Admin Configuration ID -func ValidateSecurityAdminConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseSecurityAdminConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Security Admin Configuration ID -func (id SecurityAdminConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Security Admin Configuration ID -func (id SecurityAdminConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - } -} - -// String returns a human-readable description of this Security Admin Configuration ID -func (id SecurityAdminConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - } - return fmt.Sprintf("Security Admin Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/id_securityadminconfiguration_test.go b/resource-manager/network/2022-09-01/securityadminconfigurations/id_securityadminconfiguration_test.go deleted file mode 100644 index 19df83d16df..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/id_securityadminconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package securityadminconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityAdminConfigurationId{} - -func TestNewSecurityAdminConfigurationID(t *testing.T) { - id := NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } -} - -func TestFormatSecurityAdminConfigurationID(t *testing.T) { - actual := NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseSecurityAdminConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityAdminConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityAdminConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - } -} - -func TestParseSecurityAdminConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityAdminConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityAdminConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - } -} - -func TestSegmentsForSecurityAdminConfigurationId(t *testing.T) { - segments := SecurityAdminConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("SecurityAdminConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/method_createorupdate.go b/resource-manager/network/2022-09-01/securityadminconfigurations/method_createorupdate.go deleted file mode 100644 index f0b44f47219..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package securityadminconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityAdminConfiguration -} - -// CreateOrUpdate ... -func (c SecurityAdminConfigurationsClient) CreateOrUpdate(ctx context.Context, id SecurityAdminConfigurationId, input SecurityAdminConfiguration) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/method_delete.go b/resource-manager/network/2022-09-01/securityadminconfigurations/method_delete.go deleted file mode 100644 index d08913b2c20..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package securityadminconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c SecurityAdminConfigurationsClient) Delete(ctx context.Context, id SecurityAdminConfigurationId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c SecurityAdminConfigurationsClient) DeleteThenPoll(ctx context.Context, id SecurityAdminConfigurationId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/method_get.go b/resource-manager/network/2022-09-01/securityadminconfigurations/method_get.go deleted file mode 100644 index fbc3b845a75..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package securityadminconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityAdminConfiguration -} - -// Get ... -func (c SecurityAdminConfigurationsClient) Get(ctx context.Context, id SecurityAdminConfigurationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/method_list.go b/resource-manager/network/2022-09-01/securityadminconfigurations/method_list.go deleted file mode 100644 index 3396789e5c1..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package securityadminconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityAdminConfiguration -} - -type ListCompleteResult struct { - Items []SecurityAdminConfiguration -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c SecurityAdminConfigurationsClient) List(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/securityAdminConfigurations", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityAdminConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c SecurityAdminConfigurationsClient) ListComplete(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, SecurityAdminConfigurationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityAdminConfigurationsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate SecurityAdminConfigurationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]SecurityAdminConfiguration, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/model_securityadminconfiguration.go b/resource-manager/network/2022-09-01/securityadminconfigurations/model_securityadminconfiguration.go deleted file mode 100644 index 004c4d46b07..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/model_securityadminconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package securityadminconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAdminConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityAdminConfigurationPropertiesFormat `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/model_securityadminconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/securityadminconfigurations/model_securityadminconfigurationpropertiesformat.go deleted file mode 100644 index ad8903223e2..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/model_securityadminconfigurationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package securityadminconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAdminConfigurationPropertiesFormat struct { - ApplyOnNetworkIntentPolicyBasedServices *[]NetworkIntentPolicyBasedService `json:"applyOnNetworkIntentPolicyBasedServices,omitempty"` - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/predicates.go b/resource-manager/network/2022-09-01/securityadminconfigurations/predicates.go deleted file mode 100644 index bcc5de9a6a8..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package securityadminconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAdminConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p SecurityAdminConfigurationOperationPredicate) Matches(input SecurityAdminConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/securityadminconfigurations/version.go b/resource-manager/network/2022-09-01/securityadminconfigurations/version.go deleted file mode 100644 index e14bfa83205..00000000000 --- a/resource-manager/network/2022-09-01/securityadminconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package securityadminconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityadminconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/README.md b/resource-manager/network/2022-09-01/securitypartnerproviders/README.md deleted file mode 100644 index 5488fcf329b..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/securitypartnerproviders` Documentation - -The `securitypartnerproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/securitypartnerproviders" -``` - - -### Client Initialization - -```go -client := securitypartnerproviders.NewSecurityPartnerProvidersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SecurityPartnerProvidersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - -payload := securitypartnerproviders.SecurityPartnerProvider{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.Delete` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.Get` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.List` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.UpdateTags` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - -payload := securitypartnerproviders.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/client.go b/resource-manager/network/2022-09-01/securitypartnerproviders/client.go deleted file mode 100644 index 8e43fdacd61..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package securitypartnerproviders - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityPartnerProvidersClient struct { - Client *resourcemanager.Client -} - -func NewSecurityPartnerProvidersClientWithBaseURI(api environments.Api) (*SecurityPartnerProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "securitypartnerproviders", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating SecurityPartnerProvidersClient: %+v", err) - } - - return &SecurityPartnerProvidersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/constants.go b/resource-manager/network/2022-09-01/securitypartnerproviders/constants.go deleted file mode 100644 index 2390c77210a..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/constants.go +++ /dev/null @@ -1,148 +0,0 @@ -package securitypartnerproviders - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityPartnerProviderConnectionStatus string - -const ( - SecurityPartnerProviderConnectionStatusConnected SecurityPartnerProviderConnectionStatus = "Connected" - SecurityPartnerProviderConnectionStatusNotConnected SecurityPartnerProviderConnectionStatus = "NotConnected" - SecurityPartnerProviderConnectionStatusPartiallyConnected SecurityPartnerProviderConnectionStatus = "PartiallyConnected" - SecurityPartnerProviderConnectionStatusUnknown SecurityPartnerProviderConnectionStatus = "Unknown" -) - -func PossibleValuesForSecurityPartnerProviderConnectionStatus() []string { - return []string{ - string(SecurityPartnerProviderConnectionStatusConnected), - string(SecurityPartnerProviderConnectionStatusNotConnected), - string(SecurityPartnerProviderConnectionStatusPartiallyConnected), - string(SecurityPartnerProviderConnectionStatusUnknown), - } -} - -func (s *SecurityPartnerProviderConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityPartnerProviderConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityPartnerProviderConnectionStatus(input string) (*SecurityPartnerProviderConnectionStatus, error) { - vals := map[string]SecurityPartnerProviderConnectionStatus{ - "connected": SecurityPartnerProviderConnectionStatusConnected, - "notconnected": SecurityPartnerProviderConnectionStatusNotConnected, - "partiallyconnected": SecurityPartnerProviderConnectionStatusPartiallyConnected, - "unknown": SecurityPartnerProviderConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityPartnerProviderConnectionStatus(input) - return &out, nil -} - -type SecurityProviderName string - -const ( - SecurityProviderNameCheckpoint SecurityProviderName = "Checkpoint" - SecurityProviderNameIBoss SecurityProviderName = "IBoss" - SecurityProviderNameZScaler SecurityProviderName = "ZScaler" -) - -func PossibleValuesForSecurityProviderName() []string { - return []string{ - string(SecurityProviderNameCheckpoint), - string(SecurityProviderNameIBoss), - string(SecurityProviderNameZScaler), - } -} - -func (s *SecurityProviderName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityProviderName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityProviderName(input string) (*SecurityProviderName, error) { - vals := map[string]SecurityProviderName{ - "checkpoint": SecurityProviderNameCheckpoint, - "iboss": SecurityProviderNameIBoss, - "zscaler": SecurityProviderNameZScaler, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityProviderName(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/id_securitypartnerprovider.go b/resource-manager/network/2022-09-01/securitypartnerproviders/id_securitypartnerprovider.go deleted file mode 100644 index 3ebe53eb67a..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/id_securitypartnerprovider.go +++ /dev/null @@ -1,127 +0,0 @@ -package securitypartnerproviders - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityPartnerProviderId{} - -// SecurityPartnerProviderId is a struct representing the Resource ID for a Security Partner Provider -type SecurityPartnerProviderId struct { - SubscriptionId string - ResourceGroupName string - SecurityPartnerProviderName string -} - -// NewSecurityPartnerProviderID returns a new SecurityPartnerProviderId struct -func NewSecurityPartnerProviderID(subscriptionId string, resourceGroupName string, securityPartnerProviderName string) SecurityPartnerProviderId { - return SecurityPartnerProviderId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - SecurityPartnerProviderName: securityPartnerProviderName, - } -} - -// ParseSecurityPartnerProviderID parses 'input' into a SecurityPartnerProviderId -func ParseSecurityPartnerProviderID(input string) (*SecurityPartnerProviderId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityPartnerProviderId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityPartnerProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SecurityPartnerProviderName, ok = parsed.Parsed["securityPartnerProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityPartnerProviderName", *parsed) - } - - return &id, nil -} - -// ParseSecurityPartnerProviderIDInsensitively parses 'input' case-insensitively into a SecurityPartnerProviderId -// note: this method should only be used for API response data and not user input -func ParseSecurityPartnerProviderIDInsensitively(input string) (*SecurityPartnerProviderId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityPartnerProviderId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityPartnerProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SecurityPartnerProviderName, ok = parsed.Parsed["securityPartnerProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityPartnerProviderName", *parsed) - } - - return &id, nil -} - -// ValidateSecurityPartnerProviderID checks that 'input' can be parsed as a Security Partner Provider ID -func ValidateSecurityPartnerProviderID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseSecurityPartnerProviderID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Security Partner Provider ID -func (id SecurityPartnerProviderId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/securityPartnerProviders/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SecurityPartnerProviderName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Security Partner Provider ID -func (id SecurityPartnerProviderId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticSecurityPartnerProviders", "securityPartnerProviders", "securityPartnerProviders"), - resourceids.UserSpecifiedSegment("securityPartnerProviderName", "securityPartnerProviderValue"), - } -} - -// String returns a human-readable description of this Security Partner Provider ID -func (id SecurityPartnerProviderId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Security Partner Provider Name: %q", id.SecurityPartnerProviderName), - } - return fmt.Sprintf("Security Partner Provider (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/id_securitypartnerprovider_test.go b/resource-manager/network/2022-09-01/securitypartnerproviders/id_securitypartnerprovider_test.go deleted file mode 100644 index 4913b91b19a..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/id_securitypartnerprovider_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package securitypartnerproviders - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityPartnerProviderId{} - -func TestNewSecurityPartnerProviderID(t *testing.T) { - id := NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.SecurityPartnerProviderName != "securityPartnerProviderValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityPartnerProviderName'", id.SecurityPartnerProviderName, "securityPartnerProviderValue") - } -} - -func TestFormatSecurityPartnerProviderID(t *testing.T) { - actual := NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseSecurityPartnerProviderID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityPartnerProviderId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue", - Expected: &SecurityPartnerProviderId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - SecurityPartnerProviderName: "securityPartnerProviderValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityPartnerProviderID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.SecurityPartnerProviderName != v.Expected.SecurityPartnerProviderName { - t.Fatalf("Expected %q but got %q for SecurityPartnerProviderName", v.Expected.SecurityPartnerProviderName, actual.SecurityPartnerProviderName) - } - - } -} - -func TestParseSecurityPartnerProviderIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityPartnerProviderId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sEcUrItYpArTnErPrOvIdErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue", - Expected: &SecurityPartnerProviderId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - SecurityPartnerProviderName: "securityPartnerProviderValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sEcUrItYpArTnErPrOvIdErS/sEcUrItYpArTnErPrOvIdErVaLuE", - Expected: &SecurityPartnerProviderId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - SecurityPartnerProviderName: "sEcUrItYpArTnErPrOvIdErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sEcUrItYpArTnErPrOvIdErS/sEcUrItYpArTnErPrOvIdErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityPartnerProviderIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.SecurityPartnerProviderName != v.Expected.SecurityPartnerProviderName { - t.Fatalf("Expected %q but got %q for SecurityPartnerProviderName", v.Expected.SecurityPartnerProviderName, actual.SecurityPartnerProviderName) - } - - } -} - -func TestSegmentsForSecurityPartnerProviderId(t *testing.T) { - segments := SecurityPartnerProviderId{}.Segments() - if len(segments) == 0 { - t.Fatalf("SecurityPartnerProviderId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/method_createorupdate.go b/resource-manager/network/2022-09-01/securitypartnerproviders/method_createorupdate.go deleted file mode 100644 index 2dc29af24df..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c SecurityPartnerProvidersClient) CreateOrUpdate(ctx context.Context, id SecurityPartnerProviderId, input SecurityPartnerProvider) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c SecurityPartnerProvidersClient) CreateOrUpdateThenPoll(ctx context.Context, id SecurityPartnerProviderId, input SecurityPartnerProvider) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/method_delete.go b/resource-manager/network/2022-09-01/securitypartnerproviders/method_delete.go deleted file mode 100644 index 9494188070d..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c SecurityPartnerProvidersClient) Delete(ctx context.Context, id SecurityPartnerProviderId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c SecurityPartnerProvidersClient) DeleteThenPoll(ctx context.Context, id SecurityPartnerProviderId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/method_get.go b/resource-manager/network/2022-09-01/securitypartnerproviders/method_get.go deleted file mode 100644 index ddc2a48c971..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityPartnerProvider -} - -// Get ... -func (c SecurityPartnerProvidersClient) Get(ctx context.Context, id SecurityPartnerProviderId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/method_list.go b/resource-manager/network/2022-09-01/securitypartnerproviders/method_list.go deleted file mode 100644 index a7c1b9d58d8..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityPartnerProvider -} - -type ListCompleteResult struct { - Items []SecurityPartnerProvider -} - -// List ... -func (c SecurityPartnerProvidersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/securityPartnerProviders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityPartnerProvider `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c SecurityPartnerProvidersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, SecurityPartnerProviderOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityPartnerProvidersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SecurityPartnerProviderOperationPredicate) (result ListCompleteResult, err error) { - items := make([]SecurityPartnerProvider, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/securitypartnerproviders/method_listbyresourcegroup.go deleted file mode 100644 index 0db7ed7c03e..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityPartnerProvider -} - -type ListByResourceGroupCompleteResult struct { - Items []SecurityPartnerProvider -} - -// ListByResourceGroup ... -func (c SecurityPartnerProvidersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/securityPartnerProviders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityPartnerProvider `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c SecurityPartnerProvidersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SecurityPartnerProviderOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityPartnerProvidersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SecurityPartnerProviderOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]SecurityPartnerProvider, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/method_updatetags.go b/resource-manager/network/2022-09-01/securitypartnerproviders/method_updatetags.go deleted file mode 100644 index a3c2a4211b8..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityPartnerProvider -} - -// UpdateTags ... -func (c SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, id SecurityPartnerProviderId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/model_securitypartnerprovider.go b/resource-manager/network/2022-09-01/securitypartnerproviders/model_securitypartnerprovider.go deleted file mode 100644 index 059710a7ff6..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/model_securitypartnerprovider.go +++ /dev/null @@ -1,14 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityPartnerProvider struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/model_securitypartnerproviderpropertiesformat.go b/resource-manager/network/2022-09-01/securitypartnerproviders/model_securitypartnerproviderpropertiesformat.go deleted file mode 100644 index 100f4648a9e..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/model_securitypartnerproviderpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityPartnerProviderPropertiesFormat struct { - ConnectionStatus *SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SecurityProviderName *SecurityProviderName `json:"securityProviderName,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/model_subresource.go b/resource-manager/network/2022-09-01/securitypartnerproviders/model_subresource.go deleted file mode 100644 index 0d259c7609a..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/model_tagsobject.go b/resource-manager/network/2022-09-01/securitypartnerproviders/model_tagsobject.go deleted file mode 100644 index 64020cc08ef..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/predicates.go b/resource-manager/network/2022-09-01/securitypartnerproviders/predicates.go deleted file mode 100644 index ef826d6c55f..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityPartnerProviderOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p SecurityPartnerProviderOperationPredicate) Matches(input SecurityPartnerProvider) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/securitypartnerproviders/version.go b/resource-manager/network/2022-09-01/securitypartnerproviders/version.go deleted file mode 100644 index f7cc9b3b8e6..00000000000 --- a/resource-manager/network/2022-09-01/securitypartnerproviders/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package securitypartnerproviders - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypartnerproviders/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/securityrules/README.md b/resource-manager/network/2022-09-01/securityrules/README.md deleted file mode 100644 index 901d0c5cbc9..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/README.md +++ /dev/null @@ -1,115 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/securityrules` Documentation - -The `securityrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/securityrules" -``` - - -### Client Initialization - -```go -client := securityrules.NewSecurityRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SecurityRulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := securityrules.NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue") - -payload := securityrules.SecurityRule{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityRulesClient.DefaultSecurityRulesGet` - -```go -ctx := context.TODO() -id := securityrules.NewDefaultSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "defaultSecurityRuleValue") - -read, err := client.DefaultSecurityRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityRulesClient.DefaultSecurityRulesList` - -```go -ctx := context.TODO() -id := securityrules.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -// alternatively `client.DefaultSecurityRulesList(ctx, id)` can be used to do batched pagination -items, err := client.DefaultSecurityRulesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SecurityRulesClient.Delete` - -```go -ctx := context.TODO() -id := securityrules.NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityRulesClient.Get` - -```go -ctx := context.TODO() -id := securityrules.NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityRulesClient.List` - -```go -ctx := context.TODO() -id := securityrules.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/securityrules/client.go b/resource-manager/network/2022-09-01/securityrules/client.go deleted file mode 100644 index a386b6c0dec..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package securityrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulesClient struct { - Client *resourcemanager.Client -} - -func NewSecurityRulesClientWithBaseURI(api environments.Api) (*SecurityRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "securityrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating SecurityRulesClient: %+v", err) - } - - return &SecurityRulesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/securityrules/constants.go b/resource-manager/network/2022-09-01/securityrules/constants.go deleted file mode 100644 index 41396358614..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/constants.go +++ /dev/null @@ -1,192 +0,0 @@ -package securityrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/securityrules/id_defaultsecurityrule.go b/resource-manager/network/2022-09-01/securityrules/id_defaultsecurityrule.go deleted file mode 100644 index e4a89e02f98..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/id_defaultsecurityrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package securityrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DefaultSecurityRuleId{} - -// DefaultSecurityRuleId is a struct representing the Resource ID for a Default Security Rule -type DefaultSecurityRuleId struct { - SubscriptionId string - ResourceGroupName string - NetworkSecurityGroupName string - DefaultSecurityRuleName string -} - -// NewDefaultSecurityRuleID returns a new DefaultSecurityRuleId struct -func NewDefaultSecurityRuleID(subscriptionId string, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) DefaultSecurityRuleId { - return DefaultSecurityRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkSecurityGroupName: networkSecurityGroupName, - DefaultSecurityRuleName: defaultSecurityRuleName, - } -} - -// ParseDefaultSecurityRuleID parses 'input' into a DefaultSecurityRuleId -func ParseDefaultSecurityRuleID(input string) (*DefaultSecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(DefaultSecurityRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DefaultSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.DefaultSecurityRuleName, ok = parsed.Parsed["defaultSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "defaultSecurityRuleName", *parsed) - } - - return &id, nil -} - -// ParseDefaultSecurityRuleIDInsensitively parses 'input' case-insensitively into a DefaultSecurityRuleId -// note: this method should only be used for API response data and not user input -func ParseDefaultSecurityRuleIDInsensitively(input string) (*DefaultSecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(DefaultSecurityRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DefaultSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.DefaultSecurityRuleName, ok = parsed.Parsed["defaultSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "defaultSecurityRuleName", *parsed) - } - - return &id, nil -} - -// ValidateDefaultSecurityRuleID checks that 'input' can be parsed as a Default Security Rule ID -func ValidateDefaultSecurityRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDefaultSecurityRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Default Security Rule ID -func (id DefaultSecurityRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/defaultSecurityRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkSecurityGroupName, id.DefaultSecurityRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Default Security Rule ID -func (id DefaultSecurityRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkSecurityGroups", "networkSecurityGroups", "networkSecurityGroups"), - resourceids.UserSpecifiedSegment("networkSecurityGroupName", "networkSecurityGroupValue"), - resourceids.StaticSegment("staticDefaultSecurityRules", "defaultSecurityRules", "defaultSecurityRules"), - resourceids.UserSpecifiedSegment("defaultSecurityRuleName", "defaultSecurityRuleValue"), - } -} - -// String returns a human-readable description of this Default Security Rule ID -func (id DefaultSecurityRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Security Group Name: %q", id.NetworkSecurityGroupName), - fmt.Sprintf("Default Security Rule Name: %q", id.DefaultSecurityRuleName), - } - return fmt.Sprintf("Default Security Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/securityrules/id_defaultsecurityrule_test.go b/resource-manager/network/2022-09-01/securityrules/id_defaultsecurityrule_test.go deleted file mode 100644 index de944c4f40e..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/id_defaultsecurityrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package securityrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DefaultSecurityRuleId{} - -func TestNewDefaultSecurityRuleID(t *testing.T) { - id := NewDefaultSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "defaultSecurityRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkSecurityGroupName != "networkSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkSecurityGroupName'", id.NetworkSecurityGroupName, "networkSecurityGroupValue") - } - - if id.DefaultSecurityRuleName != "defaultSecurityRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'DefaultSecurityRuleName'", id.DefaultSecurityRuleName, "defaultSecurityRuleValue") - } -} - -func TestFormatDefaultSecurityRuleID(t *testing.T) { - actual := NewDefaultSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "defaultSecurityRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseDefaultSecurityRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DefaultSecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue", - Expected: &DefaultSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - DefaultSecurityRuleName: "defaultSecurityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDefaultSecurityRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - if actual.DefaultSecurityRuleName != v.Expected.DefaultSecurityRuleName { - t.Fatalf("Expected %q but got %q for DefaultSecurityRuleName", v.Expected.DefaultSecurityRuleName, actual.DefaultSecurityRuleName) - } - - } -} - -func TestParseDefaultSecurityRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DefaultSecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/dEfAuLtSeCuRiTyRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue", - Expected: &DefaultSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - DefaultSecurityRuleName: "defaultSecurityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/dEfAuLtSeCuRiTyRuLeS/dEfAuLtSeCuRiTyRuLeVaLuE", - Expected: &DefaultSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkSecurityGroupName: "nEtWoRkSeCuRiTyGrOuPvAlUe", - DefaultSecurityRuleName: "dEfAuLtSeCuRiTyRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/dEfAuLtSeCuRiTyRuLeS/dEfAuLtSeCuRiTyRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDefaultSecurityRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - if actual.DefaultSecurityRuleName != v.Expected.DefaultSecurityRuleName { - t.Fatalf("Expected %q but got %q for DefaultSecurityRuleName", v.Expected.DefaultSecurityRuleName, actual.DefaultSecurityRuleName) - } - - } -} - -func TestSegmentsForDefaultSecurityRuleId(t *testing.T) { - segments := DefaultSecurityRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("DefaultSecurityRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/securityrules/id_networksecuritygroup.go b/resource-manager/network/2022-09-01/securityrules/id_networksecuritygroup.go deleted file mode 100644 index 07dda76386b..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/id_networksecuritygroup.go +++ /dev/null @@ -1,127 +0,0 @@ -package securityrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkSecurityGroupId{} - -// NetworkSecurityGroupId is a struct representing the Resource ID for a Network Security Group -type NetworkSecurityGroupId struct { - SubscriptionId string - ResourceGroupName string - NetworkSecurityGroupName string -} - -// NewNetworkSecurityGroupID returns a new NetworkSecurityGroupId struct -func NewNetworkSecurityGroupID(subscriptionId string, resourceGroupName string, networkSecurityGroupName string) NetworkSecurityGroupId { - return NetworkSecurityGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkSecurityGroupName: networkSecurityGroupName, - } -} - -// ParseNetworkSecurityGroupID parses 'input' into a NetworkSecurityGroupId -func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkSecurityGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ParseNetworkSecurityGroupIDInsensitively parses 'input' case-insensitively into a NetworkSecurityGroupId -// note: this method should only be used for API response data and not user input -func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkSecurityGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkSecurityGroupID checks that 'input' can be parsed as a Network Security Group ID -func ValidateNetworkSecurityGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkSecurityGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Security Group ID -func (id NetworkSecurityGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkSecurityGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Security Group ID -func (id NetworkSecurityGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkSecurityGroups", "networkSecurityGroups", "networkSecurityGroups"), - resourceids.UserSpecifiedSegment("networkSecurityGroupName", "networkSecurityGroupValue"), - } -} - -// String returns a human-readable description of this Network Security Group ID -func (id NetworkSecurityGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Security Group Name: %q", id.NetworkSecurityGroupName), - } - return fmt.Sprintf("Network Security Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/securityrules/id_networksecuritygroup_test.go b/resource-manager/network/2022-09-01/securityrules/id_networksecuritygroup_test.go deleted file mode 100644 index 6ebeb384028..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/id_networksecuritygroup_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package securityrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkSecurityGroupId{} - -func TestNewNetworkSecurityGroupID(t *testing.T) { - id := NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkSecurityGroupName != "networkSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkSecurityGroupName'", id.NetworkSecurityGroupName, "networkSecurityGroupValue") - } -} - -func TestFormatNetworkSecurityGroupID(t *testing.T) { - actual := NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkSecurityGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkSecurityGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - } -} - -func TestParseNetworkSecurityGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkSecurityGroupName: "nEtWoRkSeCuRiTyGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkSecurityGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - } -} - -func TestSegmentsForNetworkSecurityGroupId(t *testing.T) { - segments := NetworkSecurityGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkSecurityGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/securityrules/id_securityrule.go b/resource-manager/network/2022-09-01/securityrules/id_securityrule.go deleted file mode 100644 index 32ca98be479..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/id_securityrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package securityrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityRuleId{} - -// SecurityRuleId is a struct representing the Resource ID for a Security Rule -type SecurityRuleId struct { - SubscriptionId string - ResourceGroupName string - NetworkSecurityGroupName string - SecurityRuleName string -} - -// NewSecurityRuleID returns a new SecurityRuleId struct -func NewSecurityRuleID(subscriptionId string, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) SecurityRuleId { - return SecurityRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkSecurityGroupName: networkSecurityGroupName, - SecurityRuleName: securityRuleName, - } -} - -// ParseSecurityRuleID parses 'input' into a SecurityRuleId -func ParseSecurityRuleID(input string) (*SecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.SecurityRuleName, ok = parsed.Parsed["securityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityRuleName", *parsed) - } - - return &id, nil -} - -// ParseSecurityRuleIDInsensitively parses 'input' case-insensitively into a SecurityRuleId -// note: this method should only be used for API response data and not user input -func ParseSecurityRuleIDInsensitively(input string) (*SecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.SecurityRuleName, ok = parsed.Parsed["securityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityRuleName", *parsed) - } - - return &id, nil -} - -// ValidateSecurityRuleID checks that 'input' can be parsed as a Security Rule ID -func ValidateSecurityRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseSecurityRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Security Rule ID -func (id SecurityRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkSecurityGroupName, id.SecurityRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Security Rule ID -func (id SecurityRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkSecurityGroups", "networkSecurityGroups", "networkSecurityGroups"), - resourceids.UserSpecifiedSegment("networkSecurityGroupName", "networkSecurityGroupValue"), - resourceids.StaticSegment("staticSecurityRules", "securityRules", "securityRules"), - resourceids.UserSpecifiedSegment("securityRuleName", "securityRuleValue"), - } -} - -// String returns a human-readable description of this Security Rule ID -func (id SecurityRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Security Group Name: %q", id.NetworkSecurityGroupName), - fmt.Sprintf("Security Rule Name: %q", id.SecurityRuleName), - } - return fmt.Sprintf("Security Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/securityrules/id_securityrule_test.go b/resource-manager/network/2022-09-01/securityrules/id_securityrule_test.go deleted file mode 100644 index 8f87597f680..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/id_securityrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package securityrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityRuleId{} - -func TestNewSecurityRuleID(t *testing.T) { - id := NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkSecurityGroupName != "networkSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkSecurityGroupName'", id.NetworkSecurityGroupName, "networkSecurityGroupValue") - } - - if id.SecurityRuleName != "securityRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityRuleName'", id.SecurityRuleName, "securityRuleValue") - } -} - -func TestFormatSecurityRuleID(t *testing.T) { - actual := NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseSecurityRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue", - Expected: &SecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - SecurityRuleName: "securityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - if actual.SecurityRuleName != v.Expected.SecurityRuleName { - t.Fatalf("Expected %q but got %q for SecurityRuleName", v.Expected.SecurityRuleName, actual.SecurityRuleName) - } - - } -} - -func TestParseSecurityRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/sEcUrItYrUlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue", - Expected: &SecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - SecurityRuleName: "securityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/sEcUrItYrUlEs/sEcUrItYrUlEvAlUe", - Expected: &SecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkSecurityGroupName: "nEtWoRkSeCuRiTyGrOuPvAlUe", - SecurityRuleName: "sEcUrItYrUlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/sEcUrItYrUlEs/sEcUrItYrUlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - if actual.SecurityRuleName != v.Expected.SecurityRuleName { - t.Fatalf("Expected %q but got %q for SecurityRuleName", v.Expected.SecurityRuleName, actual.SecurityRuleName) - } - - } -} - -func TestSegmentsForSecurityRuleId(t *testing.T) { - segments := SecurityRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("SecurityRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/securityrules/method_createorupdate.go b/resource-manager/network/2022-09-01/securityrules/method_createorupdate.go deleted file mode 100644 index e3daab4f05d..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package securityrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c SecurityRulesClient) CreateOrUpdate(ctx context.Context, id SecurityRuleId, input SecurityRule) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c SecurityRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id SecurityRuleId, input SecurityRule) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/securityrules/method_defaultsecurityrulesget.go b/resource-manager/network/2022-09-01/securityrules/method_defaultsecurityrulesget.go deleted file mode 100644 index 23be623d279..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/method_defaultsecurityrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package securityrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultSecurityRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityRule -} - -// DefaultSecurityRulesGet ... -func (c SecurityRulesClient) DefaultSecurityRulesGet(ctx context.Context, id DefaultSecurityRuleId) (result DefaultSecurityRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/securityrules/method_defaultsecurityruleslist.go b/resource-manager/network/2022-09-01/securityrules/method_defaultsecurityruleslist.go deleted file mode 100644 index 54e0598e000..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/method_defaultsecurityruleslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package securityrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultSecurityRulesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityRule -} - -type DefaultSecurityRulesListCompleteResult struct { - Items []SecurityRule -} - -// DefaultSecurityRulesList ... -func (c SecurityRulesClient) DefaultSecurityRulesList(ctx context.Context, id NetworkSecurityGroupId) (result DefaultSecurityRulesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/defaultSecurityRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// DefaultSecurityRulesListComplete retrieves all the results into a single object -func (c SecurityRulesClient) DefaultSecurityRulesListComplete(ctx context.Context, id NetworkSecurityGroupId) (DefaultSecurityRulesListCompleteResult, error) { - return c.DefaultSecurityRulesListCompleteMatchingPredicate(ctx, id, SecurityRuleOperationPredicate{}) -} - -// DefaultSecurityRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityRulesClient) DefaultSecurityRulesListCompleteMatchingPredicate(ctx context.Context, id NetworkSecurityGroupId, predicate SecurityRuleOperationPredicate) (result DefaultSecurityRulesListCompleteResult, err error) { - items := make([]SecurityRule, 0) - - resp, err := c.DefaultSecurityRulesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = DefaultSecurityRulesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/securityrules/method_delete.go b/resource-manager/network/2022-09-01/securityrules/method_delete.go deleted file mode 100644 index 769b4866b0d..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package securityrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c SecurityRulesClient) Delete(ctx context.Context, id SecurityRuleId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c SecurityRulesClient) DeleteThenPoll(ctx context.Context, id SecurityRuleId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/securityrules/method_get.go b/resource-manager/network/2022-09-01/securityrules/method_get.go deleted file mode 100644 index 42d48fb8083..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package securityrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityRule -} - -// Get ... -func (c SecurityRulesClient) Get(ctx context.Context, id SecurityRuleId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/securityrules/method_list.go b/resource-manager/network/2022-09-01/securityrules/method_list.go deleted file mode 100644 index 0040a4b383b..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package securityrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityRule -} - -type ListCompleteResult struct { - Items []SecurityRule -} - -// List ... -func (c SecurityRulesClient) List(ctx context.Context, id NetworkSecurityGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/securityRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c SecurityRulesClient) ListComplete(ctx context.Context, id NetworkSecurityGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, SecurityRuleOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkSecurityGroupId, predicate SecurityRuleOperationPredicate) (result ListCompleteResult, err error) { - items := make([]SecurityRule, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/securityrules/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/securityrules/model_applicationsecuritygroup.go deleted file mode 100644 index 7a6b77fa92a..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securityrules/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/securityrules/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index b73ae024539..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securityrules/model_securityrule.go b/resource-manager/network/2022-09-01/securityrules/model_securityrule.go deleted file mode 100644 index e96cb57aa16..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securityrules/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/securityrules/model_securityrulepropertiesformat.go deleted file mode 100644 index a7e44555d95..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/securityrules/predicates.go b/resource-manager/network/2022-09-01/securityrules/predicates.go deleted file mode 100644 index adf918c9ac4..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p SecurityRuleOperationPredicate) Matches(input SecurityRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/securityrules/version.go b/resource-manager/network/2022-09-01/securityrules/version.go deleted file mode 100644 index 1e1d579f370..00000000000 --- a/resource-manager/network/2022-09-01/securityrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package securityrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityrules/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/README.md b/resource-manager/network/2022-09-01/serviceendpointpolicies/README.md deleted file mode 100644 index 4842a43f31f..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/serviceendpointpolicies` Documentation - -The `serviceendpointpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/serviceendpointpolicies" -``` - - -### Client Initialization - -```go -client := serviceendpointpolicies.NewServiceEndpointPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -payload := serviceendpointpolicies.ServiceEndpointPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.Get` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -read, err := client.Get(ctx, id, serviceendpointpolicies.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.List` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.UpdateTags` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -payload := serviceendpointpolicies.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/client.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/client.go deleted file mode 100644 index aa0cce53c77..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package serviceendpointpolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewServiceEndpointPoliciesClientWithBaseURI(api environments.Api) (*ServiceEndpointPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "serviceendpointpolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ServiceEndpointPoliciesClient: %+v", err) - } - - return &ServiceEndpointPoliciesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/constants.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/constants.go deleted file mode 100644 index 27a348c9951..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package serviceendpointpolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/id_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/id_serviceendpointpolicy.go deleted file mode 100644 index 1df0f6e4676..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/id_serviceendpointpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package serviceendpointpolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyId{} - -// ServiceEndpointPolicyId is a struct representing the Resource ID for a Service Endpoint Policy -type ServiceEndpointPolicyId struct { - SubscriptionId string - ResourceGroupName string - ServiceEndpointPolicyName string -} - -// NewServiceEndpointPolicyID returns a new ServiceEndpointPolicyId struct -func NewServiceEndpointPolicyID(subscriptionId string, resourceGroupName string, serviceEndpointPolicyName string) ServiceEndpointPolicyId { - return ServiceEndpointPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServiceEndpointPolicyName: serviceEndpointPolicyName, - } -} - -// ParseServiceEndpointPolicyID parses 'input' into a ServiceEndpointPolicyId -func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - return &id, nil -} - -// ParseServiceEndpointPolicyIDInsensitively parses 'input' case-insensitively into a ServiceEndpointPolicyId -// note: this method should only be used for API response data and not user input -func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateServiceEndpointPolicyID checks that 'input' can be parsed as a Service Endpoint Policy ID -func ValidateServiceEndpointPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServiceEndpointPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/serviceEndpointPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServiceEndpointPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticServiceEndpointPolicies", "serviceEndpointPolicies", "serviceEndpointPolicies"), - resourceids.UserSpecifiedSegment("serviceEndpointPolicyName", "serviceEndpointPolicyValue"), - } -} - -// String returns a human-readable description of this Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Service Endpoint Policy Name: %q", id.ServiceEndpointPolicyName), - } - return fmt.Sprintf("Service Endpoint Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/id_serviceendpointpolicy_test.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/id_serviceendpointpolicy_test.go deleted file mode 100644 index 35673e3699e..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/id_serviceendpointpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package serviceendpointpolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyId{} - -func TestNewServiceEndpointPolicyID(t *testing.T) { - id := NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ServiceEndpointPolicyName != "serviceEndpointPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'ServiceEndpointPolicyName'", id.ServiceEndpointPolicyName, "serviceEndpointPolicyValue") - } -} - -func TestFormatServiceEndpointPolicyID(t *testing.T) { - actual := NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseServiceEndpointPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - } -} - -func TestParseServiceEndpointPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ServiceEndpointPolicyName: "sErViCeEnDpOiNtPoLiCyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - } -} - -func TestSegmentsForServiceEndpointPolicyId(t *testing.T) { - segments := ServiceEndpointPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ServiceEndpointPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_createorupdate.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/method_createorupdate.go deleted file mode 100644 index 9dec5a538a4..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context, id ServiceEndpointPolicyId, input ServiceEndpointPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ServiceEndpointPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id ServiceEndpointPolicyId, input ServiceEndpointPolicy) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_delete.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/method_delete.go deleted file mode 100644 index fbffd77bf76..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ServiceEndpointPoliciesClient) Delete(ctx context.Context, id ServiceEndpointPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ServiceEndpointPoliciesClient) DeleteThenPoll(ctx context.Context, id ServiceEndpointPolicyId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_get.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/method_get.go deleted file mode 100644 index d67e8405ee3..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceEndpointPolicy -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c ServiceEndpointPoliciesClient) Get(ctx context.Context, id ServiceEndpointPolicyId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_list.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/method_list.go deleted file mode 100644 index a066f03166d..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ServiceEndpointPolicy -} - -type ListCompleteResult struct { - Items []ServiceEndpointPolicy -} - -// List ... -func (c ServiceEndpointPoliciesClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/serviceEndpointPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ServiceEndpointPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ServiceEndpointPoliciesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ServiceEndpointPolicyOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ServiceEndpointPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ServiceEndpointPolicyOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ServiceEndpointPolicy, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/method_listbyresourcegroup.go deleted file mode 100644 index 9ac4b41e723..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ServiceEndpointPolicy -} - -type ListByResourceGroupCompleteResult struct { - Items []ServiceEndpointPolicy -} - -// ListByResourceGroup ... -func (c ServiceEndpointPoliciesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/serviceEndpointPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ServiceEndpointPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c ServiceEndpointPoliciesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ServiceEndpointPolicyOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ServiceEndpointPoliciesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ServiceEndpointPolicyOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]ServiceEndpointPolicy, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_updatetags.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/method_updatetags.go deleted file mode 100644 index 212145e5f2b..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceEndpointPolicy -} - -// UpdateTags ... -func (c ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, id ServiceEndpointPolicyId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 7a1f5258bb4..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 76bca3269ac..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 1e70d427a94..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 7f6bd42e1cc..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 15556d9d646..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationsecuritygroup.go deleted file mode 100644 index 6e7d684d6ab..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 2f704e37983..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_backendaddresspool.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_backendaddresspool.go deleted file mode 100644 index feb93ad5475..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index bcc53963c2f..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 9f6fb9fe6e7..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ddossettings.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ddossettings.go deleted file mode 100644 index de52c73833f..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_delegation.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_delegation.go deleted file mode 100644 index 1e9e6e93b12..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlog.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlog.go deleted file mode 100644 index a657d2ccd92..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlogformatparameters.go deleted file mode 100644 index 64ce02b9b62..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlogpropertiesformat.go deleted file mode 100644 index c83c10c7197..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_frontendipconfiguration.go deleted file mode 100644 index 3460648e174..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 27c417be79d..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 253d53dc1d3..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_inboundnatrule.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_inboundnatrule.go deleted file mode 100644 index 691567f1623..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index bcdf56e4388..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfiguration.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfiguration.go deleted file mode 100644 index 43160da9e2b..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationprofile.go deleted file mode 100644 index cbb4340c474..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index a8340bcc1f3..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index b76d67b91b5..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_iptag.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_iptag.go deleted file mode 100644 index 879d6210923..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_loadbalancerbackendaddress.go deleted file mode 100644 index bcd25a343d4..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 71bfae4fc90..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgateway.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgateway.go deleted file mode 100644 index 4fce3c97a62..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgatewaypropertiesformat.go deleted file mode 100644 index 0eae8e55e8c..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgatewaysku.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgatewaysku.go deleted file mode 100644 index d7c06ad6950..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natruleportmapping.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natruleportmapping.go deleted file mode 100644 index af408670c2d..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterface.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterface.go deleted file mode 100644 index 4576b3d0a24..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacednssettings.go deleted file mode 100644 index f2f63e673ce..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfiguration.go deleted file mode 100644 index efba2a7575d..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index fee33255b2f..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index c09e2754047..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacepropertiesformat.go deleted file mode 100644 index a3fa855fe9e..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 373ac218872..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 1a2c2bc8774..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networksecuritygroup.go deleted file mode 100644 index 7babf5dcba3..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 9e417934d4e..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpoint.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpoint.go deleted file mode 100644 index b9c2640063f..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointconnection.go deleted file mode 100644 index 0c67a94b069..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointconnectionproperties.go deleted file mode 100644 index adaf1af02d5..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointipconfiguration.go deleted file mode 100644 index 25ab508cf68..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index b2b9cd17391..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointproperties.go deleted file mode 100644 index b74aa311c14..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkservice.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkservice.go deleted file mode 100644 index f69adbd0b19..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnection.go deleted file mode 100644 index f163cad59d9..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index e9560116ef6..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 9accc19fd8b..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index e2a71cb7416..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 6cc9d81d85e..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceproperties.go deleted file mode 100644 index 972989defcd..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddress.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddress.go deleted file mode 100644 index b3722e1f191..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddressdnssettings.go deleted file mode 100644 index ed5b245a223..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddresspropertiesformat.go deleted file mode 100644 index fe9e93dc57e..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddresssku.go deleted file mode 100644 index 5d6c2dd1535..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourcenavigationlink.go deleted file mode 100644 index 3a125f5d30e..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourcenavigationlinkformat.go deleted file mode 100644 index 004d9d501d7..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourceset.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourceset.go deleted file mode 100644 index 33f79b6dd7f..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_retentionpolicyparameters.go deleted file mode 100644 index 98b48093fe5..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_route.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_route.go deleted file mode 100644 index a08219146cf..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_routepropertiesformat.go deleted file mode 100644 index a2d74c7e24a..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_routetable.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_routetable.go deleted file mode 100644 index fabb0fc336d..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_routetablepropertiesformat.go deleted file mode 100644 index fbf628f66f3..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_securityrule.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_securityrule.go deleted file mode 100644 index 3f50e5ddac6..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_securityrulepropertiesformat.go deleted file mode 100644 index 8d5f321605a..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceassociationlink.go deleted file mode 100644 index a22d8f42829..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 5b81f28e88b..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 0903abfa70e..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicy.go deleted file mode 100644 index 796d7019b02..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 75928dae7f1..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 31efd2eb7eb..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index fdb4ecd0a7f..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 2927331856d..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_subnet.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_subnet.go deleted file mode 100644 index 50005077792..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_subnetpropertiesformat.go deleted file mode 100644 index 78947f02f56..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_subresource.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_subresource.go deleted file mode 100644 index 61370085ffc..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_tagsobject.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_tagsobject.go deleted file mode 100644 index 7c5d750fc90..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index da94c72fe29..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_trafficanalyticsproperties.go deleted file mode 100644 index 58889a80476..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_virtualnetworktap.go deleted file mode 100644 index 1d191ff67f0..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 2660ce6a382..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/predicates.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/predicates.go deleted file mode 100644 index ddd972a1d9d..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/predicates.go +++ /dev/null @@ -1,42 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyOperationPredicate struct { - Etag *string - Id *string - Kind *string - Location *string - Name *string - Type *string -} - -func (p ServiceEndpointPolicyOperationPredicate) Matches(input ServiceEndpointPolicy) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicies/version.go b/resource-manager/network/2022-09-01/serviceendpointpolicies/version.go deleted file mode 100644 index bb8ab5e6a75..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicies/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/README.md b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/README.md deleted file mode 100644 index 5ff39ffe227..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions` Documentation - -The `serviceendpointpolicydefinitions` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions" -``` - - -### Client Initialization - -```go -client := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue") - -payload := serviceendpointpolicydefinitions.ServiceEndpointPolicyDefinition{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServiceEndpointPolicyDefinitionsClient.Delete` - -```go -ctx := context.TODO() -id := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServiceEndpointPolicyDefinitionsClient.Get` - -```go -ctx := context.TODO() -id := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := serviceendpointpolicydefinitions.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/client.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/client.go deleted file mode 100644 index 255a599b606..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionsClient struct { - Client *resourcemanager.Client -} - -func NewServiceEndpointPolicyDefinitionsClientWithBaseURI(api environments.Api) (*ServiceEndpointPolicyDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "serviceendpointpolicydefinitions", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ServiceEndpointPolicyDefinitionsClient: %+v", err) - } - - return &ServiceEndpointPolicyDefinitionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/constants.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/constants.go deleted file mode 100644 index 3e91dc60d4b..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go deleted file mode 100644 index 979cf4f022e..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyId{} - -// ServiceEndpointPolicyId is a struct representing the Resource ID for a Service Endpoint Policy -type ServiceEndpointPolicyId struct { - SubscriptionId string - ResourceGroupName string - ServiceEndpointPolicyName string -} - -// NewServiceEndpointPolicyID returns a new ServiceEndpointPolicyId struct -func NewServiceEndpointPolicyID(subscriptionId string, resourceGroupName string, serviceEndpointPolicyName string) ServiceEndpointPolicyId { - return ServiceEndpointPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServiceEndpointPolicyName: serviceEndpointPolicyName, - } -} - -// ParseServiceEndpointPolicyID parses 'input' into a ServiceEndpointPolicyId -func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - return &id, nil -} - -// ParseServiceEndpointPolicyIDInsensitively parses 'input' case-insensitively into a ServiceEndpointPolicyId -// note: this method should only be used for API response data and not user input -func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateServiceEndpointPolicyID checks that 'input' can be parsed as a Service Endpoint Policy ID -func ValidateServiceEndpointPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServiceEndpointPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/serviceEndpointPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServiceEndpointPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticServiceEndpointPolicies", "serviceEndpointPolicies", "serviceEndpointPolicies"), - resourceids.UserSpecifiedSegment("serviceEndpointPolicyName", "serviceEndpointPolicyValue"), - } -} - -// String returns a human-readable description of this Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Service Endpoint Policy Name: %q", id.ServiceEndpointPolicyName), - } - return fmt.Sprintf("Service Endpoint Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy_test.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy_test.go deleted file mode 100644 index 784f2c6a9f5..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyId{} - -func TestNewServiceEndpointPolicyID(t *testing.T) { - id := NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ServiceEndpointPolicyName != "serviceEndpointPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'ServiceEndpointPolicyName'", id.ServiceEndpointPolicyName, "serviceEndpointPolicyValue") - } -} - -func TestFormatServiceEndpointPolicyID(t *testing.T) { - actual := NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseServiceEndpointPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - } -} - -func TestParseServiceEndpointPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ServiceEndpointPolicyName: "sErViCeEnDpOiNtPoLiCyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - } -} - -func TestSegmentsForServiceEndpointPolicyId(t *testing.T) { - segments := ServiceEndpointPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ServiceEndpointPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go deleted file mode 100644 index f8fabb5925a..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,140 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyDefinitionId{} - -// ServiceEndpointPolicyDefinitionId is a struct representing the Resource ID for a Service Endpoint Policy Definition -type ServiceEndpointPolicyDefinitionId struct { - SubscriptionId string - ResourceGroupName string - ServiceEndpointPolicyName string - ServiceEndpointPolicyDefinitionName string -} - -// NewServiceEndpointPolicyDefinitionID returns a new ServiceEndpointPolicyDefinitionId struct -func NewServiceEndpointPolicyDefinitionID(subscriptionId string, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) ServiceEndpointPolicyDefinitionId { - return ServiceEndpointPolicyDefinitionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServiceEndpointPolicyName: serviceEndpointPolicyName, - ServiceEndpointPolicyDefinitionName: serviceEndpointPolicyDefinitionName, - } -} - -// ParseServiceEndpointPolicyDefinitionID parses 'input' into a ServiceEndpointPolicyDefinitionId -func ParseServiceEndpointPolicyDefinitionID(input string) (*ServiceEndpointPolicyDefinitionId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyDefinitionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - if id.ServiceEndpointPolicyDefinitionName, ok = parsed.Parsed["serviceEndpointPolicyDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyDefinitionName", *parsed) - } - - return &id, nil -} - -// ParseServiceEndpointPolicyDefinitionIDInsensitively parses 'input' case-insensitively into a ServiceEndpointPolicyDefinitionId -// note: this method should only be used for API response data and not user input -func ParseServiceEndpointPolicyDefinitionIDInsensitively(input string) (*ServiceEndpointPolicyDefinitionId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyDefinitionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - if id.ServiceEndpointPolicyDefinitionName, ok = parsed.Parsed["serviceEndpointPolicyDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyDefinitionName", *parsed) - } - - return &id, nil -} - -// ValidateServiceEndpointPolicyDefinitionID checks that 'input' can be parsed as a Service Endpoint Policy Definition ID -func ValidateServiceEndpointPolicyDefinitionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServiceEndpointPolicyDefinitionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Service Endpoint Policy Definition ID -func (id ServiceEndpointPolicyDefinitionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/serviceEndpointPolicies/%s/serviceEndpointPolicyDefinitions/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServiceEndpointPolicyName, id.ServiceEndpointPolicyDefinitionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Service Endpoint Policy Definition ID -func (id ServiceEndpointPolicyDefinitionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticServiceEndpointPolicies", "serviceEndpointPolicies", "serviceEndpointPolicies"), - resourceids.UserSpecifiedSegment("serviceEndpointPolicyName", "serviceEndpointPolicyValue"), - resourceids.StaticSegment("staticServiceEndpointPolicyDefinitions", "serviceEndpointPolicyDefinitions", "serviceEndpointPolicyDefinitions"), - resourceids.UserSpecifiedSegment("serviceEndpointPolicyDefinitionName", "serviceEndpointPolicyDefinitionValue"), - } -} - -// String returns a human-readable description of this Service Endpoint Policy Definition ID -func (id ServiceEndpointPolicyDefinitionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Service Endpoint Policy Name: %q", id.ServiceEndpointPolicyName), - fmt.Sprintf("Service Endpoint Policy Definition Name: %q", id.ServiceEndpointPolicyDefinitionName), - } - return fmt.Sprintf("Service Endpoint Policy Definition (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition_test.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition_test.go deleted file mode 100644 index ee51207e4e8..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyDefinitionId{} - -func TestNewServiceEndpointPolicyDefinitionID(t *testing.T) { - id := NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ServiceEndpointPolicyName != "serviceEndpointPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'ServiceEndpointPolicyName'", id.ServiceEndpointPolicyName, "serviceEndpointPolicyValue") - } - - if id.ServiceEndpointPolicyDefinitionName != "serviceEndpointPolicyDefinitionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ServiceEndpointPolicyDefinitionName'", id.ServiceEndpointPolicyDefinitionName, "serviceEndpointPolicyDefinitionValue") - } -} - -func TestFormatServiceEndpointPolicyDefinitionID(t *testing.T) { - actual := NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseServiceEndpointPolicyDefinitionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyDefinitionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue", - Expected: &ServiceEndpointPolicyDefinitionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - ServiceEndpointPolicyDefinitionName: "serviceEndpointPolicyDefinitionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyDefinitionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - if actual.ServiceEndpointPolicyDefinitionName != v.Expected.ServiceEndpointPolicyDefinitionName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyDefinitionName", v.Expected.ServiceEndpointPolicyDefinitionName, actual.ServiceEndpointPolicyDefinitionName) - } - - } -} - -func TestParseServiceEndpointPolicyDefinitionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyDefinitionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue", - Expected: &ServiceEndpointPolicyDefinitionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - ServiceEndpointPolicyDefinitionName: "serviceEndpointPolicyDefinitionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnS/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnVaLuE", - Expected: &ServiceEndpointPolicyDefinitionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ServiceEndpointPolicyName: "sErViCeEnDpOiNtPoLiCyVaLuE", - ServiceEndpointPolicyDefinitionName: "sErViCeEnDpOiNtPoLiCyDeFiNiTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnS/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyDefinitionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - if actual.ServiceEndpointPolicyDefinitionName != v.Expected.ServiceEndpointPolicyDefinitionName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyDefinitionName", v.Expected.ServiceEndpointPolicyDefinitionName, actual.ServiceEndpointPolicyDefinitionName) - } - - } -} - -func TestSegmentsForServiceEndpointPolicyDefinitionId(t *testing.T) { - segments := ServiceEndpointPolicyDefinitionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ServiceEndpointPolicyDefinitionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_createorupdate.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_createorupdate.go deleted file mode 100644 index 5c2f9dec299..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.Context, id ServiceEndpointPolicyDefinitionId, input ServiceEndpointPolicyDefinition) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ServiceEndpointPolicyDefinitionId, input ServiceEndpointPolicyDefinition) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_delete.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_delete.go deleted file mode 100644 index 81989f95364..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context, id ServiceEndpointPolicyDefinitionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ServiceEndpointPolicyDefinitionsClient) DeleteThenPoll(ctx context.Context, id ServiceEndpointPolicyDefinitionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_get.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_get.go deleted file mode 100644 index fb9581ea3c7..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceEndpointPolicyDefinition -} - -// Get ... -func (c ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, id ServiceEndpointPolicyDefinitionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_listbyresourcegroup.go deleted file mode 100644 index 2968a1c6fa3..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/method_listbyresourcegroup.go +++ /dev/null @@ -1,89 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ServiceEndpointPolicyDefinition -} - -type ListByResourceGroupCompleteResult struct { - Items []ServiceEndpointPolicyDefinition -} - -// ListByResourceGroup ... -func (c ServiceEndpointPolicyDefinitionsClient) ListByResourceGroup(ctx context.Context, id ServiceEndpointPolicyId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/serviceEndpointPolicyDefinitions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ServiceEndpointPolicyDefinition `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupComplete(ctx context.Context, id ServiceEndpointPolicyId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ServiceEndpointPolicyDefinitionOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ServiceEndpointPolicyId, predicate ServiceEndpointPolicyDefinitionOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]ServiceEndpointPolicyDefinition, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 012ba37fe47..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicydefinitions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index ff7d49d8a5b..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicydefinitions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/predicates.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/predicates.go deleted file mode 100644 index a7a08fa9deb..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package serviceendpointpolicydefinitions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ServiceEndpointPolicyDefinitionOperationPredicate) Matches(input ServiceEndpointPolicyDefinition) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/version.go b/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/version.go deleted file mode 100644 index ad3aa4fc5c7..00000000000 --- a/resource-manager/network/2022-09-01/serviceendpointpolicydefinitions/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicydefinitions - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/servicetags/README.md b/resource-manager/network/2022-09-01/servicetags/README.md deleted file mode 100644 index 58e64f6e060..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/servicetags` Documentation - -The `servicetags` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/servicetags" -``` - - -### Client Initialization - -```go -client := servicetags.NewServiceTagsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServiceTagsClient.ServiceTagInformationList` - -```go -ctx := context.TODO() -id := servicetags.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.ServiceTagInformationList(ctx, id, servicetags.DefaultServiceTagInformationListOperationOptions())` can be used to do batched pagination -items, err := client.ServiceTagInformationListComplete(ctx, id, servicetags.DefaultServiceTagInformationListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ServiceTagsClient.ServiceTagsList` - -```go -ctx := context.TODO() -id := servicetags.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -read, err := client.ServiceTagsList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/servicetags/client.go b/resource-manager/network/2022-09-01/servicetags/client.go deleted file mode 100644 index 6ce184db9bc..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package servicetags - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagsClient struct { - Client *resourcemanager.Client -} - -func NewServiceTagsClientWithBaseURI(api environments.Api) (*ServiceTagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "servicetags", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ServiceTagsClient: %+v", err) - } - - return &ServiceTagsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/servicetags/id_location.go b/resource-manager/network/2022-09-01/servicetags/id_location.go deleted file mode 100644 index 2d8a29c22d9..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package servicetags - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/servicetags/id_location_test.go b/resource-manager/network/2022-09-01/servicetags/id_location_test.go deleted file mode 100644 index 809e7f8e19a..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package servicetags - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/servicetags/method_servicetaginformationlist.go b/resource-manager/network/2022-09-01/servicetags/method_servicetaginformationlist.go deleted file mode 100644 index c413c9f490a..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/method_servicetaginformationlist.go +++ /dev/null @@ -1,121 +0,0 @@ -package servicetags - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagInformationListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ServiceTagInformation -} - -type ServiceTagInformationListCompleteResult struct { - Items []ServiceTagInformation -} - -type ServiceTagInformationListOperationOptions struct { - NoAddressPrefixes *bool - TagName *string -} - -func DefaultServiceTagInformationListOperationOptions() ServiceTagInformationListOperationOptions { - return ServiceTagInformationListOperationOptions{} -} - -func (o ServiceTagInformationListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ServiceTagInformationListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ServiceTagInformationListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.NoAddressPrefixes != nil { - out.Append("noAddressPrefixes", fmt.Sprintf("%v", *o.NoAddressPrefixes)) - } - if o.TagName != nil { - out.Append("tagName", fmt.Sprintf("%v", *o.TagName)) - } - return &out -} - -// ServiceTagInformationList ... -func (c ServiceTagsClient) ServiceTagInformationList(ctx context.Context, id LocationId, options ServiceTagInformationListOperationOptions) (result ServiceTagInformationListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/serviceTagDetails", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ServiceTagInformation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ServiceTagInformationListComplete retrieves all the results into a single object -func (c ServiceTagsClient) ServiceTagInformationListComplete(ctx context.Context, id LocationId, options ServiceTagInformationListOperationOptions) (ServiceTagInformationListCompleteResult, error) { - return c.ServiceTagInformationListCompleteMatchingPredicate(ctx, id, options, ServiceTagInformationOperationPredicate{}) -} - -// ServiceTagInformationListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ServiceTagsClient) ServiceTagInformationListCompleteMatchingPredicate(ctx context.Context, id LocationId, options ServiceTagInformationListOperationOptions, predicate ServiceTagInformationOperationPredicate) (result ServiceTagInformationListCompleteResult, err error) { - items := make([]ServiceTagInformation, 0) - - resp, err := c.ServiceTagInformationList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ServiceTagInformationListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/servicetags/method_servicetagslist.go b/resource-manager/network/2022-09-01/servicetags/method_servicetagslist.go deleted file mode 100644 index b9acb9e9472..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/method_servicetagslist.go +++ /dev/null @@ -1,52 +0,0 @@ -package servicetags - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceTagsListResult -} - -// ServiceTagsList ... -func (c ServiceTagsClient) ServiceTagsList(ctx context.Context, id LocationId) (result ServiceTagsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/serviceTags", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/servicetags/model_servicetaginformation.go b/resource-manager/network/2022-09-01/servicetags/model_servicetaginformation.go deleted file mode 100644 index 705268a5bb9..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/model_servicetaginformation.go +++ /dev/null @@ -1,11 +0,0 @@ -package servicetags - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagInformation struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"` - ServiceTagChangeNumber *string `json:"serviceTagChangeNumber,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/servicetags/model_servicetaginformationpropertiesformat.go b/resource-manager/network/2022-09-01/servicetags/model_servicetaginformationpropertiesformat.go deleted file mode 100644 index 0d51bfcd8b2..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/model_servicetaginformationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package servicetags - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagInformationPropertiesFormat struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ChangeNumber *string `json:"changeNumber,omitempty"` - Region *string `json:"region,omitempty"` - State *string `json:"state,omitempty"` - SystemService *string `json:"systemService,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/servicetags/model_servicetagslistresult.go b/resource-manager/network/2022-09-01/servicetags/model_servicetagslistresult.go deleted file mode 100644 index 9cfb2fb2afb..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/model_servicetagslistresult.go +++ /dev/null @@ -1,14 +0,0 @@ -package servicetags - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagsListResult struct { - ChangeNumber *string `json:"changeNumber,omitempty"` - Cloud *string `json:"cloud,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Type *string `json:"type,omitempty"` - Values *[]ServiceTagInformation `json:"values,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/servicetags/predicates.go b/resource-manager/network/2022-09-01/servicetags/predicates.go deleted file mode 100644 index e10bffe6a4f..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package servicetags - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagInformationOperationPredicate struct { - Id *string - Name *string - ServiceTagChangeNumber *string -} - -func (p ServiceTagInformationOperationPredicate) Matches(input ServiceTagInformation) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.ServiceTagChangeNumber != nil && (input.ServiceTagChangeNumber == nil || *p.ServiceTagChangeNumber != *input.ServiceTagChangeNumber) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/servicetags/version.go b/resource-manager/network/2022-09-01/servicetags/version.go deleted file mode 100644 index 3844a9766c0..00000000000 --- a/resource-manager/network/2022-09-01/servicetags/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package servicetags - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicetags/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/staticmembers/README.md b/resource-manager/network/2022-09-01/staticmembers/README.md deleted file mode 100644 index 0397534afee..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/README.md +++ /dev/null @@ -1,90 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/staticmembers` Documentation - -The `staticmembers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/staticmembers" -``` - - -### Client Initialization - -```go -client := staticmembers.NewStaticMembersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `StaticMembersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := staticmembers.NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue") - -payload := staticmembers.StaticMember{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StaticMembersClient.Delete` - -```go -ctx := context.TODO() -id := staticmembers.NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StaticMembersClient.Get` - -```go -ctx := context.TODO() -id := staticmembers.NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StaticMembersClient.List` - -```go -ctx := context.TODO() -id := staticmembers.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - -// alternatively `client.List(ctx, id, staticmembers.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, staticmembers.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/staticmembers/client.go b/resource-manager/network/2022-09-01/staticmembers/client.go deleted file mode 100644 index bc0383f9c3c..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package staticmembers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticMembersClient struct { - Client *resourcemanager.Client -} - -func NewStaticMembersClientWithBaseURI(api environments.Api) (*StaticMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "staticmembers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating StaticMembersClient: %+v", err) - } - - return &StaticMembersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/staticmembers/constants.go b/resource-manager/network/2022-09-01/staticmembers/constants.go deleted file mode 100644 index 3ccbd94262b..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package staticmembers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/staticmembers/id_networkgroup.go b/resource-manager/network/2022-09-01/staticmembers/id_networkgroup.go deleted file mode 100644 index 67b3fd5daf1..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/id_networkgroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package staticmembers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkGroupId{} - -// NetworkGroupId is a struct representing the Resource ID for a Network Group -type NetworkGroupId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - NetworkGroupName string -} - -// NewNetworkGroupID returns a new NetworkGroupId struct -func NewNetworkGroupID(subscriptionId string, resourceGroupName string, networkManagerName string, networkGroupName string) NetworkGroupId { - return NetworkGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - NetworkGroupName: networkGroupName, - } -} - -// ParseNetworkGroupID parses 'input' into a NetworkGroupId -func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - return &id, nil -} - -// ParseNetworkGroupIDInsensitively parses 'input' case-insensitively into a NetworkGroupId -// note: this method should only be used for API response data and not user input -func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkGroupID checks that 'input' can be parsed as a Network Group ID -func ValidateNetworkGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Group ID -func (id NetworkGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/networkGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.NetworkGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Group ID -func (id NetworkGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticNetworkGroups", "networkGroups", "networkGroups"), - resourceids.UserSpecifiedSegment("networkGroupName", "networkGroupValue"), - } -} - -// String returns a human-readable description of this Network Group ID -func (id NetworkGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Network Group Name: %q", id.NetworkGroupName), - } - return fmt.Sprintf("Network Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/staticmembers/id_networkgroup_test.go b/resource-manager/network/2022-09-01/staticmembers/id_networkgroup_test.go deleted file mode 100644 index 2f0e7a131b1..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/id_networkgroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package staticmembers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkGroupId{} - -func TestNewNetworkGroupID(t *testing.T) { - id := NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.NetworkGroupName != "networkGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkGroupName'", id.NetworkGroupName, "networkGroupValue") - } -} - -func TestFormatNetworkGroupID(t *testing.T) { - actual := NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - } -} - -func TestParseNetworkGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - NetworkGroupName: "nEtWoRkGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - } -} - -func TestSegmentsForNetworkGroupId(t *testing.T) { - segments := NetworkGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/staticmembers/id_staticmember.go b/resource-manager/network/2022-09-01/staticmembers/id_staticmember.go deleted file mode 100644 index c42f4e8bd27..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/id_staticmember.go +++ /dev/null @@ -1,153 +0,0 @@ -package staticmembers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = StaticMemberId{} - -// StaticMemberId is a struct representing the Resource ID for a Static Member -type StaticMemberId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - NetworkGroupName string - StaticMemberName string -} - -// NewStaticMemberID returns a new StaticMemberId struct -func NewStaticMemberID(subscriptionId string, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string) StaticMemberId { - return StaticMemberId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - NetworkGroupName: networkGroupName, - StaticMemberName: staticMemberName, - } -} - -// ParseStaticMemberID parses 'input' into a StaticMemberId -func ParseStaticMemberID(input string) (*StaticMemberId, error) { - parser := resourceids.NewParserFromResourceIdType(StaticMemberId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StaticMemberId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - if id.StaticMemberName, ok = parsed.Parsed["staticMemberName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "staticMemberName", *parsed) - } - - return &id, nil -} - -// ParseStaticMemberIDInsensitively parses 'input' case-insensitively into a StaticMemberId -// note: this method should only be used for API response data and not user input -func ParseStaticMemberIDInsensitively(input string) (*StaticMemberId, error) { - parser := resourceids.NewParserFromResourceIdType(StaticMemberId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StaticMemberId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - if id.StaticMemberName, ok = parsed.Parsed["staticMemberName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "staticMemberName", *parsed) - } - - return &id, nil -} - -// ValidateStaticMemberID checks that 'input' can be parsed as a Static Member ID -func ValidateStaticMemberID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStaticMemberID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Static Member ID -func (id StaticMemberId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/networkGroups/%s/staticMembers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.NetworkGroupName, id.StaticMemberName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Static Member ID -func (id StaticMemberId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticNetworkGroups", "networkGroups", "networkGroups"), - resourceids.UserSpecifiedSegment("networkGroupName", "networkGroupValue"), - resourceids.StaticSegment("staticStaticMembers", "staticMembers", "staticMembers"), - resourceids.UserSpecifiedSegment("staticMemberName", "staticMemberValue"), - } -} - -// String returns a human-readable description of this Static Member ID -func (id StaticMemberId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Network Group Name: %q", id.NetworkGroupName), - fmt.Sprintf("Static Member Name: %q", id.StaticMemberName), - } - return fmt.Sprintf("Static Member (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/staticmembers/id_staticmember_test.go b/resource-manager/network/2022-09-01/staticmembers/id_staticmember_test.go deleted file mode 100644 index 2291e76f553..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/id_staticmember_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package staticmembers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = StaticMemberId{} - -func TestNewStaticMemberID(t *testing.T) { - id := NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.NetworkGroupName != "networkGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkGroupName'", id.NetworkGroupName, "networkGroupValue") - } - - if id.StaticMemberName != "staticMemberValue" { - t.Fatalf("Expected %q but got %q for Segment 'StaticMemberName'", id.StaticMemberName, "staticMemberValue") - } -} - -func TestFormatStaticMemberID(t *testing.T) { - actual := NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseStaticMemberID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *StaticMemberId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue", - Expected: &StaticMemberId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - StaticMemberName: "staticMemberValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseStaticMemberID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - if actual.StaticMemberName != v.Expected.StaticMemberName { - t.Fatalf("Expected %q but got %q for StaticMemberName", v.Expected.StaticMemberName, actual.StaticMemberName) - } - - } -} - -func TestParseStaticMemberIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *StaticMemberId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/sTaTiCmEmBeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue", - Expected: &StaticMemberId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - StaticMemberName: "staticMemberValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/sTaTiCmEmBeRs/sTaTiCmEmBeRvAlUe", - Expected: &StaticMemberId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - NetworkGroupName: "nEtWoRkGrOuPvAlUe", - StaticMemberName: "sTaTiCmEmBeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/sTaTiCmEmBeRs/sTaTiCmEmBeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseStaticMemberIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - if actual.StaticMemberName != v.Expected.StaticMemberName { - t.Fatalf("Expected %q but got %q for StaticMemberName", v.Expected.StaticMemberName, actual.StaticMemberName) - } - - } -} - -func TestSegmentsForStaticMemberId(t *testing.T) { - segments := StaticMemberId{}.Segments() - if len(segments) == 0 { - t.Fatalf("StaticMemberId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/staticmembers/method_createorupdate.go b/resource-manager/network/2022-09-01/staticmembers/method_createorupdate.go deleted file mode 100644 index ed6f5c34d52..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package staticmembers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StaticMember -} - -// CreateOrUpdate ... -func (c StaticMembersClient) CreateOrUpdate(ctx context.Context, id StaticMemberId, input StaticMember) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/staticmembers/method_delete.go b/resource-manager/network/2022-09-01/staticmembers/method_delete.go deleted file mode 100644 index 5709eca59ec..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/method_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package staticmembers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c StaticMembersClient) Delete(ctx context.Context, id StaticMemberId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/staticmembers/method_get.go b/resource-manager/network/2022-09-01/staticmembers/method_get.go deleted file mode 100644 index 742da5445a8..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package staticmembers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StaticMember -} - -// Get ... -func (c StaticMembersClient) Get(ctx context.Context, id StaticMemberId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/staticmembers/method_list.go b/resource-manager/network/2022-09-01/staticmembers/method_list.go deleted file mode 100644 index ef049ac1a6a..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package staticmembers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]StaticMember -} - -type ListCompleteResult struct { - Items []StaticMember -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c StaticMembersClient) List(ctx context.Context, id NetworkGroupId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/staticMembers", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]StaticMember `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c StaticMembersClient) ListComplete(ctx context.Context, id NetworkGroupId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, StaticMemberOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StaticMembersClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkGroupId, options ListOperationOptions, predicate StaticMemberOperationPredicate) (result ListCompleteResult, err error) { - items := make([]StaticMember, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/staticmembers/model_staticmember.go b/resource-manager/network/2022-09-01/staticmembers/model_staticmember.go deleted file mode 100644 index b0d518168ea..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/model_staticmember.go +++ /dev/null @@ -1,17 +0,0 @@ -package staticmembers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticMember struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *StaticMemberProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/staticmembers/model_staticmemberproperties.go b/resource-manager/network/2022-09-01/staticmembers/model_staticmemberproperties.go deleted file mode 100644 index 513dd3e5b9b..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/model_staticmemberproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package staticmembers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticMemberProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Region *string `json:"region,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/staticmembers/predicates.go b/resource-manager/network/2022-09-01/staticmembers/predicates.go deleted file mode 100644 index 0fb08a96da7..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package staticmembers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticMemberOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p StaticMemberOperationPredicate) Matches(input StaticMember) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/staticmembers/version.go b/resource-manager/network/2022-09-01/staticmembers/version.go deleted file mode 100644 index bdaaa53040c..00000000000 --- a/resource-manager/network/2022-09-01/staticmembers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package staticmembers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/staticmembers/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/subnets/README.md b/resource-manager/network/2022-09-01/subnets/README.md deleted file mode 100644 index c63d917d819..00000000000 --- a/resource-manager/network/2022-09-01/subnets/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/subnets` Documentation - -The `subnets` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/subnets" -``` - - -### Client Initialization - -```go -client := subnets.NewSubnetsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SubnetsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := subnets.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -payload := subnets.Subnet{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `SubnetsClient.Delete` - -```go -ctx := context.TODO() -id := subnets.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `SubnetsClient.Get` - -```go -ctx := context.TODO() -id := subnets.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -read, err := client.Get(ctx, id, subnets.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SubnetsClient.List` - -```go -ctx := context.TODO() -id := subnets.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/subnets/client.go b/resource-manager/network/2022-09-01/subnets/client.go deleted file mode 100644 index 3efe55fa485..00000000000 --- a/resource-manager/network/2022-09-01/subnets/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package subnets - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetsClient struct { - Client *resourcemanager.Client -} - -func NewSubnetsClientWithBaseURI(api environments.Api) (*SubnetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "subnets", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating SubnetsClient: %+v", err) - } - - return &SubnetsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/subnets/constants.go b/resource-manager/network/2022-09-01/subnets/constants.go deleted file mode 100644 index 466a38e9386..00000000000 --- a/resource-manager/network/2022-09-01/subnets/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package subnets - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/subnets/method_createorupdate.go b/resource-manager/network/2022-09-01/subnets/method_createorupdate.go deleted file mode 100644 index 03bb34707c9..00000000000 --- a/resource-manager/network/2022-09-01/subnets/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package subnets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c SubnetsClient) CreateOrUpdate(ctx context.Context, id commonids.SubnetId, input Subnet) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c SubnetsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SubnetId, input Subnet) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/subnets/method_delete.go b/resource-manager/network/2022-09-01/subnets/method_delete.go deleted file mode 100644 index 8be424289f0..00000000000 --- a/resource-manager/network/2022-09-01/subnets/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package subnets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c SubnetsClient) Delete(ctx context.Context, id commonids.SubnetId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c SubnetsClient) DeleteThenPoll(ctx context.Context, id commonids.SubnetId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/subnets/method_get.go b/resource-manager/network/2022-09-01/subnets/method_get.go deleted file mode 100644 index 97bd6dda326..00000000000 --- a/resource-manager/network/2022-09-01/subnets/method_get.go +++ /dev/null @@ -1,81 +0,0 @@ -package subnets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Subnet -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c SubnetsClient) Get(ctx context.Context, id commonids.SubnetId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/subnets/method_list.go b/resource-manager/network/2022-09-01/subnets/method_list.go deleted file mode 100644 index 6912c6ff2c3..00000000000 --- a/resource-manager/network/2022-09-01/subnets/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package subnets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Subnet -} - -type ListCompleteResult struct { - Items []Subnet -} - -// List ... -func (c SubnetsClient) List(ctx context.Context, id commonids.VirtualNetworkId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/subnets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Subnet `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c SubnetsClient) ListComplete(ctx context.Context, id commonids.VirtualNetworkId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, SubnetOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SubnetsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, predicate SubnetOperationPredicate) (result ListCompleteResult, err error) { - items := make([]Subnet, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 3788306fb6c..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 916f79f9c4c..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 5cb3ab5e50f..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/subnets/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 2064f06b67c..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index ba5d67b2ce4..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/subnets/model_applicationsecuritygroup.go deleted file mode 100644 index 2b7038a9661..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 0444d465786..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_backendaddresspool.go b/resource-manager/network/2022-09-01/subnets/model_backendaddresspool.go deleted file mode 100644 index 8549e5db3a8..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 9e59212a304..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index b8332f10ecf..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_ddossettings.go b/resource-manager/network/2022-09-01/subnets/model_ddossettings.go deleted file mode 100644 index d48851a6ba1..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_delegation.go b/resource-manager/network/2022-09-01/subnets/model_delegation.go deleted file mode 100644 index 541d9d1d34b..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_flowlog.go b/resource-manager/network/2022-09-01/subnets/model_flowlog.go deleted file mode 100644 index d350c16ef43..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/subnets/model_flowlogformatparameters.go deleted file mode 100644 index 492844afa0c..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_flowlogpropertiesformat.go deleted file mode 100644 index a2a70e0c856..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/subnets/model_frontendipconfiguration.go deleted file mode 100644 index f24121e7c39..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 3c86535825a..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/subnets/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 3d2ff9b3010..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_inboundnatrule.go b/resource-manager/network/2022-09-01/subnets/model_inboundnatrule.go deleted file mode 100644 index dd23aa7a490..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index ac29e9fd37d..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_ipconfiguration.go b/resource-manager/network/2022-09-01/subnets/model_ipconfiguration.go deleted file mode 100644 index 3e2e5516ea9..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/subnets/model_ipconfigurationprofile.go deleted file mode 100644 index a4d5be3c038..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index bfb28994f14..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 4814acb3e8e..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_iptag.go b/resource-manager/network/2022-09-01/subnets/model_iptag.go deleted file mode 100644 index 8ccc055cb31..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/subnets/model_loadbalancerbackendaddress.go deleted file mode 100644 index e3b148912e3..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index ee7815f178d..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_natgateway.go b/resource-manager/network/2022-09-01/subnets/model_natgateway.go deleted file mode 100644 index 9a8fad20def..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_natgatewaypropertiesformat.go deleted file mode 100644 index e9043897c52..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_natgatewaysku.go b/resource-manager/network/2022-09-01/subnets/model_natgatewaysku.go deleted file mode 100644 index 617e7c19ff3..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_natruleportmapping.go b/resource-manager/network/2022-09-01/subnets/model_natruleportmapping.go deleted file mode 100644 index 1e546cf811d..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networkinterface.go b/resource-manager/network/2022-09-01/subnets/model_networkinterface.go deleted file mode 100644 index 06d849fad90..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/subnets/model_networkinterfacednssettings.go deleted file mode 100644 index 67fcb29afe7..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfiguration.go deleted file mode 100644 index dea0691831d..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 51e7195920f..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index bc6e9588ae5..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 32b6aab65eb..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/subnets/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 2cd16be245c..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 1bc23cee100..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/subnets/model_networksecuritygroup.go deleted file mode 100644 index fa06f5f24cc..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index da7b074dbbf..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privateendpoint.go b/resource-manager/network/2022-09-01/subnets/model_privateendpoint.go deleted file mode 100644 index 4fa549c3b13..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/subnets/model_privateendpointconnection.go deleted file mode 100644 index 1e354419cca..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/subnets/model_privateendpointconnectionproperties.go deleted file mode 100644 index 5633d4ca53d..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/subnets/model_privateendpointipconfiguration.go deleted file mode 100644 index 20625cb09d3..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/subnets/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 5d90f3c61bf..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/subnets/model_privateendpointproperties.go deleted file mode 100644 index 4913ece3049..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privatelinkservice.go b/resource-manager/network/2022-09-01/subnets/model_privatelinkservice.go deleted file mode 100644 index 34c00e7cffb..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnection.go deleted file mode 100644 index af937a19eda..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index d6ad965c136..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 4072e649f7a..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index c48e1e87c65..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index eccb8844155..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceproperties.go deleted file mode 100644 index 0f4d213769b..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_publicipaddress.go b/resource-manager/network/2022-09-01/subnets/model_publicipaddress.go deleted file mode 100644 index 9931f78d236..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/subnets/model_publicipaddressdnssettings.go deleted file mode 100644 index 2421df5949d..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_publicipaddresspropertiesformat.go deleted file mode 100644 index c8c5eb4251a..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/subnets/model_publicipaddresssku.go deleted file mode 100644 index 21dd8f7d664..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/subnets/model_resourcenavigationlink.go deleted file mode 100644 index fcd37a760e6..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/subnets/model_resourcenavigationlinkformat.go deleted file mode 100644 index 103426fc9c3..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_resourceset.go b/resource-manager/network/2022-09-01/subnets/model_resourceset.go deleted file mode 100644 index 5daeebab425..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/subnets/model_retentionpolicyparameters.go deleted file mode 100644 index 8ea922b85fe..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_route.go b/resource-manager/network/2022-09-01/subnets/model_route.go deleted file mode 100644 index e40ded16b00..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_routepropertiesformat.go deleted file mode 100644 index c87b62acaed..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_routetable.go b/resource-manager/network/2022-09-01/subnets/model_routetable.go deleted file mode 100644 index 6bb137b8242..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_routetablepropertiesformat.go deleted file mode 100644 index 07d88ea8a30..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_securityrule.go b/resource-manager/network/2022-09-01/subnets/model_securityrule.go deleted file mode 100644 index 70772203f7b..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_securityrulepropertiesformat.go deleted file mode 100644 index cad2dbd820c..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/subnets/model_serviceassociationlink.go deleted file mode 100644 index c82eae5ac15..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index f1a92b71485..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 1680e52b8a1..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicy.go deleted file mode 100644 index 68813a7b3e8..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 8fa72c305ed..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index b7b56f401a8..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 5e0804aa438..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 7011fc209c0..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_subnet.go b/resource-manager/network/2022-09-01/subnets/model_subnet.go deleted file mode 100644 index 820673d7c16..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_subnetpropertiesformat.go deleted file mode 100644 index 5094062f846..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_subresource.go b/resource-manager/network/2022-09-01/subnets/model_subresource.go deleted file mode 100644 index d986a303819..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/subnets/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index e93599e3f9c..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/subnets/model_trafficanalyticsproperties.go deleted file mode 100644 index fa6abc84aef..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/subnets/model_virtualnetworktap.go deleted file mode 100644 index f9e8be401f9..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/subnets/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index c8b60852b33..00000000000 --- a/resource-manager/network/2022-09-01/subnets/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/subnets/predicates.go b/resource-manager/network/2022-09-01/subnets/predicates.go deleted file mode 100644 index 33b8979e3cc..00000000000 --- a/resource-manager/network/2022-09-01/subnets/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p SubnetOperationPredicate) Matches(input Subnet) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/subnets/version.go b/resource-manager/network/2022-09-01/subnets/version.go deleted file mode 100644 index 29c96bd9e73..00000000000 --- a/resource-manager/network/2022-09-01/subnets/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subnets/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/README.md b/resource-manager/network/2022-09-01/trafficanalytics/README.md deleted file mode 100644 index 6da6a6b1865..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/trafficanalytics` Documentation - -The `trafficanalytics` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/trafficanalytics" -``` - - -### Client Initialization - -```go -client := trafficanalytics.NewTrafficAnalyticsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `TrafficAnalyticsClient.NetworkWatchersGetFlowLogStatus` - -```go -ctx := context.TODO() -id := trafficanalytics.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := trafficanalytics.FlowLogStatusParameters{ - // ... -} - - -if err := client.NetworkWatchersGetFlowLogStatusThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `TrafficAnalyticsClient.NetworkWatchersSetFlowLogConfiguration` - -```go -ctx := context.TODO() -id := trafficanalytics.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := trafficanalytics.FlowLogInformation{ - // ... -} - - -if err := client.NetworkWatchersSetFlowLogConfigurationThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/trafficanalytics/client.go b/resource-manager/network/2022-09-01/trafficanalytics/client.go deleted file mode 100644 index 3dd5fd4cf96..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package trafficanalytics - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsClient struct { - Client *resourcemanager.Client -} - -func NewTrafficAnalyticsClientWithBaseURI(api environments.Api) (*TrafficAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "trafficanalytics", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating TrafficAnalyticsClient: %+v", err) - } - - return &TrafficAnalyticsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/constants.go b/resource-manager/network/2022-09-01/trafficanalytics/constants.go deleted file mode 100644 index 54031e636e9..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/constants.go +++ /dev/null @@ -1,48 +0,0 @@ -package trafficanalytics - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/id_networkwatcher.go b/resource-manager/network/2022-09-01/trafficanalytics/id_networkwatcher.go deleted file mode 100644 index 28df98e2c49..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package trafficanalytics - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/id_networkwatcher_test.go b/resource-manager/network/2022-09-01/trafficanalytics/id_networkwatcher_test.go deleted file mode 100644 index 73301e9064d..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package trafficanalytics - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/method_networkwatchersgetflowlogstatus.go b/resource-manager/network/2022-09-01/trafficanalytics/method_networkwatchersgetflowlogstatus.go deleted file mode 100644 index 62301dc57e3..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/method_networkwatchersgetflowlogstatus.go +++ /dev/null @@ -1,74 +0,0 @@ -package trafficanalytics - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatchersGetFlowLogStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NetworkWatchersGetFlowLogStatus ... -func (c TrafficAnalyticsClient) NetworkWatchersGetFlowLogStatus(ctx context.Context, id NetworkWatcherId, input FlowLogStatusParameters) (result NetworkWatchersGetFlowLogStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryFlowLogStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NetworkWatchersGetFlowLogStatusThenPoll performs NetworkWatchersGetFlowLogStatus then polls until it's completed -func (c TrafficAnalyticsClient) NetworkWatchersGetFlowLogStatusThenPoll(ctx context.Context, id NetworkWatcherId, input FlowLogStatusParameters) error { - result, err := c.NetworkWatchersGetFlowLogStatus(ctx, id, input) - if err != nil { - return fmt.Errorf("performing NetworkWatchersGetFlowLogStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NetworkWatchersGetFlowLogStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/method_networkwatcherssetflowlogconfiguration.go b/resource-manager/network/2022-09-01/trafficanalytics/method_networkwatcherssetflowlogconfiguration.go deleted file mode 100644 index 6c64f19fd99..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/method_networkwatcherssetflowlogconfiguration.go +++ /dev/null @@ -1,74 +0,0 @@ -package trafficanalytics - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatchersSetFlowLogConfigurationOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NetworkWatchersSetFlowLogConfiguration ... -func (c TrafficAnalyticsClient) NetworkWatchersSetFlowLogConfiguration(ctx context.Context, id NetworkWatcherId, input FlowLogInformation) (result NetworkWatchersSetFlowLogConfigurationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/configureFlowLog", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NetworkWatchersSetFlowLogConfigurationThenPoll performs NetworkWatchersSetFlowLogConfiguration then polls until it's completed -func (c TrafficAnalyticsClient) NetworkWatchersSetFlowLogConfigurationThenPoll(ctx context.Context, id NetworkWatcherId, input FlowLogInformation) error { - result, err := c.NetworkWatchersSetFlowLogConfiguration(ctx, id, input) - if err != nil { - return fmt.Errorf("performing NetworkWatchersSetFlowLogConfiguration: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NetworkWatchersSetFlowLogConfiguration: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/trafficanalytics/model_flowlogformatparameters.go deleted file mode 100644 index 87ffe400a44..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/model_flowloginformation.go b/resource-manager/network/2022-09-01/trafficanalytics/model_flowloginformation.go deleted file mode 100644 index 15a1cc0029d..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/model_flowloginformation.go +++ /dev/null @@ -1,10 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogInformation struct { - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Properties FlowLogProperties `json:"properties"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/model_flowlogproperties.go b/resource-manager/network/2022-09-01/trafficanalytics/model_flowlogproperties.go deleted file mode 100644 index b26bd4b572a..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/model_flowlogproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogProperties struct { - Enabled bool `json:"enabled"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/model_flowlogstatusparameters.go b/resource-manager/network/2022-09-01/trafficanalytics/model_flowlogstatusparameters.go deleted file mode 100644 index a066e2ad70a..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/model_flowlogstatusparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogStatusParameters struct { - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/trafficanalytics/model_retentionpolicyparameters.go deleted file mode 100644 index b432d3a27f0..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/trafficanalytics/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 01350bb98c2..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/trafficanalytics/model_trafficanalyticsproperties.go deleted file mode 100644 index 94df925e175..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/trafficanalytics/version.go b/resource-manager/network/2022-09-01/trafficanalytics/version.go deleted file mode 100644 index b96817b6983..00000000000 --- a/resource-manager/network/2022-09-01/trafficanalytics/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package trafficanalytics - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficanalytics/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/usages/README.md b/resource-manager/network/2022-09-01/usages/README.md deleted file mode 100644 index 22b9bf4aaaa..00000000000 --- a/resource-manager/network/2022-09-01/usages/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/usages` Documentation - -The `usages` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/usages" -``` - - -### Client Initialization - -```go -client := usages.NewUsagesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `UsagesClient.List` - -```go -ctx := context.TODO() -id := usages.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/usages/client.go b/resource-manager/network/2022-09-01/usages/client.go deleted file mode 100644 index 99b2625224d..00000000000 --- a/resource-manager/network/2022-09-01/usages/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package usages - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UsagesClient struct { - Client *resourcemanager.Client -} - -func NewUsagesClientWithBaseURI(api environments.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "usages", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) - } - - return &UsagesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/usages/constants.go b/resource-manager/network/2022-09-01/usages/constants.go deleted file mode 100644 index 0d8916ba5aa..00000000000 --- a/resource-manager/network/2022-09-01/usages/constants.go +++ /dev/null @@ -1,48 +0,0 @@ -package usages - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UsageUnit string - -const ( - UsageUnitCount UsageUnit = "Count" -) - -func PossibleValuesForUsageUnit() []string { - return []string{ - string(UsageUnitCount), - } -} - -func (s *UsageUnit) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUsageUnit(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUsageUnit(input string) (*UsageUnit, error) { - vals := map[string]UsageUnit{ - "count": UsageUnitCount, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UsageUnit(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/usages/id_location.go b/resource-manager/network/2022-09-01/usages/id_location.go deleted file mode 100644 index ef70b32225b..00000000000 --- a/resource-manager/network/2022-09-01/usages/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package usages - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/usages/id_location_test.go b/resource-manager/network/2022-09-01/usages/id_location_test.go deleted file mode 100644 index abdfdf42b49..00000000000 --- a/resource-manager/network/2022-09-01/usages/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package usages - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/usages/method_list.go b/resource-manager/network/2022-09-01/usages/method_list.go deleted file mode 100644 index af7b3fe5c9c..00000000000 --- a/resource-manager/network/2022-09-01/usages/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package usages - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Usage -} - -type ListCompleteResult struct { - Items []Usage -} - -// List ... -func (c UsagesClient) List(ctx context.Context, id LocationId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/usages", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Usage `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c UsagesClient) ListComplete(ctx context.Context, id LocationId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, UsageOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c UsagesClient) ListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate UsageOperationPredicate) (result ListCompleteResult, err error) { - items := make([]Usage, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/usages/model_usage.go b/resource-manager/network/2022-09-01/usages/model_usage.go deleted file mode 100644 index 2a734980b2c..00000000000 --- a/resource-manager/network/2022-09-01/usages/model_usage.go +++ /dev/null @@ -1,12 +0,0 @@ -package usages - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Usage struct { - CurrentValue int64 `json:"currentValue"` - Id *string `json:"id,omitempty"` - Limit int64 `json:"limit"` - Name UsageName `json:"name"` - Unit UsageUnit `json:"unit"` -} diff --git a/resource-manager/network/2022-09-01/usages/model_usagename.go b/resource-manager/network/2022-09-01/usages/model_usagename.go deleted file mode 100644 index ff2d9cbdd3e..00000000000 --- a/resource-manager/network/2022-09-01/usages/model_usagename.go +++ /dev/null @@ -1,9 +0,0 @@ -package usages - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UsageName struct { - LocalizedValue *string `json:"localizedValue,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/usages/predicates.go b/resource-manager/network/2022-09-01/usages/predicates.go deleted file mode 100644 index ad3b401c1ce..00000000000 --- a/resource-manager/network/2022-09-01/usages/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package usages - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UsageOperationPredicate struct { - CurrentValue *int64 - Id *string - Limit *int64 -} - -func (p UsageOperationPredicate) Matches(input Usage) bool { - - if p.CurrentValue != nil && *p.CurrentValue != input.CurrentValue { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Limit != nil && *p.Limit != input.Limit { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/usages/version.go b/resource-manager/network/2022-09-01/usages/version.go deleted file mode 100644 index c7b48feb55e..00000000000 --- a/resource-manager/network/2022-09-01/usages/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package usages - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/vipswap/README.md b/resource-manager/network/2022-09-01/vipswap/README.md deleted file mode 100644 index ac396a0d08b..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/README.md +++ /dev/null @@ -1,69 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vipswap` Documentation - -The `vipswap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vipswap" -``` - - -### Client Initialization - -```go -client := vipswap.NewVipSwapClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VipSwapClient.Create` - -```go -ctx := context.TODO() -id := vipswap.NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue") - -payload := vipswap.SwapResource{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VipSwapClient.Get` - -```go -ctx := context.TODO() -id := vipswap.NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VipSwapClient.List` - -```go -ctx := context.TODO() -id := vipswap.NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/vipswap/client.go b/resource-manager/network/2022-09-01/vipswap/client.go deleted file mode 100644 index 1f634dd13c3..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vipswap - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VipSwapClient struct { - Client *resourcemanager.Client -} - -func NewVipSwapClientWithBaseURI(api environments.Api) (*VipSwapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vipswap", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VipSwapClient: %+v", err) - } - - return &VipSwapClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/vipswap/constants.go b/resource-manager/network/2022-09-01/vipswap/constants.go deleted file mode 100644 index c6cf7234532..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/constants.go +++ /dev/null @@ -1,51 +0,0 @@ -package vipswap - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SlotType string - -const ( - SlotTypeProduction SlotType = "Production" - SlotTypeStaging SlotType = "Staging" -) - -func PossibleValuesForSlotType() []string { - return []string{ - string(SlotTypeProduction), - string(SlotTypeStaging), - } -} - -func (s *SlotType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSlotType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSlotType(input string) (*SlotType, error) { - vals := map[string]SlotType{ - "production": SlotTypeProduction, - "staging": SlotTypeStaging, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SlotType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/vipswap/id_cloudservice.go b/resource-manager/network/2022-09-01/vipswap/id_cloudservice.go deleted file mode 100644 index 9544661fbc5..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/id_cloudservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package vipswap - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = CloudServiceId{} - -// CloudServiceId is a struct representing the Resource ID for a Cloud Service -type CloudServiceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string -} - -// NewCloudServiceID returns a new CloudServiceId struct -func NewCloudServiceID(subscriptionId string, resourceGroupName string, cloudServiceName string) CloudServiceId { - return CloudServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - } -} - -// ParseCloudServiceID parses 'input' into a CloudServiceId -func ParseCloudServiceID(input string) (*CloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(CloudServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ParseCloudServiceIDInsensitively parses 'input' case-insensitively into a CloudServiceId -// note: this method should only be used for API response data and not user input -func ParseCloudServiceIDInsensitively(input string) (*CloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(CloudServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ValidateCloudServiceID checks that 'input' can be parsed as a Cloud Service ID -func ValidateCloudServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseCloudServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cloud Service ID -func (id CloudServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cloud Service ID -func (id CloudServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.UserSpecifiedSegment("resourceGroupName", "resourceGroupValue"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - } -} - -// String returns a human-readable description of this Cloud Service ID -func (id CloudServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - } - return fmt.Sprintf("Cloud Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/vipswap/id_cloudservice_test.go b/resource-manager/network/2022-09-01/vipswap/id_cloudservice_test.go deleted file mode 100644 index 378cc82cf7d..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/id_cloudservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vipswap - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = CloudServiceId{} - -func TestNewCloudServiceID(t *testing.T) { - id := NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "resourceGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "resourceGroupValue") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } -} - -func TestFormatCloudServiceID(t *testing.T) { - actual := NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseCloudServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *CloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &CloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "resourceGroupValue", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseCloudServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestParseCloudServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *CloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &CloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "resourceGroupValue", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Expected: &CloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "rEsOuRcEgRoUpVaLuE", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseCloudServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestSegmentsForCloudServiceId(t *testing.T) { - segments := CloudServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("CloudServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/vipswap/method_create.go b/resource-manager/network/2022-09-01/vipswap/method_create.go deleted file mode 100644 index c7db22cb3af..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/method_create.go +++ /dev/null @@ -1,74 +0,0 @@ -package vipswap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Create ... -func (c VipSwapClient) Create(ctx context.Context, id CloudServiceId, input SwapResource) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/cloudServiceSlots/swap", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c VipSwapClient) CreateThenPoll(ctx context.Context, id CloudServiceId, input SwapResource) error { - result, err := c.Create(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/vipswap/method_get.go b/resource-manager/network/2022-09-01/vipswap/method_get.go deleted file mode 100644 index 539b4bf0171..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/method_get.go +++ /dev/null @@ -1,52 +0,0 @@ -package vipswap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SwapResource -} - -// Get ... -func (c VipSwapClient) Get(ctx context.Context, id CloudServiceId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/cloudServiceSlots/swap", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/vipswap/method_list.go b/resource-manager/network/2022-09-01/vipswap/method_list.go deleted file mode 100644 index 65fbb81b8e0..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/method_list.go +++ /dev/null @@ -1,52 +0,0 @@ -package vipswap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SwapResourceListResult -} - -// List ... -func (c VipSwapClient) List(ctx context.Context, id CloudServiceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/cloudServiceSlots", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/vipswap/model_swapresource.go b/resource-manager/network/2022-09-01/vipswap/model_swapresource.go deleted file mode 100644 index cd135639ade..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/model_swapresource.go +++ /dev/null @@ -1,11 +0,0 @@ -package vipswap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SwapResource struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SwapResourceProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vipswap/model_swapresourcelistresult.go b/resource-manager/network/2022-09-01/vipswap/model_swapresourcelistresult.go deleted file mode 100644 index d4cb9490d3a..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/model_swapresourcelistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package vipswap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SwapResourceListResult struct { - Value *[]SwapResource `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vipswap/model_swapresourceproperties.go b/resource-manager/network/2022-09-01/vipswap/model_swapresourceproperties.go deleted file mode 100644 index 8254763b326..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/model_swapresourceproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package vipswap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SwapResourceProperties struct { - SlotType *SlotType `json:"slotType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vipswap/version.go b/resource-manager/network/2022-09-01/vipswap/version.go deleted file mode 100644 index 4d488ea5a5c..00000000000 --- a/resource-manager/network/2022-09-01/vipswap/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vipswap - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vipswap/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/README.md b/resource-manager/network/2022-09-01/virtualappliancesites/README.md deleted file mode 100644 index 026cdc07254..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualappliancesites` Documentation - -The `virtualappliancesites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualappliancesites" -``` - - -### Client Initialization - -```go -client := virtualappliancesites.NewVirtualApplianceSitesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualApplianceSitesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualappliancesites.NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue") - -payload := virtualappliancesites.VirtualApplianceSite{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualApplianceSitesClient.Delete` - -```go -ctx := context.TODO() -id := virtualappliancesites.NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualApplianceSitesClient.Get` - -```go -ctx := context.TODO() -id := virtualappliancesites.NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualApplianceSitesClient.List` - -```go -ctx := context.TODO() -id := virtualappliancesites.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/client.go b/resource-manager/network/2022-09-01/virtualappliancesites/client.go deleted file mode 100644 index 32de5368a81..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualappliancesites - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSitesClient struct { - Client *resourcemanager.Client -} - -func NewVirtualApplianceSitesClientWithBaseURI(api environments.Api) (*VirtualApplianceSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualappliancesites", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualApplianceSitesClient: %+v", err) - } - - return &VirtualApplianceSitesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/constants.go b/resource-manager/network/2022-09-01/virtualappliancesites/constants.go deleted file mode 100644 index bd413f43290..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package virtualappliancesites - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/id_networkvirtualappliance.go b/resource-manager/network/2022-09-01/virtualappliancesites/id_networkvirtualappliance.go deleted file mode 100644 index 2ae3ddeb528..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/id_networkvirtualappliance.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualappliancesites - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -// NetworkVirtualApplianceId is a struct representing the Resource ID for a Network Virtual Appliance -type NetworkVirtualApplianceId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string -} - -// NewNetworkVirtualApplianceID returns a new NetworkVirtualApplianceId struct -func NewNetworkVirtualApplianceID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string) NetworkVirtualApplianceId { - return NetworkVirtualApplianceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - } -} - -// ParseNetworkVirtualApplianceID parses 'input' into a NetworkVirtualApplianceId -func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ParseNetworkVirtualApplianceIDInsensitively parses 'input' case-insensitively into a NetworkVirtualApplianceId -// note: this method should only be used for API response data and not user input -func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkVirtualApplianceID checks that 'input' can be parsed as a Network Virtual Appliance ID -func ValidateNetworkVirtualApplianceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkVirtualApplianceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - } -} - -// String returns a human-readable description of this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - } - return fmt.Sprintf("Network Virtual Appliance (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/id_networkvirtualappliance_test.go b/resource-manager/network/2022-09-01/virtualappliancesites/id_networkvirtualappliance_test.go deleted file mode 100644 index d5bd4698714..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/id_networkvirtualappliance_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualappliancesites - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -func TestNewNetworkVirtualApplianceID(t *testing.T) { - id := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } -} - -func TestFormatNetworkVirtualApplianceID(t *testing.T) { - actual := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkVirtualApplianceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestParseNetworkVirtualApplianceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestSegmentsForNetworkVirtualApplianceId(t *testing.T) { - segments := NetworkVirtualApplianceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkVirtualApplianceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/id_virtualappliancesite.go b/resource-manager/network/2022-09-01/virtualappliancesites/id_virtualappliancesite.go deleted file mode 100644 index 62bcc9817bf..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/id_virtualappliancesite.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualappliancesites - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualApplianceSiteId{} - -// VirtualApplianceSiteId is a struct representing the Resource ID for a Virtual Appliance Site -type VirtualApplianceSiteId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string - VirtualApplianceSiteName string -} - -// NewVirtualApplianceSiteID returns a new VirtualApplianceSiteId struct -func NewVirtualApplianceSiteID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string, virtualApplianceSiteName string) VirtualApplianceSiteId { - return VirtualApplianceSiteId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - VirtualApplianceSiteName: virtualApplianceSiteName, - } -} - -// ParseVirtualApplianceSiteID parses 'input' into a VirtualApplianceSiteId -func ParseVirtualApplianceSiteID(input string) (*VirtualApplianceSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualApplianceSiteId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualApplianceSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.VirtualApplianceSiteName, ok = parsed.Parsed["virtualApplianceSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualApplianceSiteName", *parsed) - } - - return &id, nil -} - -// ParseVirtualApplianceSiteIDInsensitively parses 'input' case-insensitively into a VirtualApplianceSiteId -// note: this method should only be used for API response data and not user input -func ParseVirtualApplianceSiteIDInsensitively(input string) (*VirtualApplianceSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualApplianceSiteId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualApplianceSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.VirtualApplianceSiteName, ok = parsed.Parsed["virtualApplianceSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualApplianceSiteName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualApplianceSiteID checks that 'input' can be parsed as a Virtual Appliance Site ID -func ValidateVirtualApplianceSiteID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualApplianceSiteID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Appliance Site ID -func (id VirtualApplianceSiteId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s/virtualApplianceSites/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName, id.VirtualApplianceSiteName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Appliance Site ID -func (id VirtualApplianceSiteId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - resourceids.StaticSegment("staticVirtualApplianceSites", "virtualApplianceSites", "virtualApplianceSites"), - resourceids.UserSpecifiedSegment("virtualApplianceSiteName", "virtualApplianceSiteValue"), - } -} - -// String returns a human-readable description of this Virtual Appliance Site ID -func (id VirtualApplianceSiteId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - fmt.Sprintf("Virtual Appliance Site Name: %q", id.VirtualApplianceSiteName), - } - return fmt.Sprintf("Virtual Appliance Site (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/id_virtualappliancesite_test.go b/resource-manager/network/2022-09-01/virtualappliancesites/id_virtualappliancesite_test.go deleted file mode 100644 index e02782570f5..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/id_virtualappliancesite_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualappliancesites - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualApplianceSiteId{} - -func TestNewVirtualApplianceSiteID(t *testing.T) { - id := NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } - - if id.VirtualApplianceSiteName != "virtualApplianceSiteValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualApplianceSiteName'", id.VirtualApplianceSiteName, "virtualApplianceSiteValue") - } -} - -func TestFormatVirtualApplianceSiteID(t *testing.T) { - actual := NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualApplianceSiteID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualApplianceSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue", - Expected: &VirtualApplianceSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - VirtualApplianceSiteName: "virtualApplianceSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualApplianceSiteID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.VirtualApplianceSiteName != v.Expected.VirtualApplianceSiteName { - t.Fatalf("Expected %q but got %q for VirtualApplianceSiteName", v.Expected.VirtualApplianceSiteName, actual.VirtualApplianceSiteName) - } - - } -} - -func TestParseVirtualApplianceSiteIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualApplianceSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/vIrTuAlApPlIaNcEsItEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue", - Expected: &VirtualApplianceSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - VirtualApplianceSiteName: "virtualApplianceSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/vIrTuAlApPlIaNcEsItEs/vIrTuAlApPlIaNcEsItEvAlUe", - Expected: &VirtualApplianceSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - VirtualApplianceSiteName: "vIrTuAlApPlIaNcEsItEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/vIrTuAlApPlIaNcEsItEs/vIrTuAlApPlIaNcEsItEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualApplianceSiteIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.VirtualApplianceSiteName != v.Expected.VirtualApplianceSiteName { - t.Fatalf("Expected %q but got %q for VirtualApplianceSiteName", v.Expected.VirtualApplianceSiteName, actual.VirtualApplianceSiteName) - } - - } -} - -func TestSegmentsForVirtualApplianceSiteId(t *testing.T) { - segments := VirtualApplianceSiteId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualApplianceSiteId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/method_createorupdate.go b/resource-manager/network/2022-09-01/virtualappliancesites/method_createorupdate.go deleted file mode 100644 index 151a0833e1f..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualappliancesites - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualApplianceSitesClient) CreateOrUpdate(ctx context.Context, id VirtualApplianceSiteId, input VirtualApplianceSite) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualApplianceSitesClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualApplianceSiteId, input VirtualApplianceSite) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/method_delete.go b/resource-manager/network/2022-09-01/virtualappliancesites/method_delete.go deleted file mode 100644 index 50e7f186f39..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualappliancesites - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualApplianceSitesClient) Delete(ctx context.Context, id VirtualApplianceSiteId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualApplianceSitesClient) DeleteThenPoll(ctx context.Context, id VirtualApplianceSiteId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/method_get.go b/resource-manager/network/2022-09-01/virtualappliancesites/method_get.go deleted file mode 100644 index c20537dd870..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualappliancesites - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualApplianceSite -} - -// Get ... -func (c VirtualApplianceSitesClient) Get(ctx context.Context, id VirtualApplianceSiteId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/method_list.go b/resource-manager/network/2022-09-01/virtualappliancesites/method_list.go deleted file mode 100644 index ef7c699926f..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualappliancesites - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualApplianceSite -} - -type ListCompleteResult struct { - Items []VirtualApplianceSite -} - -// List ... -func (c VirtualApplianceSitesClient) List(ctx context.Context, id NetworkVirtualApplianceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/virtualApplianceSites", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualApplianceSite `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualApplianceSitesClient) ListComplete(ctx context.Context, id NetworkVirtualApplianceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualApplianceSiteOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualApplianceSitesClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkVirtualApplianceId, predicate VirtualApplianceSiteOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualApplianceSite, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/model_breakoutcategorypolicies.go b/resource-manager/network/2022-09-01/virtualappliancesites/model_breakoutcategorypolicies.go deleted file mode 100644 index 6a2b15ecb1d..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/model_breakoutcategorypolicies.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BreakOutCategoryPolicies struct { - Allow *bool `json:"allow,omitempty"` - Default *bool `json:"default,omitempty"` - Optimize *bool `json:"optimize,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/model_office365policyproperties.go b/resource-manager/network/2022-09-01/virtualappliancesites/model_office365policyproperties.go deleted file mode 100644 index b891141a5ba..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/model_office365policyproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Office365PolicyProperties struct { - BreakOutCategories *BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/model_virtualappliancesite.go b/resource-manager/network/2022-09-01/virtualappliancesites/model_virtualappliancesite.go deleted file mode 100644 index 1b84d25c56d..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/model_virtualappliancesite.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSite struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualApplianceSiteProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/model_virtualappliancesiteproperties.go b/resource-manager/network/2022-09-01/virtualappliancesites/model_virtualappliancesiteproperties.go deleted file mode 100644 index 5d01b6ab8f8..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/model_virtualappliancesiteproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSiteProperties struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - O365Policy *Office365PolicyProperties `json:"o365Policy,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/predicates.go b/resource-manager/network/2022-09-01/virtualappliancesites/predicates.go deleted file mode 100644 index af31f940d24..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSiteOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VirtualApplianceSiteOperationPredicate) Matches(input VirtualApplianceSite) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualappliancesites/version.go b/resource-manager/network/2022-09-01/virtualappliancesites/version.go deleted file mode 100644 index 1aec4e78d4a..00000000000 --- a/resource-manager/network/2022-09-01/virtualappliancesites/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualappliancesites - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualappliancesites/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/README.md b/resource-manager/network/2022-09-01/virtualapplianceskus/README.md deleted file mode 100644 index 2810c7248cf..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualapplianceskus` Documentation - -The `virtualapplianceskus` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualapplianceskus" -``` - - -### Client Initialization - -```go -client := virtualapplianceskus.NewVirtualApplianceSkusClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualApplianceSkusClient.Get` - -```go -ctx := context.TODO() -id := virtualapplianceskus.NewNetworkVirtualApplianceSkuID("12345678-1234-9876-4563-123456789012", "networkVirtualApplianceSkuValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualApplianceSkusClient.List` - -```go -ctx := context.TODO() -id := virtualapplianceskus.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/client.go b/resource-manager/network/2022-09-01/virtualapplianceskus/client.go deleted file mode 100644 index 63ec1eff1ea..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualapplianceskus - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSkusClient struct { - Client *resourcemanager.Client -} - -func NewVirtualApplianceSkusClientWithBaseURI(api environments.Api) (*VirtualApplianceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualapplianceskus", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualApplianceSkusClient: %+v", err) - } - - return &VirtualApplianceSkusClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/id_networkvirtualappliancesku.go b/resource-manager/network/2022-09-01/virtualapplianceskus/id_networkvirtualappliancesku.go deleted file mode 100644 index 7558f22904e..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/id_networkvirtualappliancesku.go +++ /dev/null @@ -1,114 +0,0 @@ -package virtualapplianceskus - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceSkuId{} - -// NetworkVirtualApplianceSkuId is a struct representing the Resource ID for a Network Virtual Appliance Sku -type NetworkVirtualApplianceSkuId struct { - SubscriptionId string - NetworkVirtualApplianceSkuName string -} - -// NewNetworkVirtualApplianceSkuID returns a new NetworkVirtualApplianceSkuId struct -func NewNetworkVirtualApplianceSkuID(subscriptionId string, networkVirtualApplianceSkuName string) NetworkVirtualApplianceSkuId { - return NetworkVirtualApplianceSkuId{ - SubscriptionId: subscriptionId, - NetworkVirtualApplianceSkuName: networkVirtualApplianceSkuName, - } -} - -// ParseNetworkVirtualApplianceSkuID parses 'input' into a NetworkVirtualApplianceSkuId -func ParseNetworkVirtualApplianceSkuID(input string) (*NetworkVirtualApplianceSkuId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceSkuId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceSkuId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkVirtualApplianceSkuName, ok = parsed.Parsed["networkVirtualApplianceSkuName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceSkuName", *parsed) - } - - return &id, nil -} - -// ParseNetworkVirtualApplianceSkuIDInsensitively parses 'input' case-insensitively into a NetworkVirtualApplianceSkuId -// note: this method should only be used for API response data and not user input -func ParseNetworkVirtualApplianceSkuIDInsensitively(input string) (*NetworkVirtualApplianceSkuId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceSkuId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceSkuId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkVirtualApplianceSkuName, ok = parsed.Parsed["networkVirtualApplianceSkuName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceSkuName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkVirtualApplianceSkuID checks that 'input' can be parsed as a Network Virtual Appliance Sku ID -func ValidateNetworkVirtualApplianceSkuID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkVirtualApplianceSkuID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Virtual Appliance Sku ID -func (id NetworkVirtualApplianceSkuId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/networkVirtualApplianceSkus/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.NetworkVirtualApplianceSkuName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Virtual Appliance Sku ID -func (id NetworkVirtualApplianceSkuId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualApplianceSkus", "networkVirtualApplianceSkus", "networkVirtualApplianceSkus"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceSkuName", "networkVirtualApplianceSkuValue"), - } -} - -// String returns a human-readable description of this Network Virtual Appliance Sku ID -func (id NetworkVirtualApplianceSkuId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Network Virtual Appliance Sku Name: %q", id.NetworkVirtualApplianceSkuName), - } - return fmt.Sprintf("Network Virtual Appliance Sku (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/id_networkvirtualappliancesku_test.go b/resource-manager/network/2022-09-01/virtualapplianceskus/id_networkvirtualappliancesku_test.go deleted file mode 100644 index 78093111504..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/id_networkvirtualappliancesku_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package virtualapplianceskus - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceSkuId{} - -func TestNewNetworkVirtualApplianceSkuID(t *testing.T) { - id := NewNetworkVirtualApplianceSkuID("12345678-1234-9876-4563-123456789012", "networkVirtualApplianceSkuValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.NetworkVirtualApplianceSkuName != "networkVirtualApplianceSkuValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceSkuName'", id.NetworkVirtualApplianceSkuName, "networkVirtualApplianceSkuValue") - } -} - -func TestFormatNetworkVirtualApplianceSkuID(t *testing.T) { - actual := NewNetworkVirtualApplianceSkuID("12345678-1234-9876-4563-123456789012", "networkVirtualApplianceSkuValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkVirtualApplianceSkuID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceSkuId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue", - Expected: &NetworkVirtualApplianceSkuId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkVirtualApplianceSkuName: "networkVirtualApplianceSkuValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceSkuID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.NetworkVirtualApplianceSkuName != v.Expected.NetworkVirtualApplianceSkuName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceSkuName", v.Expected.NetworkVirtualApplianceSkuName, actual.NetworkVirtualApplianceSkuName) - } - - } -} - -func TestParseNetworkVirtualApplianceSkuIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceSkuId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeSkUs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue", - Expected: &NetworkVirtualApplianceSkuId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkVirtualApplianceSkuName: "networkVirtualApplianceSkuValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeSkUs/nEtWoRkViRtUaLaPpLiAnCeSkUvAlUe", - Expected: &NetworkVirtualApplianceSkuId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkVirtualApplianceSkuName: "nEtWoRkViRtUaLaPpLiAnCeSkUvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeSkUs/nEtWoRkViRtUaLaPpLiAnCeSkUvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceSkuIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.NetworkVirtualApplianceSkuName != v.Expected.NetworkVirtualApplianceSkuName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceSkuName", v.Expected.NetworkVirtualApplianceSkuName, actual.NetworkVirtualApplianceSkuName) - } - - } -} - -func TestSegmentsForNetworkVirtualApplianceSkuId(t *testing.T) { - segments := NetworkVirtualApplianceSkuId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkVirtualApplianceSkuId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/method_get.go b/resource-manager/network/2022-09-01/virtualapplianceskus/method_get.go deleted file mode 100644 index 8c4c8cc7e35..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualapplianceskus - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkVirtualApplianceSku -} - -// Get ... -func (c VirtualApplianceSkusClient) Get(ctx context.Context, id NetworkVirtualApplianceSkuId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/method_list.go b/resource-manager/network/2022-09-01/virtualapplianceskus/method_list.go deleted file mode 100644 index d1a8acbd5e2..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualapplianceskus - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkVirtualApplianceSku -} - -type ListCompleteResult struct { - Items []NetworkVirtualApplianceSku -} - -// List ... -func (c VirtualApplianceSkusClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkVirtualApplianceSkus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkVirtualApplianceSku `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualApplianceSkusClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkVirtualApplianceSkuOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualApplianceSkusClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkVirtualApplianceSkuOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkVirtualApplianceSku, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualappliancesku.go b/resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualappliancesku.go deleted file mode 100644 index 93719c4daa2..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualappliancesku.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualapplianceskus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceSku struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkVirtualApplianceSkuPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualapplianceskuinstances.go b/resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualapplianceskuinstances.go deleted file mode 100644 index 99b52442ed2..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualapplianceskuinstances.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualapplianceskus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceSkuInstances struct { - InstanceCount *int64 `json:"instanceCount,omitempty"` - ScaleUnit *string `json:"scaleUnit,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualapplianceskupropertiesformat.go b/resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualapplianceskupropertiesformat.go deleted file mode 100644 index 5df8c3c3b00..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/model_networkvirtualapplianceskupropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualapplianceskus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceSkuPropertiesFormat struct { - AvailableScaleUnits *[]NetworkVirtualApplianceSkuInstances `json:"availableScaleUnits,omitempty"` - AvailableVersions *[]string `json:"availableVersions,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/predicates.go b/resource-manager/network/2022-09-01/virtualapplianceskus/predicates.go deleted file mode 100644 index 758bba40370..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package virtualapplianceskus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceSkuOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkVirtualApplianceSkuOperationPredicate) Matches(input NetworkVirtualApplianceSku) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualapplianceskus/version.go b/resource-manager/network/2022-09-01/virtualapplianceskus/version.go deleted file mode 100644 index 06695212e9c..00000000000 --- a/resource-manager/network/2022-09-01/virtualapplianceskus/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualapplianceskus - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualapplianceskus/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/README.md b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/README.md deleted file mode 100644 index 7c158bf6577..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/README.md +++ /dev/null @@ -1,207 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections` Documentation - -The `virtualnetworkgatewayconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections" -``` - - -### Client Initialization - -```go -client := virtualnetworkgatewayconnections.NewVirtualNetworkGatewayConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.VirtualNetworkGatewayConnection{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.GetIkeSas` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -if err := client.GetIkeSasThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.GetSharedKey` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -read, err := client.GetSharedKey(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.List` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.ResetConnection` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -if err := client.ResetConnectionThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.ResetSharedKey` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.ConnectionResetSharedKey{ - // ... -} - - -if err := client.ResetSharedKeyThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.SetSharedKey` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.ConnectionSharedKey{ - // ... -} - - -if err := client.SetSharedKeyThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.StartPacketCapture` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.VpnPacketCaptureStartParameters{ - // ... -} - - -if err := client.StartPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.StopPacketCapture` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.VpnPacketCaptureStopParameters{ - // ... -} - - -if err := client.StopPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/client.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/client.go deleted file mode 100644 index a2b5610883b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(api environments.Api) (*VirtualNetworkGatewayConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworkgatewayconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkGatewayConnectionsClient: %+v", err) - } - - return &VirtualNetworkGatewayConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/constants.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/constants.go deleted file mode 100644 index 4223454aad8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/constants.go +++ /dev/null @@ -1,1137 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionMode string - -const ( - VirtualNetworkGatewayConnectionModeDefault VirtualNetworkGatewayConnectionMode = "Default" - VirtualNetworkGatewayConnectionModeInitiatorOnly VirtualNetworkGatewayConnectionMode = "InitiatorOnly" - VirtualNetworkGatewayConnectionModeResponderOnly VirtualNetworkGatewayConnectionMode = "ResponderOnly" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionMode() []string { - return []string{ - string(VirtualNetworkGatewayConnectionModeDefault), - string(VirtualNetworkGatewayConnectionModeInitiatorOnly), - string(VirtualNetworkGatewayConnectionModeResponderOnly), - } -} - -func (s *VirtualNetworkGatewayConnectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionMode(input string) (*VirtualNetworkGatewayConnectionMode, error) { - vals := map[string]VirtualNetworkGatewayConnectionMode{ - "default": VirtualNetworkGatewayConnectionModeDefault, - "initiatoronly": VirtualNetworkGatewayConnectionModeInitiatorOnly, - "responderonly": VirtualNetworkGatewayConnectionModeResponderOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionMode(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionProtocol string - -const ( - VirtualNetworkGatewayConnectionProtocolIKEvOne VirtualNetworkGatewayConnectionProtocol = "IKEv1" - VirtualNetworkGatewayConnectionProtocolIKEvTwo VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionProtocol() []string { - return []string{ - string(VirtualNetworkGatewayConnectionProtocolIKEvOne), - string(VirtualNetworkGatewayConnectionProtocolIKEvTwo), - } -} - -func (s *VirtualNetworkGatewayConnectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionProtocol(input string) (*VirtualNetworkGatewayConnectionProtocol, error) { - vals := map[string]VirtualNetworkGatewayConnectionProtocol{ - "ikev1": VirtualNetworkGatewayConnectionProtocolIKEvOne, - "ikev2": VirtualNetworkGatewayConnectionProtocolIKEvTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionProtocol(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionStatus string - -const ( - VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" - VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" - VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" - VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionStatus() []string { - return []string{ - string(VirtualNetworkGatewayConnectionStatusConnected), - string(VirtualNetworkGatewayConnectionStatusConnecting), - string(VirtualNetworkGatewayConnectionStatusNotConnected), - string(VirtualNetworkGatewayConnectionStatusUnknown), - } -} - -func (s *VirtualNetworkGatewayConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionStatus(input string) (*VirtualNetworkGatewayConnectionStatus, error) { - vals := map[string]VirtualNetworkGatewayConnectionStatus{ - "connected": VirtualNetworkGatewayConnectionStatusConnected, - "connecting": VirtualNetworkGatewayConnectionStatusConnecting, - "notconnected": VirtualNetworkGatewayConnectionStatusNotConnected, - "unknown": VirtualNetworkGatewayConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionStatus(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionType string - -const ( - VirtualNetworkGatewayConnectionTypeExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" - VirtualNetworkGatewayConnectionTypeIPsec VirtualNetworkGatewayConnectionType = "IPsec" - VirtualNetworkGatewayConnectionTypeVPNClient VirtualNetworkGatewayConnectionType = "VPNClient" - VirtualNetworkGatewayConnectionTypeVnetTwoVnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionType() []string { - return []string{ - string(VirtualNetworkGatewayConnectionTypeExpressRoute), - string(VirtualNetworkGatewayConnectionTypeIPsec), - string(VirtualNetworkGatewayConnectionTypeVPNClient), - string(VirtualNetworkGatewayConnectionTypeVnetTwoVnet), - } -} - -func (s *VirtualNetworkGatewayConnectionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionType(input string) (*VirtualNetworkGatewayConnectionType, error) { - vals := map[string]VirtualNetworkGatewayConnectionType{ - "expressroute": VirtualNetworkGatewayConnectionTypeExpressRoute, - "ipsec": VirtualNetworkGatewayConnectionTypeIPsec, - "vpnclient": VirtualNetworkGatewayConnectionTypeVPNClient, - "vnet2vnet": VirtualNetworkGatewayConnectionTypeVnetTwoVnet, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionType(input) - return &out, nil -} - -type VirtualNetworkGatewaySkuName string - -const ( - VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" - VirtualNetworkGatewaySkuNameErGwOneAZ VirtualNetworkGatewaySkuName = "ErGw1AZ" - VirtualNetworkGatewaySkuNameErGwThreeAZ VirtualNetworkGatewaySkuName = "ErGw3AZ" - VirtualNetworkGatewaySkuNameErGwTwoAZ VirtualNetworkGatewaySkuName = "ErGw2AZ" - VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" - VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" - VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" - VirtualNetworkGatewaySkuNameVpnGwFive VirtualNetworkGatewaySkuName = "VpnGw5" - VirtualNetworkGatewaySkuNameVpnGwFiveAZ VirtualNetworkGatewaySkuName = "VpnGw5AZ" - VirtualNetworkGatewaySkuNameVpnGwFour VirtualNetworkGatewaySkuName = "VpnGw4" - VirtualNetworkGatewaySkuNameVpnGwFourAZ VirtualNetworkGatewaySkuName = "VpnGw4AZ" - VirtualNetworkGatewaySkuNameVpnGwOne VirtualNetworkGatewaySkuName = "VpnGw1" - VirtualNetworkGatewaySkuNameVpnGwOneAZ VirtualNetworkGatewaySkuName = "VpnGw1AZ" - VirtualNetworkGatewaySkuNameVpnGwThree VirtualNetworkGatewaySkuName = "VpnGw3" - VirtualNetworkGatewaySkuNameVpnGwThreeAZ VirtualNetworkGatewaySkuName = "VpnGw3AZ" - VirtualNetworkGatewaySkuNameVpnGwTwo VirtualNetworkGatewaySkuName = "VpnGw2" - VirtualNetworkGatewaySkuNameVpnGwTwoAZ VirtualNetworkGatewaySkuName = "VpnGw2AZ" -) - -func PossibleValuesForVirtualNetworkGatewaySkuName() []string { - return []string{ - string(VirtualNetworkGatewaySkuNameBasic), - string(VirtualNetworkGatewaySkuNameErGwOneAZ), - string(VirtualNetworkGatewaySkuNameErGwThreeAZ), - string(VirtualNetworkGatewaySkuNameErGwTwoAZ), - string(VirtualNetworkGatewaySkuNameHighPerformance), - string(VirtualNetworkGatewaySkuNameStandard), - string(VirtualNetworkGatewaySkuNameUltraPerformance), - string(VirtualNetworkGatewaySkuNameVpnGwFive), - string(VirtualNetworkGatewaySkuNameVpnGwFiveAZ), - string(VirtualNetworkGatewaySkuNameVpnGwFour), - string(VirtualNetworkGatewaySkuNameVpnGwFourAZ), - string(VirtualNetworkGatewaySkuNameVpnGwOne), - string(VirtualNetworkGatewaySkuNameVpnGwOneAZ), - string(VirtualNetworkGatewaySkuNameVpnGwThree), - string(VirtualNetworkGatewaySkuNameVpnGwThreeAZ), - string(VirtualNetworkGatewaySkuNameVpnGwTwo), - string(VirtualNetworkGatewaySkuNameVpnGwTwoAZ), - } -} - -func (s *VirtualNetworkGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewaySkuName(input string) (*VirtualNetworkGatewaySkuName, error) { - vals := map[string]VirtualNetworkGatewaySkuName{ - "basic": VirtualNetworkGatewaySkuNameBasic, - "ergw1az": VirtualNetworkGatewaySkuNameErGwOneAZ, - "ergw3az": VirtualNetworkGatewaySkuNameErGwThreeAZ, - "ergw2az": VirtualNetworkGatewaySkuNameErGwTwoAZ, - "highperformance": VirtualNetworkGatewaySkuNameHighPerformance, - "standard": VirtualNetworkGatewaySkuNameStandard, - "ultraperformance": VirtualNetworkGatewaySkuNameUltraPerformance, - "vpngw5": VirtualNetworkGatewaySkuNameVpnGwFive, - "vpngw5az": VirtualNetworkGatewaySkuNameVpnGwFiveAZ, - "vpngw4": VirtualNetworkGatewaySkuNameVpnGwFour, - "vpngw4az": VirtualNetworkGatewaySkuNameVpnGwFourAZ, - "vpngw1": VirtualNetworkGatewaySkuNameVpnGwOne, - "vpngw1az": VirtualNetworkGatewaySkuNameVpnGwOneAZ, - "vpngw3": VirtualNetworkGatewaySkuNameVpnGwThree, - "vpngw3az": VirtualNetworkGatewaySkuNameVpnGwThreeAZ, - "vpngw2": VirtualNetworkGatewaySkuNameVpnGwTwo, - "vpngw2az": VirtualNetworkGatewaySkuNameVpnGwTwoAZ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewaySkuName(input) - return &out, nil -} - -type VirtualNetworkGatewaySkuTier string - -const ( - VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" - VirtualNetworkGatewaySkuTierErGwOneAZ VirtualNetworkGatewaySkuTier = "ErGw1AZ" - VirtualNetworkGatewaySkuTierErGwThreeAZ VirtualNetworkGatewaySkuTier = "ErGw3AZ" - VirtualNetworkGatewaySkuTierErGwTwoAZ VirtualNetworkGatewaySkuTier = "ErGw2AZ" - VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" - VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" - VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" - VirtualNetworkGatewaySkuTierVpnGwFive VirtualNetworkGatewaySkuTier = "VpnGw5" - VirtualNetworkGatewaySkuTierVpnGwFiveAZ VirtualNetworkGatewaySkuTier = "VpnGw5AZ" - VirtualNetworkGatewaySkuTierVpnGwFour VirtualNetworkGatewaySkuTier = "VpnGw4" - VirtualNetworkGatewaySkuTierVpnGwFourAZ VirtualNetworkGatewaySkuTier = "VpnGw4AZ" - VirtualNetworkGatewaySkuTierVpnGwOne VirtualNetworkGatewaySkuTier = "VpnGw1" - VirtualNetworkGatewaySkuTierVpnGwOneAZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ" - VirtualNetworkGatewaySkuTierVpnGwThree VirtualNetworkGatewaySkuTier = "VpnGw3" - VirtualNetworkGatewaySkuTierVpnGwThreeAZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ" - VirtualNetworkGatewaySkuTierVpnGwTwo VirtualNetworkGatewaySkuTier = "VpnGw2" - VirtualNetworkGatewaySkuTierVpnGwTwoAZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ" -) - -func PossibleValuesForVirtualNetworkGatewaySkuTier() []string { - return []string{ - string(VirtualNetworkGatewaySkuTierBasic), - string(VirtualNetworkGatewaySkuTierErGwOneAZ), - string(VirtualNetworkGatewaySkuTierErGwThreeAZ), - string(VirtualNetworkGatewaySkuTierErGwTwoAZ), - string(VirtualNetworkGatewaySkuTierHighPerformance), - string(VirtualNetworkGatewaySkuTierStandard), - string(VirtualNetworkGatewaySkuTierUltraPerformance), - string(VirtualNetworkGatewaySkuTierVpnGwFive), - string(VirtualNetworkGatewaySkuTierVpnGwFiveAZ), - string(VirtualNetworkGatewaySkuTierVpnGwFour), - string(VirtualNetworkGatewaySkuTierVpnGwFourAZ), - string(VirtualNetworkGatewaySkuTierVpnGwOne), - string(VirtualNetworkGatewaySkuTierVpnGwOneAZ), - string(VirtualNetworkGatewaySkuTierVpnGwThree), - string(VirtualNetworkGatewaySkuTierVpnGwThreeAZ), - string(VirtualNetworkGatewaySkuTierVpnGwTwo), - string(VirtualNetworkGatewaySkuTierVpnGwTwoAZ), - } -} - -func (s *VirtualNetworkGatewaySkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewaySkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewaySkuTier(input string) (*VirtualNetworkGatewaySkuTier, error) { - vals := map[string]VirtualNetworkGatewaySkuTier{ - "basic": VirtualNetworkGatewaySkuTierBasic, - "ergw1az": VirtualNetworkGatewaySkuTierErGwOneAZ, - "ergw3az": VirtualNetworkGatewaySkuTierErGwThreeAZ, - "ergw2az": VirtualNetworkGatewaySkuTierErGwTwoAZ, - "highperformance": VirtualNetworkGatewaySkuTierHighPerformance, - "standard": VirtualNetworkGatewaySkuTierStandard, - "ultraperformance": VirtualNetworkGatewaySkuTierUltraPerformance, - "vpngw5": VirtualNetworkGatewaySkuTierVpnGwFive, - "vpngw5az": VirtualNetworkGatewaySkuTierVpnGwFiveAZ, - "vpngw4": VirtualNetworkGatewaySkuTierVpnGwFour, - "vpngw4az": VirtualNetworkGatewaySkuTierVpnGwFourAZ, - "vpngw1": VirtualNetworkGatewaySkuTierVpnGwOne, - "vpngw1az": VirtualNetworkGatewaySkuTierVpnGwOneAZ, - "vpngw3": VirtualNetworkGatewaySkuTierVpnGwThree, - "vpngw3az": VirtualNetworkGatewaySkuTierVpnGwThreeAZ, - "vpngw2": VirtualNetworkGatewaySkuTierVpnGwTwo, - "vpngw2az": VirtualNetworkGatewaySkuTierVpnGwTwoAZ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewaySkuTier(input) - return &out, nil -} - -type VirtualNetworkGatewayType string - -const ( - VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" - VirtualNetworkGatewayTypeLocalGateway VirtualNetworkGatewayType = "LocalGateway" - VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" -) - -func PossibleValuesForVirtualNetworkGatewayType() []string { - return []string{ - string(VirtualNetworkGatewayTypeExpressRoute), - string(VirtualNetworkGatewayTypeLocalGateway), - string(VirtualNetworkGatewayTypeVpn), - } -} - -func (s *VirtualNetworkGatewayType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayType(input string) (*VirtualNetworkGatewayType, error) { - vals := map[string]VirtualNetworkGatewayType{ - "expressroute": VirtualNetworkGatewayTypeExpressRoute, - "localgateway": VirtualNetworkGatewayTypeLocalGateway, - "vpn": VirtualNetworkGatewayTypeVpn, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayType(input) - return &out, nil -} - -type VpnAuthenticationType string - -const ( - VpnAuthenticationTypeAAD VpnAuthenticationType = "AAD" - VpnAuthenticationTypeCertificate VpnAuthenticationType = "Certificate" - VpnAuthenticationTypeRadius VpnAuthenticationType = "Radius" -) - -func PossibleValuesForVpnAuthenticationType() []string { - return []string{ - string(VpnAuthenticationTypeAAD), - string(VpnAuthenticationTypeCertificate), - string(VpnAuthenticationTypeRadius), - } -} - -func (s *VpnAuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnAuthenticationType(input string) (*VpnAuthenticationType, error) { - vals := map[string]VpnAuthenticationType{ - "aad": VpnAuthenticationTypeAAD, - "certificate": VpnAuthenticationTypeCertificate, - "radius": VpnAuthenticationTypeRadius, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnAuthenticationType(input) - return &out, nil -} - -type VpnClientProtocol string - -const ( - VpnClientProtocolIkeVTwo VpnClientProtocol = "IkeV2" - VpnClientProtocolOpenVPN VpnClientProtocol = "OpenVPN" - VpnClientProtocolSSTP VpnClientProtocol = "SSTP" -) - -func PossibleValuesForVpnClientProtocol() []string { - return []string{ - string(VpnClientProtocolIkeVTwo), - string(VpnClientProtocolOpenVPN), - string(VpnClientProtocolSSTP), - } -} - -func (s *VpnClientProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnClientProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnClientProtocol(input string) (*VpnClientProtocol, error) { - vals := map[string]VpnClientProtocol{ - "ikev2": VpnClientProtocolIkeVTwo, - "openvpn": VpnClientProtocolOpenVPN, - "sstp": VpnClientProtocolSSTP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnClientProtocol(input) - return &out, nil -} - -type VpnGatewayGeneration string - -const ( - VpnGatewayGenerationGenerationOne VpnGatewayGeneration = "Generation1" - VpnGatewayGenerationGenerationTwo VpnGatewayGeneration = "Generation2" - VpnGatewayGenerationNone VpnGatewayGeneration = "None" -) - -func PossibleValuesForVpnGatewayGeneration() []string { - return []string{ - string(VpnGatewayGenerationGenerationOne), - string(VpnGatewayGenerationGenerationTwo), - string(VpnGatewayGenerationNone), - } -} - -func (s *VpnGatewayGeneration) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnGatewayGeneration(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnGatewayGeneration(input string) (*VpnGatewayGeneration, error) { - vals := map[string]VpnGatewayGeneration{ - "generation1": VpnGatewayGenerationGenerationOne, - "generation2": VpnGatewayGenerationGenerationTwo, - "none": VpnGatewayGenerationNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnGatewayGeneration(input) - return &out, nil -} - -type VpnNatRuleMode string - -const ( - VpnNatRuleModeEgressSnat VpnNatRuleMode = "EgressSnat" - VpnNatRuleModeIngressSnat VpnNatRuleMode = "IngressSnat" -) - -func PossibleValuesForVpnNatRuleMode() []string { - return []string{ - string(VpnNatRuleModeEgressSnat), - string(VpnNatRuleModeIngressSnat), - } -} - -func (s *VpnNatRuleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleMode(input string) (*VpnNatRuleMode, error) { - vals := map[string]VpnNatRuleMode{ - "egresssnat": VpnNatRuleModeEgressSnat, - "ingresssnat": VpnNatRuleModeIngressSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleMode(input) - return &out, nil -} - -type VpnNatRuleType string - -const ( - VpnNatRuleTypeDynamic VpnNatRuleType = "Dynamic" - VpnNatRuleTypeStatic VpnNatRuleType = "Static" -) - -func PossibleValuesForVpnNatRuleType() []string { - return []string{ - string(VpnNatRuleTypeDynamic), - string(VpnNatRuleTypeStatic), - } -} - -func (s *VpnNatRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleType(input string) (*VpnNatRuleType, error) { - vals := map[string]VpnNatRuleType{ - "dynamic": VpnNatRuleTypeDynamic, - "static": VpnNatRuleTypeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleType(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} - -type VpnType string - -const ( - VpnTypePolicyBased VpnType = "PolicyBased" - VpnTypeRouteBased VpnType = "RouteBased" -) - -func PossibleValuesForVpnType() []string { - return []string{ - string(VpnTypePolicyBased), - string(VpnTypeRouteBased), - } -} - -func (s *VpnType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnType(input string) (*VpnType, error) { - vals := map[string]VpnType{ - "policybased": VpnTypePolicyBased, - "routebased": VpnTypeRouteBased, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/id_connection.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/id_connection.go deleted file mode 100644 index 20cd2e94077..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/id_connection.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionId{} - -// ConnectionId is a struct representing the Resource ID for a Connection -type ConnectionId struct { - SubscriptionId string - ResourceGroupName string - ConnectionName string -} - -// NewConnectionID returns a new ConnectionId struct -func NewConnectionID(subscriptionId string, resourceGroupName string, connectionName string) ConnectionId { - return ConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ConnectionName: connectionName, - } -} - -// ParseConnectionID parses 'input' into a ConnectionId -func ParseConnectionID(input string) (*ConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ParseConnectionIDInsensitively parses 'input' case-insensitively into a ConnectionId -// note: this method should only be used for API response data and not user input -func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ValidateConnectionID checks that 'input' can be parsed as a Connection ID -func ValidateConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Connection ID -func (id ConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/connections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Connection ID -func (id ConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticConnections", "connections", "connections"), - resourceids.UserSpecifiedSegment("connectionName", "connectionValue"), - } -} - -// String returns a human-readable description of this Connection ID -func (id ConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Connection Name: %q", id.ConnectionName), - } - return fmt.Sprintf("Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/id_connection_test.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/id_connection_test.go deleted file mode 100644 index 0807de5b933..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/id_connection_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionId{} - -func TestNewConnectionID(t *testing.T) { - id := NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ConnectionName != "connectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectionName'", id.ConnectionName, "connectionValue") - } -} - -func TestFormatConnectionID(t *testing.T) { - actual := NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestParseConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs/cOnNeCtIoNvAlUe", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ConnectionName: "cOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs/cOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestSegmentsForConnectionId(t *testing.T) { - segments := ConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_createorupdate.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_createorupdate.go deleted file mode 100644 index 9f2ef5c63e1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.Context, id ConnectionId, input VirtualNetworkGatewayConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ConnectionId, input VirtualNetworkGatewayConnection) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_delete.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_delete.go deleted file mode 100644 index 4d46161ff40..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context, id ConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) DeleteThenPoll(ctx context.Context, id ConnectionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_get.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_get.go deleted file mode 100644 index b9ef8773c42..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkGatewayConnection -} - -// Get ... -func (c VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, id ConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_getikesas.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_getikesas.go deleted file mode 100644 index 71376515c3f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_getikesas.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetIkeSasOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetIkeSas ... -func (c VirtualNetworkGatewayConnectionsClient) GetIkeSas(ctx context.Context, id ConnectionId) (result GetIkeSasOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getikesas", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetIkeSasThenPoll performs GetIkeSas then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) GetIkeSasThenPoll(ctx context.Context, id ConnectionId) error { - result, err := c.GetIkeSas(ctx, id) - if err != nil { - return fmt.Errorf("performing GetIkeSas: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetIkeSas: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_getsharedkey.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_getsharedkey.go deleted file mode 100644 index 7b140c7a771..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_getsharedkey.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetSharedKeyOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectionSharedKey -} - -// GetSharedKey ... -func (c VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, id ConnectionId) (result GetSharedKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/sharedkey", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_list.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_list.go deleted file mode 100644 index e83b3fcee8c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkGatewayConnection -} - -type ListCompleteResult struct { - Items []VirtualNetworkGatewayConnection -} - -// List ... -func (c VirtualNetworkGatewayConnectionsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/connections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkGatewayConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualNetworkGatewayConnectionsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualNetworkGatewayConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkGatewayConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualNetworkGatewayConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualNetworkGatewayConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_resetconnection.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_resetconnection.go deleted file mode 100644 index 7898a434030..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_resetconnection.go +++ /dev/null @@ -1,69 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetConnectionOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ResetConnection ... -func (c VirtualNetworkGatewayConnectionsClient) ResetConnection(ctx context.Context, id ConnectionId) (result ResetConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/resetconnection", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetConnectionThenPoll performs ResetConnection then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) ResetConnectionThenPoll(ctx context.Context, id ConnectionId) error { - result, err := c.ResetConnection(ctx, id) - if err != nil { - return fmt.Errorf("performing ResetConnection: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ResetConnection: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_resetsharedkey.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_resetsharedkey.go deleted file mode 100644 index b72c1fc8c36..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_resetsharedkey.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetSharedKeyOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ResetSharedKey ... -func (c VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.Context, id ConnectionId, input ConnectionResetSharedKey) (result ResetSharedKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/sharedkey/reset", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetSharedKeyThenPoll performs ResetSharedKey then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) ResetSharedKeyThenPoll(ctx context.Context, id ConnectionId, input ConnectionResetSharedKey) error { - result, err := c.ResetSharedKey(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ResetSharedKey: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ResetSharedKey: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_setsharedkey.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_setsharedkey.go deleted file mode 100644 index 62d9390ea06..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_setsharedkey.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SetSharedKeyOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SetSharedKey ... -func (c VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Context, id ConnectionId, input ConnectionSharedKey) (result SetSharedKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: fmt.Sprintf("%s/sharedkey", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SetSharedKeyThenPoll performs SetSharedKey then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) SetSharedKeyThenPoll(ctx context.Context, id ConnectionId, input ConnectionSharedKey) error { - result, err := c.SetSharedKey(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SetSharedKey: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SetSharedKey: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_startpacketcapture.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_startpacketcapture.go deleted file mode 100644 index 561ec18d395..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_startpacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StartPacketCapture ... -func (c VirtualNetworkGatewayConnectionsClient) StartPacketCapture(ctx context.Context, id ConnectionId, input VpnPacketCaptureStartParameters) (result StartPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/startPacketCapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartPacketCaptureThenPoll performs StartPacketCapture then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) StartPacketCaptureThenPoll(ctx context.Context, id ConnectionId, input VpnPacketCaptureStartParameters) error { - result, err := c.StartPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StartPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StartPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_stoppacketcapture.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_stoppacketcapture.go deleted file mode 100644 index 56c241761af..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_stoppacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StopPacketCapture ... -func (c VirtualNetworkGatewayConnectionsClient) StopPacketCapture(ctx context.Context, id ConnectionId, input VpnPacketCaptureStopParameters) (result StopPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stopPacketCapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopPacketCaptureThenPoll performs StopPacketCapture then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) StopPacketCaptureThenPoll(ctx context.Context, id ConnectionId, input VpnPacketCaptureStopParameters) error { - result, err := c.StopPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StopPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StopPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_updatetags.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_updatetags.go deleted file mode 100644 index e67d778ee91..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Context, id ConnectionId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) UpdateTagsThenPoll(ctx context.Context, id ConnectionId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_addressspace.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_addressspace.go deleted file mode 100644 index e94b1820056..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_bgpsettings.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_bgpsettings.go deleted file mode 100644 index e03680282e6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_connectionresetsharedkey.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_connectionresetsharedkey.go deleted file mode 100644 index 3e1887b9d36..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_connectionresetsharedkey.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionResetSharedKey struct { - KeyLength int64 `json:"keyLength"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_connectionsharedkey.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_connectionsharedkey.go deleted file mode 100644 index 069812d03a4..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_connectionsharedkey.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionSharedKey struct { - Id *string `json:"id,omitempty"` - Value string `json:"value"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_gatewaycustombgpipaddressipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_gatewaycustombgpipaddressipconfiguration.go deleted file mode 100644 index 7fda76a8317..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_gatewaycustombgpipaddressipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayCustomBgpIPAddressIPConfiguration struct { - CustomBgpIPAddress string `json:"customBgpIpAddress"` - IPConfigurationId string `json:"ipConfigurationId"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index dd6001591ee..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_ipsecpolicy.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_ipsecpolicy.go deleted file mode 100644 index e36e053ac75..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_localnetworkgateway.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_localnetworkgateway.go deleted file mode 100644 index 9ddafdd0d6e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_localnetworkgateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties LocalNetworkGatewayPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_localnetworkgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_localnetworkgatewaypropertiesformat.go deleted file mode 100644 index bf0176c3023..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_localnetworkgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGatewayPropertiesFormat struct { - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` - LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_radiusserver.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_radiusserver.go deleted file mode 100644 index ffc93e64965..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_radiusserver.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RadiusServer struct { - RadiusServerAddress string `json:"radiusServerAddress"` - RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_subresource.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_subresource.go deleted file mode 100644 index 25e6382622d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_tagsobject.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_tagsobject.go deleted file mode 100644 index 5f1bce5d03d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_trafficselectorpolicy.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_trafficselectorpolicy.go deleted file mode 100644 index 7d824402850..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_trafficselectorpolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficSelectorPolicy struct { - LocalAddressRanges []string `json:"localAddressRanges"` - RemoteAddressRanges []string `json:"remoteAddressRanges"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_tunnelconnectionhealth.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_tunnelconnectionhealth.go deleted file mode 100644 index 71722a9b5e7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_tunnelconnectionhealth.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TunnelConnectionHealth struct { - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` - Tunnel *string `json:"tunnel,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgateway.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgateway.go deleted file mode 100644 index 7a95498040e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgateway.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGateway struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties VirtualNetworkGatewayPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnection.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnection.go deleted file mode 100644 index 05a6ea7eb90..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnection.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnectionpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnectionpropertiesformat.go deleted file mode 100644 index ef9af43f207..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnectionpropertiesformat.go +++ /dev/null @@ -1,34 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - ConnectionMode *VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"` - ConnectionProtocol *VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType"` - DpdTimeoutSeconds *int64 `json:"dpdTimeoutSeconds,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnablePrivateLinkFastPath *bool `json:"enablePrivateLinkFastPath,omitempty"` - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - GatewayCustomBgpIPAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"gatewayCustomBgpIpAddresses,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"` - LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` - Peer *SubResource `json:"peer,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VirtualNetworkGateway1 VirtualNetworkGateway `json:"virtualNetworkGateway1"` - VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfiguration.go deleted file mode 100644 index 30467eb2ed1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 863c3769296..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatrule.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatrule.go deleted file mode 100644 index ff6c91b0d66..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayNatRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatruleproperties.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatruleproperties.go deleted file mode 100644 index 75185bb4a84..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatruleproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRuleProperties struct { - ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` - IPConfigurationId *string `json:"ipConfigurationId,omitempty"` - InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` - Mode *VpnNatRuleMode `json:"mode,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *VpnNatRuleType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroup.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroup.go deleted file mode 100644 index cd507b1d533..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayPolicyGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupmember.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupmember.go deleted file mode 100644 index 632e3bda52f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupproperties.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupproperties.go deleted file mode 100644 index 6b20992105c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroupProperties struct { - IsDefault bool `json:"isDefault"` - PolicyMembers []VirtualNetworkGatewayPolicyGroupMember `json:"policyMembers"` - Priority int64 `json:"priority"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VngClientConnectionConfigurations *[]SubResource `json:"vngClientConnectionConfigurations,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypropertiesformat.go deleted file mode 100644 index 52ff615e5c7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypropertiesformat.go +++ /dev/null @@ -1,30 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPropertiesFormat struct { - ActiveActive *bool `json:"activeActive,omitempty"` - AllowRemoteVnetTraffic *bool `json:"allowRemoteVnetTraffic,omitempty"` - AllowVirtualWanTraffic *bool `json:"allowVirtualWanTraffic,omitempty"` - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` - DisableIPSecReplayProtection *bool `json:"disableIPSecReplayProtection,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - EnableDnsForwarding *bool `json:"enableDnsForwarding,omitempty"` - EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"` - GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` - GatewayType *VirtualNetworkGatewayType `json:"gatewayType,omitempty"` - IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - InboundDnsForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"` - NatRules *[]VirtualNetworkGatewayNatRule `json:"natRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` - VNetExtendedLocationResourceId *string `json:"vNetExtendedLocationResourceId,omitempty"` - VirtualNetworkGatewayPolicyGroups *[]VirtualNetworkGatewayPolicyGroup `json:"virtualNetworkGatewayPolicyGroups,omitempty"` - VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` - VpnGatewayGeneration *VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"` - VpnType *VpnType `json:"vpnType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaysku.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaysku.go deleted file mode 100644 index 301f66896ac..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaysku.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewaySku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *VirtualNetworkGatewaySkuName `json:"name,omitempty"` - Tier *VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfiguration.go deleted file mode 100644 index 744d5505a17..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VngClientConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VngClientConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfigurationproperties.go deleted file mode 100644 index 531c18a0419..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VngClientConnectionConfigurationProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkGatewayPolicyGroups []SubResource `json:"virtualNetworkGatewayPolicyGroups"` - VpnClientAddressPool AddressSpace `json:"vpnClientAddressPool"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientconfiguration.go deleted file mode 100644 index f7da3943c5a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientconfiguration.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConfiguration struct { - AadAudience *string `json:"aadAudience,omitempty"` - AadIssuer *string `json:"aadIssuer,omitempty"` - AadTenant *string `json:"aadTenant,omitempty"` - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` - VngClientConnectionConfigurations *[]VngClientConnectionConfiguration `json:"vngClientConnectionConfigurations,omitempty"` - VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - VpnClientIPsecPolicies *[]IPsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` - VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificate.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificate.go deleted file mode 100644 index 7f83a9053a4..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificate.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRevokedCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificatepropertiesformat.go deleted file mode 100644 index 0155228d4d1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRevokedCertificatePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificate.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificate.go deleted file mode 100644 index 6eb8d073f4f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificate.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRootCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties VpnClientRootCertificatePropertiesFormat `json:"properties"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificatepropertiesformat.go deleted file mode 100644 index f5048e1ed78..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRootCertificatePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicCertData string `json:"publicCertData"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnnatrulemapping.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnnatrulemapping.go deleted file mode 100644 index 394cabc619d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnnatrulemapping.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnNatRuleMapping struct { - AddressSpace *string `json:"addressSpace,omitempty"` - PortRange *string `json:"portRange,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestartparameters.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestartparameters.go deleted file mode 100644 index 52273329f1d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestartparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnPacketCaptureStartParameters struct { - FilterData *string `json:"filterData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestopparameters.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestopparameters.go deleted file mode 100644 index e7481a70176..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestopparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnPacketCaptureStopParameters struct { - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/predicates.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/predicates.go deleted file mode 100644 index c1fe558dd66..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkGatewayConnectionOperationPredicate) Matches(input VirtualNetworkGatewayConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/version.go b/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/version.go deleted file mode 100644 index f30efbd791b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgatewayconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/README.md b/resource-manager/network/2022-09-01/virtualnetworkgateways/README.md deleted file mode 100644 index 36092fa77b9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/README.md +++ /dev/null @@ -1,413 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworkgateways` Documentation - -The `virtualnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworkgateways" -``` - - -### Client Initialization - -```go -client := virtualnetworkgateways.NewVirtualNetworkGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VirtualNetworkGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVpnConnections` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.P2SVpnConnectionRequest{ - // ... -} - - -if err := client.DisconnectVirtualNetworkGatewayVpnConnectionsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GenerateVpnProfile` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnClientParameters{ - // ... -} - - -if err := client.GenerateVpnProfileThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.Generatevpnclientpackage` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnClientParameters{ - // ... -} - - -if err := client.GeneratevpnclientpackageThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetAdvertisedRoutes` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetAdvertisedRoutesThenPoll(ctx, id, virtualnetworkgateways.DefaultGetAdvertisedRoutesOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetBgpPeerStatus` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetBgpPeerStatusThenPoll(ctx, id, virtualnetworkgateways.DefaultGetBgpPeerStatusOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetLearnedRoutes` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetLearnedRoutesThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetVpnProfilePackageUrl` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetVpnProfilePackageUrlThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetVpnclientConnectionHealthThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetVpnclientIPsecParameters` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetVpnclientIPsecParametersThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.List` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.ListConnections` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -// alternatively `client.ListConnections(ctx, id)` can be used to do batched pagination -items, err := client.ListConnectionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.Reset` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.ResetThenPoll(ctx, id, virtualnetworkgateways.DefaultResetOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.ResetVpnClientSharedKey` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.ResetVpnClientSharedKeyThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.SetVpnclientIPsecParameters` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnClientIPsecParameters{ - // ... -} - - -if err := client.SetVpnclientIPsecParametersThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.StartPacketCapture` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnPacketCaptureStartParameters{ - // ... -} - - -if err := client.StartPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.StopPacketCapture` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnPacketCaptureStopParameters{ - // ... -} - - -if err := client.StopPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.SupportedVpnDevices` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -read, err := client.SupportedVpnDevices(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue") - -payload := virtualnetworkgateways.VirtualNetworkGatewayNatRule{ - // ... -} - - -if err := client.VirtualNetworkGatewayNatRulesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesDelete` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue") - -if err := client.VirtualNetworkGatewayNatRulesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesGet` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue") - -read, err := client.VirtualNetworkGatewayNatRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -// alternatively `client.VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway(ctx, id)` can be used to do batched pagination -items, err := client.VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VpnDeviceConfigurationScript` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgateways.VpnDeviceScriptParameters{ - // ... -} - - -read, err := client.VpnDeviceConfigurationScript(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/client.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/client.go deleted file mode 100644 index c99ea430c0a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworkgateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkGatewaysClientWithBaseURI(api environments.Api) (*VirtualNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworkgateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkGatewaysClient: %+v", err) - } - - return &VirtualNetworkGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/constants.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/constants.go deleted file mode 100644 index ae27a0a432f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/constants.go +++ /dev/null @@ -1,1269 +0,0 @@ -package virtualnetworkgateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationMethod string - -const ( - AuthenticationMethodEAPMSCHAPvTwo AuthenticationMethod = "EAPMSCHAPv2" - AuthenticationMethodEAPTLS AuthenticationMethod = "EAPTLS" -) - -func PossibleValuesForAuthenticationMethod() []string { - return []string{ - string(AuthenticationMethodEAPMSCHAPvTwo), - string(AuthenticationMethodEAPTLS), - } -} - -func (s *AuthenticationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationMethod(input string) (*AuthenticationMethod, error) { - vals := map[string]AuthenticationMethod{ - "eapmschapv2": AuthenticationMethodEAPMSCHAPvTwo, - "eaptls": AuthenticationMethodEAPTLS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationMethod(input) - return &out, nil -} - -type BgpPeerState string - -const ( - BgpPeerStateConnected BgpPeerState = "Connected" - BgpPeerStateConnecting BgpPeerState = "Connecting" - BgpPeerStateIdle BgpPeerState = "Idle" - BgpPeerStateStopped BgpPeerState = "Stopped" - BgpPeerStateUnknown BgpPeerState = "Unknown" -) - -func PossibleValuesForBgpPeerState() []string { - return []string{ - string(BgpPeerStateConnected), - string(BgpPeerStateConnecting), - string(BgpPeerStateIdle), - string(BgpPeerStateStopped), - string(BgpPeerStateUnknown), - } -} - -func (s *BgpPeerState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBgpPeerState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBgpPeerState(input string) (*BgpPeerState, error) { - vals := map[string]BgpPeerState{ - "connected": BgpPeerStateConnected, - "connecting": BgpPeerStateConnecting, - "idle": BgpPeerStateIdle, - "stopped": BgpPeerStateStopped, - "unknown": BgpPeerStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BgpPeerState(input) - return &out, nil -} - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type ProcessorArchitecture string - -const ( - ProcessorArchitectureAmdSixFour ProcessorArchitecture = "Amd64" - ProcessorArchitectureXEightSix ProcessorArchitecture = "X86" -) - -func PossibleValuesForProcessorArchitecture() []string { - return []string{ - string(ProcessorArchitectureAmdSixFour), - string(ProcessorArchitectureXEightSix), - } -} - -func (s *ProcessorArchitecture) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProcessorArchitecture(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProcessorArchitecture(input string) (*ProcessorArchitecture, error) { - vals := map[string]ProcessorArchitecture{ - "amd64": ProcessorArchitectureAmdSixFour, - "x86": ProcessorArchitectureXEightSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProcessorArchitecture(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionMode string - -const ( - VirtualNetworkGatewayConnectionModeDefault VirtualNetworkGatewayConnectionMode = "Default" - VirtualNetworkGatewayConnectionModeInitiatorOnly VirtualNetworkGatewayConnectionMode = "InitiatorOnly" - VirtualNetworkGatewayConnectionModeResponderOnly VirtualNetworkGatewayConnectionMode = "ResponderOnly" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionMode() []string { - return []string{ - string(VirtualNetworkGatewayConnectionModeDefault), - string(VirtualNetworkGatewayConnectionModeInitiatorOnly), - string(VirtualNetworkGatewayConnectionModeResponderOnly), - } -} - -func (s *VirtualNetworkGatewayConnectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionMode(input string) (*VirtualNetworkGatewayConnectionMode, error) { - vals := map[string]VirtualNetworkGatewayConnectionMode{ - "default": VirtualNetworkGatewayConnectionModeDefault, - "initiatoronly": VirtualNetworkGatewayConnectionModeInitiatorOnly, - "responderonly": VirtualNetworkGatewayConnectionModeResponderOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionMode(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionProtocol string - -const ( - VirtualNetworkGatewayConnectionProtocolIKEvOne VirtualNetworkGatewayConnectionProtocol = "IKEv1" - VirtualNetworkGatewayConnectionProtocolIKEvTwo VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionProtocol() []string { - return []string{ - string(VirtualNetworkGatewayConnectionProtocolIKEvOne), - string(VirtualNetworkGatewayConnectionProtocolIKEvTwo), - } -} - -func (s *VirtualNetworkGatewayConnectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionProtocol(input string) (*VirtualNetworkGatewayConnectionProtocol, error) { - vals := map[string]VirtualNetworkGatewayConnectionProtocol{ - "ikev1": VirtualNetworkGatewayConnectionProtocolIKEvOne, - "ikev2": VirtualNetworkGatewayConnectionProtocolIKEvTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionProtocol(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionStatus string - -const ( - VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" - VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" - VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" - VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionStatus() []string { - return []string{ - string(VirtualNetworkGatewayConnectionStatusConnected), - string(VirtualNetworkGatewayConnectionStatusConnecting), - string(VirtualNetworkGatewayConnectionStatusNotConnected), - string(VirtualNetworkGatewayConnectionStatusUnknown), - } -} - -func (s *VirtualNetworkGatewayConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionStatus(input string) (*VirtualNetworkGatewayConnectionStatus, error) { - vals := map[string]VirtualNetworkGatewayConnectionStatus{ - "connected": VirtualNetworkGatewayConnectionStatusConnected, - "connecting": VirtualNetworkGatewayConnectionStatusConnecting, - "notconnected": VirtualNetworkGatewayConnectionStatusNotConnected, - "unknown": VirtualNetworkGatewayConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionStatus(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionType string - -const ( - VirtualNetworkGatewayConnectionTypeExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" - VirtualNetworkGatewayConnectionTypeIPsec VirtualNetworkGatewayConnectionType = "IPsec" - VirtualNetworkGatewayConnectionTypeVPNClient VirtualNetworkGatewayConnectionType = "VPNClient" - VirtualNetworkGatewayConnectionTypeVnetTwoVnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionType() []string { - return []string{ - string(VirtualNetworkGatewayConnectionTypeExpressRoute), - string(VirtualNetworkGatewayConnectionTypeIPsec), - string(VirtualNetworkGatewayConnectionTypeVPNClient), - string(VirtualNetworkGatewayConnectionTypeVnetTwoVnet), - } -} - -func (s *VirtualNetworkGatewayConnectionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionType(input string) (*VirtualNetworkGatewayConnectionType, error) { - vals := map[string]VirtualNetworkGatewayConnectionType{ - "expressroute": VirtualNetworkGatewayConnectionTypeExpressRoute, - "ipsec": VirtualNetworkGatewayConnectionTypeIPsec, - "vpnclient": VirtualNetworkGatewayConnectionTypeVPNClient, - "vnet2vnet": VirtualNetworkGatewayConnectionTypeVnetTwoVnet, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionType(input) - return &out, nil -} - -type VirtualNetworkGatewaySkuName string - -const ( - VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" - VirtualNetworkGatewaySkuNameErGwOneAZ VirtualNetworkGatewaySkuName = "ErGw1AZ" - VirtualNetworkGatewaySkuNameErGwThreeAZ VirtualNetworkGatewaySkuName = "ErGw3AZ" - VirtualNetworkGatewaySkuNameErGwTwoAZ VirtualNetworkGatewaySkuName = "ErGw2AZ" - VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" - VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" - VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" - VirtualNetworkGatewaySkuNameVpnGwFive VirtualNetworkGatewaySkuName = "VpnGw5" - VirtualNetworkGatewaySkuNameVpnGwFiveAZ VirtualNetworkGatewaySkuName = "VpnGw5AZ" - VirtualNetworkGatewaySkuNameVpnGwFour VirtualNetworkGatewaySkuName = "VpnGw4" - VirtualNetworkGatewaySkuNameVpnGwFourAZ VirtualNetworkGatewaySkuName = "VpnGw4AZ" - VirtualNetworkGatewaySkuNameVpnGwOne VirtualNetworkGatewaySkuName = "VpnGw1" - VirtualNetworkGatewaySkuNameVpnGwOneAZ VirtualNetworkGatewaySkuName = "VpnGw1AZ" - VirtualNetworkGatewaySkuNameVpnGwThree VirtualNetworkGatewaySkuName = "VpnGw3" - VirtualNetworkGatewaySkuNameVpnGwThreeAZ VirtualNetworkGatewaySkuName = "VpnGw3AZ" - VirtualNetworkGatewaySkuNameVpnGwTwo VirtualNetworkGatewaySkuName = "VpnGw2" - VirtualNetworkGatewaySkuNameVpnGwTwoAZ VirtualNetworkGatewaySkuName = "VpnGw2AZ" -) - -func PossibleValuesForVirtualNetworkGatewaySkuName() []string { - return []string{ - string(VirtualNetworkGatewaySkuNameBasic), - string(VirtualNetworkGatewaySkuNameErGwOneAZ), - string(VirtualNetworkGatewaySkuNameErGwThreeAZ), - string(VirtualNetworkGatewaySkuNameErGwTwoAZ), - string(VirtualNetworkGatewaySkuNameHighPerformance), - string(VirtualNetworkGatewaySkuNameStandard), - string(VirtualNetworkGatewaySkuNameUltraPerformance), - string(VirtualNetworkGatewaySkuNameVpnGwFive), - string(VirtualNetworkGatewaySkuNameVpnGwFiveAZ), - string(VirtualNetworkGatewaySkuNameVpnGwFour), - string(VirtualNetworkGatewaySkuNameVpnGwFourAZ), - string(VirtualNetworkGatewaySkuNameVpnGwOne), - string(VirtualNetworkGatewaySkuNameVpnGwOneAZ), - string(VirtualNetworkGatewaySkuNameVpnGwThree), - string(VirtualNetworkGatewaySkuNameVpnGwThreeAZ), - string(VirtualNetworkGatewaySkuNameVpnGwTwo), - string(VirtualNetworkGatewaySkuNameVpnGwTwoAZ), - } -} - -func (s *VirtualNetworkGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewaySkuName(input string) (*VirtualNetworkGatewaySkuName, error) { - vals := map[string]VirtualNetworkGatewaySkuName{ - "basic": VirtualNetworkGatewaySkuNameBasic, - "ergw1az": VirtualNetworkGatewaySkuNameErGwOneAZ, - "ergw3az": VirtualNetworkGatewaySkuNameErGwThreeAZ, - "ergw2az": VirtualNetworkGatewaySkuNameErGwTwoAZ, - "highperformance": VirtualNetworkGatewaySkuNameHighPerformance, - "standard": VirtualNetworkGatewaySkuNameStandard, - "ultraperformance": VirtualNetworkGatewaySkuNameUltraPerformance, - "vpngw5": VirtualNetworkGatewaySkuNameVpnGwFive, - "vpngw5az": VirtualNetworkGatewaySkuNameVpnGwFiveAZ, - "vpngw4": VirtualNetworkGatewaySkuNameVpnGwFour, - "vpngw4az": VirtualNetworkGatewaySkuNameVpnGwFourAZ, - "vpngw1": VirtualNetworkGatewaySkuNameVpnGwOne, - "vpngw1az": VirtualNetworkGatewaySkuNameVpnGwOneAZ, - "vpngw3": VirtualNetworkGatewaySkuNameVpnGwThree, - "vpngw3az": VirtualNetworkGatewaySkuNameVpnGwThreeAZ, - "vpngw2": VirtualNetworkGatewaySkuNameVpnGwTwo, - "vpngw2az": VirtualNetworkGatewaySkuNameVpnGwTwoAZ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewaySkuName(input) - return &out, nil -} - -type VirtualNetworkGatewaySkuTier string - -const ( - VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" - VirtualNetworkGatewaySkuTierErGwOneAZ VirtualNetworkGatewaySkuTier = "ErGw1AZ" - VirtualNetworkGatewaySkuTierErGwThreeAZ VirtualNetworkGatewaySkuTier = "ErGw3AZ" - VirtualNetworkGatewaySkuTierErGwTwoAZ VirtualNetworkGatewaySkuTier = "ErGw2AZ" - VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" - VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" - VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" - VirtualNetworkGatewaySkuTierVpnGwFive VirtualNetworkGatewaySkuTier = "VpnGw5" - VirtualNetworkGatewaySkuTierVpnGwFiveAZ VirtualNetworkGatewaySkuTier = "VpnGw5AZ" - VirtualNetworkGatewaySkuTierVpnGwFour VirtualNetworkGatewaySkuTier = "VpnGw4" - VirtualNetworkGatewaySkuTierVpnGwFourAZ VirtualNetworkGatewaySkuTier = "VpnGw4AZ" - VirtualNetworkGatewaySkuTierVpnGwOne VirtualNetworkGatewaySkuTier = "VpnGw1" - VirtualNetworkGatewaySkuTierVpnGwOneAZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ" - VirtualNetworkGatewaySkuTierVpnGwThree VirtualNetworkGatewaySkuTier = "VpnGw3" - VirtualNetworkGatewaySkuTierVpnGwThreeAZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ" - VirtualNetworkGatewaySkuTierVpnGwTwo VirtualNetworkGatewaySkuTier = "VpnGw2" - VirtualNetworkGatewaySkuTierVpnGwTwoAZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ" -) - -func PossibleValuesForVirtualNetworkGatewaySkuTier() []string { - return []string{ - string(VirtualNetworkGatewaySkuTierBasic), - string(VirtualNetworkGatewaySkuTierErGwOneAZ), - string(VirtualNetworkGatewaySkuTierErGwThreeAZ), - string(VirtualNetworkGatewaySkuTierErGwTwoAZ), - string(VirtualNetworkGatewaySkuTierHighPerformance), - string(VirtualNetworkGatewaySkuTierStandard), - string(VirtualNetworkGatewaySkuTierUltraPerformance), - string(VirtualNetworkGatewaySkuTierVpnGwFive), - string(VirtualNetworkGatewaySkuTierVpnGwFiveAZ), - string(VirtualNetworkGatewaySkuTierVpnGwFour), - string(VirtualNetworkGatewaySkuTierVpnGwFourAZ), - string(VirtualNetworkGatewaySkuTierVpnGwOne), - string(VirtualNetworkGatewaySkuTierVpnGwOneAZ), - string(VirtualNetworkGatewaySkuTierVpnGwThree), - string(VirtualNetworkGatewaySkuTierVpnGwThreeAZ), - string(VirtualNetworkGatewaySkuTierVpnGwTwo), - string(VirtualNetworkGatewaySkuTierVpnGwTwoAZ), - } -} - -func (s *VirtualNetworkGatewaySkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewaySkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewaySkuTier(input string) (*VirtualNetworkGatewaySkuTier, error) { - vals := map[string]VirtualNetworkGatewaySkuTier{ - "basic": VirtualNetworkGatewaySkuTierBasic, - "ergw1az": VirtualNetworkGatewaySkuTierErGwOneAZ, - "ergw3az": VirtualNetworkGatewaySkuTierErGwThreeAZ, - "ergw2az": VirtualNetworkGatewaySkuTierErGwTwoAZ, - "highperformance": VirtualNetworkGatewaySkuTierHighPerformance, - "standard": VirtualNetworkGatewaySkuTierStandard, - "ultraperformance": VirtualNetworkGatewaySkuTierUltraPerformance, - "vpngw5": VirtualNetworkGatewaySkuTierVpnGwFive, - "vpngw5az": VirtualNetworkGatewaySkuTierVpnGwFiveAZ, - "vpngw4": VirtualNetworkGatewaySkuTierVpnGwFour, - "vpngw4az": VirtualNetworkGatewaySkuTierVpnGwFourAZ, - "vpngw1": VirtualNetworkGatewaySkuTierVpnGwOne, - "vpngw1az": VirtualNetworkGatewaySkuTierVpnGwOneAZ, - "vpngw3": VirtualNetworkGatewaySkuTierVpnGwThree, - "vpngw3az": VirtualNetworkGatewaySkuTierVpnGwThreeAZ, - "vpngw2": VirtualNetworkGatewaySkuTierVpnGwTwo, - "vpngw2az": VirtualNetworkGatewaySkuTierVpnGwTwoAZ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewaySkuTier(input) - return &out, nil -} - -type VirtualNetworkGatewayType string - -const ( - VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" - VirtualNetworkGatewayTypeLocalGateway VirtualNetworkGatewayType = "LocalGateway" - VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" -) - -func PossibleValuesForVirtualNetworkGatewayType() []string { - return []string{ - string(VirtualNetworkGatewayTypeExpressRoute), - string(VirtualNetworkGatewayTypeLocalGateway), - string(VirtualNetworkGatewayTypeVpn), - } -} - -func (s *VirtualNetworkGatewayType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayType(input string) (*VirtualNetworkGatewayType, error) { - vals := map[string]VirtualNetworkGatewayType{ - "expressroute": VirtualNetworkGatewayTypeExpressRoute, - "localgateway": VirtualNetworkGatewayTypeLocalGateway, - "vpn": VirtualNetworkGatewayTypeVpn, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayType(input) - return &out, nil -} - -type VpnAuthenticationType string - -const ( - VpnAuthenticationTypeAAD VpnAuthenticationType = "AAD" - VpnAuthenticationTypeCertificate VpnAuthenticationType = "Certificate" - VpnAuthenticationTypeRadius VpnAuthenticationType = "Radius" -) - -func PossibleValuesForVpnAuthenticationType() []string { - return []string{ - string(VpnAuthenticationTypeAAD), - string(VpnAuthenticationTypeCertificate), - string(VpnAuthenticationTypeRadius), - } -} - -func (s *VpnAuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnAuthenticationType(input string) (*VpnAuthenticationType, error) { - vals := map[string]VpnAuthenticationType{ - "aad": VpnAuthenticationTypeAAD, - "certificate": VpnAuthenticationTypeCertificate, - "radius": VpnAuthenticationTypeRadius, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnAuthenticationType(input) - return &out, nil -} - -type VpnClientProtocol string - -const ( - VpnClientProtocolIkeVTwo VpnClientProtocol = "IkeV2" - VpnClientProtocolOpenVPN VpnClientProtocol = "OpenVPN" - VpnClientProtocolSSTP VpnClientProtocol = "SSTP" -) - -func PossibleValuesForVpnClientProtocol() []string { - return []string{ - string(VpnClientProtocolIkeVTwo), - string(VpnClientProtocolOpenVPN), - string(VpnClientProtocolSSTP), - } -} - -func (s *VpnClientProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnClientProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnClientProtocol(input string) (*VpnClientProtocol, error) { - vals := map[string]VpnClientProtocol{ - "ikev2": VpnClientProtocolIkeVTwo, - "openvpn": VpnClientProtocolOpenVPN, - "sstp": VpnClientProtocolSSTP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnClientProtocol(input) - return &out, nil -} - -type VpnGatewayGeneration string - -const ( - VpnGatewayGenerationGenerationOne VpnGatewayGeneration = "Generation1" - VpnGatewayGenerationGenerationTwo VpnGatewayGeneration = "Generation2" - VpnGatewayGenerationNone VpnGatewayGeneration = "None" -) - -func PossibleValuesForVpnGatewayGeneration() []string { - return []string{ - string(VpnGatewayGenerationGenerationOne), - string(VpnGatewayGenerationGenerationTwo), - string(VpnGatewayGenerationNone), - } -} - -func (s *VpnGatewayGeneration) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnGatewayGeneration(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnGatewayGeneration(input string) (*VpnGatewayGeneration, error) { - vals := map[string]VpnGatewayGeneration{ - "generation1": VpnGatewayGenerationGenerationOne, - "generation2": VpnGatewayGenerationGenerationTwo, - "none": VpnGatewayGenerationNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnGatewayGeneration(input) - return &out, nil -} - -type VpnNatRuleMode string - -const ( - VpnNatRuleModeEgressSnat VpnNatRuleMode = "EgressSnat" - VpnNatRuleModeIngressSnat VpnNatRuleMode = "IngressSnat" -) - -func PossibleValuesForVpnNatRuleMode() []string { - return []string{ - string(VpnNatRuleModeEgressSnat), - string(VpnNatRuleModeIngressSnat), - } -} - -func (s *VpnNatRuleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleMode(input string) (*VpnNatRuleMode, error) { - vals := map[string]VpnNatRuleMode{ - "egresssnat": VpnNatRuleModeEgressSnat, - "ingresssnat": VpnNatRuleModeIngressSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleMode(input) - return &out, nil -} - -type VpnNatRuleType string - -const ( - VpnNatRuleTypeDynamic VpnNatRuleType = "Dynamic" - VpnNatRuleTypeStatic VpnNatRuleType = "Static" -) - -func PossibleValuesForVpnNatRuleType() []string { - return []string{ - string(VpnNatRuleTypeDynamic), - string(VpnNatRuleTypeStatic), - } -} - -func (s *VpnNatRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleType(input string) (*VpnNatRuleType, error) { - vals := map[string]VpnNatRuleType{ - "dynamic": VpnNatRuleTypeDynamic, - "static": VpnNatRuleTypeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleType(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} - -type VpnType string - -const ( - VpnTypePolicyBased VpnType = "PolicyBased" - VpnTypeRouteBased VpnType = "RouteBased" -) - -func PossibleValuesForVpnType() []string { - return []string{ - string(VpnTypePolicyBased), - string(VpnTypeRouteBased), - } -} - -func (s *VpnType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnType(input string) (*VpnType, error) { - vals := map[string]VpnType{ - "policybased": VpnTypePolicyBased, - "routebased": VpnTypeRouteBased, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_connection.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/id_connection.go deleted file mode 100644 index 0474f12724b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_connection.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualnetworkgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionId{} - -// ConnectionId is a struct representing the Resource ID for a Connection -type ConnectionId struct { - SubscriptionId string - ResourceGroupName string - ConnectionName string -} - -// NewConnectionID returns a new ConnectionId struct -func NewConnectionID(subscriptionId string, resourceGroupName string, connectionName string) ConnectionId { - return ConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ConnectionName: connectionName, - } -} - -// ParseConnectionID parses 'input' into a ConnectionId -func ParseConnectionID(input string) (*ConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ParseConnectionIDInsensitively parses 'input' case-insensitively into a ConnectionId -// note: this method should only be used for API response data and not user input -func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ValidateConnectionID checks that 'input' can be parsed as a Connection ID -func ValidateConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Connection ID -func (id ConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/connections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Connection ID -func (id ConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticConnections", "connections", "connections"), - resourceids.UserSpecifiedSegment("connectionName", "connectionValue"), - } -} - -// String returns a human-readable description of this Connection ID -func (id ConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Connection Name: %q", id.ConnectionName), - } - return fmt.Sprintf("Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_connection_test.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/id_connection_test.go deleted file mode 100644 index b3024a9a004..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_connection_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualnetworkgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionId{} - -func TestNewConnectionID(t *testing.T) { - id := NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ConnectionName != "connectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectionName'", id.ConnectionName, "connectionValue") - } -} - -func TestFormatConnectionID(t *testing.T) { - actual := NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestParseConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs/cOnNeCtIoNvAlUe", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ConnectionName: "cOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs/cOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestSegmentsForConnectionId(t *testing.T) { - segments := ConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgateway.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgateway.go deleted file mode 100644 index f405ee0a07d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualnetworkgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkGatewayId{} - -// VirtualNetworkGatewayId is a struct representing the Resource ID for a Virtual Network Gateway -type VirtualNetworkGatewayId struct { - SubscriptionId string - ResourceGroupName string - VirtualNetworkGatewayName string -} - -// NewVirtualNetworkGatewayID returns a new VirtualNetworkGatewayId struct -func NewVirtualNetworkGatewayID(subscriptionId string, resourceGroupName string, virtualNetworkGatewayName string) VirtualNetworkGatewayId { - return VirtualNetworkGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualNetworkGatewayName: virtualNetworkGatewayName, - } -} - -// ParseVirtualNetworkGatewayID parses 'input' into a VirtualNetworkGatewayId -func ParseVirtualNetworkGatewayID(input string) (*VirtualNetworkGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) - } - - return &id, nil -} - -// ParseVirtualNetworkGatewayIDInsensitively parses 'input' case-insensitively into a VirtualNetworkGatewayId -// note: this method should only be used for API response data and not user input -func ParseVirtualNetworkGatewayIDInsensitively(input string) (*VirtualNetworkGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualNetworkGatewayID checks that 'input' can be parsed as a Virtual Network Gateway ID -func ValidateVirtualNetworkGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualNetworkGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Network Gateway ID -func (id VirtualNetworkGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworkGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualNetworkGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Network Gateway ID -func (id VirtualNetworkGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualNetworkGateways", "virtualNetworkGateways", "virtualNetworkGateways"), - resourceids.UserSpecifiedSegment("virtualNetworkGatewayName", "virtualNetworkGatewayValue"), - } -} - -// String returns a human-readable description of this Virtual Network Gateway ID -func (id VirtualNetworkGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Network Gateway Name: %q", id.VirtualNetworkGatewayName), - } - return fmt.Sprintf("Virtual Network Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgateway_test.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgateway_test.go deleted file mode 100644 index 5371e4ecd6f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualnetworkgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkGatewayId{} - -func TestNewVirtualNetworkGatewayID(t *testing.T) { - id := NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualNetworkGatewayName != "virtualNetworkGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkGatewayName'", id.VirtualNetworkGatewayName, "virtualNetworkGatewayValue") - } -} - -func TestFormatVirtualNetworkGatewayID(t *testing.T) { - actual := NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualNetworkGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue", - Expected: &VirtualNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkGatewayName: "virtualNetworkGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkGatewayName != v.Expected.VirtualNetworkGatewayName { - t.Fatalf("Expected %q but got %q for VirtualNetworkGatewayName", v.Expected.VirtualNetworkGatewayName, actual.VirtualNetworkGatewayName) - } - - } -} - -func TestParseVirtualNetworkGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue", - Expected: &VirtualNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkGatewayName: "virtualNetworkGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE", - Expected: &VirtualNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualNetworkGatewayName: "vIrTuAlNeTwOrKgAtEwAyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkGatewayName != v.Expected.VirtualNetworkGatewayName { - t.Fatalf("Expected %q but got %q for VirtualNetworkGatewayName", v.Expected.VirtualNetworkGatewayName, actual.VirtualNetworkGatewayName) - } - - } -} - -func TestSegmentsForVirtualNetworkGatewayId(t *testing.T) { - segments := VirtualNetworkGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualNetworkGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go deleted file mode 100644 index 76631d94563..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualnetworkgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkGatewayNatRuleId{} - -// VirtualNetworkGatewayNatRuleId is a struct representing the Resource ID for a Virtual Network Gateway Nat Rule -type VirtualNetworkGatewayNatRuleId struct { - SubscriptionId string - ResourceGroupName string - VirtualNetworkGatewayName string - NatRuleName string -} - -// NewVirtualNetworkGatewayNatRuleID returns a new VirtualNetworkGatewayNatRuleId struct -func NewVirtualNetworkGatewayNatRuleID(subscriptionId string, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) VirtualNetworkGatewayNatRuleId { - return VirtualNetworkGatewayNatRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualNetworkGatewayName: virtualNetworkGatewayName, - NatRuleName: natRuleName, - } -} - -// ParseVirtualNetworkGatewayNatRuleID parses 'input' into a VirtualNetworkGatewayNatRuleId -func ParseVirtualNetworkGatewayNatRuleID(input string) (*VirtualNetworkGatewayNatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkGatewayNatRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkGatewayNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) - } - - return &id, nil -} - -// ParseVirtualNetworkGatewayNatRuleIDInsensitively parses 'input' case-insensitively into a VirtualNetworkGatewayNatRuleId -// note: this method should only be used for API response data and not user input -func ParseVirtualNetworkGatewayNatRuleIDInsensitively(input string) (*VirtualNetworkGatewayNatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkGatewayNatRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkGatewayNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualNetworkGatewayNatRuleID checks that 'input' can be parsed as a Virtual Network Gateway Nat Rule ID -func ValidateVirtualNetworkGatewayNatRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualNetworkGatewayNatRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Network Gateway Nat Rule ID -func (id VirtualNetworkGatewayNatRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworkGateways/%s/natRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualNetworkGatewayName, id.NatRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Network Gateway Nat Rule ID -func (id VirtualNetworkGatewayNatRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualNetworkGateways", "virtualNetworkGateways", "virtualNetworkGateways"), - resourceids.UserSpecifiedSegment("virtualNetworkGatewayName", "virtualNetworkGatewayValue"), - resourceids.StaticSegment("staticNatRules", "natRules", "natRules"), - resourceids.UserSpecifiedSegment("natRuleName", "natRuleValue"), - } -} - -// String returns a human-readable description of this Virtual Network Gateway Nat Rule ID -func (id VirtualNetworkGatewayNatRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Network Gateway Name: %q", id.VirtualNetworkGatewayName), - fmt.Sprintf("Nat Rule Name: %q", id.NatRuleName), - } - return fmt.Sprintf("Virtual Network Gateway Nat Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule_test.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule_test.go deleted file mode 100644 index 1a042f5ce76..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualnetworkgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkGatewayNatRuleId{} - -func TestNewVirtualNetworkGatewayNatRuleID(t *testing.T) { - id := NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualNetworkGatewayName != "virtualNetworkGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkGatewayName'", id.VirtualNetworkGatewayName, "virtualNetworkGatewayValue") - } - - if id.NatRuleName != "natRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'NatRuleName'", id.NatRuleName, "natRuleValue") - } -} - -func TestFormatVirtualNetworkGatewayNatRuleID(t *testing.T) { - actual := NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualNetworkGatewayNatRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkGatewayNatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue", - Expected: &VirtualNetworkGatewayNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkGatewayName: "virtualNetworkGatewayValue", - NatRuleName: "natRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkGatewayNatRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkGatewayName != v.Expected.VirtualNetworkGatewayName { - t.Fatalf("Expected %q but got %q for VirtualNetworkGatewayName", v.Expected.VirtualNetworkGatewayName, actual.VirtualNetworkGatewayName) - } - - if actual.NatRuleName != v.Expected.NatRuleName { - t.Fatalf("Expected %q but got %q for NatRuleName", v.Expected.NatRuleName, actual.NatRuleName) - } - - } -} - -func TestParseVirtualNetworkGatewayNatRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkGatewayNatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE/nAtRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue", - Expected: &VirtualNetworkGatewayNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkGatewayName: "virtualNetworkGatewayValue", - NatRuleName: "natRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE/nAtRuLeS/nAtRuLeVaLuE", - Expected: &VirtualNetworkGatewayNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualNetworkGatewayName: "vIrTuAlNeTwOrKgAtEwAyVaLuE", - NatRuleName: "nAtRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE/nAtRuLeS/nAtRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkGatewayNatRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkGatewayName != v.Expected.VirtualNetworkGatewayName { - t.Fatalf("Expected %q but got %q for VirtualNetworkGatewayName", v.Expected.VirtualNetworkGatewayName, actual.VirtualNetworkGatewayName) - } - - if actual.NatRuleName != v.Expected.NatRuleName { - t.Fatalf("Expected %q but got %q for NatRuleName", v.Expected.NatRuleName, actual.NatRuleName) - } - - } -} - -func TestSegmentsForVirtualNetworkGatewayNatRuleId(t *testing.T) { - segments := VirtualNetworkGatewayNatRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualNetworkGatewayNatRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_createorupdate.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_createorupdate.go deleted file mode 100644 index 12eaeda1be7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, id VirtualNetworkGatewayId, input VirtualNetworkGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworkGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VirtualNetworkGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_delete.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_delete.go deleted file mode 100644 index 06878f245a4..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworkGatewaysClient) Delete(ctx context.Context, id VirtualNetworkGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworkGatewaysClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_disconnectvirtualnetworkgatewayvpnconnections.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_disconnectvirtualnetworkgatewayvpnconnections.go deleted file mode 100644 index 6a0589d67d6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_disconnectvirtualnetworkgatewayvpnconnections.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DisconnectVirtualNetworkGatewayVpnConnectionsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DisconnectVirtualNetworkGatewayVpnConnections ... -func (c VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnConnections(ctx context.Context, id VirtualNetworkGatewayId, input P2SVpnConnectionRequest) (result DisconnectVirtualNetworkGatewayVpnConnectionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/disconnectVirtualNetworkGatewayVpnConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DisconnectVirtualNetworkGatewayVpnConnectionsThenPoll performs DisconnectVirtualNetworkGatewayVpnConnections then polls until it's completed -func (c VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnConnectionsThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input P2SVpnConnectionRequest) error { - result, err := c.DisconnectVirtualNetworkGatewayVpnConnections(ctx, id, input) - if err != nil { - return fmt.Errorf("performing DisconnectVirtualNetworkGatewayVpnConnections: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DisconnectVirtualNetworkGatewayVpnConnections: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_generatevpnclientpackage.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_generatevpnclientpackage.go deleted file mode 100644 index e9ed69b2443..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_generatevpnclientpackage.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GeneratevpnclientpackageOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Generatevpnclientpackage ... -func (c VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientParameters) (result GeneratevpnclientpackageOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generatevpnclientpackage", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GeneratevpnclientpackageThenPoll performs Generatevpnclientpackage then polls until it's completed -func (c VirtualNetworkGatewaysClient) GeneratevpnclientpackageThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientParameters) error { - result, err := c.Generatevpnclientpackage(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Generatevpnclientpackage: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Generatevpnclientpackage: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_generatevpnprofile.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_generatevpnprofile.go deleted file mode 100644 index d812edf3be9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_generatevpnprofile.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateVpnProfileOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GenerateVpnProfile ... -func (c VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientParameters) (result GenerateVpnProfileOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generatevpnprofile", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GenerateVpnProfileThenPoll performs GenerateVpnProfile then polls until it's completed -func (c VirtualNetworkGatewaysClient) GenerateVpnProfileThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientParameters) error { - result, err := c.GenerateVpnProfile(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GenerateVpnProfile: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GenerateVpnProfile: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_get.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_get.go deleted file mode 100644 index d57ac7b4996..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkGateway -} - -// Get ... -func (c VirtualNetworkGatewaysClient) Get(ctx context.Context, id VirtualNetworkGatewayId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getadvertisedroutes.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getadvertisedroutes.go deleted file mode 100644 index add8f59a43e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getadvertisedroutes.go +++ /dev/null @@ -1,98 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetAdvertisedRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type GetAdvertisedRoutesOperationOptions struct { - Peer *string -} - -func DefaultGetAdvertisedRoutesOperationOptions() GetAdvertisedRoutesOperationOptions { - return GetAdvertisedRoutesOperationOptions{} -} - -func (o GetAdvertisedRoutesOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetAdvertisedRoutesOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetAdvertisedRoutesOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Peer != nil { - out.Append("peer", fmt.Sprintf("%v", *o.Peer)) - } - return &out -} - -// GetAdvertisedRoutes ... -func (c VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Context, id VirtualNetworkGatewayId, options GetAdvertisedRoutesOperationOptions) (result GetAdvertisedRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getAdvertisedRoutes", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetAdvertisedRoutesThenPoll performs GetAdvertisedRoutes then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetAdvertisedRoutesThenPoll(ctx context.Context, id VirtualNetworkGatewayId, options GetAdvertisedRoutesOperationOptions) error { - result, err := c.GetAdvertisedRoutes(ctx, id, options) - if err != nil { - return fmt.Errorf("performing GetAdvertisedRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetAdvertisedRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getbgppeerstatus.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getbgppeerstatus.go deleted file mode 100644 index b4c390104d0..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getbgppeerstatus.go +++ /dev/null @@ -1,98 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetBgpPeerStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type GetBgpPeerStatusOperationOptions struct { - Peer *string -} - -func DefaultGetBgpPeerStatusOperationOptions() GetBgpPeerStatusOperationOptions { - return GetBgpPeerStatusOperationOptions{} -} - -func (o GetBgpPeerStatusOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetBgpPeerStatusOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetBgpPeerStatusOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Peer != nil { - out.Append("peer", fmt.Sprintf("%v", *o.Peer)) - } - return &out -} - -// GetBgpPeerStatus ... -func (c VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context, id VirtualNetworkGatewayId, options GetBgpPeerStatusOperationOptions) (result GetBgpPeerStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getBgpPeerStatus", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetBgpPeerStatusThenPoll performs GetBgpPeerStatus then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetBgpPeerStatusThenPoll(ctx context.Context, id VirtualNetworkGatewayId, options GetBgpPeerStatusOperationOptions) error { - result, err := c.GetBgpPeerStatus(ctx, id, options) - if err != nil { - return fmt.Errorf("performing GetBgpPeerStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetBgpPeerStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getlearnedroutes.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getlearnedroutes.go deleted file mode 100644 index 34e547bb191..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getlearnedroutes.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetLearnedRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetLearnedRoutes ... -func (c VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context, id VirtualNetworkGatewayId) (result GetLearnedRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getLearnedRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetLearnedRoutesThenPoll performs GetLearnedRoutes then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetLearnedRoutesThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.GetLearnedRoutes(ctx, id) - if err != nil { - return fmt.Errorf("performing GetLearnedRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetLearnedRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnclientconnectionhealth.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnclientconnectionhealth.go deleted file mode 100644 index 8700c4fe48a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnclientconnectionhealth.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVpnclientConnectionHealthOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetVpnclientConnectionHealth ... -func (c VirtualNetworkGatewaysClient) GetVpnclientConnectionHealth(ctx context.Context, id VirtualNetworkGatewayId) (result GetVpnclientConnectionHealthOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getVpnClientConnectionHealth", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetVpnclientConnectionHealthThenPoll performs GetVpnclientConnectionHealth then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.GetVpnclientConnectionHealth(ctx, id) - if err != nil { - return fmt.Errorf("performing GetVpnclientConnectionHealth: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetVpnclientConnectionHealth: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnclientipsecparameters.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnclientipsecparameters.go deleted file mode 100644 index a610eb0afcc..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnclientipsecparameters.go +++ /dev/null @@ -1,69 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVpnclientIPsecParametersOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetVpnclientIPsecParameters ... -func (c VirtualNetworkGatewaysClient) GetVpnclientIPsecParameters(ctx context.Context, id VirtualNetworkGatewayId) (result GetVpnclientIPsecParametersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getvpnclientipsecparameters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetVpnclientIPsecParametersThenPoll performs GetVpnclientIPsecParameters then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetVpnclientIPsecParametersThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.GetVpnclientIPsecParameters(ctx, id) - if err != nil { - return fmt.Errorf("performing GetVpnclientIPsecParameters: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetVpnclientIPsecParameters: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnprofilepackageurl.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnprofilepackageurl.go deleted file mode 100644 index 6e1e4ee9495..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_getvpnprofilepackageurl.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVpnProfilePackageUrlOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetVpnProfilePackageUrl ... -func (c VirtualNetworkGatewaysClient) GetVpnProfilePackageUrl(ctx context.Context, id VirtualNetworkGatewayId) (result GetVpnProfilePackageUrlOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getvpnprofilepackageurl", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetVpnProfilePackageUrlThenPoll performs GetVpnProfilePackageUrl then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetVpnProfilePackageUrlThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.GetVpnProfilePackageUrl(ctx, id) - if err != nil { - return fmt.Errorf("performing GetVpnProfilePackageUrl: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetVpnProfilePackageUrl: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_list.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_list.go deleted file mode 100644 index a70840c0b9e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkGateway -} - -type ListCompleteResult struct { - Items []VirtualNetworkGateway -} - -// List ... -func (c VirtualNetworkGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworkGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualNetworkGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualNetworkGatewayOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualNetworkGatewayOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualNetworkGateway, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_listconnections.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_listconnections.go deleted file mode 100644 index fa1d66370c8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_listconnections.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListConnectionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkGatewayConnectionListEntity -} - -type ListConnectionsCompleteResult struct { - Items []VirtualNetworkGatewayConnectionListEntity -} - -// ListConnections ... -func (c VirtualNetworkGatewaysClient) ListConnections(ctx context.Context, id VirtualNetworkGatewayId) (result ListConnectionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/connections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkGatewayConnectionListEntity `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListConnectionsComplete retrieves all the results into a single object -func (c VirtualNetworkGatewaysClient) ListConnectionsComplete(ctx context.Context, id VirtualNetworkGatewayId) (ListConnectionsCompleteResult, error) { - return c.ListConnectionsCompleteMatchingPredicate(ctx, id, VirtualNetworkGatewayConnectionListEntityOperationPredicate{}) -} - -// ListConnectionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkGatewaysClient) ListConnectionsCompleteMatchingPredicate(ctx context.Context, id VirtualNetworkGatewayId, predicate VirtualNetworkGatewayConnectionListEntityOperationPredicate) (result ListConnectionsCompleteResult, err error) { - items := make([]VirtualNetworkGatewayConnectionListEntity, 0) - - resp, err := c.ListConnections(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListConnectionsCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_reset.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_reset.go deleted file mode 100644 index b5d66af7067..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_reset.go +++ /dev/null @@ -1,98 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type ResetOperationOptions struct { - GatewayVip *string -} - -func DefaultResetOperationOptions() ResetOperationOptions { - return ResetOperationOptions{} -} - -func (o ResetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ResetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ResetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.GatewayVip != nil { - out.Append("gatewayVip", fmt.Sprintf("%v", *o.GatewayVip)) - } - return &out -} - -// Reset ... -func (c VirtualNetworkGatewaysClient) Reset(ctx context.Context, id VirtualNetworkGatewayId, options ResetOperationOptions) (result ResetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/reset", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetThenPoll performs Reset then polls until it's completed -func (c VirtualNetworkGatewaysClient) ResetThenPoll(ctx context.Context, id VirtualNetworkGatewayId, options ResetOperationOptions) error { - result, err := c.Reset(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Reset: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Reset: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_resetvpnclientsharedkey.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_resetvpnclientsharedkey.go deleted file mode 100644 index 3e10b92aa05..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_resetvpnclientsharedkey.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetVpnClientSharedKeyOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ResetVpnClientSharedKey ... -func (c VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.Context, id VirtualNetworkGatewayId) (result ResetVpnClientSharedKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/resetvpnclientsharedkey", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetVpnClientSharedKeyThenPoll performs ResetVpnClientSharedKey then polls until it's completed -func (c VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.ResetVpnClientSharedKey(ctx, id) - if err != nil { - return fmt.Errorf("performing ResetVpnClientSharedKey: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ResetVpnClientSharedKey: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_setvpnclientipsecparameters.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_setvpnclientipsecparameters.go deleted file mode 100644 index 22f9a0a8516..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_setvpnclientipsecparameters.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SetVpnclientIPsecParametersOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SetVpnclientIPsecParameters ... -func (c VirtualNetworkGatewaysClient) SetVpnclientIPsecParameters(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientIPsecParameters) (result SetVpnclientIPsecParametersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/setvpnclientipsecparameters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SetVpnclientIPsecParametersThenPoll performs SetVpnclientIPsecParameters then polls until it's completed -func (c VirtualNetworkGatewaysClient) SetVpnclientIPsecParametersThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientIPsecParameters) error { - result, err := c.SetVpnclientIPsecParameters(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SetVpnclientIPsecParameters: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SetVpnclientIPsecParameters: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_startpacketcapture.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_startpacketcapture.go deleted file mode 100644 index 14dcd2d1645..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_startpacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StartPacketCapture ... -func (c VirtualNetworkGatewaysClient) StartPacketCapture(ctx context.Context, id VirtualNetworkGatewayId, input VpnPacketCaptureStartParameters) (result StartPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/startPacketCapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartPacketCaptureThenPoll performs StartPacketCapture then polls until it's completed -func (c VirtualNetworkGatewaysClient) StartPacketCaptureThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnPacketCaptureStartParameters) error { - result, err := c.StartPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StartPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StartPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_stoppacketcapture.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_stoppacketcapture.go deleted file mode 100644 index 63960993e8a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_stoppacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StopPacketCapture ... -func (c VirtualNetworkGatewaysClient) StopPacketCapture(ctx context.Context, id VirtualNetworkGatewayId, input VpnPacketCaptureStopParameters) (result StopPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stopPacketCapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopPacketCaptureThenPoll performs StopPacketCapture then polls until it's completed -func (c VirtualNetworkGatewaysClient) StopPacketCaptureThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnPacketCaptureStopParameters) error { - result, err := c.StopPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StopPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StopPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_supportedvpndevices.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_supportedvpndevices.go deleted file mode 100644 index 7f62811c3ef..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_supportedvpndevices.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SupportedVpnDevicesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *string -} - -// SupportedVpnDevices ... -func (c VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, id VirtualNetworkGatewayId) (result SupportedVpnDevicesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/supportedvpndevices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_updatetags.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_updatetags.go deleted file mode 100644 index 698f272d3e7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, id VirtualNetworkGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c VirtualNetworkGatewaysClient) UpdateTagsThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulescreateorupdate.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulescreateorupdate.go deleted file mode 100644 index 5fdd09e6178..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRulesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualNetworkGatewayNatRulesCreateOrUpdate ... -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesCreateOrUpdate(ctx context.Context, id VirtualNetworkGatewayNatRuleId, input VirtualNetworkGatewayNatRule) (result VirtualNetworkGatewayNatRulesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualNetworkGatewayNatRulesCreateOrUpdateThenPoll performs VirtualNetworkGatewayNatRulesCreateOrUpdate then polls until it's completed -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesCreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkGatewayNatRuleId, input VirtualNetworkGatewayNatRule) error { - result, err := c.VirtualNetworkGatewayNatRulesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualNetworkGatewayNatRulesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualNetworkGatewayNatRulesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesdelete.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesdelete.go deleted file mode 100644 index 4d041050bd2..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRulesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualNetworkGatewayNatRulesDelete ... -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesDelete(ctx context.Context, id VirtualNetworkGatewayNatRuleId) (result VirtualNetworkGatewayNatRulesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualNetworkGatewayNatRulesDeleteThenPoll performs VirtualNetworkGatewayNatRulesDelete then polls until it's completed -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesDeleteThenPoll(ctx context.Context, id VirtualNetworkGatewayNatRuleId) error { - result, err := c.VirtualNetworkGatewayNatRulesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualNetworkGatewayNatRulesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualNetworkGatewayNatRulesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go deleted file mode 100644 index ddb145f9aed..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkGatewayNatRule -} - -// VirtualNetworkGatewayNatRulesGet ... -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesGet(ctx context.Context, id VirtualNetworkGatewayNatRuleId) (result VirtualNetworkGatewayNatRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatruleslistbyvirtualnetworkgateway.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatruleslistbyvirtualnetworkgateway.go deleted file mode 100644 index d390dc1a8e0..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_virtualnetworkgatewaynatruleslistbyvirtualnetworkgateway.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkGatewayNatRule -} - -type VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteResult struct { - Items []VirtualNetworkGatewayNatRule -} - -// VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway ... -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway(ctx context.Context, id VirtualNetworkGatewayId) (result VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/natRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkGatewayNatRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayComplete retrieves all the results into a single object -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayComplete(ctx context.Context, id VirtualNetworkGatewayId) (VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteResult, error) { - return c.VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteMatchingPredicate(ctx, id, VirtualNetworkGatewayNatRuleOperationPredicate{}) -} - -// VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteMatchingPredicate(ctx context.Context, id VirtualNetworkGatewayId, predicate VirtualNetworkGatewayNatRuleOperationPredicate) (result VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteResult, err error) { - items := make([]VirtualNetworkGatewayNatRule, 0) - - resp, err := c.VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go deleted file mode 100644 index 8629f901a70..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go +++ /dev/null @@ -1,56 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnDeviceConfigurationScriptOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *string -} - -// VpnDeviceConfigurationScript ... -func (c VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.Context, id ConnectionId, input VpnDeviceScriptParameters) (result VpnDeviceConfigurationScriptOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/vpndeviceconfigurationscript", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_addressspace.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_addressspace.go deleted file mode 100644 index 8ec4b3f0b7d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgppeerstatus.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgppeerstatus.go deleted file mode 100644 index 8b54be7d7ae..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgppeerstatus.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpPeerStatus struct { - Asn *int64 `json:"asn,omitempty"` - ConnectedDuration *string `json:"connectedDuration,omitempty"` - LocalAddress *string `json:"localAddress,omitempty"` - MessagesReceived *int64 `json:"messagesReceived,omitempty"` - MessagesSent *int64 `json:"messagesSent,omitempty"` - Neighbor *string `json:"neighbor,omitempty"` - RoutesReceived *int64 `json:"routesReceived,omitempty"` - State *BgpPeerState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgppeerstatuslistresult.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgppeerstatuslistresult.go deleted file mode 100644 index 4affff1a309..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgppeerstatuslistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpPeerStatusListResult struct { - Value *[]BgpPeerStatus `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgpsettings.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgpsettings.go deleted file mode 100644 index 38b1165bfa1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewaycustombgpipaddressipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewaycustombgpipaddressipconfiguration.go deleted file mode 100644 index 6bb7f5aa055..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewaycustombgpipaddressipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayCustomBgpIPAddressIPConfiguration struct { - CustomBgpIPAddress string `json:"customBgpIpAddress"` - IPConfigurationId string `json:"ipConfigurationId"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewayroute.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewayroute.go deleted file mode 100644 index 038e61f22d3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewayroute.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayRoute struct { - AsPath *string `json:"asPath,omitempty"` - LocalAddress *string `json:"localAddress,omitempty"` - Network *string `json:"network,omitempty"` - NextHop *string `json:"nextHop,omitempty"` - Origin *string `json:"origin,omitempty"` - SourcePeer *string `json:"sourcePeer,omitempty"` - Weight *int64 `json:"weight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewayroutelistresult.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewayroutelistresult.go deleted file mode 100644 index d0ab95ca8fb..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_gatewayroutelistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayRouteListResult struct { - Value *[]GatewayRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index bfda111f40f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_ipsecpolicy.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_ipsecpolicy.go deleted file mode 100644 index 6db4ac44425..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_p2svpnconnectionrequest.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_p2svpnconnectionrequest.go deleted file mode 100644 index dafc643bcef..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_p2svpnconnectionrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnConnectionRequest struct { - VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_radiusserver.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_radiusserver.go deleted file mode 100644 index eb891246991..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_radiusserver.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RadiusServer struct { - RadiusServerAddress string `json:"radiusServerAddress"` - RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_subresource.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_subresource.go deleted file mode 100644 index 5e20a09efb4..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_tagsobject.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_tagsobject.go deleted file mode 100644 index 1208ffee7eb..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_trafficselectorpolicy.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_trafficselectorpolicy.go deleted file mode 100644 index 6dbeefcf439..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_trafficselectorpolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficSelectorPolicy struct { - LocalAddressRanges []string `json:"localAddressRanges"` - RemoteAddressRanges []string `json:"remoteAddressRanges"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_tunnelconnectionhealth.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_tunnelconnectionhealth.go deleted file mode 100644 index 786b8730363..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_tunnelconnectionhealth.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TunnelConnectionHealth struct { - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` - Tunnel *string `json:"tunnel,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkconnectiongatewayreference.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkconnectiongatewayreference.go deleted file mode 100644 index f9ddd43a0b5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkconnectiongatewayreference.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkConnectionGatewayReference struct { - Id string `json:"id"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgateway.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgateway.go deleted file mode 100644 index 0bd39843684..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgateway.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworkgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGateway struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties VirtualNetworkGatewayPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentity.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentity.go deleted file mode 100644 index fc88052ded9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentity.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionListEntity struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentitypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentitypropertiesformat.go deleted file mode 100644 index ad063d3db47..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentitypropertiesformat.go +++ /dev/null @@ -1,30 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - ConnectionMode *VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"` - ConnectionProtocol *VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnablePrivateLinkFastPath *bool `json:"enablePrivateLinkFastPath,omitempty"` - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - GatewayCustomBgpIPAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"gatewayCustomBgpIpAddresses,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` - Peer *SubResource `json:"peer,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VirtualNetworkGateway1 VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1"` - VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfiguration.go deleted file mode 100644 index b0f988e9a2c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index f4396964e0a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaynatrule.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaynatrule.go deleted file mode 100644 index f8d6791d170..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaynatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayNatRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaynatruleproperties.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaynatruleproperties.go deleted file mode 100644 index 6227a89e253..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaynatruleproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRuleProperties struct { - ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` - IPConfigurationId *string `json:"ipConfigurationId,omitempty"` - InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` - Mode *VpnNatRuleMode `json:"mode,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *VpnNatRuleType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroup.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroup.go deleted file mode 100644 index ebd198d261e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayPolicyGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupmember.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupmember.go deleted file mode 100644 index 466e643ddd8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupproperties.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupproperties.go deleted file mode 100644 index ab108714ff3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroupProperties struct { - IsDefault bool `json:"isDefault"` - PolicyMembers []VirtualNetworkGatewayPolicyGroupMember `json:"policyMembers"` - Priority int64 `json:"priority"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VngClientConnectionConfigurations *[]SubResource `json:"vngClientConnectionConfigurations,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypropertiesformat.go deleted file mode 100644 index 99f3368d17e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaypropertiesformat.go +++ /dev/null @@ -1,30 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPropertiesFormat struct { - ActiveActive *bool `json:"activeActive,omitempty"` - AllowRemoteVnetTraffic *bool `json:"allowRemoteVnetTraffic,omitempty"` - AllowVirtualWanTraffic *bool `json:"allowVirtualWanTraffic,omitempty"` - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` - DisableIPSecReplayProtection *bool `json:"disableIPSecReplayProtection,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - EnableDnsForwarding *bool `json:"enableDnsForwarding,omitempty"` - EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"` - GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` - GatewayType *VirtualNetworkGatewayType `json:"gatewayType,omitempty"` - IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - InboundDnsForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"` - NatRules *[]VirtualNetworkGatewayNatRule `json:"natRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` - VNetExtendedLocationResourceId *string `json:"vNetExtendedLocationResourceId,omitempty"` - VirtualNetworkGatewayPolicyGroups *[]VirtualNetworkGatewayPolicyGroup `json:"virtualNetworkGatewayPolicyGroups,omitempty"` - VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` - VpnGatewayGeneration *VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"` - VpnType *VpnType `json:"vpnType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaysku.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaysku.go deleted file mode 100644 index b96386d7651..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_virtualnetworkgatewaysku.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewaySku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *VirtualNetworkGatewaySkuName `json:"name,omitempty"` - Tier *VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vngclientconnectionconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vngclientconnectionconfiguration.go deleted file mode 100644 index 44c61c02167..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vngclientconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VngClientConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VngClientConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vngclientconnectionconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vngclientconnectionconfigurationproperties.go deleted file mode 100644 index 8bf37c29734..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vngclientconnectionconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VngClientConnectionConfigurationProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkGatewayPolicyGroups []SubResource `json:"virtualNetworkGatewayPolicyGroups"` - VpnClientAddressPool AddressSpace `json:"vpnClientAddressPool"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconfiguration.go deleted file mode 100644 index 947582e3da9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconfiguration.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConfiguration struct { - AadAudience *string `json:"aadAudience,omitempty"` - AadIssuer *string `json:"aadIssuer,omitempty"` - AadTenant *string `json:"aadTenant,omitempty"` - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` - VngClientConnectionConfigurations *[]VngClientConnectionConfiguration `json:"vngClientConnectionConfigurations,omitempty"` - VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - VpnClientIPsecPolicies *[]IPsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` - VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetail.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetail.go deleted file mode 100644 index c1bd5bd01b8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetail.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealthDetail struct { - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"` - MaxBandwidth *int64 `json:"maxBandwidth,omitempty"` - MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"` - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` - VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"` - VpnConnectionId *string `json:"vpnConnectionId,omitempty"` - VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"` - VpnUserName *string `json:"vpnUserName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetaillistresult.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetaillistresult.go deleted file mode 100644 index d0c7c1a3f22..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetaillistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealthDetailListResult struct { - Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientipsecparameters.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientipsecparameters.go deleted file mode 100644 index d972e45d72e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientipsecparameters.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientIPsecParameters struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientparameters.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientparameters.go deleted file mode 100644 index dbfa84e1c67..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientparameters.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientParameters struct { - AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` - ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"` - ProcessorArchitecture *ProcessorArchitecture `json:"processorArchitecture,omitempty"` - RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrevokedcertificate.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrevokedcertificate.go deleted file mode 100644 index 2151e3bf02b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrevokedcertificate.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRevokedCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrevokedcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrevokedcertificatepropertiesformat.go deleted file mode 100644 index 9a5fb25ca9b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrevokedcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRevokedCertificatePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrootcertificate.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrootcertificate.go deleted file mode 100644 index db4850a95ff..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrootcertificate.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRootCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties VpnClientRootCertificatePropertiesFormat `json:"properties"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrootcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrootcertificatepropertiesformat.go deleted file mode 100644 index 4a44a811b2a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnclientrootcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRootCertificatePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicCertData string `json:"publicCertData"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpndevicescriptparameters.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpndevicescriptparameters.go deleted file mode 100644 index 61ec4f46b54..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpndevicescriptparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnDeviceScriptParameters struct { - DeviceFamily *string `json:"deviceFamily,omitempty"` - FirmwareVersion *string `json:"firmwareVersion,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnnatrulemapping.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnnatrulemapping.go deleted file mode 100644 index d903f625a58..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnnatrulemapping.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnNatRuleMapping struct { - AddressSpace *string `json:"addressSpace,omitempty"` - PortRange *string `json:"portRange,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnpacketcapturestartparameters.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnpacketcapturestartparameters.go deleted file mode 100644 index 014f699e436..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnpacketcapturestartparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnPacketCaptureStartParameters struct { - FilterData *string `json:"filterData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnpacketcapturestopparameters.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnpacketcapturestopparameters.go deleted file mode 100644 index 091426a3451..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/model_vpnpacketcapturestopparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnPacketCaptureStopParameters struct { - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/predicates.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/predicates.go deleted file mode 100644 index e03cad8f7b6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/predicates.go +++ /dev/null @@ -1,98 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkGatewayOperationPredicate) Matches(input VirtualNetworkGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualNetworkGatewayConnectionListEntityOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkGatewayConnectionListEntityOperationPredicate) Matches(input VirtualNetworkGatewayConnectionListEntity) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualNetworkGatewayNatRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VirtualNetworkGatewayNatRuleOperationPredicate) Matches(input VirtualNetworkGatewayNatRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkgateways/version.go b/resource-manager/network/2022-09-01/virtualnetworkgateways/version.go deleted file mode 100644 index b4958cb0554..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkgateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/README.md b/resource-manager/network/2022-09-01/virtualnetworkpeerings/README.md deleted file mode 100644 index 2bf8862e4fc..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworkpeerings` Documentation - -The `virtualnetworkpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworkpeerings" -``` - - -### Client Initialization - -```go -client := virtualnetworkpeerings.NewVirtualNetworkPeeringsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkPeeringsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworkpeerings.NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue") - -payload := virtualnetworkpeerings.VirtualNetworkPeering{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload, virtualnetworkpeerings.DefaultCreateOrUpdateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkPeeringsClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworkpeerings.NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkPeeringsClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworkpeerings.NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkPeeringsClient.List` - -```go -ctx := context.TODO() -id := virtualnetworkpeerings.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/client.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/client.go deleted file mode 100644 index becd896b345..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworkpeerings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeeringsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkPeeringsClientWithBaseURI(api environments.Api) (*VirtualNetworkPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworkpeerings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkPeeringsClient: %+v", err) - } - - return &VirtualNetworkPeeringsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/constants.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/constants.go deleted file mode 100644 index 0cb41da70fc..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/constants.go +++ /dev/null @@ -1,227 +0,0 @@ -package virtualnetworkpeerings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SyncRemoteAddressSpace string - -const ( - SyncRemoteAddressSpaceTrue SyncRemoteAddressSpace = "true" -) - -func PossibleValuesForSyncRemoteAddressSpace() []string { - return []string{ - string(SyncRemoteAddressSpaceTrue), - } -} - -func (s *SyncRemoteAddressSpace) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncRemoteAddressSpace(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncRemoteAddressSpace(input string) (*SyncRemoteAddressSpace, error) { - vals := map[string]SyncRemoteAddressSpace{ - "true": SyncRemoteAddressSpaceTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncRemoteAddressSpace(input) - return &out, nil -} - -type VirtualNetworkEncryptionEnforcement string - -const ( - VirtualNetworkEncryptionEnforcementAllowUnencrypted VirtualNetworkEncryptionEnforcement = "AllowUnencrypted" - VirtualNetworkEncryptionEnforcementDropUnencrypted VirtualNetworkEncryptionEnforcement = "DropUnencrypted" -) - -func PossibleValuesForVirtualNetworkEncryptionEnforcement() []string { - return []string{ - string(VirtualNetworkEncryptionEnforcementAllowUnencrypted), - string(VirtualNetworkEncryptionEnforcementDropUnencrypted), - } -} - -func (s *VirtualNetworkEncryptionEnforcement) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkEncryptionEnforcement(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkEncryptionEnforcement(input string) (*VirtualNetworkEncryptionEnforcement, error) { - vals := map[string]VirtualNetworkEncryptionEnforcement{ - "allowunencrypted": VirtualNetworkEncryptionEnforcementAllowUnencrypted, - "dropunencrypted": VirtualNetworkEncryptionEnforcementDropUnencrypted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkEncryptionEnforcement(input) - return &out, nil -} - -type VirtualNetworkPeeringLevel string - -const ( - VirtualNetworkPeeringLevelFullyInSync VirtualNetworkPeeringLevel = "FullyInSync" - VirtualNetworkPeeringLevelLocalAndRemoteNotInSync VirtualNetworkPeeringLevel = "LocalAndRemoteNotInSync" - VirtualNetworkPeeringLevelLocalNotInSync VirtualNetworkPeeringLevel = "LocalNotInSync" - VirtualNetworkPeeringLevelRemoteNotInSync VirtualNetworkPeeringLevel = "RemoteNotInSync" -) - -func PossibleValuesForVirtualNetworkPeeringLevel() []string { - return []string{ - string(VirtualNetworkPeeringLevelFullyInSync), - string(VirtualNetworkPeeringLevelLocalAndRemoteNotInSync), - string(VirtualNetworkPeeringLevelLocalNotInSync), - string(VirtualNetworkPeeringLevelRemoteNotInSync), - } -} - -func (s *VirtualNetworkPeeringLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPeeringLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPeeringLevel(input string) (*VirtualNetworkPeeringLevel, error) { - vals := map[string]VirtualNetworkPeeringLevel{ - "fullyinsync": VirtualNetworkPeeringLevelFullyInSync, - "localandremotenotinsync": VirtualNetworkPeeringLevelLocalAndRemoteNotInSync, - "localnotinsync": VirtualNetworkPeeringLevelLocalNotInSync, - "remotenotinsync": VirtualNetworkPeeringLevelRemoteNotInSync, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPeeringLevel(input) - return &out, nil -} - -type VirtualNetworkPeeringState string - -const ( - VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" - VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" - VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" -) - -func PossibleValuesForVirtualNetworkPeeringState() []string { - return []string{ - string(VirtualNetworkPeeringStateConnected), - string(VirtualNetworkPeeringStateDisconnected), - string(VirtualNetworkPeeringStateInitiated), - } -} - -func (s *VirtualNetworkPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPeeringState(input string) (*VirtualNetworkPeeringState, error) { - vals := map[string]VirtualNetworkPeeringState{ - "connected": VirtualNetworkPeeringStateConnected, - "disconnected": VirtualNetworkPeeringStateDisconnected, - "initiated": VirtualNetworkPeeringStateInitiated, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPeeringState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/id_virtualnetworkpeering.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/id_virtualnetworkpeering.go deleted file mode 100644 index aaaf017cf07..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/id_virtualnetworkpeering.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualnetworkpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkPeeringId{} - -// VirtualNetworkPeeringId is a struct representing the Resource ID for a Virtual Network Peering -type VirtualNetworkPeeringId struct { - SubscriptionId string - ResourceGroupName string - VirtualNetworkName string - VirtualNetworkPeeringName string -} - -// NewVirtualNetworkPeeringID returns a new VirtualNetworkPeeringId struct -func NewVirtualNetworkPeeringID(subscriptionId string, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) VirtualNetworkPeeringId { - return VirtualNetworkPeeringId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualNetworkName: virtualNetworkName, - VirtualNetworkPeeringName: virtualNetworkPeeringName, - } -} - -// ParseVirtualNetworkPeeringID parses 'input' into a VirtualNetworkPeeringId -func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkPeeringId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkPeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkName, ok = parsed.Parsed["virtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", *parsed) - } - - if id.VirtualNetworkPeeringName, ok = parsed.Parsed["virtualNetworkPeeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", *parsed) - } - - return &id, nil -} - -// ParseVirtualNetworkPeeringIDInsensitively parses 'input' case-insensitively into a VirtualNetworkPeeringId -// note: this method should only be used for API response data and not user input -func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPeeringId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkPeeringId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkPeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkName, ok = parsed.Parsed["virtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", *parsed) - } - - if id.VirtualNetworkPeeringName, ok = parsed.Parsed["virtualNetworkPeeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualNetworkPeeringID checks that 'input' can be parsed as a Virtual Network Peering ID -func ValidateVirtualNetworkPeeringID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualNetworkPeeringID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Network Peering ID -func (id VirtualNetworkPeeringId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s/virtualNetworkPeerings/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualNetworkName, id.VirtualNetworkPeeringName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Network Peering ID -func (id VirtualNetworkPeeringId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualNetworks", "virtualNetworks", "virtualNetworks"), - resourceids.UserSpecifiedSegment("virtualNetworkName", "virtualNetworkValue"), - resourceids.StaticSegment("staticVirtualNetworkPeerings", "virtualNetworkPeerings", "virtualNetworkPeerings"), - resourceids.UserSpecifiedSegment("virtualNetworkPeeringName", "virtualNetworkPeeringValue"), - } -} - -// String returns a human-readable description of this Virtual Network Peering ID -func (id VirtualNetworkPeeringId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Network Name: %q", id.VirtualNetworkName), - fmt.Sprintf("Virtual Network Peering Name: %q", id.VirtualNetworkPeeringName), - } - return fmt.Sprintf("Virtual Network Peering (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/id_virtualnetworkpeering_test.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/id_virtualnetworkpeering_test.go deleted file mode 100644 index 3b574d37ed3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/id_virtualnetworkpeering_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualnetworkpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkPeeringId{} - -func TestNewVirtualNetworkPeeringID(t *testing.T) { - id := NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualNetworkName != "virtualNetworkValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkName'", id.VirtualNetworkName, "virtualNetworkValue") - } - - if id.VirtualNetworkPeeringName != "virtualNetworkPeeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkPeeringName'", id.VirtualNetworkPeeringName, "virtualNetworkPeeringValue") - } -} - -func TestFormatVirtualNetworkPeeringID(t *testing.T) { - actual := NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualNetworkPeeringID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkPeeringId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue", - Expected: &VirtualNetworkPeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkName: "virtualNetworkValue", - VirtualNetworkPeeringName: "virtualNetworkPeeringValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkPeeringID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkName != v.Expected.VirtualNetworkName { - t.Fatalf("Expected %q but got %q for VirtualNetworkName", v.Expected.VirtualNetworkName, actual.VirtualNetworkName) - } - - if actual.VirtualNetworkPeeringName != v.Expected.VirtualNetworkPeeringName { - t.Fatalf("Expected %q but got %q for VirtualNetworkPeeringName", v.Expected.VirtualNetworkPeeringName, actual.VirtualNetworkPeeringName) - } - - } -} - -func TestParseVirtualNetworkPeeringIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkPeeringId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs/vIrTuAlNeTwOrKvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs/vIrTuAlNeTwOrKvAlUe/vIrTuAlNeTwOrKpEeRiNgS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue", - Expected: &VirtualNetworkPeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkName: "virtualNetworkValue", - VirtualNetworkPeeringName: "virtualNetworkPeeringValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs/vIrTuAlNeTwOrKvAlUe/vIrTuAlNeTwOrKpEeRiNgS/vIrTuAlNeTwOrKpEeRiNgVaLuE", - Expected: &VirtualNetworkPeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualNetworkName: "vIrTuAlNeTwOrKvAlUe", - VirtualNetworkPeeringName: "vIrTuAlNeTwOrKpEeRiNgVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs/vIrTuAlNeTwOrKvAlUe/vIrTuAlNeTwOrKpEeRiNgS/vIrTuAlNeTwOrKpEeRiNgVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkPeeringIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkName != v.Expected.VirtualNetworkName { - t.Fatalf("Expected %q but got %q for VirtualNetworkName", v.Expected.VirtualNetworkName, actual.VirtualNetworkName) - } - - if actual.VirtualNetworkPeeringName != v.Expected.VirtualNetworkPeeringName { - t.Fatalf("Expected %q but got %q for VirtualNetworkPeeringName", v.Expected.VirtualNetworkPeeringName, actual.VirtualNetworkPeeringName) - } - - } -} - -func TestSegmentsForVirtualNetworkPeeringId(t *testing.T) { - segments := VirtualNetworkPeeringId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualNetworkPeeringId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_createorupdate.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_createorupdate.go deleted file mode 100644 index 705f6d3f092..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_createorupdate.go +++ /dev/null @@ -1,102 +0,0 @@ -package virtualnetworkpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type CreateOrUpdateOperationOptions struct { - SyncRemoteAddressSpace *SyncRemoteAddressSpace -} - -func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions { - return CreateOrUpdateOperationOptions{} -} - -func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.SyncRemoteAddressSpace != nil { - out.Append("syncRemoteAddressSpace", fmt.Sprintf("%v", *o.SyncRemoteAddressSpace)) - } - return &out -} - -// CreateOrUpdate ... -func (c VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, id VirtualNetworkPeeringId, input VirtualNetworkPeering, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworkPeeringsClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkPeeringId, input VirtualNetworkPeering, options CreateOrUpdateOperationOptions) error { - result, err := c.CreateOrUpdate(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_delete.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_delete.go deleted file mode 100644 index 0d0ded252a4..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworkpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworkPeeringsClient) Delete(ctx context.Context, id VirtualNetworkPeeringId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworkPeeringsClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkPeeringId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_get.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_get.go deleted file mode 100644 index bd83fb76d79..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworkpeerings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkPeering -} - -// Get ... -func (c VirtualNetworkPeeringsClient) Get(ctx context.Context, id VirtualNetworkPeeringId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_list.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_list.go deleted file mode 100644 index ad8e9a444c7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworkpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkPeering -} - -type ListCompleteResult struct { - Items []VirtualNetworkPeering -} - -// List ... -func (c VirtualNetworkPeeringsClient) List(ctx context.Context, id commonids.VirtualNetworkId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/virtualNetworkPeerings", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkPeering `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualNetworkPeeringsClient) ListComplete(ctx context.Context, id commonids.VirtualNetworkId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualNetworkPeeringOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkPeeringsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, predicate VirtualNetworkPeeringOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualNetworkPeering, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_addressspace.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_addressspace.go deleted file mode 100644 index dadfe5be0b5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_subresource.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_subresource.go deleted file mode 100644 index 07cc63aadbb..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkbgpcommunities.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkbgpcommunities.go deleted file mode 100644 index a1302f81779..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkbgpcommunities.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkBgpCommunities struct { - RegionalCommunity *string `json:"regionalCommunity,omitempty"` - VirtualNetworkCommunity string `json:"virtualNetworkCommunity"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkencryption.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkencryption.go deleted file mode 100644 index 82989ac5992..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkencryption.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkEncryption struct { - Enabled bool `json:"enabled"` - Enforcement *VirtualNetworkEncryptionEnforcement `json:"enforcement,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkpeering.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkpeering.go deleted file mode 100644 index 4b0c5a50abf..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkpeeringpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkpeeringpropertiesformat.go deleted file mode 100644 index c7f9534bb15..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/model_virtualnetworkpeeringpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeeringPropertiesFormat struct { - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` - DoNotVerifyRemoteGateways *bool `json:"doNotVerifyRemoteGateways,omitempty"` - PeeringState *VirtualNetworkPeeringState `json:"peeringState,omitempty"` - PeeringSyncLevel *VirtualNetworkPeeringLevel `json:"peeringSyncLevel,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` - RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"` - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - RemoteVirtualNetworkAddressSpace *AddressSpace `json:"remoteVirtualNetworkAddressSpace,omitempty"` - RemoteVirtualNetworkEncryption *VirtualNetworkEncryption `json:"remoteVirtualNetworkEncryption,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/predicates.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/predicates.go deleted file mode 100644 index a945839e0b2..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeeringOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VirtualNetworkPeeringOperationPredicate) Matches(input VirtualNetworkPeering) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualnetworkpeerings/version.go b/resource-manager/network/2022-09-01/virtualnetworkpeerings/version.go deleted file mode 100644 index 74581e8e874..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworkpeerings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkpeerings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkpeerings/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/README.md b/resource-manager/network/2022-09-01/virtualnetworks/README.md deleted file mode 100644 index 2efd038724b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/README.md +++ /dev/null @@ -1,236 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworks` Documentation - -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworks" -``` - - -### Client Initialization - -```go -client := virtualnetworks.NewVirtualNetworksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworksClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -payload := virtualnetworks.VirtualNetwork{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworksClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworksClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -read, err := client.Get(ctx, id, virtualnetworks.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.List` - -```go -ctx := context.TODO() -id := virtualnetworks.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworksClient.ListAll` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworksClient.ResourceNavigationLinksList` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -read, err := client.ResourceNavigationLinksList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.ServiceAssociationLinksList` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -read, err := client.ServiceAssociationLinksList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.SubnetsPrepareNetworkPolicies` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -payload := virtualnetworks.PrepareNetworkPoliciesRequest{ - // ... -} - - -if err := client.SubnetsPrepareNetworkPoliciesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworksClient.SubnetsUnprepareNetworkPolicies` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -payload := virtualnetworks.UnprepareNetworkPoliciesRequest{ - // ... -} - - -if err := client.SubnetsUnprepareNetworkPoliciesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworksClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -payload := virtualnetworks.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.VirtualNetworksCheckIPAddressAvailability` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -read, err := client.VirtualNetworksCheckIPAddressAvailability(ctx, id, virtualnetworks.DefaultVirtualNetworksCheckIPAddressAvailabilityOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.VirtualNetworksListDdosProtectionStatus` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -// alternatively `client.VirtualNetworksListDdosProtectionStatus(ctx, id, virtualnetworks.DefaultVirtualNetworksListDdosProtectionStatusOperationOptions())` can be used to do batched pagination -items, err := client.VirtualNetworksListDdosProtectionStatusComplete(ctx, id, virtualnetworks.DefaultVirtualNetworksListDdosProtectionStatusOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworksClient.VirtualNetworksListUsage` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -// alternatively `client.VirtualNetworksListUsage(ctx, id)` can be used to do batched pagination -items, err := client.VirtualNetworksListUsageComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/virtualnetworks/client.go b/resource-manager/network/2022-09-01/virtualnetworks/client.go deleted file mode 100644 index c274c9c87de..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworksClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworksClientWithBaseURI(api environments.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) - } - - return &VirtualNetworksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/constants.go b/resource-manager/network/2022-09-01/virtualnetworks/constants.go deleted file mode 100644 index 059e144a736..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/constants.go +++ /dev/null @@ -1,1186 +0,0 @@ -package virtualnetworks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type IsWorkloadProtected string - -const ( - IsWorkloadProtectedFalse IsWorkloadProtected = "False" - IsWorkloadProtectedTrue IsWorkloadProtected = "True" -) - -func PossibleValuesForIsWorkloadProtected() []string { - return []string{ - string(IsWorkloadProtectedFalse), - string(IsWorkloadProtectedTrue), - } -} - -func (s *IsWorkloadProtected) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsWorkloadProtected(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsWorkloadProtected(input string) (*IsWorkloadProtected, error) { - vals := map[string]IsWorkloadProtected{ - "false": IsWorkloadProtectedFalse, - "true": IsWorkloadProtectedTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsWorkloadProtected(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkEncryptionEnforcement string - -const ( - VirtualNetworkEncryptionEnforcementAllowUnencrypted VirtualNetworkEncryptionEnforcement = "AllowUnencrypted" - VirtualNetworkEncryptionEnforcementDropUnencrypted VirtualNetworkEncryptionEnforcement = "DropUnencrypted" -) - -func PossibleValuesForVirtualNetworkEncryptionEnforcement() []string { - return []string{ - string(VirtualNetworkEncryptionEnforcementAllowUnencrypted), - string(VirtualNetworkEncryptionEnforcementDropUnencrypted), - } -} - -func (s *VirtualNetworkEncryptionEnforcement) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkEncryptionEnforcement(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkEncryptionEnforcement(input string) (*VirtualNetworkEncryptionEnforcement, error) { - vals := map[string]VirtualNetworkEncryptionEnforcement{ - "allowunencrypted": VirtualNetworkEncryptionEnforcementAllowUnencrypted, - "dropunencrypted": VirtualNetworkEncryptionEnforcementDropUnencrypted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkEncryptionEnforcement(input) - return &out, nil -} - -type VirtualNetworkPeeringLevel string - -const ( - VirtualNetworkPeeringLevelFullyInSync VirtualNetworkPeeringLevel = "FullyInSync" - VirtualNetworkPeeringLevelLocalAndRemoteNotInSync VirtualNetworkPeeringLevel = "LocalAndRemoteNotInSync" - VirtualNetworkPeeringLevelLocalNotInSync VirtualNetworkPeeringLevel = "LocalNotInSync" - VirtualNetworkPeeringLevelRemoteNotInSync VirtualNetworkPeeringLevel = "RemoteNotInSync" -) - -func PossibleValuesForVirtualNetworkPeeringLevel() []string { - return []string{ - string(VirtualNetworkPeeringLevelFullyInSync), - string(VirtualNetworkPeeringLevelLocalAndRemoteNotInSync), - string(VirtualNetworkPeeringLevelLocalNotInSync), - string(VirtualNetworkPeeringLevelRemoteNotInSync), - } -} - -func (s *VirtualNetworkPeeringLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPeeringLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPeeringLevel(input string) (*VirtualNetworkPeeringLevel, error) { - vals := map[string]VirtualNetworkPeeringLevel{ - "fullyinsync": VirtualNetworkPeeringLevelFullyInSync, - "localandremotenotinsync": VirtualNetworkPeeringLevelLocalAndRemoteNotInSync, - "localnotinsync": VirtualNetworkPeeringLevelLocalNotInSync, - "remotenotinsync": VirtualNetworkPeeringLevelRemoteNotInSync, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPeeringLevel(input) - return &out, nil -} - -type VirtualNetworkPeeringState string - -const ( - VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" - VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" - VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" -) - -func PossibleValuesForVirtualNetworkPeeringState() []string { - return []string{ - string(VirtualNetworkPeeringStateConnected), - string(VirtualNetworkPeeringStateDisconnected), - string(VirtualNetworkPeeringStateInitiated), - } -} - -func (s *VirtualNetworkPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPeeringState(input string) (*VirtualNetworkPeeringState, error) { - vals := map[string]VirtualNetworkPeeringState{ - "connected": VirtualNetworkPeeringStateConnected, - "disconnected": VirtualNetworkPeeringStateDisconnected, - "initiated": VirtualNetworkPeeringStateInitiated, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPeeringState(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_createorupdate.go b/resource-manager/network/2022-09-01/virtualnetworks/method_createorupdate.go deleted file mode 100644 index 4b2992b2c9c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualNetworksClient) CreateOrUpdate(ctx context.Context, id commonids.VirtualNetworkId, input VirtualNetwork) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworksClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualNetworkId, input VirtualNetwork) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_delete.go b/resource-manager/network/2022-09-01/virtualnetworks/method_delete.go deleted file mode 100644 index 53212cd5aba..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworksClient) Delete(ctx context.Context, id commonids.VirtualNetworkId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworksClient) DeleteThenPoll(ctx context.Context, id commonids.VirtualNetworkId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_get.go b/resource-manager/network/2022-09-01/virtualnetworks/method_get.go deleted file mode 100644 index 3c63f6e1f3e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_get.go +++ /dev/null @@ -1,81 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetwork -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c VirtualNetworksClient) Get(ctx context.Context, id commonids.VirtualNetworkId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_list.go b/resource-manager/network/2022-09-01/virtualnetworks/method_list.go deleted file mode 100644 index 61ed068daaf..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetwork -} - -type ListCompleteResult struct { - Items []VirtualNetwork -} - -// List ... -func (c VirtualNetworksClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetwork `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualNetworksClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualNetworkOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworksClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualNetworkOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualNetwork, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_listall.go b/resource-manager/network/2022-09-01/virtualnetworks/method_listall.go deleted file mode 100644 index 449dbc671f9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetwork -} - -type ListAllCompleteResult struct { - Items []VirtualNetwork -} - -// ListAll ... -func (c VirtualNetworksClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetwork `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c VirtualNetworksClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, VirtualNetworkOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworksClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualNetworkOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]VirtualNetwork, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_resourcenavigationlinkslist.go b/resource-manager/network/2022-09-01/virtualnetworks/method_resourcenavigationlinkslist.go deleted file mode 100644 index 985a51cbc4a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_resourcenavigationlinkslist.go +++ /dev/null @@ -1,53 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinksListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ResourceNavigationLinksListResult -} - -// ResourceNavigationLinksList ... -func (c VirtualNetworksClient) ResourceNavigationLinksList(ctx context.Context, id commonids.SubnetId) (result ResourceNavigationLinksListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/resourceNavigationLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_serviceassociationlinkslist.go b/resource-manager/network/2022-09-01/virtualnetworks/method_serviceassociationlinkslist.go deleted file mode 100644 index c80b23963bf..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_serviceassociationlinkslist.go +++ /dev/null @@ -1,53 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinksListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceAssociationLinksListResult -} - -// ServiceAssociationLinksList ... -func (c VirtualNetworksClient) ServiceAssociationLinksList(ctx context.Context, id commonids.SubnetId) (result ServiceAssociationLinksListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/serviceAssociationLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_subnetspreparenetworkpolicies.go b/resource-manager/network/2022-09-01/virtualnetworks/method_subnetspreparenetworkpolicies.go deleted file mode 100644 index b42b121f904..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_subnetspreparenetworkpolicies.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetsPrepareNetworkPoliciesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SubnetsPrepareNetworkPolicies ... -func (c VirtualNetworksClient) SubnetsPrepareNetworkPolicies(ctx context.Context, id commonids.SubnetId, input PrepareNetworkPoliciesRequest) (result SubnetsPrepareNetworkPoliciesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/prepareNetworkPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SubnetsPrepareNetworkPoliciesThenPoll performs SubnetsPrepareNetworkPolicies then polls until it's completed -func (c VirtualNetworksClient) SubnetsPrepareNetworkPoliciesThenPoll(ctx context.Context, id commonids.SubnetId, input PrepareNetworkPoliciesRequest) error { - result, err := c.SubnetsPrepareNetworkPolicies(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SubnetsPrepareNetworkPolicies: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SubnetsPrepareNetworkPolicies: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_subnetsunpreparenetworkpolicies.go b/resource-manager/network/2022-09-01/virtualnetworks/method_subnetsunpreparenetworkpolicies.go deleted file mode 100644 index 69a0e33a2c8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_subnetsunpreparenetworkpolicies.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetsUnprepareNetworkPoliciesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SubnetsUnprepareNetworkPolicies ... -func (c VirtualNetworksClient) SubnetsUnprepareNetworkPolicies(ctx context.Context, id commonids.SubnetId, input UnprepareNetworkPoliciesRequest) (result SubnetsUnprepareNetworkPoliciesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/unprepareNetworkPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SubnetsUnprepareNetworkPoliciesThenPoll performs SubnetsUnprepareNetworkPolicies then polls until it's completed -func (c VirtualNetworksClient) SubnetsUnprepareNetworkPoliciesThenPoll(ctx context.Context, id commonids.SubnetId, input UnprepareNetworkPoliciesRequest) error { - result, err := c.SubnetsUnprepareNetworkPolicies(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SubnetsUnprepareNetworkPolicies: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SubnetsUnprepareNetworkPolicies: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_updatetags.go b/resource-manager/network/2022-09-01/virtualnetworks/method_updatetags.go deleted file mode 100644 index 717bb61aa72..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_updatetags.go +++ /dev/null @@ -1,56 +0,0 @@ -package virtualnetworks - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetwork -} - -// UpdateTags ... -func (c VirtualNetworksClient) UpdateTags(ctx context.Context, id commonids.VirtualNetworkId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go b/resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go deleted file mode 100644 index 0567355dd14..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go +++ /dev/null @@ -1,81 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworksCheckIPAddressAvailabilityOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPAddressAvailabilityResult -} - -type VirtualNetworksCheckIPAddressAvailabilityOperationOptions struct { - IPAddress *string -} - -func DefaultVirtualNetworksCheckIPAddressAvailabilityOperationOptions() VirtualNetworksCheckIPAddressAvailabilityOperationOptions { - return VirtualNetworksCheckIPAddressAvailabilityOperationOptions{} -} - -func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.IPAddress != nil { - out.Append("ipAddress", fmt.Sprintf("%v", *o.IPAddress)) - } - return &out -} - -// VirtualNetworksCheckIPAddressAvailability ... -func (c VirtualNetworksClient) VirtualNetworksCheckIPAddressAvailability(ctx context.Context, id commonids.VirtualNetworkId, options VirtualNetworksCheckIPAddressAvailabilityOperationOptions) (result VirtualNetworksCheckIPAddressAvailabilityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/checkIPAddressAvailability", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go deleted file mode 100644 index 9bc1ee99d76..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ /dev/null @@ -1,117 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworksListDdosProtectionStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPDdosProtectionStatusResult -} - -type VirtualNetworksListDdosProtectionStatusCompleteResult struct { - Items []PublicIPDdosProtectionStatusResult -} - -type VirtualNetworksListDdosProtectionStatusOperationOptions struct { - SkipToken *string - Top *int64 -} - -func DefaultVirtualNetworksListDdosProtectionStatusOperationOptions() VirtualNetworksListDdosProtectionStatusOperationOptions { - return VirtualNetworksListDdosProtectionStatusOperationOptions{} -} - -func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.SkipToken != nil { - out.Append("skipToken", fmt.Sprintf("%v", *o.SkipToken)) - } - if o.Top != nil { - out.Append("top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// VirtualNetworksListDdosProtectionStatus ... -func (c VirtualNetworksClient) VirtualNetworksListDdosProtectionStatus(ctx context.Context, id commonids.VirtualNetworkId, options VirtualNetworksListDdosProtectionStatusOperationOptions) (result VirtualNetworksListDdosProtectionStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/ddosProtectionStatus", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPDdosProtectionStatusResult `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualNetworksListDdosProtectionStatusThenPoll performs VirtualNetworksListDdosProtectionStatus then polls until it's completed -func (c VirtualNetworksClient) VirtualNetworksListDdosProtectionStatusThenPoll(ctx context.Context, id commonids.VirtualNetworkId, options VirtualNetworksListDdosProtectionStatusOperationOptions) error { - result, err := c.VirtualNetworksListDdosProtectionStatus(ctx, id, options) - if err != nil { - return fmt.Errorf("performing VirtualNetworksListDdosProtectionStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualNetworksListDdosProtectionStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkslistusage.go b/resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkslistusage.go deleted file mode 100644 index 19ece360ae9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/method_virtualnetworkslistusage.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworksListUsageOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkUsage -} - -type VirtualNetworksListUsageCompleteResult struct { - Items []VirtualNetworkUsage -} - -// VirtualNetworksListUsage ... -func (c VirtualNetworksClient) VirtualNetworksListUsage(ctx context.Context, id commonids.VirtualNetworkId) (result VirtualNetworksListUsageOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/usages", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkUsage `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualNetworksListUsageComplete retrieves all the results into a single object -func (c VirtualNetworksClient) VirtualNetworksListUsageComplete(ctx context.Context, id commonids.VirtualNetworkId) (VirtualNetworksListUsageCompleteResult, error) { - return c.VirtualNetworksListUsageCompleteMatchingPredicate(ctx, id, VirtualNetworkUsageOperationPredicate{}) -} - -// VirtualNetworksListUsageCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworksClient) VirtualNetworksListUsageCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, predicate VirtualNetworkUsageOperationPredicate) (result VirtualNetworksListUsageCompleteResult, err error) { - items := make([]VirtualNetworkUsage, 0) - - resp, err := c.VirtualNetworksListUsage(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualNetworksListUsageCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_addressspace.go b/resource-manager/network/2022-09-01/virtualnetworks/model_addressspace.go deleted file mode 100644 index 9e0e23e9145..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 3f9607979a8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 6f399a7bf5d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 953789d1f3e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 3da3cb7d9c8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index d9d39242c2b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/virtualnetworks/model_applicationsecuritygroup.go deleted file mode 100644 index 8069aeaaf35..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 29a50229369..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_backendaddresspool.go b/resource-manager/network/2022-09-01/virtualnetworks/model_backendaddresspool.go deleted file mode 100644 index dca54b5ff44..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index af9dbefab27..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 4608979dcd2..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_ddossettings.go b/resource-manager/network/2022-09-01/virtualnetworks/model_ddossettings.go deleted file mode 100644 index 1a0ce5cf3aa..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_delegation.go b/resource-manager/network/2022-09-01/virtualnetworks/model_delegation.go deleted file mode 100644 index a8d0d243017..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_dhcpoptions.go b/resource-manager/network/2022-09-01/virtualnetworks/model_dhcpoptions.go deleted file mode 100644 index 2e389bf9503..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_dhcpoptions.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DhcpOptions struct { - DnsServers *[]string `json:"dnsServers,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_flowlog.go b/resource-manager/network/2022-09-01/virtualnetworks/model_flowlog.go deleted file mode 100644 index b920c2a5d05..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/virtualnetworks/model_flowlogformatparameters.go deleted file mode 100644 index 62b8c967d59..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_flowlogpropertiesformat.go deleted file mode 100644 index 46ad7cc1502..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworks/model_frontendipconfiguration.go deleted file mode 100644 index 4b7f7549a8a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 7f51afc745f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/virtualnetworks/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index ef3318f49d4..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_inboundnatrule.go b/resource-manager/network/2022-09-01/virtualnetworks/model_inboundnatrule.go deleted file mode 100644 index 20f0e56c966..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 8ca3d3cee59..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_ipaddressavailabilityresult.go b/resource-manager/network/2022-09-01/virtualnetworks/model_ipaddressavailabilityresult.go deleted file mode 100644 index 2db5fbd90fa..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_ipaddressavailabilityresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAddressAvailabilityResult struct { - Available *bool `json:"available,omitempty"` - AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` - IsPlatformReserved *bool `json:"isPlatformReserved,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfiguration.go deleted file mode 100644 index 7fc81013c87..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationprofile.go deleted file mode 100644 index 246a7d2784a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1c15860eaa4..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 5f7e978b372..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_iptag.go b/resource-manager/network/2022-09-01/virtualnetworks/model_iptag.go deleted file mode 100644 index 5f312015c16..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/virtualnetworks/model_loadbalancerbackendaddress.go deleted file mode 100644 index f84e6394098..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 5b16669363a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_natgateway.go b/resource-manager/network/2022-09-01/virtualnetworks/model_natgateway.go deleted file mode 100644 index e2a2c9ea1aa..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_natgatewaypropertiesformat.go deleted file mode 100644 index 11bdb034e9d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_natgatewaysku.go b/resource-manager/network/2022-09-01/virtualnetworks/model_natgatewaysku.go deleted file mode 100644 index 3375ec20625..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_natruleportmapping.go b/resource-manager/network/2022-09-01/virtualnetworks/model_natruleportmapping.go deleted file mode 100644 index c1f6eb9d264..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkintentpolicy.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkintentpolicy.go deleted file mode 100644 index 565f4c702ee..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkintentpolicy.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkIntentPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkintentpolicyconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkintentpolicyconfiguration.go deleted file mode 100644 index 3f3080bf421..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkintentpolicyconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkIntentPolicyConfiguration struct { - NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"` - SourceNetworkIntentPolicy *NetworkIntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterface.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterface.go deleted file mode 100644 index 51266c314db..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacednssettings.go deleted file mode 100644 index 35b796d58ea..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfiguration.go deleted file mode 100644 index e4fe127f68f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 0cf1411b04e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index d36857278bf..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacepropertiesformat.go deleted file mode 100644 index d6b3046fc75..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 7ee2c196852..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index f37548acc09..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networksecuritygroup.go deleted file mode 100644 index c6ffd2de200..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index bdaff37d6ec..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_preparenetworkpoliciesrequest.go b/resource-manager/network/2022-09-01/virtualnetworks/model_preparenetworkpoliciesrequest.go deleted file mode 100644 index af5d6a6061c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_preparenetworkpoliciesrequest.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrepareNetworkPoliciesRequest struct { - NetworkIntentPolicyConfigurations *[]NetworkIntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpoint.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpoint.go deleted file mode 100644 index a21e2003c7b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointconnection.go deleted file mode 100644 index 03c0943acbe..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointconnectionproperties.go deleted file mode 100644 index 6e88d534cbf..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointipconfiguration.go deleted file mode 100644 index b8c8c0e51e2..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 0e1ea69495c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointproperties.go deleted file mode 100644 index c204c6f06f5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkservice.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkservice.go deleted file mode 100644 index ea60905675d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnection.go deleted file mode 100644 index 45640ebd97e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index ece1141c4d0..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 498d4f92f9a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index b637ed217b5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 7c3080b30c1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceproperties.go deleted file mode 100644 index e187bf8454c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddress.go b/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddress.go deleted file mode 100644 index 5eef47c77e3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddressdnssettings.go deleted file mode 100644 index 303439f2292..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddresspropertiesformat.go deleted file mode 100644 index f38386b9fd0..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddresssku.go deleted file mode 100644 index f080c20b33e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipddosprotectionstatusresult.go b/resource-manager/network/2022-09-01/virtualnetworks/model_publicipddosprotectionstatusresult.go deleted file mode 100644 index ca0f8cc894f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_publicipddosprotectionstatusresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPDdosProtectionStatusResult struct { - DdosProtectionPlanId *string `json:"ddosProtectionPlanId,omitempty"` - IsWorkloadProtected *IsWorkloadProtected `json:"isWorkloadProtected,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` - PublicIPAddressId *string `json:"publicIpAddressId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlink.go deleted file mode 100644 index e26d27c7784..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlinkformat.go deleted file mode 100644 index 5c0bb30457e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlinkslistresult.go b/resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlinkslistresult.go deleted file mode 100644 index 2aea67db63f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_resourcenavigationlinkslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinksListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ResourceNavigationLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_resourceset.go b/resource-manager/network/2022-09-01/virtualnetworks/model_resourceset.go deleted file mode 100644 index 3f176c096e6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/virtualnetworks/model_retentionpolicyparameters.go deleted file mode 100644 index b8a74239a26..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_route.go b/resource-manager/network/2022-09-01/virtualnetworks/model_route.go deleted file mode 100644 index d76eb9ceeec..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_routepropertiesformat.go deleted file mode 100644 index e52a5de8ca6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_routetable.go b/resource-manager/network/2022-09-01/virtualnetworks/model_routetable.go deleted file mode 100644 index 2e233c020e3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_routetablepropertiesformat.go deleted file mode 100644 index 69015d57403..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_securityrule.go b/resource-manager/network/2022-09-01/virtualnetworks/model_securityrule.go deleted file mode 100644 index f7ed0f51115..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_securityrulepropertiesformat.go deleted file mode 100644 index af160e60e64..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlink.go deleted file mode 100644 index 77039ca3b73..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index d6ef1f15de1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlinkslistresult.go b/resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlinkslistresult.go deleted file mode 100644 index 92970f6011f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceassociationlinkslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinksListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ServiceAssociationLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 82eb0f31d43..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicy.go deleted file mode 100644 index d50c20ce576..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 4d2ebe5ac46..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index b221dd2c319..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 00a9c1e5662..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 03a937b7d65..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_subnet.go b/resource-manager/network/2022-09-01/virtualnetworks/model_subnet.go deleted file mode 100644 index 7b3d4ff10c8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_subnetpropertiesformat.go deleted file mode 100644 index 599b6927d9c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_subresource.go b/resource-manager/network/2022-09-01/virtualnetworks/model_subresource.go deleted file mode 100644 index ecd84dace18..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_tagsobject.go b/resource-manager/network/2022-09-01/virtualnetworks/model_tagsobject.go deleted file mode 100644 index 9ac4400ec75..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworks/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index ce47549e2b9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/virtualnetworks/model_trafficanalyticsproperties.go deleted file mode 100644 index 26812782cc8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_unpreparenetworkpoliciesrequest.go b/resource-manager/network/2022-09-01/virtualnetworks/model_unpreparenetworkpoliciesrequest.go deleted file mode 100644 index 84b1fedbc2b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_unpreparenetworkpoliciesrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UnprepareNetworkPoliciesRequest struct { - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetwork.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetwork.go deleted file mode 100644 index 01f2a07994e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetwork.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetwork struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkbgpcommunities.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkbgpcommunities.go deleted file mode 100644 index ecb655fd234..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkbgpcommunities.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkBgpCommunities struct { - RegionalCommunity *string `json:"regionalCommunity,omitempty"` - VirtualNetworkCommunity string `json:"virtualNetworkCommunity"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkencryption.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkencryption.go deleted file mode 100644 index a0d8e13fe3a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkencryption.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkEncryption struct { - Enabled bool `json:"enabled"` - Enforcement *VirtualNetworkEncryptionEnforcement `json:"enforcement,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpeering.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpeering.go deleted file mode 100644 index 85b7fe9183a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpeeringpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpeeringpropertiesformat.go deleted file mode 100644 index 642e0676b8f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpeeringpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeeringPropertiesFormat struct { - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` - DoNotVerifyRemoteGateways *bool `json:"doNotVerifyRemoteGateways,omitempty"` - PeeringState *VirtualNetworkPeeringState `json:"peeringState,omitempty"` - PeeringSyncLevel *VirtualNetworkPeeringLevel `json:"peeringSyncLevel,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` - RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"` - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - RemoteVirtualNetworkAddressSpace *AddressSpace `json:"remoteVirtualNetworkAddressSpace,omitempty"` - RemoteVirtualNetworkEncryption *VirtualNetworkEncryption `json:"remoteVirtualNetworkEncryption,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpropertiesformat.go deleted file mode 100644 index a6ad3b4e3a0..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPropertiesFormat struct { - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"` - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` - EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` - EnableVMProtection *bool `json:"enableVmProtection,omitempty"` - Encryption *VirtualNetworkEncryption `json:"encryption,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlowTimeoutInMinutes *int64 `json:"flowTimeoutInMinutes,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` - VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworktap.go deleted file mode 100644 index d1b3faf4100..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 4c2bb1fad6c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkusage.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkusage.go deleted file mode 100644 index 470dd6b34f8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkusage.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkUsage struct { - CurrentValue *float64 `json:"currentValue,omitempty"` - Id *string `json:"id,omitempty"` - Limit *float64 `json:"limit,omitempty"` - Name *VirtualNetworkUsageName `json:"name,omitempty"` - Unit *string `json:"unit,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkusagename.go b/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkusagename.go deleted file mode 100644 index f3156ce6be8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/model_virtualnetworkusagename.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkUsageName struct { - LocalizedValue *string `json:"localizedValue,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/predicates.go b/resource-manager/network/2022-09-01/virtualnetworks/predicates.go deleted file mode 100644 index 32421738de2..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/predicates.go +++ /dev/null @@ -1,88 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPDdosProtectionStatusResultOperationPredicate struct { - DdosProtectionPlanId *string - PublicIPAddress *string - PublicIPAddressId *string -} - -func (p PublicIPDdosProtectionStatusResultOperationPredicate) Matches(input PublicIPDdosProtectionStatusResult) bool { - - if p.DdosProtectionPlanId != nil && (input.DdosProtectionPlanId == nil || *p.DdosProtectionPlanId != *input.DdosProtectionPlanId) { - return false - } - - if p.PublicIPAddress != nil && (input.PublicIPAddress == nil || *p.PublicIPAddress != *input.PublicIPAddress) { - return false - } - - if p.PublicIPAddressId != nil && (input.PublicIPAddressId == nil || *p.PublicIPAddressId != *input.PublicIPAddressId) { - return false - } - - return true -} - -type VirtualNetworkOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkOperationPredicate) Matches(input VirtualNetwork) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualNetworkUsageOperationPredicate struct { - CurrentValue *float64 - Id *string - Limit *float64 - Unit *string -} - -func (p VirtualNetworkUsageOperationPredicate) Matches(input VirtualNetworkUsage) bool { - - if p.CurrentValue != nil && (input.CurrentValue == nil || *p.CurrentValue != *input.CurrentValue) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Limit != nil && (input.Limit == nil || *p.Limit != *input.Limit) { - return false - } - - if p.Unit != nil && (input.Unit == nil || *p.Unit != *input.Unit) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualnetworks/version.go b/resource-manager/network/2022-09-01/virtualnetworks/version.go deleted file mode 100644 index c1b4f30552c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/README.md b/resource-manager/network/2022-09-01/virtualnetworktap/README.md deleted file mode 100644 index 27dbd9415e2..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworktap` Documentation - -The `virtualnetworktap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworktap" -``` - - -### Client Initialization - -```go -client := virtualnetworktap.NewVirtualNetworkTapClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkTapClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworktap.NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - -payload := virtualnetworktap.VirtualNetworkTap{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkTapClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworktap.NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkTapClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworktap.NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkTapClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualnetworktap.NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - -payload := virtualnetworktap.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/client.go b/resource-manager/network/2022-09-01/virtualnetworktap/client.go deleted file mode 100644 index ed44f57de37..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworktap - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkTapClientWithBaseURI(api environments.Api) (*VirtualNetworkTapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworktap", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkTapClient: %+v", err) - } - - return &VirtualNetworkTapClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/constants.go b/resource-manager/network/2022-09-01/virtualnetworktap/constants.go deleted file mode 100644 index 20a150eb595..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package virtualnetworktap - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/id_virtualnetworktap.go b/resource-manager/network/2022-09-01/virtualnetworktap/id_virtualnetworktap.go deleted file mode 100644 index 7e7e843e4d1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/id_virtualnetworktap.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualnetworktap - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkTapId{} - -// VirtualNetworkTapId is a struct representing the Resource ID for a Virtual Network Tap -type VirtualNetworkTapId struct { - SubscriptionId string - ResourceGroupName string - VirtualNetworkTapName string -} - -// NewVirtualNetworkTapID returns a new VirtualNetworkTapId struct -func NewVirtualNetworkTapID(subscriptionId string, resourceGroupName string, virtualNetworkTapName string) VirtualNetworkTapId { - return VirtualNetworkTapId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualNetworkTapName: virtualNetworkTapName, - } -} - -// ParseVirtualNetworkTapID parses 'input' into a VirtualNetworkTapId -func ParseVirtualNetworkTapID(input string) (*VirtualNetworkTapId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkTapId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkTapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkTapName, ok = parsed.Parsed["virtualNetworkTapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkTapName", *parsed) - } - - return &id, nil -} - -// ParseVirtualNetworkTapIDInsensitively parses 'input' case-insensitively into a VirtualNetworkTapId -// note: this method should only be used for API response data and not user input -func ParseVirtualNetworkTapIDInsensitively(input string) (*VirtualNetworkTapId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkTapId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkTapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkTapName, ok = parsed.Parsed["virtualNetworkTapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkTapName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualNetworkTapID checks that 'input' can be parsed as a Virtual Network Tap ID -func ValidateVirtualNetworkTapID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualNetworkTapID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Network Tap ID -func (id VirtualNetworkTapId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworkTaps/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualNetworkTapName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Network Tap ID -func (id VirtualNetworkTapId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualNetworkTaps", "virtualNetworkTaps", "virtualNetworkTaps"), - resourceids.UserSpecifiedSegment("virtualNetworkTapName", "virtualNetworkTapValue"), - } -} - -// String returns a human-readable description of this Virtual Network Tap ID -func (id VirtualNetworkTapId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Network Tap Name: %q", id.VirtualNetworkTapName), - } - return fmt.Sprintf("Virtual Network Tap (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/id_virtualnetworktap_test.go b/resource-manager/network/2022-09-01/virtualnetworktap/id_virtualnetworktap_test.go deleted file mode 100644 index 3188c76969e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/id_virtualnetworktap_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualnetworktap - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkTapId{} - -func TestNewVirtualNetworkTapID(t *testing.T) { - id := NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualNetworkTapName != "virtualNetworkTapValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkTapName'", id.VirtualNetworkTapName, "virtualNetworkTapValue") - } -} - -func TestFormatVirtualNetworkTapID(t *testing.T) { - actual := NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualNetworkTapID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkTapId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue", - Expected: &VirtualNetworkTapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkTapName: "virtualNetworkTapValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkTapID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkTapName != v.Expected.VirtualNetworkTapName { - t.Fatalf("Expected %q but got %q for VirtualNetworkTapName", v.Expected.VirtualNetworkTapName, actual.VirtualNetworkTapName) - } - - } -} - -func TestParseVirtualNetworkTapIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkTapId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKtApS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue", - Expected: &VirtualNetworkTapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkTapName: "virtualNetworkTapValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKtApS/vIrTuAlNeTwOrKtApVaLuE", - Expected: &VirtualNetworkTapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualNetworkTapName: "vIrTuAlNeTwOrKtApVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKtApS/vIrTuAlNeTwOrKtApVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkTapIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkTapName != v.Expected.VirtualNetworkTapName { - t.Fatalf("Expected %q but got %q for VirtualNetworkTapName", v.Expected.VirtualNetworkTapName, actual.VirtualNetworkTapName) - } - - } -} - -func TestSegmentsForVirtualNetworkTapId(t *testing.T) { - segments := VirtualNetworkTapId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualNetworkTapId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/method_createorupdate.go b/resource-manager/network/2022-09-01/virtualnetworktap/method_createorupdate.go deleted file mode 100644 index 4e1df6fbd4e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworktap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualNetworkTapClient) CreateOrUpdate(ctx context.Context, id VirtualNetworkTapId, input VirtualNetworkTap) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworkTapClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkTapId, input VirtualNetworkTap) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/method_delete.go b/resource-manager/network/2022-09-01/virtualnetworktap/method_delete.go deleted file mode 100644 index 93b4ec0c489..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworktap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworkTapClient) Delete(ctx context.Context, id VirtualNetworkTapId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworkTapClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkTapId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/method_get.go b/resource-manager/network/2022-09-01/virtualnetworktap/method_get.go deleted file mode 100644 index cb91236143f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworktap - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkTap -} - -// Get ... -func (c VirtualNetworkTapClient) Get(ctx context.Context, id VirtualNetworkTapId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/method_updatetags.go b/resource-manager/network/2022-09-01/virtualnetworktap/method_updatetags.go deleted file mode 100644 index fda5671abd1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package virtualnetworktap - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkTap -} - -// UpdateTags ... -func (c VirtualNetworkTapClient) UpdateTags(ctx context.Context, id VirtualNetworkTapId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddress.go deleted file mode 100644 index db62a91aeb1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index a220744195a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index f1a5f708c1c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewayipconfiguration.go deleted file mode 100644 index e0dd6f54986..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 05e2cf6e7ff..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationsecuritygroup.go deleted file mode 100644 index 89fac6f865a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index dd34d207344..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_backendaddresspool.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_backendaddresspool.go deleted file mode 100644 index 22fa8953303..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 05a9e141168..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index d263c1b8649..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_ddossettings.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_ddossettings.go deleted file mode 100644 index 934851a560f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_delegation.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_delegation.go deleted file mode 100644 index b98041c6409..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_flowlog.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_flowlog.go deleted file mode 100644 index ddd3757f710..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_flowlogformatparameters.go deleted file mode 100644 index 05c5660bcab..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_flowlogpropertiesformat.go deleted file mode 100644 index 64eb8ac4566..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_frontendipconfiguration.go deleted file mode 100644 index 8e718fbb787..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index df238cbcfd3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 3301ab1a1c7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_inboundnatrule.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_inboundnatrule.go deleted file mode 100644 index 7c4fefd00fe..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 9562bb00429..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfiguration.go deleted file mode 100644 index 072921c15aa..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationprofile.go deleted file mode 100644 index 319c9ec5ee9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index adf0a28fb73..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 14c8a64a2a2..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_iptag.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_iptag.go deleted file mode 100644 index 85d10556d1c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_loadbalancerbackendaddress.go deleted file mode 100644 index bb0a0c328c1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index b16ba8335ae..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_natgateway.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_natgateway.go deleted file mode 100644 index ff0008c8a9e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_natgatewaypropertiesformat.go deleted file mode 100644 index 314c102eee6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_natgatewaysku.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_natgatewaysku.go deleted file mode 100644 index efd87c92e07..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_natruleportmapping.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_natruleportmapping.go deleted file mode 100644 index 9c675767782..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterface.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterface.go deleted file mode 100644 index 90bd182032d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacednssettings.go deleted file mode 100644 index 8f7f5c9ab69..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 420ea20f4d2..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index e2d0d046dd7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index e8b6558e224..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 671ae2c84ba..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 1514177f60e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 4d5181920b1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networksecuritygroup.go deleted file mode 100644 index f1f880186f1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index c0a2565b3a0..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpoint.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpoint.go deleted file mode 100644 index 18177d11a3e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointconnection.go deleted file mode 100644 index 3a5764483c9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointconnectionproperties.go deleted file mode 100644 index 78130e93af9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointipconfiguration.go deleted file mode 100644 index 35ffb6cda11..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 8e362a6d1b5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointproperties.go deleted file mode 100644 index 8d42714c80d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkservice.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkservice.go deleted file mode 100644 index 42d87ebbbcb..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnection.go deleted file mode 100644 index 6218ca9e0c5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index bb689f2425d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 4510ba8bea7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 7f7ebc0d7f8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 9e874822a6b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceproperties.go deleted file mode 100644 index cbafd8f4967..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddress.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddress.go deleted file mode 100644 index 5059f6b2c6b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddressdnssettings.go deleted file mode 100644 index 838ec9ca294..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddresspropertiesformat.go deleted file mode 100644 index b1b74de6b82..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddresssku.go deleted file mode 100644 index c719ed93844..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_resourcenavigationlink.go deleted file mode 100644 index e1834b720d7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_resourcenavigationlinkformat.go deleted file mode 100644 index 5100c40bc8d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_resourceset.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_resourceset.go deleted file mode 100644 index fa8408e3374..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_retentionpolicyparameters.go deleted file mode 100644 index 402a95f81e1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_route.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_route.go deleted file mode 100644 index 5eb14c76d8d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_routepropertiesformat.go deleted file mode 100644 index 1e404b86207..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_routetable.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_routetable.go deleted file mode 100644 index c5bfa2aacc9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_routetablepropertiesformat.go deleted file mode 100644 index 788b58851db..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_securityrule.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_securityrule.go deleted file mode 100644 index 42a4c62093e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_securityrulepropertiesformat.go deleted file mode 100644 index 8b92ef45964..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceassociationlink.go deleted file mode 100644 index 806ced6b5e5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 9a18079edd6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 347761b277f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicy.go deleted file mode 100644 index 6ca8e2d4a35..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 05ee77e2b81..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 537a3df890d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index f2645082640..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 6da43c107d7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_subnet.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_subnet.go deleted file mode 100644 index e7d6771812b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_subnetpropertiesformat.go deleted file mode 100644 index f179399d941..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_subresource.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_subresource.go deleted file mode 100644 index da7e12e526b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_tagsobject.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_tagsobject.go deleted file mode 100644 index 1c98be14a33..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 89aa415edbb..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_trafficanalyticsproperties.go deleted file mode 100644 index 701cc7ae154..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_virtualnetworktap.go deleted file mode 100644 index 209659855b5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktap/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 5c2f9db5892..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktap/version.go b/resource-manager/network/2022-09-01/virtualnetworktap/version.go deleted file mode 100644 index e22b153e8a1..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktap/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktap/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/README.md b/resource-manager/network/2022-09-01/virtualnetworktaps/README.md deleted file mode 100644 index 5f672343975..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworktaps` Documentation - -The `virtualnetworktaps` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualnetworktaps" -``` - - -### Client Initialization - -```go -client := virtualnetworktaps.NewVirtualNetworkTapsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkTapsClient.ListAll` - -```go -ctx := context.TODO() -id := virtualnetworktaps.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkTapsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualnetworktaps.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/client.go b/resource-manager/network/2022-09-01/virtualnetworktaps/client.go deleted file mode 100644 index ef1af892cdc..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworktaps - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkTapsClientWithBaseURI(api environments.Api) (*VirtualNetworkTapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworktaps", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkTapsClient: %+v", err) - } - - return &VirtualNetworkTapsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/constants.go b/resource-manager/network/2022-09-01/virtualnetworktaps/constants.go deleted file mode 100644 index ec6c33780c3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package virtualnetworktaps - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/method_listall.go b/resource-manager/network/2022-09-01/virtualnetworktaps/method_listall.go deleted file mode 100644 index c2241d9d29a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworktaps - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkTap -} - -type ListAllCompleteResult struct { - Items []VirtualNetworkTap -} - -// ListAll ... -func (c VirtualNetworkTapsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworkTaps", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkTap `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c VirtualNetworkTapsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, VirtualNetworkTapOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkTapsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualNetworkTapOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]VirtualNetworkTap, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/virtualnetworktaps/method_listbyresourcegroup.go deleted file mode 100644 index 2e4d8c6fa90..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworktaps - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkTap -} - -type ListByResourceGroupCompleteResult struct { - Items []VirtualNetworkTap -} - -// ListByResourceGroup ... -func (c VirtualNetworkTapsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworkTaps", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkTap `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualNetworkTapsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, VirtualNetworkTapOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkTapsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualNetworkTapOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]VirtualNetworkTap, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddress.go deleted file mode 100644 index b76026be6bc..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index b8bc620ea71..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index f6179e4f0e3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 9e995dbb56d..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 0c3c2c531f3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationsecuritygroup.go deleted file mode 100644 index 1c38043ef88..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 9102a6b9188..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_backendaddresspool.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_backendaddresspool.go deleted file mode 100644 index 2c478d85562..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index e04619de88e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 36b2063994a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ddossettings.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_ddossettings.go deleted file mode 100644 index cbd6745cb8e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_delegation.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_delegation.go deleted file mode 100644 index 018e0605aee..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlog.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlog.go deleted file mode 100644 index 5a7b0a4647b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlogformatparameters.go deleted file mode 100644 index 3dc25c465d0..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlogpropertiesformat.go deleted file mode 100644 index 6fc887f8010..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_frontendipconfiguration.go deleted file mode 100644 index 35e28c95460..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index c6949a4745a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index a2e82dba72b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_inboundnatrule.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_inboundnatrule.go deleted file mode 100644 index f84bd93f6c7..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 8200337ef35..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfiguration.go deleted file mode 100644 index fcd9033c4a4..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationprofile.go deleted file mode 100644 index 2e7b5cfe5eb..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1d5ab92dcd5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 4a486230c36..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_iptag.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_iptag.go deleted file mode 100644 index c4127e59d60..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_loadbalancerbackendaddress.go deleted file mode 100644 index 7a8c5cb8b73..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index d3193da6576..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_natgateway.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_natgateway.go deleted file mode 100644 index b2e289b8923..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_natgatewaypropertiesformat.go deleted file mode 100644 index 17859bcb59e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_natgatewaysku.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_natgatewaysku.go deleted file mode 100644 index cab72fef58e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_natruleportmapping.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_natruleportmapping.go deleted file mode 100644 index 2426f4e9182..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterface.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterface.go deleted file mode 100644 index 0959f2effbd..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacednssettings.go deleted file mode 100644 index 63a0e5410a5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 3295f16b481..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 7659a03380a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index dcfd84eac61..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 35b3ceb7ece..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 3d883d5678c..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index dd9ef377372..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networksecuritygroup.go deleted file mode 100644 index d3ce4b39ea6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 57de91eafd3..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpoint.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpoint.go deleted file mode 100644 index b58c024b508..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointconnection.go deleted file mode 100644 index 3d314882781..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointconnectionproperties.go deleted file mode 100644 index 0db7d18e597..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointipconfiguration.go deleted file mode 100644 index 40468e7e3ae..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 46faf7b053b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointproperties.go deleted file mode 100644 index 44ca9629906..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkservice.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkservice.go deleted file mode 100644 index 8df5b6ca8e9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnection.go deleted file mode 100644 index 3d9511e926a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 149dad152de..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 5ae16683918..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 830a49d4825..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index b3b914d17a6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceproperties.go deleted file mode 100644 index 9e5885610f5..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddress.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddress.go deleted file mode 100644 index a63d498e9b2..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddressdnssettings.go deleted file mode 100644 index b2dc7a62f43..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddresspropertiesformat.go deleted file mode 100644 index f3a6e76f01e..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddresssku.go deleted file mode 100644 index b6d56cb8fcd..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_resourcenavigationlink.go deleted file mode 100644 index b362ba5a95b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_resourcenavigationlinkformat.go deleted file mode 100644 index 83b81bd5755..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_resourceset.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_resourceset.go deleted file mode 100644 index 7e28952a0a0..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_retentionpolicyparameters.go deleted file mode 100644 index 9a09f483b36..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_route.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_route.go deleted file mode 100644 index fe09505f366..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_routepropertiesformat.go deleted file mode 100644 index 3d3840b7cfb..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_routetable.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_routetable.go deleted file mode 100644 index dc456ac5330..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_routetablepropertiesformat.go deleted file mode 100644 index 29d5488b413..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_securityrule.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_securityrule.go deleted file mode 100644 index 2b52f93106a..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_securityrulepropertiesformat.go deleted file mode 100644 index 549b4d495a6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceassociationlink.go deleted file mode 100644 index eff71aa8797..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 72fe6efec6b..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_servicedelegationpropertiesformat.go deleted file mode 100644 index d130c80bc92..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicy.go deleted file mode 100644 index b164c8a3ad8..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicydefinition.go deleted file mode 100644 index a715beb370f..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 6283b834876..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index e39a39b0dc9..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpropertiesformat.go deleted file mode 100644 index c5085da61db..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_subnet.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_subnet.go deleted file mode 100644 index 586828d80aa..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_subnetpropertiesformat.go deleted file mode 100644 index be802f29a97..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_subresource.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_subresource.go deleted file mode 100644 index 64ad7a5e2b6..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 5d2043fba12..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_trafficanalyticsproperties.go deleted file mode 100644 index a673cd2c104..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_virtualnetworktap.go deleted file mode 100644 index d5bf88cf9cb..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/virtualnetworktaps/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index e75a60ff515..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/predicates.go b/resource-manager/network/2022-09-01/virtualnetworktaps/predicates.go deleted file mode 100644 index 0b7fb5985f4..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkTapOperationPredicate) Matches(input VirtualNetworkTap) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualnetworktaps/version.go b/resource-manager/network/2022-09-01/virtualnetworktaps/version.go deleted file mode 100644 index 5c6ddbafe69..00000000000 --- a/resource-manager/network/2022-09-01/virtualnetworktaps/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktaps/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/README.md b/resource-manager/network/2022-09-01/virtualrouterpeerings/README.md deleted file mode 100644 index 3f1d78ac48e..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualrouterpeerings` Documentation - -The `virtualrouterpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualrouterpeerings" -``` - - -### Client Initialization - -```go -client := virtualrouterpeerings.NewVirtualRouterPeeringsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualRouterPeeringsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualrouterpeerings.NewVirtualRouterPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue", "peeringValue") - -payload := virtualrouterpeerings.VirtualRouterPeering{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualRouterPeeringsClient.Delete` - -```go -ctx := context.TODO() -id := virtualrouterpeerings.NewVirtualRouterPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue", "peeringValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualRouterPeeringsClient.Get` - -```go -ctx := context.TODO() -id := virtualrouterpeerings.NewVirtualRouterPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue", "peeringValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualRouterPeeringsClient.List` - -```go -ctx := context.TODO() -id := virtualrouterpeerings.NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/client.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/client.go deleted file mode 100644 index 06dbd163078..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualrouterpeerings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPeeringsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualRouterPeeringsClientWithBaseURI(api environments.Api) (*VirtualRouterPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualrouterpeerings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualRouterPeeringsClient: %+v", err) - } - - return &VirtualRouterPeeringsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/constants.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/constants.go deleted file mode 100644 index 464d2b779c9..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package virtualrouterpeerings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/id_virtualrouter.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/id_virtualrouter.go deleted file mode 100644 index 885ce3a276a..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/id_virtualrouter.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualrouterpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualRouterId{} - -// VirtualRouterId is a struct representing the Resource ID for a Virtual Router -type VirtualRouterId struct { - SubscriptionId string - ResourceGroupName string - VirtualRouterName string -} - -// NewVirtualRouterID returns a new VirtualRouterId struct -func NewVirtualRouterID(subscriptionId string, resourceGroupName string, virtualRouterName string) VirtualRouterId { - return VirtualRouterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualRouterName: virtualRouterName, - } -} - -// ParseVirtualRouterID parses 'input' into a VirtualRouterId -func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualRouterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) - } - - return &id, nil -} - -// ParseVirtualRouterIDInsensitively parses 'input' case-insensitively into a VirtualRouterId -// note: this method should only be used for API response data and not user input -func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualRouterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualRouterID checks that 'input' can be parsed as a Virtual Router ID -func ValidateVirtualRouterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualRouterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Router ID -func (id VirtualRouterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualRouters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualRouterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Router ID -func (id VirtualRouterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualRouters", "virtualRouters", "virtualRouters"), - resourceids.UserSpecifiedSegment("virtualRouterName", "virtualRouterValue"), - } -} - -// String returns a human-readable description of this Virtual Router ID -func (id VirtualRouterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Router Name: %q", id.VirtualRouterName), - } - return fmt.Sprintf("Virtual Router (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/id_virtualrouter_test.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/id_virtualrouter_test.go deleted file mode 100644 index db1b29df7df..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/id_virtualrouter_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualrouterpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualRouterId{} - -func TestNewVirtualRouterID(t *testing.T) { - id := NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualRouterName != "virtualRouterValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualRouterName'", id.VirtualRouterName, "virtualRouterValue") - } -} - -func TestFormatVirtualRouterID(t *testing.T) { - actual := NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualRouterID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualRouterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualRouterName: "virtualRouterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualRouterID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualRouterName != v.Expected.VirtualRouterName { - t.Fatalf("Expected %q but got %q for VirtualRouterName", v.Expected.VirtualRouterName, actual.VirtualRouterName) - } - - } -} - -func TestParseVirtualRouterIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualRouterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualRouterName: "virtualRouterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS/vIrTuAlRoUtErVaLuE", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualRouterName: "vIrTuAlRoUtErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS/vIrTuAlRoUtErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualRouterIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualRouterName != v.Expected.VirtualRouterName { - t.Fatalf("Expected %q but got %q for VirtualRouterName", v.Expected.VirtualRouterName, actual.VirtualRouterName) - } - - } -} - -func TestSegmentsForVirtualRouterId(t *testing.T) { - segments := VirtualRouterId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualRouterId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/method_createorupdate.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/method_createorupdate.go deleted file mode 100644 index f6c2be4ebe6..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualrouterpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, id commonids.VirtualRouterPeeringId, input VirtualRouterPeering) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualRouterPeeringsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualRouterPeeringId, input VirtualRouterPeering) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/method_delete.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/method_delete.go deleted file mode 100644 index 0f1d37addbb..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualrouterpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualRouterPeeringsClient) Delete(ctx context.Context, id commonids.VirtualRouterPeeringId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualRouterPeeringsClient) DeleteThenPoll(ctx context.Context, id commonids.VirtualRouterPeeringId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/method_get.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/method_get.go deleted file mode 100644 index 5fb3287863d..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/method_get.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualrouterpeerings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualRouterPeering -} - -// Get ... -func (c VirtualRouterPeeringsClient) Get(ctx context.Context, id commonids.VirtualRouterPeeringId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/method_list.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/method_list.go deleted file mode 100644 index add4c4c4ed1..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualrouterpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualRouterPeering -} - -type ListCompleteResult struct { - Items []VirtualRouterPeering -} - -// List ... -func (c VirtualRouterPeeringsClient) List(ctx context.Context, id VirtualRouterId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/peerings", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualRouterPeering `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualRouterPeeringsClient) ListComplete(ctx context.Context, id VirtualRouterId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualRouterPeeringOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualRouterPeeringsClient) ListCompleteMatchingPredicate(ctx context.Context, id VirtualRouterId, predicate VirtualRouterPeeringOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualRouterPeering, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/model_virtualrouterpeering.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/model_virtualrouterpeering.go deleted file mode 100644 index 148137d1d12..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/model_virtualrouterpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualrouterpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualRouterPeeringProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/model_virtualrouterpeeringproperties.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/model_virtualrouterpeeringproperties.go deleted file mode 100644 index c205251cdff..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/model_virtualrouterpeeringproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualrouterpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPeeringProperties struct { - PeerAsn *int64 `json:"peerAsn,omitempty"` - PeerIP *string `json:"peerIp,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/predicates.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/predicates.go deleted file mode 100644 index 1e181881675..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package virtualrouterpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPeeringOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VirtualRouterPeeringOperationPredicate) Matches(input VirtualRouterPeering) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualrouterpeerings/version.go b/resource-manager/network/2022-09-01/virtualrouterpeerings/version.go deleted file mode 100644 index f39b5ab88e7..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouterpeerings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualrouterpeerings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouterpeerings/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/README.md b/resource-manager/network/2022-09-01/virtualrouters/README.md deleted file mode 100644 index 0c454a0957a..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/README.md +++ /dev/null @@ -1,99 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualrouters` Documentation - -The `virtualrouters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualrouters" -``` - - -### Client Initialization - -```go -client := virtualrouters.NewVirtualRoutersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualRoutersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualrouters.NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - -payload := virtualrouters.VirtualRouter{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualRoutersClient.Delete` - -```go -ctx := context.TODO() -id := virtualrouters.NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualRoutersClient.Get` - -```go -ctx := context.TODO() -id := virtualrouters.NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - -read, err := client.Get(ctx, id, virtualrouters.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualRoutersClient.List` - -```go -ctx := context.TODO() -id := virtualrouters.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualRoutersClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualrouters.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/virtualrouters/client.go b/resource-manager/network/2022-09-01/virtualrouters/client.go deleted file mode 100644 index 0c0a8fa4887..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualrouters - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRoutersClient struct { - Client *resourcemanager.Client -} - -func NewVirtualRoutersClientWithBaseURI(api environments.Api) (*VirtualRoutersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualrouters", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualRoutersClient: %+v", err) - } - - return &VirtualRoutersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/constants.go b/resource-manager/network/2022-09-01/virtualrouters/constants.go deleted file mode 100644 index 1a43afab5dd..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package virtualrouters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/id_virtualrouter.go b/resource-manager/network/2022-09-01/virtualrouters/id_virtualrouter.go deleted file mode 100644 index ecb01bd99e5..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/id_virtualrouter.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualrouters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualRouterId{} - -// VirtualRouterId is a struct representing the Resource ID for a Virtual Router -type VirtualRouterId struct { - SubscriptionId string - ResourceGroupName string - VirtualRouterName string -} - -// NewVirtualRouterID returns a new VirtualRouterId struct -func NewVirtualRouterID(subscriptionId string, resourceGroupName string, virtualRouterName string) VirtualRouterId { - return VirtualRouterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualRouterName: virtualRouterName, - } -} - -// ParseVirtualRouterID parses 'input' into a VirtualRouterId -func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualRouterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) - } - - return &id, nil -} - -// ParseVirtualRouterIDInsensitively parses 'input' case-insensitively into a VirtualRouterId -// note: this method should only be used for API response data and not user input -func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualRouterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualRouterID checks that 'input' can be parsed as a Virtual Router ID -func ValidateVirtualRouterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualRouterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Router ID -func (id VirtualRouterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualRouters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualRouterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Router ID -func (id VirtualRouterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualRouters", "virtualRouters", "virtualRouters"), - resourceids.UserSpecifiedSegment("virtualRouterName", "virtualRouterValue"), - } -} - -// String returns a human-readable description of this Virtual Router ID -func (id VirtualRouterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Router Name: %q", id.VirtualRouterName), - } - return fmt.Sprintf("Virtual Router (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/id_virtualrouter_test.go b/resource-manager/network/2022-09-01/virtualrouters/id_virtualrouter_test.go deleted file mode 100644 index 7948e51838c..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/id_virtualrouter_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualrouters - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualRouterId{} - -func TestNewVirtualRouterID(t *testing.T) { - id := NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualRouterName != "virtualRouterValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualRouterName'", id.VirtualRouterName, "virtualRouterValue") - } -} - -func TestFormatVirtualRouterID(t *testing.T) { - actual := NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualRouterID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualRouterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualRouterName: "virtualRouterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualRouterID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualRouterName != v.Expected.VirtualRouterName { - t.Fatalf("Expected %q but got %q for VirtualRouterName", v.Expected.VirtualRouterName, actual.VirtualRouterName) - } - - } -} - -func TestParseVirtualRouterIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualRouterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualRouterName: "virtualRouterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS/vIrTuAlRoUtErVaLuE", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualRouterName: "vIrTuAlRoUtErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS/vIrTuAlRoUtErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualRouterIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualRouterName != v.Expected.VirtualRouterName { - t.Fatalf("Expected %q but got %q for VirtualRouterName", v.Expected.VirtualRouterName, actual.VirtualRouterName) - } - - } -} - -func TestSegmentsForVirtualRouterId(t *testing.T) { - segments := VirtualRouterId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualRouterId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/method_createorupdate.go b/resource-manager/network/2022-09-01/virtualrouters/method_createorupdate.go deleted file mode 100644 index 3c1c2cd2781..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualRoutersClient) CreateOrUpdate(ctx context.Context, id VirtualRouterId, input VirtualRouter) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualRoutersClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualRouterId, input VirtualRouter) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/method_delete.go b/resource-manager/network/2022-09-01/virtualrouters/method_delete.go deleted file mode 100644 index 7dcaaf847d3..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualRoutersClient) Delete(ctx context.Context, id VirtualRouterId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualRoutersClient) DeleteThenPoll(ctx context.Context, id VirtualRouterId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/method_get.go b/resource-manager/network/2022-09-01/virtualrouters/method_get.go deleted file mode 100644 index c6a0af7c359..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualRouter -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c VirtualRoutersClient) Get(ctx context.Context, id VirtualRouterId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/method_list.go b/resource-manager/network/2022-09-01/virtualrouters/method_list.go deleted file mode 100644 index 633bf710c34..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualRouter -} - -type ListCompleteResult struct { - Items []VirtualRouter -} - -// List ... -func (c VirtualRoutersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualRouters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualRouter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualRoutersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualRouterOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualRoutersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualRouterOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualRouter, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/method_listbyresourcegroup.go b/resource-manager/network/2022-09-01/virtualrouters/method_listbyresourcegroup.go deleted file mode 100644 index 5e702661c15..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualRouter -} - -type ListByResourceGroupCompleteResult struct { - Items []VirtualRouter -} - -// ListByResourceGroup ... -func (c VirtualRoutersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualRouters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualRouter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualRoutersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, VirtualRouterOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualRoutersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualRouterOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]VirtualRouter, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/model_subresource.go b/resource-manager/network/2022-09-01/virtualrouters/model_subresource.go deleted file mode 100644 index f9c28cc090f..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualrouters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/model_virtualrouter.go b/resource-manager/network/2022-09-01/virtualrouters/model_virtualrouter.go deleted file mode 100644 index ac50af509f1..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/model_virtualrouter.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualrouters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouter struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualRouterPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/model_virtualrouterpropertiesformat.go b/resource-manager/network/2022-09-01/virtualrouters/model_virtualrouterpropertiesformat.go deleted file mode 100644 index 24601ff2eb4..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/model_virtualrouterpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualrouters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPropertiesFormat struct { - HostedGateway *SubResource `json:"hostedGateway,omitempty"` - HostedSubnet *SubResource `json:"hostedSubnet,omitempty"` - Peerings *[]SubResource `json:"peerings,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` - VirtualRouterIPs *[]string `json:"virtualRouterIps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/predicates.go b/resource-manager/network/2022-09-01/virtualrouters/predicates.go deleted file mode 100644 index 676ee423641..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package virtualrouters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualRouterOperationPredicate) Matches(input VirtualRouter) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualrouters/version.go b/resource-manager/network/2022-09-01/virtualrouters/version.go deleted file mode 100644 index 1206aca6bde..00000000000 --- a/resource-manager/network/2022-09-01/virtualrouters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualrouters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouters/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/README.md b/resource-manager/network/2022-09-01/virtualwans/README.md deleted file mode 100644 index 8e384cb621d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/README.md +++ /dev/null @@ -1,1405 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualwans` Documentation - -The `virtualwans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/virtualwans" -``` - - -### Client Initialization - -```go -client := virtualwans.NewVirtualWANsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualWANsClient.ConfigurationPolicyGroupsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue") - -payload := virtualwans.VpnServerConfigurationPolicyGroup{ - // ... -} - - -if err := client.ConfigurationPolicyGroupsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.ConfigurationPolicyGroupsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue") - -if err := client.ConfigurationPolicyGroupsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.ConfigurationPolicyGroupsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue") - -read, err := client.ConfigurationPolicyGroupsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.ConfigurationPolicyGroupsListByVpnServerConfiguration` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -// alternatively `client.ConfigurationPolicyGroupsListByVpnServerConfiguration(ctx, id)` can be used to do batched pagination -items, err := client.ConfigurationPolicyGroupsListByVpnServerConfigurationComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.Generatevirtualwanvpnserverconfigurationvpnprofile` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -payload := virtualwans.VirtualWanVpnProfileParameters{ - // ... -} - - -if err := client.GeneratevirtualwanvpnserverconfigurationvpnprofileThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubRouteTablesCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue") - -payload := virtualwans.HubRouteTable{ - // ... -} - - -if err := client.HubRouteTablesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubRouteTablesDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue") - -if err := client.HubRouteTablesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubRouteTablesGet` - -```go -ctx := context.TODO() -id := virtualwans.NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue") - -read, err := client.HubRouteTablesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.HubRouteTablesList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.HubRouteTablesList(ctx, id)` can be used to do batched pagination -items, err := client.HubRouteTablesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.HubVirtualNetworkConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue") - -payload := virtualwans.HubVirtualNetworkConnection{ - // ... -} - - -if err := client.HubVirtualNetworkConnectionsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubVirtualNetworkConnectionsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue") - -if err := client.HubVirtualNetworkConnectionsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubVirtualNetworkConnectionsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue") - -read, err := client.HubVirtualNetworkConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.HubVirtualNetworkConnectionsList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.HubVirtualNetworkConnectionsList(ctx, id)` can be used to do batched pagination -items, err := client.HubVirtualNetworkConnectionsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.NatRulesCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue") - -payload := virtualwans.VpnGatewayNatRule{ - // ... -} - - -if err := client.NatRulesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.NatRulesDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue") - -if err := client.NatRulesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.NatRulesGet` - -```go -ctx := context.TODO() -id := virtualwans.NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue") - -read, err := client.NatRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.NatRulesListByVpnGateway` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -// alternatively `client.NatRulesListByVpnGateway(ctx, id)` can be used to do batched pagination -items, err := client.NatRulesListByVpnGatewayComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := virtualwans.P2SVpnGateway{ - // ... -} - - -if err := client.P2sVpnGatewaysCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -if err := client.P2sVpnGatewaysDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -read, err := client.P2sVpnGatewaysGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.P2sVpnGatewaysList(ctx, id)` can be used to do batched pagination -items, err := client.P2sVpnGatewaysListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.P2sVpnGatewaysListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.P2sVpnGatewaysListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.RouteMapsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue") - -payload := virtualwans.RouteMap{ - // ... -} - - -if err := client.RouteMapsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.RouteMapsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue") - -if err := client.RouteMapsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.RouteMapsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue") - -read, err := client.RouteMapsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.RouteMapsList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.RouteMapsList(ctx, id)` can be used to do batched pagination -items, err := client.RouteMapsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.RoutingIntentCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue") - -payload := virtualwans.RoutingIntent{ - // ... -} - - -if err := client.RoutingIntentCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.RoutingIntentDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue") - -if err := client.RoutingIntentDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.RoutingIntentGet` - -```go -ctx := context.TODO() -id := virtualwans.NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue") - -read, err := client.RoutingIntentGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.RoutingIntentList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.RoutingIntentList(ctx, id)` can be used to do batched pagination -items, err := client.RoutingIntentListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.SupportedSecurityProviders` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -read, err := client.SupportedSecurityProviders(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -payload := virtualwans.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -payload := virtualwans.BgpConnection{ - // ... -} - - -if err := client.VirtualHubBgpConnectionCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -if err := client.VirtualHubBgpConnectionDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -read, err := client.VirtualHubBgpConnectionGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionsList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.VirtualHubBgpConnectionsList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubBgpConnectionsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionsListAdvertisedRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -if err := client.VirtualHubBgpConnectionsListAdvertisedRoutesThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionsListLearnedRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -if err := client.VirtualHubBgpConnectionsListLearnedRoutesThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubIPConfigurationCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "ipConfigurationValue") - -payload := virtualwans.HubIPConfiguration{ - // ... -} - - -if err := client.VirtualHubIPConfigurationCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubIPConfigurationDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "ipConfigurationValue") - -if err := client.VirtualHubIPConfigurationDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubIPConfigurationGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "ipConfigurationValue") - -read, err := client.VirtualHubIPConfigurationGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubIPConfigurationList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.VirtualHubIPConfigurationList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubIPConfigurationListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubRouteTableV2sCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue") - -payload := virtualwans.VirtualHubRouteTableV2{ - // ... -} - - -if err := client.VirtualHubRouteTableV2sCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubRouteTableV2sDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue") - -if err := client.VirtualHubRouteTableV2sDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubRouteTableV2sGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue") - -read, err := client.VirtualHubRouteTableV2sGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubRouteTableV2sList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.VirtualHubRouteTableV2sList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubRouteTableV2sListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.VirtualHub{ - // ... -} - - -if err := client.VirtualHubsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -if err := client.VirtualHubsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -read, err := client.VirtualHubsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsGetEffectiveVirtualHubRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.EffectiveRoutesParameters{ - // ... -} - - -if err := client.VirtualHubsGetEffectiveVirtualHubRoutesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsGetInboundRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.GetInboundRoutesParameters{ - // ... -} - - -if err := client.VirtualHubsGetInboundRoutesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsGetOutboundRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.GetOutboundRoutesParameters{ - // ... -} - - -if err := client.VirtualHubsGetOutboundRoutesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VirtualHubsList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VirtualHubsListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubsListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsUpdateTags` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.TagsObject{ - // ... -} - - -read, err := client.VirtualHubsUpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -payload := virtualwans.VirtualWAN{ - // ... -} - - -if err := client.VirtualWansCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -if err := client.VirtualWansDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -read, err := client.VirtualWansGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VirtualWansList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualWansListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VirtualWansListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VirtualWansListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -payload := virtualwans.VpnConnection{ - // ... -} - - -if err := client.VpnConnectionsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -if err := client.VpnConnectionsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -read, err := client.VpnConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsListByVpnGateway` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -// alternatively `client.VpnConnectionsListByVpnGateway(ctx, id)` can be used to do batched pagination -items, err := client.VpnConnectionsListByVpnGatewayComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsStartPacketCapture` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -payload := virtualwans.VpnConnectionPacketCaptureStartParameters{ - // ... -} - - -if err := client.VpnConnectionsStartPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsStopPacketCapture` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -payload := virtualwans.VpnConnectionPacketCaptureStopParameters{ - // ... -} - - -if err := client.VpnConnectionsStopPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -payload := virtualwans.VpnGateway{ - // ... -} - - -if err := client.VpnGatewaysCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -if err := client.VpnGatewaysDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -read, err := client.VpnGatewaysGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VpnGatewaysList(ctx, id)` can be used to do batched pagination -items, err := client.VpnGatewaysListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VpnGatewaysListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VpnGatewaysListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnLinkConnectionsGetIkeSas` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue") - -if err := client.VpnLinkConnectionsGetIkeSasThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnLinkConnectionsListByVpnConnection` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -// alternatively `client.VpnLinkConnectionsListByVpnConnection(ctx, id)` can be used to do batched pagination -items, err := client.VpnLinkConnectionsListByVpnConnectionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsAssociatedWithVirtualWanList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -if err := client.VpnServerConfigurationsAssociatedWithVirtualWanListThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -payload := virtualwans.VpnServerConfiguration{ - // ... -} - - -if err := client.VpnServerConfigurationsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -if err := client.VpnServerConfigurationsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -read, err := client.VpnServerConfigurationsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VpnServerConfigurationsList(ctx, id)` can be used to do batched pagination -items, err := client.VpnServerConfigurationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VpnServerConfigurationsListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VpnServerConfigurationsListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSiteLinkConnectionsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue") - -read, err := client.VpnSiteLinkConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSiteLinksGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue", "vpnSiteLinkValue") - -read, err := client.VpnSiteLinksGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSiteLinksListByVpnSite` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -// alternatively `client.VpnSiteLinksListByVpnSite(ctx, id)` can be used to do batched pagination -items, err := client.VpnSiteLinksListByVpnSiteComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesConfigurationDownload` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -payload := virtualwans.GetVpnSitesConfigurationRequest{ - // ... -} - - -if err := client.VpnSitesConfigurationDownloadThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -payload := virtualwans.VpnSite{ - // ... -} - - -if err := client.VpnSitesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -if err := client.VpnSitesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -read, err := client.VpnSitesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VpnSitesList(ctx, id)` can be used to do batched pagination -items, err := client.VpnSitesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VpnSitesListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VpnSitesListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/virtualwans/client.go b/resource-manager/network/2022-09-01/virtualwans/client.go deleted file mode 100644 index ae4ecc81d13..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualwans - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWANsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualWANsClientWithBaseURI(api environments.Api) (*VirtualWANsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualwans", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualWANsClient: %+v", err) - } - - return &VirtualWANsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/constants.go b/resource-manager/network/2022-09-01/virtualwans/constants.go deleted file mode 100644 index ce5d770b21d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/constants.go +++ /dev/null @@ -1,2197 +0,0 @@ -package virtualwans - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationMethod string - -const ( - AuthenticationMethodEAPMSCHAPvTwo AuthenticationMethod = "EAPMSCHAPv2" - AuthenticationMethodEAPTLS AuthenticationMethod = "EAPTLS" -) - -func PossibleValuesForAuthenticationMethod() []string { - return []string{ - string(AuthenticationMethodEAPMSCHAPvTwo), - string(AuthenticationMethodEAPTLS), - } -} - -func (s *AuthenticationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationMethod(input string) (*AuthenticationMethod, error) { - vals := map[string]AuthenticationMethod{ - "eapmschapv2": AuthenticationMethodEAPMSCHAPvTwo, - "eaptls": AuthenticationMethodEAPTLS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationMethod(input) - return &out, nil -} - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type HubBgpConnectionStatus string - -const ( - HubBgpConnectionStatusConnected HubBgpConnectionStatus = "Connected" - HubBgpConnectionStatusConnecting HubBgpConnectionStatus = "Connecting" - HubBgpConnectionStatusNotConnected HubBgpConnectionStatus = "NotConnected" - HubBgpConnectionStatusUnknown HubBgpConnectionStatus = "Unknown" -) - -func PossibleValuesForHubBgpConnectionStatus() []string { - return []string{ - string(HubBgpConnectionStatusConnected), - string(HubBgpConnectionStatusConnecting), - string(HubBgpConnectionStatusNotConnected), - string(HubBgpConnectionStatusUnknown), - } -} - -func (s *HubBgpConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHubBgpConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHubBgpConnectionStatus(input string) (*HubBgpConnectionStatus, error) { - vals := map[string]HubBgpConnectionStatus{ - "connected": HubBgpConnectionStatusConnected, - "connecting": HubBgpConnectionStatusConnecting, - "notconnected": HubBgpConnectionStatusNotConnected, - "unknown": HubBgpConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HubBgpConnectionStatus(input) - return &out, nil -} - -type HubRoutingPreference string - -const ( - HubRoutingPreferenceASPath HubRoutingPreference = "ASPath" - HubRoutingPreferenceExpressRoute HubRoutingPreference = "ExpressRoute" - HubRoutingPreferenceVpnGateway HubRoutingPreference = "VpnGateway" -) - -func PossibleValuesForHubRoutingPreference() []string { - return []string{ - string(HubRoutingPreferenceASPath), - string(HubRoutingPreferenceExpressRoute), - string(HubRoutingPreferenceVpnGateway), - } -} - -func (s *HubRoutingPreference) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHubRoutingPreference(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHubRoutingPreference(input string) (*HubRoutingPreference, error) { - vals := map[string]HubRoutingPreference{ - "aspath": HubRoutingPreferenceASPath, - "expressroute": HubRoutingPreferenceExpressRoute, - "vpngateway": HubRoutingPreferenceVpnGateway, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HubRoutingPreference(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type NextStep string - -const ( - NextStepContinue NextStep = "Continue" - NextStepTerminate NextStep = "Terminate" - NextStepUnknown NextStep = "Unknown" -) - -func PossibleValuesForNextStep() []string { - return []string{ - string(NextStepContinue), - string(NextStepTerminate), - string(NextStepUnknown), - } -} - -func (s *NextStep) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNextStep(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNextStep(input string) (*NextStep, error) { - vals := map[string]NextStep{ - "continue": NextStepContinue, - "terminate": NextStepTerminate, - "unknown": NextStepUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NextStep(input) - return &out, nil -} - -type OfficeTrafficCategory string - -const ( - OfficeTrafficCategoryAll OfficeTrafficCategory = "All" - OfficeTrafficCategoryNone OfficeTrafficCategory = "None" - OfficeTrafficCategoryOptimize OfficeTrafficCategory = "Optimize" - OfficeTrafficCategoryOptimizeAndAllow OfficeTrafficCategory = "OptimizeAndAllow" -) - -func PossibleValuesForOfficeTrafficCategory() []string { - return []string{ - string(OfficeTrafficCategoryAll), - string(OfficeTrafficCategoryNone), - string(OfficeTrafficCategoryOptimize), - string(OfficeTrafficCategoryOptimizeAndAllow), - } -} - -func (s *OfficeTrafficCategory) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOfficeTrafficCategory(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOfficeTrafficCategory(input string) (*OfficeTrafficCategory, error) { - vals := map[string]OfficeTrafficCategory{ - "all": OfficeTrafficCategoryAll, - "none": OfficeTrafficCategoryNone, - "optimize": OfficeTrafficCategoryOptimize, - "optimizeandallow": OfficeTrafficCategoryOptimizeAndAllow, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OfficeTrafficCategory(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type PreferredRoutingGateway string - -const ( - PreferredRoutingGatewayExpressRoute PreferredRoutingGateway = "ExpressRoute" - PreferredRoutingGatewayNone PreferredRoutingGateway = "None" - PreferredRoutingGatewayVpnGateway PreferredRoutingGateway = "VpnGateway" -) - -func PossibleValuesForPreferredRoutingGateway() []string { - return []string{ - string(PreferredRoutingGatewayExpressRoute), - string(PreferredRoutingGatewayNone), - string(PreferredRoutingGatewayVpnGateway), - } -} - -func (s *PreferredRoutingGateway) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePreferredRoutingGateway(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePreferredRoutingGateway(input string) (*PreferredRoutingGateway, error) { - vals := map[string]PreferredRoutingGateway{ - "expressroute": PreferredRoutingGatewayExpressRoute, - "none": PreferredRoutingGatewayNone, - "vpngateway": PreferredRoutingGatewayVpnGateway, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PreferredRoutingGateway(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteMapActionType string - -const ( - RouteMapActionTypeAdd RouteMapActionType = "Add" - RouteMapActionTypeDrop RouteMapActionType = "Drop" - RouteMapActionTypeRemove RouteMapActionType = "Remove" - RouteMapActionTypeReplace RouteMapActionType = "Replace" - RouteMapActionTypeUnknown RouteMapActionType = "Unknown" -) - -func PossibleValuesForRouteMapActionType() []string { - return []string{ - string(RouteMapActionTypeAdd), - string(RouteMapActionTypeDrop), - string(RouteMapActionTypeRemove), - string(RouteMapActionTypeReplace), - string(RouteMapActionTypeUnknown), - } -} - -func (s *RouteMapActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteMapActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteMapActionType(input string) (*RouteMapActionType, error) { - vals := map[string]RouteMapActionType{ - "add": RouteMapActionTypeAdd, - "drop": RouteMapActionTypeDrop, - "remove": RouteMapActionTypeRemove, - "replace": RouteMapActionTypeReplace, - "unknown": RouteMapActionTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteMapActionType(input) - return &out, nil -} - -type RouteMapMatchCondition string - -const ( - RouteMapMatchConditionContains RouteMapMatchCondition = "Contains" - RouteMapMatchConditionEquals RouteMapMatchCondition = "Equals" - RouteMapMatchConditionNotContains RouteMapMatchCondition = "NotContains" - RouteMapMatchConditionNotEquals RouteMapMatchCondition = "NotEquals" - RouteMapMatchConditionUnknown RouteMapMatchCondition = "Unknown" -) - -func PossibleValuesForRouteMapMatchCondition() []string { - return []string{ - string(RouteMapMatchConditionContains), - string(RouteMapMatchConditionEquals), - string(RouteMapMatchConditionNotContains), - string(RouteMapMatchConditionNotEquals), - string(RouteMapMatchConditionUnknown), - } -} - -func (s *RouteMapMatchCondition) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteMapMatchCondition(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteMapMatchCondition(input string) (*RouteMapMatchCondition, error) { - vals := map[string]RouteMapMatchCondition{ - "contains": RouteMapMatchConditionContains, - "equals": RouteMapMatchConditionEquals, - "notcontains": RouteMapMatchConditionNotContains, - "notequals": RouteMapMatchConditionNotEquals, - "unknown": RouteMapMatchConditionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteMapMatchCondition(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type RoutingState string - -const ( - RoutingStateFailed RoutingState = "Failed" - RoutingStateNone RoutingState = "None" - RoutingStateProvisioned RoutingState = "Provisioned" - RoutingStateProvisioning RoutingState = "Provisioning" -) - -func PossibleValuesForRoutingState() []string { - return []string{ - string(RoutingStateFailed), - string(RoutingStateNone), - string(RoutingStateProvisioned), - string(RoutingStateProvisioning), - } -} - -func (s *RoutingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRoutingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRoutingState(input string) (*RoutingState, error) { - vals := map[string]RoutingState{ - "failed": RoutingStateFailed, - "none": RoutingStateNone, - "provisioned": RoutingStateProvisioned, - "provisioning": RoutingStateProvisioning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RoutingState(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionProtocol string - -const ( - VirtualNetworkGatewayConnectionProtocolIKEvOne VirtualNetworkGatewayConnectionProtocol = "IKEv1" - VirtualNetworkGatewayConnectionProtocolIKEvTwo VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionProtocol() []string { - return []string{ - string(VirtualNetworkGatewayConnectionProtocolIKEvOne), - string(VirtualNetworkGatewayConnectionProtocolIKEvTwo), - } -} - -func (s *VirtualNetworkGatewayConnectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionProtocol(input string) (*VirtualNetworkGatewayConnectionProtocol, error) { - vals := map[string]VirtualNetworkGatewayConnectionProtocol{ - "ikev1": VirtualNetworkGatewayConnectionProtocolIKEvOne, - "ikev2": VirtualNetworkGatewayConnectionProtocolIKEvTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} - -type VirtualWanSecurityProviderType string - -const ( - VirtualWanSecurityProviderTypeExternal VirtualWanSecurityProviderType = "External" - VirtualWanSecurityProviderTypeNative VirtualWanSecurityProviderType = "Native" -) - -func PossibleValuesForVirtualWanSecurityProviderType() []string { - return []string{ - string(VirtualWanSecurityProviderTypeExternal), - string(VirtualWanSecurityProviderTypeNative), - } -} - -func (s *VirtualWanSecurityProviderType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualWanSecurityProviderType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualWanSecurityProviderType(input string) (*VirtualWanSecurityProviderType, error) { - vals := map[string]VirtualWanSecurityProviderType{ - "external": VirtualWanSecurityProviderTypeExternal, - "native": VirtualWanSecurityProviderTypeNative, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualWanSecurityProviderType(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} - -type VpnAuthenticationType string - -const ( - VpnAuthenticationTypeAAD VpnAuthenticationType = "AAD" - VpnAuthenticationTypeCertificate VpnAuthenticationType = "Certificate" - VpnAuthenticationTypeRadius VpnAuthenticationType = "Radius" -) - -func PossibleValuesForVpnAuthenticationType() []string { - return []string{ - string(VpnAuthenticationTypeAAD), - string(VpnAuthenticationTypeCertificate), - string(VpnAuthenticationTypeRadius), - } -} - -func (s *VpnAuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnAuthenticationType(input string) (*VpnAuthenticationType, error) { - vals := map[string]VpnAuthenticationType{ - "aad": VpnAuthenticationTypeAAD, - "certificate": VpnAuthenticationTypeCertificate, - "radius": VpnAuthenticationTypeRadius, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnAuthenticationType(input) - return &out, nil -} - -type VpnConnectionStatus string - -const ( - VpnConnectionStatusConnected VpnConnectionStatus = "Connected" - VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting" - VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected" - VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown" -) - -func PossibleValuesForVpnConnectionStatus() []string { - return []string{ - string(VpnConnectionStatusConnected), - string(VpnConnectionStatusConnecting), - string(VpnConnectionStatusNotConnected), - string(VpnConnectionStatusUnknown), - } -} - -func (s *VpnConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnConnectionStatus(input string) (*VpnConnectionStatus, error) { - vals := map[string]VpnConnectionStatus{ - "connected": VpnConnectionStatusConnected, - "connecting": VpnConnectionStatusConnecting, - "notconnected": VpnConnectionStatusNotConnected, - "unknown": VpnConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnConnectionStatus(input) - return &out, nil -} - -type VpnGatewayTunnelingProtocol string - -const ( - VpnGatewayTunnelingProtocolIkeVTwo VpnGatewayTunnelingProtocol = "IkeV2" - VpnGatewayTunnelingProtocolOpenVPN VpnGatewayTunnelingProtocol = "OpenVPN" -) - -func PossibleValuesForVpnGatewayTunnelingProtocol() []string { - return []string{ - string(VpnGatewayTunnelingProtocolIkeVTwo), - string(VpnGatewayTunnelingProtocolOpenVPN), - } -} - -func (s *VpnGatewayTunnelingProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnGatewayTunnelingProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnGatewayTunnelingProtocol(input string) (*VpnGatewayTunnelingProtocol, error) { - vals := map[string]VpnGatewayTunnelingProtocol{ - "ikev2": VpnGatewayTunnelingProtocolIkeVTwo, - "openvpn": VpnGatewayTunnelingProtocolOpenVPN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnGatewayTunnelingProtocol(input) - return &out, nil -} - -type VpnLinkConnectionMode string - -const ( - VpnLinkConnectionModeDefault VpnLinkConnectionMode = "Default" - VpnLinkConnectionModeInitiatorOnly VpnLinkConnectionMode = "InitiatorOnly" - VpnLinkConnectionModeResponderOnly VpnLinkConnectionMode = "ResponderOnly" -) - -func PossibleValuesForVpnLinkConnectionMode() []string { - return []string{ - string(VpnLinkConnectionModeDefault), - string(VpnLinkConnectionModeInitiatorOnly), - string(VpnLinkConnectionModeResponderOnly), - } -} - -func (s *VpnLinkConnectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnLinkConnectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnLinkConnectionMode(input string) (*VpnLinkConnectionMode, error) { - vals := map[string]VpnLinkConnectionMode{ - "default": VpnLinkConnectionModeDefault, - "initiatoronly": VpnLinkConnectionModeInitiatorOnly, - "responderonly": VpnLinkConnectionModeResponderOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnLinkConnectionMode(input) - return &out, nil -} - -type VpnNatRuleMode string - -const ( - VpnNatRuleModeEgressSnat VpnNatRuleMode = "EgressSnat" - VpnNatRuleModeIngressSnat VpnNatRuleMode = "IngressSnat" -) - -func PossibleValuesForVpnNatRuleMode() []string { - return []string{ - string(VpnNatRuleModeEgressSnat), - string(VpnNatRuleModeIngressSnat), - } -} - -func (s *VpnNatRuleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleMode(input string) (*VpnNatRuleMode, error) { - vals := map[string]VpnNatRuleMode{ - "egresssnat": VpnNatRuleModeEgressSnat, - "ingresssnat": VpnNatRuleModeIngressSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleMode(input) - return &out, nil -} - -type VpnNatRuleType string - -const ( - VpnNatRuleTypeDynamic VpnNatRuleType = "Dynamic" - VpnNatRuleTypeStatic VpnNatRuleType = "Static" -) - -func PossibleValuesForVpnNatRuleType() []string { - return []string{ - string(VpnNatRuleTypeDynamic), - string(VpnNatRuleTypeStatic), - } -} - -func (s *VpnNatRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleType(input string) (*VpnNatRuleType, error) { - vals := map[string]VpnNatRuleType{ - "dynamic": VpnNatRuleTypeDynamic, - "static": VpnNatRuleTypeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleType(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_configurationpolicygroup.go b/resource-manager/network/2022-09-01/virtualwans/id_configurationpolicygroup.go deleted file mode 100644 index d6c7f2eaff8..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_configurationpolicygroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConfigurationPolicyGroupId{} - -// ConfigurationPolicyGroupId is a struct representing the Resource ID for a Configuration Policy Group -type ConfigurationPolicyGroupId struct { - SubscriptionId string - ResourceGroupName string - VpnServerConfigurationName string - ConfigurationPolicyGroupName string -} - -// NewConfigurationPolicyGroupID returns a new ConfigurationPolicyGroupId struct -func NewConfigurationPolicyGroupID(subscriptionId string, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string) ConfigurationPolicyGroupId { - return ConfigurationPolicyGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnServerConfigurationName: vpnServerConfigurationName, - ConfigurationPolicyGroupName: configurationPolicyGroupName, - } -} - -// ParseConfigurationPolicyGroupID parses 'input' into a ConfigurationPolicyGroupId -func ParseConfigurationPolicyGroupID(input string) (*ConfigurationPolicyGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(ConfigurationPolicyGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConfigurationPolicyGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - if id.ConfigurationPolicyGroupName, ok = parsed.Parsed["configurationPolicyGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationPolicyGroupName", *parsed) - } - - return &id, nil -} - -// ParseConfigurationPolicyGroupIDInsensitively parses 'input' case-insensitively into a ConfigurationPolicyGroupId -// note: this method should only be used for API response data and not user input -func ParseConfigurationPolicyGroupIDInsensitively(input string) (*ConfigurationPolicyGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(ConfigurationPolicyGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConfigurationPolicyGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - if id.ConfigurationPolicyGroupName, ok = parsed.Parsed["configurationPolicyGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationPolicyGroupName", *parsed) - } - - return &id, nil -} - -// ValidateConfigurationPolicyGroupID checks that 'input' can be parsed as a Configuration Policy Group ID -func ValidateConfigurationPolicyGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConfigurationPolicyGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Configuration Policy Group ID -func (id ConfigurationPolicyGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnServerConfigurations/%s/configurationPolicyGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnServerConfigurationName, id.ConfigurationPolicyGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Configuration Policy Group ID -func (id ConfigurationPolicyGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnServerConfigurations", "vpnServerConfigurations", "vpnServerConfigurations"), - resourceids.UserSpecifiedSegment("vpnServerConfigurationName", "vpnServerConfigurationValue"), - resourceids.StaticSegment("staticConfigurationPolicyGroups", "configurationPolicyGroups", "configurationPolicyGroups"), - resourceids.UserSpecifiedSegment("configurationPolicyGroupName", "configurationPolicyGroupValue"), - } -} - -// String returns a human-readable description of this Configuration Policy Group ID -func (id ConfigurationPolicyGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Server Configuration Name: %q", id.VpnServerConfigurationName), - fmt.Sprintf("Configuration Policy Group Name: %q", id.ConfigurationPolicyGroupName), - } - return fmt.Sprintf("Configuration Policy Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_configurationpolicygroup_test.go b/resource-manager/network/2022-09-01/virtualwans/id_configurationpolicygroup_test.go deleted file mode 100644 index 4622d452f11..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_configurationpolicygroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConfigurationPolicyGroupId{} - -func TestNewConfigurationPolicyGroupID(t *testing.T) { - id := NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnServerConfigurationName != "vpnServerConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnServerConfigurationName'", id.VpnServerConfigurationName, "vpnServerConfigurationValue") - } - - if id.ConfigurationPolicyGroupName != "configurationPolicyGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConfigurationPolicyGroupName'", id.ConfigurationPolicyGroupName, "configurationPolicyGroupValue") - } -} - -func TestFormatConfigurationPolicyGroupID(t *testing.T) { - actual := NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConfigurationPolicyGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConfigurationPolicyGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue", - Expected: &ConfigurationPolicyGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - ConfigurationPolicyGroupName: "configurationPolicyGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConfigurationPolicyGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - if actual.ConfigurationPolicyGroupName != v.Expected.ConfigurationPolicyGroupName { - t.Fatalf("Expected %q but got %q for ConfigurationPolicyGroupName", v.Expected.ConfigurationPolicyGroupName, actual.ConfigurationPolicyGroupName) - } - - } -} - -func TestParseConfigurationPolicyGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConfigurationPolicyGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/cOnFiGuRaTiOnPoLiCyGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue", - Expected: &ConfigurationPolicyGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - ConfigurationPolicyGroupName: "configurationPolicyGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/cOnFiGuRaTiOnPoLiCyGrOuPs/cOnFiGuRaTiOnPoLiCyGrOuPvAlUe", - Expected: &ConfigurationPolicyGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnServerConfigurationName: "vPnSeRvErCoNfIgUrAtIoNvAlUe", - ConfigurationPolicyGroupName: "cOnFiGuRaTiOnPoLiCyGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/cOnFiGuRaTiOnPoLiCyGrOuPs/cOnFiGuRaTiOnPoLiCyGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConfigurationPolicyGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - if actual.ConfigurationPolicyGroupName != v.Expected.ConfigurationPolicyGroupName { - t.Fatalf("Expected %q but got %q for ConfigurationPolicyGroupName", v.Expected.ConfigurationPolicyGroupName, actual.ConfigurationPolicyGroupName) - } - - } -} - -func TestSegmentsForConfigurationPolicyGroupId(t *testing.T) { - segments := ConfigurationPolicyGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConfigurationPolicyGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_hubroutetable.go b/resource-manager/network/2022-09-01/virtualwans/id_hubroutetable.go deleted file mode 100644 index 0297471a681..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_hubroutetable.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = HubRouteTableId{} - -// HubRouteTableId is a struct representing the Resource ID for a Hub Route Table -type HubRouteTableId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - HubRouteTableName string -} - -// NewHubRouteTableID returns a new HubRouteTableId struct -func NewHubRouteTableID(subscriptionId string, resourceGroupName string, virtualHubName string, hubRouteTableName string) HubRouteTableId { - return HubRouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - HubRouteTableName: hubRouteTableName, - } -} - -// ParseHubRouteTableID parses 'input' into a HubRouteTableId -func ParseHubRouteTableID(input string) (*HubRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(HubRouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := HubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubRouteTableName, ok = parsed.Parsed["hubRouteTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubRouteTableName", *parsed) - } - - return &id, nil -} - -// ParseHubRouteTableIDInsensitively parses 'input' case-insensitively into a HubRouteTableId -// note: this method should only be used for API response data and not user input -func ParseHubRouteTableIDInsensitively(input string) (*HubRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(HubRouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := HubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubRouteTableName, ok = parsed.Parsed["hubRouteTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubRouteTableName", *parsed) - } - - return &id, nil -} - -// ValidateHubRouteTableID checks that 'input' can be parsed as a Hub Route Table ID -func ValidateHubRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseHubRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Hub Route Table ID -func (id HubRouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/hubRouteTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.HubRouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Hub Route Table ID -func (id HubRouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticHubRouteTables", "hubRouteTables", "hubRouteTables"), - resourceids.UserSpecifiedSegment("hubRouteTableName", "hubRouteTableValue"), - } -} - -// String returns a human-readable description of this Hub Route Table ID -func (id HubRouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Hub Route Table Name: %q", id.HubRouteTableName), - } - return fmt.Sprintf("Hub Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_hubroutetable_test.go b/resource-manager/network/2022-09-01/virtualwans/id_hubroutetable_test.go deleted file mode 100644 index 88cc32367fc..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_hubroutetable_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = HubRouteTableId{} - -func TestNewHubRouteTableID(t *testing.T) { - id := NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.HubRouteTableName != "hubRouteTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'HubRouteTableName'", id.HubRouteTableName, "hubRouteTableValue") - } -} - -func TestFormatHubRouteTableID(t *testing.T) { - actual := NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseHubRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *HubRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue", - Expected: &HubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - HubRouteTableName: "hubRouteTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseHubRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.HubRouteTableName != v.Expected.HubRouteTableName { - t.Fatalf("Expected %q but got %q for HubRouteTableName", v.Expected.HubRouteTableName, actual.HubRouteTableName) - } - - } -} - -func TestParseHubRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *HubRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbRoUtEtAbLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue", - Expected: &HubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - HubRouteTableName: "hubRouteTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbRoUtEtAbLeS/hUbRoUtEtAbLeVaLuE", - Expected: &HubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - HubRouteTableName: "hUbRoUtEtAbLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbRoUtEtAbLeS/hUbRoUtEtAbLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseHubRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.HubRouteTableName != v.Expected.HubRouteTableName { - t.Fatalf("Expected %q but got %q for HubRouteTableName", v.Expected.HubRouteTableName, actual.HubRouteTableName) - } - - } -} - -func TestSegmentsForHubRouteTableId(t *testing.T) { - segments := HubRouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("HubRouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_hubvirtualnetworkconnection.go b/resource-manager/network/2022-09-01/virtualwans/id_hubvirtualnetworkconnection.go deleted file mode 100644 index e5bc46da4b4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_hubvirtualnetworkconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = HubVirtualNetworkConnectionId{} - -// HubVirtualNetworkConnectionId is a struct representing the Resource ID for a Hub Virtual Network Connection -type HubVirtualNetworkConnectionId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - HubVirtualNetworkConnectionName string -} - -// NewHubVirtualNetworkConnectionID returns a new HubVirtualNetworkConnectionId struct -func NewHubVirtualNetworkConnectionID(subscriptionId string, resourceGroupName string, virtualHubName string, hubVirtualNetworkConnectionName string) HubVirtualNetworkConnectionId { - return HubVirtualNetworkConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - HubVirtualNetworkConnectionName: hubVirtualNetworkConnectionName, - } -} - -// ParseHubVirtualNetworkConnectionID parses 'input' into a HubVirtualNetworkConnectionId -func ParseHubVirtualNetworkConnectionID(input string) (*HubVirtualNetworkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(HubVirtualNetworkConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := HubVirtualNetworkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubVirtualNetworkConnectionName, ok = parsed.Parsed["hubVirtualNetworkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubVirtualNetworkConnectionName", *parsed) - } - - return &id, nil -} - -// ParseHubVirtualNetworkConnectionIDInsensitively parses 'input' case-insensitively into a HubVirtualNetworkConnectionId -// note: this method should only be used for API response data and not user input -func ParseHubVirtualNetworkConnectionIDInsensitively(input string) (*HubVirtualNetworkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(HubVirtualNetworkConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := HubVirtualNetworkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubVirtualNetworkConnectionName, ok = parsed.Parsed["hubVirtualNetworkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubVirtualNetworkConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateHubVirtualNetworkConnectionID checks that 'input' can be parsed as a Hub Virtual Network Connection ID -func ValidateHubVirtualNetworkConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseHubVirtualNetworkConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Hub Virtual Network Connection ID -func (id HubVirtualNetworkConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/hubVirtualNetworkConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.HubVirtualNetworkConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Hub Virtual Network Connection ID -func (id HubVirtualNetworkConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticHubVirtualNetworkConnections", "hubVirtualNetworkConnections", "hubVirtualNetworkConnections"), - resourceids.UserSpecifiedSegment("hubVirtualNetworkConnectionName", "hubVirtualNetworkConnectionValue"), - } -} - -// String returns a human-readable description of this Hub Virtual Network Connection ID -func (id HubVirtualNetworkConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Hub Virtual Network Connection Name: %q", id.HubVirtualNetworkConnectionName), - } - return fmt.Sprintf("Hub Virtual Network Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_hubvirtualnetworkconnection_test.go b/resource-manager/network/2022-09-01/virtualwans/id_hubvirtualnetworkconnection_test.go deleted file mode 100644 index c5a35b5c496..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_hubvirtualnetworkconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = HubVirtualNetworkConnectionId{} - -func TestNewHubVirtualNetworkConnectionID(t *testing.T) { - id := NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.HubVirtualNetworkConnectionName != "hubVirtualNetworkConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'HubVirtualNetworkConnectionName'", id.HubVirtualNetworkConnectionName, "hubVirtualNetworkConnectionValue") - } -} - -func TestFormatHubVirtualNetworkConnectionID(t *testing.T) { - actual := NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseHubVirtualNetworkConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *HubVirtualNetworkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue", - Expected: &HubVirtualNetworkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - HubVirtualNetworkConnectionName: "hubVirtualNetworkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseHubVirtualNetworkConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.HubVirtualNetworkConnectionName != v.Expected.HubVirtualNetworkConnectionName { - t.Fatalf("Expected %q but got %q for HubVirtualNetworkConnectionName", v.Expected.HubVirtualNetworkConnectionName, actual.HubVirtualNetworkConnectionName) - } - - } -} - -func TestParseHubVirtualNetworkConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *HubVirtualNetworkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbViRtUaLnEtWoRkCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue", - Expected: &HubVirtualNetworkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - HubVirtualNetworkConnectionName: "hubVirtualNetworkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbViRtUaLnEtWoRkCoNnEcTiOnS/hUbViRtUaLnEtWoRkCoNnEcTiOnVaLuE", - Expected: &HubVirtualNetworkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - HubVirtualNetworkConnectionName: "hUbViRtUaLnEtWoRkCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbViRtUaLnEtWoRkCoNnEcTiOnS/hUbViRtUaLnEtWoRkCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseHubVirtualNetworkConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.HubVirtualNetworkConnectionName != v.Expected.HubVirtualNetworkConnectionName { - t.Fatalf("Expected %q but got %q for HubVirtualNetworkConnectionName", v.Expected.HubVirtualNetworkConnectionName, actual.HubVirtualNetworkConnectionName) - } - - } -} - -func TestSegmentsForHubVirtualNetworkConnectionId(t *testing.T) { - segments := HubVirtualNetworkConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("HubVirtualNetworkConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_natrule.go b/resource-manager/network/2022-09-01/virtualwans/id_natrule.go deleted file mode 100644 index 2563c42130d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_natrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NatRuleId{} - -// NatRuleId is a struct representing the Resource ID for a Nat Rule -type NatRuleId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string - NatRuleName string -} - -// NewNatRuleID returns a new NatRuleId struct -func NewNatRuleID(subscriptionId string, resourceGroupName string, vpnGatewayName string, natRuleName string) NatRuleId { - return NatRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - NatRuleName: natRuleName, - } -} - -// ParseNatRuleID parses 'input' into a NatRuleId -func ParseNatRuleID(input string) (*NatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(NatRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) - } - - return &id, nil -} - -// ParseNatRuleIDInsensitively parses 'input' case-insensitively into a NatRuleId -// note: this method should only be used for API response data and not user input -func ParseNatRuleIDInsensitively(input string) (*NatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(NatRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) - } - - return &id, nil -} - -// ValidateNatRuleID checks that 'input' can be parsed as a Nat Rule ID -func ValidateNatRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNatRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Nat Rule ID -func (id NatRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s/natRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName, id.NatRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Nat Rule ID -func (id NatRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - resourceids.StaticSegment("staticNatRules", "natRules", "natRules"), - resourceids.UserSpecifiedSegment("natRuleName", "natRuleValue"), - } -} - -// String returns a human-readable description of this Nat Rule ID -func (id NatRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - fmt.Sprintf("Nat Rule Name: %q", id.NatRuleName), - } - return fmt.Sprintf("Nat Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_natrule_test.go b/resource-manager/network/2022-09-01/virtualwans/id_natrule_test.go deleted file mode 100644 index 1c0f6c6a7c0..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_natrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NatRuleId{} - -func TestNewNatRuleID(t *testing.T) { - id := NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } - - if id.NatRuleName != "natRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'NatRuleName'", id.NatRuleName, "natRuleValue") - } -} - -func TestFormatNatRuleID(t *testing.T) { - actual := NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNatRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue", - Expected: &NatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - NatRuleName: "natRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNatRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.NatRuleName != v.Expected.NatRuleName { - t.Fatalf("Expected %q but got %q for NatRuleName", v.Expected.NatRuleName, actual.NatRuleName) - } - - } -} - -func TestParseNatRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/nAtRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue", - Expected: &NatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - NatRuleName: "natRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/nAtRuLeS/nAtRuLeVaLuE", - Expected: &NatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - NatRuleName: "nAtRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/nAtRuLeS/nAtRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNatRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.NatRuleName != v.Expected.NatRuleName { - t.Fatalf("Expected %q but got %q for NatRuleName", v.Expected.NatRuleName, actual.NatRuleName) - } - - } -} - -func TestSegmentsForNatRuleId(t *testing.T) { - segments := NatRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NatRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_routemap.go b/resource-manager/network/2022-09-01/virtualwans/id_routemap.go deleted file mode 100644 index a7eb1850cb8..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_routemap.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteMapId{} - -// RouteMapId is a struct representing the Resource ID for a Route Map -type RouteMapId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - RouteMapName string -} - -// NewRouteMapID returns a new RouteMapId struct -func NewRouteMapID(subscriptionId string, resourceGroupName string, virtualHubName string, routeMapName string) RouteMapId { - return RouteMapId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - RouteMapName: routeMapName, - } -} - -// ParseRouteMapID parses 'input' into a RouteMapId -func ParseRouteMapID(input string) (*RouteMapId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteMapId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteMapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteMapName, ok = parsed.Parsed["routeMapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeMapName", *parsed) - } - - return &id, nil -} - -// ParseRouteMapIDInsensitively parses 'input' case-insensitively into a RouteMapId -// note: this method should only be used for API response data and not user input -func ParseRouteMapIDInsensitively(input string) (*RouteMapId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteMapId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteMapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteMapName, ok = parsed.Parsed["routeMapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeMapName", *parsed) - } - - return &id, nil -} - -// ValidateRouteMapID checks that 'input' can be parsed as a Route Map ID -func ValidateRouteMapID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteMapID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Map ID -func (id RouteMapId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/routeMaps/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.RouteMapName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Map ID -func (id RouteMapId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticRouteMaps", "routeMaps", "routeMaps"), - resourceids.UserSpecifiedSegment("routeMapName", "routeMapValue"), - } -} - -// String returns a human-readable description of this Route Map ID -func (id RouteMapId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Route Map Name: %q", id.RouteMapName), - } - return fmt.Sprintf("Route Map (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_routemap_test.go b/resource-manager/network/2022-09-01/virtualwans/id_routemap_test.go deleted file mode 100644 index 51ae2459655..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_routemap_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteMapId{} - -func TestNewRouteMapID(t *testing.T) { - id := NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.RouteMapName != "routeMapValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteMapName'", id.RouteMapName, "routeMapValue") - } -} - -func TestFormatRouteMapID(t *testing.T) { - actual := NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteMapID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteMapId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue", - Expected: &RouteMapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RouteMapName: "routeMapValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteMapID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RouteMapName != v.Expected.RouteMapName { - t.Fatalf("Expected %q but got %q for RouteMapName", v.Expected.RouteMapName, actual.RouteMapName) - } - - } -} - -func TestParseRouteMapIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteMapId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeMaPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue", - Expected: &RouteMapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RouteMapName: "routeMapValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeMaPs/rOuTeMaPvAlUe", - Expected: &RouteMapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - RouteMapName: "rOuTeMaPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeMaPs/rOuTeMaPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteMapIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RouteMapName != v.Expected.RouteMapName { - t.Fatalf("Expected %q but got %q for RouteMapName", v.Expected.RouteMapName, actual.RouteMapName) - } - - } -} - -func TestSegmentsForRouteMapId(t *testing.T) { - segments := RouteMapId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteMapId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_routingintent.go b/resource-manager/network/2022-09-01/virtualwans/id_routingintent.go deleted file mode 100644 index 9a8b1a5cc31..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_routingintent.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoutingIntentId{} - -// RoutingIntentId is a struct representing the Resource ID for a Routing Intent -type RoutingIntentId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - RoutingIntentName string -} - -// NewRoutingIntentID returns a new RoutingIntentId struct -func NewRoutingIntentID(subscriptionId string, resourceGroupName string, virtualHubName string, routingIntentName string) RoutingIntentId { - return RoutingIntentId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - RoutingIntentName: routingIntentName, - } -} - -// ParseRoutingIntentID parses 'input' into a RoutingIntentId -func ParseRoutingIntentID(input string) (*RoutingIntentId, error) { - parser := resourceids.NewParserFromResourceIdType(RoutingIntentId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoutingIntentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RoutingIntentName, ok = parsed.Parsed["routingIntentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routingIntentName", *parsed) - } - - return &id, nil -} - -// ParseRoutingIntentIDInsensitively parses 'input' case-insensitively into a RoutingIntentId -// note: this method should only be used for API response data and not user input -func ParseRoutingIntentIDInsensitively(input string) (*RoutingIntentId, error) { - parser := resourceids.NewParserFromResourceIdType(RoutingIntentId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoutingIntentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RoutingIntentName, ok = parsed.Parsed["routingIntentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routingIntentName", *parsed) - } - - return &id, nil -} - -// ValidateRoutingIntentID checks that 'input' can be parsed as a Routing Intent ID -func ValidateRoutingIntentID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRoutingIntentID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Routing Intent ID -func (id RoutingIntentId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/routingIntent/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.RoutingIntentName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Routing Intent ID -func (id RoutingIntentId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticRoutingIntent", "routingIntent", "routingIntent"), - resourceids.UserSpecifiedSegment("routingIntentName", "routingIntentValue"), - } -} - -// String returns a human-readable description of this Routing Intent ID -func (id RoutingIntentId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Routing Intent Name: %q", id.RoutingIntentName), - } - return fmt.Sprintf("Routing Intent (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_routingintent_test.go b/resource-manager/network/2022-09-01/virtualwans/id_routingintent_test.go deleted file mode 100644 index 9ad0fc82170..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_routingintent_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoutingIntentId{} - -func TestNewRoutingIntentID(t *testing.T) { - id := NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.RoutingIntentName != "routingIntentValue" { - t.Fatalf("Expected %q but got %q for Segment 'RoutingIntentName'", id.RoutingIntentName, "routingIntentValue") - } -} - -func TestFormatRoutingIntentID(t *testing.T) { - actual := NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRoutingIntentID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoutingIntentId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue", - Expected: &RoutingIntentId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RoutingIntentName: "routingIntentValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoutingIntentID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RoutingIntentName != v.Expected.RoutingIntentName { - t.Fatalf("Expected %q but got %q for RoutingIntentName", v.Expected.RoutingIntentName, actual.RoutingIntentName) - } - - } -} - -func TestParseRoutingIntentIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoutingIntentId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTiNgInTeNt", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue", - Expected: &RoutingIntentId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RoutingIntentName: "routingIntentValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTiNgInTeNt/rOuTiNgInTeNtVaLuE", - Expected: &RoutingIntentId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - RoutingIntentName: "rOuTiNgInTeNtVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTiNgInTeNt/rOuTiNgInTeNtVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoutingIntentIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RoutingIntentName != v.Expected.RoutingIntentName { - t.Fatalf("Expected %q but got %q for RoutingIntentName", v.Expected.RoutingIntentName, actual.RoutingIntentName) - } - - } -} - -func TestSegmentsForRoutingIntentId(t *testing.T) { - segments := RoutingIntentId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RoutingIntentId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_virtualhub.go b/resource-manager/network/2022-09-01/virtualwans/id_virtualhub.go deleted file mode 100644 index 3f42afd7fc5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_virtualhub.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualHubId{} - -// VirtualHubId is a struct representing the Resource ID for a Virtual Hub -type VirtualHubId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string -} - -// NewVirtualHubID returns a new VirtualHubId struct -func NewVirtualHubID(subscriptionId string, resourceGroupName string, virtualHubName string) VirtualHubId { - return VirtualHubId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - } -} - -// ParseVirtualHubID parses 'input' into a VirtualHubId -func ParseVirtualHubID(input string) (*VirtualHubId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualHubId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualHubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - return &id, nil -} - -// ParseVirtualHubIDInsensitively parses 'input' case-insensitively into a VirtualHubId -// note: this method should only be used for API response data and not user input -func ParseVirtualHubIDInsensitively(input string) (*VirtualHubId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualHubId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualHubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualHubID checks that 'input' can be parsed as a Virtual Hub ID -func ValidateVirtualHubID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualHubID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Hub ID -func (id VirtualHubId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Hub ID -func (id VirtualHubId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - } -} - -// String returns a human-readable description of this Virtual Hub ID -func (id VirtualHubId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - } - return fmt.Sprintf("Virtual Hub (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_virtualhub_test.go b/resource-manager/network/2022-09-01/virtualwans/id_virtualhub_test.go deleted file mode 100644 index 46ce2e94a0f..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_virtualhub_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualHubId{} - -func TestNewVirtualHubID(t *testing.T) { - id := NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } -} - -func TestFormatVirtualHubID(t *testing.T) { - actual := NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualHubID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualHubId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Expected: &VirtualHubId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualHubID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - } -} - -func TestParseVirtualHubIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualHubId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Expected: &VirtualHubId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Expected: &VirtualHubId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualHubIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - } -} - -func TestSegmentsForVirtualHubId(t *testing.T) { - segments := VirtualHubId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualHubId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_virtualhubroutetable.go b/resource-manager/network/2022-09-01/virtualwans/id_virtualhubroutetable.go deleted file mode 100644 index ccb706e1460..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_virtualhubroutetable.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualHubRouteTableId{} - -// VirtualHubRouteTableId is a struct representing the Resource ID for a Virtual Hub Route Table -type VirtualHubRouteTableId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - RouteTableName string -} - -// NewVirtualHubRouteTableID returns a new VirtualHubRouteTableId struct -func NewVirtualHubRouteTableID(subscriptionId string, resourceGroupName string, virtualHubName string, routeTableName string) VirtualHubRouteTableId { - return VirtualHubRouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - RouteTableName: routeTableName, - } -} - -// ParseVirtualHubRouteTableID parses 'input' into a VirtualHubRouteTableId -func ParseVirtualHubRouteTableID(input string) (*VirtualHubRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualHubRouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualHubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParseVirtualHubRouteTableIDInsensitively parses 'input' case-insensitively into a VirtualHubRouteTableId -// note: this method should only be used for API response data and not user input -func ParseVirtualHubRouteTableIDInsensitively(input string) (*VirtualHubRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualHubRouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualHubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualHubRouteTableID checks that 'input' can be parsed as a Virtual Hub Route Table ID -func ValidateVirtualHubRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualHubRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Hub Route Table ID -func (id VirtualHubRouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Hub Route Table ID -func (id VirtualHubRouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Virtual Hub Route Table ID -func (id VirtualHubRouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Virtual Hub Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_virtualhubroutetable_test.go b/resource-manager/network/2022-09-01/virtualwans/id_virtualhubroutetable_test.go deleted file mode 100644 index 16254eae0ca..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_virtualhubroutetable_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualHubRouteTableId{} - -func TestNewVirtualHubRouteTableID(t *testing.T) { - id := NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatVirtualHubRouteTableID(t *testing.T) { - actual := NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualHubRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualHubRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue", - Expected: &VirtualHubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualHubRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParseVirtualHubRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualHubRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue", - Expected: &VirtualHubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &VirtualHubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualHubRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForVirtualHubRouteTableId(t *testing.T) { - segments := VirtualHubRouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualHubRouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_virtualwan.go b/resource-manager/network/2022-09-01/virtualwans/id_virtualwan.go deleted file mode 100644 index 590264a9ee1..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_virtualwan.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualWANId{} - -// VirtualWANId is a struct representing the Resource ID for a Virtual W A N -type VirtualWANId struct { - SubscriptionId string - ResourceGroupName string - VirtualWanName string -} - -// NewVirtualWANID returns a new VirtualWANId struct -func NewVirtualWANID(subscriptionId string, resourceGroupName string, virtualWanName string) VirtualWANId { - return VirtualWANId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualWanName: virtualWanName, - } -} - -// ParseVirtualWANID parses 'input' into a VirtualWANId -func ParseVirtualWANID(input string) (*VirtualWANId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualWANId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualWANId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualWanName, ok = parsed.Parsed["virtualWanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualWanName", *parsed) - } - - return &id, nil -} - -// ParseVirtualWANIDInsensitively parses 'input' case-insensitively into a VirtualWANId -// note: this method should only be used for API response data and not user input -func ParseVirtualWANIDInsensitively(input string) (*VirtualWANId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualWANId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualWANId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualWanName, ok = parsed.Parsed["virtualWanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualWanName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualWANID checks that 'input' can be parsed as a Virtual W A N ID -func ValidateVirtualWANID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualWANID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual W A N ID -func (id VirtualWANId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualWans/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualWanName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual W A N ID -func (id VirtualWANId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualWans", "virtualWans", "virtualWans"), - resourceids.UserSpecifiedSegment("virtualWanName", "virtualWanValue"), - } -} - -// String returns a human-readable description of this Virtual W A N ID -func (id VirtualWANId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Wan Name: %q", id.VirtualWanName), - } - return fmt.Sprintf("Virtual W A N (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_virtualwan_test.go b/resource-manager/network/2022-09-01/virtualwans/id_virtualwan_test.go deleted file mode 100644 index 05101eb168a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_virtualwan_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualWANId{} - -func TestNewVirtualWANID(t *testing.T) { - id := NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualWanName != "virtualWanValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualWanName'", id.VirtualWanName, "virtualWanValue") - } -} - -func TestFormatVirtualWANID(t *testing.T) { - actual := NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualWANID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualWANId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue", - Expected: &VirtualWANId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualWanName: "virtualWanValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualWANID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualWanName != v.Expected.VirtualWanName { - t.Fatalf("Expected %q but got %q for VirtualWanName", v.Expected.VirtualWanName, actual.VirtualWanName) - } - - } -} - -func TestParseVirtualWANIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualWANId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlWaNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue", - Expected: &VirtualWANId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualWanName: "virtualWanValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlWaNs/vIrTuAlWaNvAlUe", - Expected: &VirtualWANId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualWanName: "vIrTuAlWaNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlWaNs/vIrTuAlWaNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualWANIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualWanName != v.Expected.VirtualWanName { - t.Fatalf("Expected %q but got %q for VirtualWanName", v.Expected.VirtualWanName, actual.VirtualWanName) - } - - } -} - -func TestSegmentsForVirtualWANId(t *testing.T) { - segments := VirtualWANId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualWANId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpngateway.go b/resource-manager/network/2022-09-01/virtualwans/id_vpngateway.go deleted file mode 100644 index a438d896289..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpngateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnGatewayId{} - -// VpnGatewayId is a struct representing the Resource ID for a Vpn Gateway -type VpnGatewayId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string -} - -// NewVpnGatewayID returns a new VpnGatewayId struct -func NewVpnGatewayID(subscriptionId string, resourceGroupName string, vpnGatewayName string) VpnGatewayId { - return VpnGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - } -} - -// ParseVpnGatewayID parses 'input' into a VpnGatewayId -func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - return &id, nil -} - -// ParseVpnGatewayIDInsensitively parses 'input' case-insensitively into a VpnGatewayId -// note: this method should only be used for API response data and not user input -func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateVpnGatewayID checks that 'input' can be parsed as a Vpn Gateway ID -func ValidateVpnGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Gateway ID -func (id VpnGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Gateway ID -func (id VpnGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - } -} - -// String returns a human-readable description of this Vpn Gateway ID -func (id VpnGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - } - return fmt.Sprintf("Vpn Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpngateway_test.go b/resource-manager/network/2022-09-01/virtualwans/id_vpngateway_test.go deleted file mode 100644 index d3d0e4c51f3..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpngateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnGatewayId{} - -func TestNewVpnGatewayID(t *testing.T) { - id := NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } -} - -func TestFormatVpnGatewayID(t *testing.T) { - actual := NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - } -} - -func TestParseVpnGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - } -} - -func TestSegmentsForVpnGatewayId(t *testing.T) { - segments := VpnGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpnlinkconnection.go b/resource-manager/network/2022-09-01/virtualwans/id_vpnlinkconnection.go deleted file mode 100644 index f8c398dc7ac..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpnlinkconnection.go +++ /dev/null @@ -1,153 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnLinkConnectionId{} - -// VpnLinkConnectionId is a struct representing the Resource ID for a Vpn Link Connection -type VpnLinkConnectionId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string - VpnConnectionName string - VpnLinkConnectionName string -} - -// NewVpnLinkConnectionID returns a new VpnLinkConnectionId struct -func NewVpnLinkConnectionID(subscriptionId string, resourceGroupName string, vpnGatewayName string, vpnConnectionName string, vpnLinkConnectionName string) VpnLinkConnectionId { - return VpnLinkConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - VpnConnectionName: vpnConnectionName, - VpnLinkConnectionName: vpnLinkConnectionName, - } -} - -// ParseVpnLinkConnectionID parses 'input' into a VpnLinkConnectionId -func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnLinkConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) - } - - return &id, nil -} - -// ParseVpnLinkConnectionIDInsensitively parses 'input' case-insensitively into a VpnLinkConnectionId -// note: this method should only be used for API response data and not user input -func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnLinkConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateVpnLinkConnectionID checks that 'input' can be parsed as a Vpn Link Connection ID -func ValidateVpnLinkConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnLinkConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Link Connection ID -func (id VpnLinkConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s/vpnConnections/%s/vpnLinkConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName, id.VpnConnectionName, id.VpnLinkConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Link Connection ID -func (id VpnLinkConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - resourceids.StaticSegment("staticVpnConnections", "vpnConnections", "vpnConnections"), - resourceids.UserSpecifiedSegment("vpnConnectionName", "vpnConnectionValue"), - resourceids.StaticSegment("staticVpnLinkConnections", "vpnLinkConnections", "vpnLinkConnections"), - resourceids.UserSpecifiedSegment("vpnLinkConnectionName", "vpnLinkConnectionValue"), - } -} - -// String returns a human-readable description of this Vpn Link Connection ID -func (id VpnLinkConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - fmt.Sprintf("Vpn Connection Name: %q", id.VpnConnectionName), - fmt.Sprintf("Vpn Link Connection Name: %q", id.VpnLinkConnectionName), - } - return fmt.Sprintf("Vpn Link Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpnlinkconnection_test.go b/resource-manager/network/2022-09-01/virtualwans/id_vpnlinkconnection_test.go deleted file mode 100644 index f712871cd7d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpnlinkconnection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnLinkConnectionId{} - -func TestNewVpnLinkConnectionID(t *testing.T) { - id := NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } - - if id.VpnConnectionName != "vpnConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnConnectionName'", id.VpnConnectionName, "vpnConnectionValue") - } - - if id.VpnLinkConnectionName != "vpnLinkConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnLinkConnectionName'", id.VpnLinkConnectionName, "vpnLinkConnectionValue") - } -} - -func TestFormatVpnLinkConnectionID(t *testing.T) { - actual := NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnLinkConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnLinkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - VpnConnectionName: "vpnConnectionValue", - VpnLinkConnectionName: "vpnLinkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnLinkConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.VpnConnectionName != v.Expected.VpnConnectionName { - t.Fatalf("Expected %q but got %q for VpnConnectionName", v.Expected.VpnConnectionName, actual.VpnConnectionName) - } - - if actual.VpnLinkConnectionName != v.Expected.VpnLinkConnectionName { - t.Fatalf("Expected %q but got %q for VpnLinkConnectionName", v.Expected.VpnLinkConnectionName, actual.VpnLinkConnectionName) - } - - } -} - -func TestParseVpnLinkConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnLinkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - VpnConnectionName: "vpnConnectionValue", - VpnLinkConnectionName: "vpnLinkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS/vPnLiNkCoNnEcTiOnVaLuE", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - VpnConnectionName: "vPnCoNnEcTiOnVaLuE", - VpnLinkConnectionName: "vPnLiNkCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS/vPnLiNkCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnLinkConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.VpnConnectionName != v.Expected.VpnConnectionName { - t.Fatalf("Expected %q but got %q for VpnConnectionName", v.Expected.VpnConnectionName, actual.VpnConnectionName) - } - - if actual.VpnLinkConnectionName != v.Expected.VpnLinkConnectionName { - t.Fatalf("Expected %q but got %q for VpnLinkConnectionName", v.Expected.VpnLinkConnectionName, actual.VpnLinkConnectionName) - } - - } -} - -func TestSegmentsForVpnLinkConnectionId(t *testing.T) { - segments := VpnLinkConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnLinkConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpnserverconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/id_vpnserverconfiguration.go deleted file mode 100644 index 194ee0e58a3..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpnserverconfiguration.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnServerConfigurationId{} - -// VpnServerConfigurationId is a struct representing the Resource ID for a Vpn Server Configuration -type VpnServerConfigurationId struct { - SubscriptionId string - ResourceGroupName string - VpnServerConfigurationName string -} - -// NewVpnServerConfigurationID returns a new VpnServerConfigurationId struct -func NewVpnServerConfigurationID(subscriptionId string, resourceGroupName string, vpnServerConfigurationName string) VpnServerConfigurationId { - return VpnServerConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnServerConfigurationName: vpnServerConfigurationName, - } -} - -// ParseVpnServerConfigurationID parses 'input' into a VpnServerConfigurationId -func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnServerConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseVpnServerConfigurationIDInsensitively parses 'input' case-insensitively into a VpnServerConfigurationId -// note: this method should only be used for API response data and not user input -func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnServerConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateVpnServerConfigurationID checks that 'input' can be parsed as a Vpn Server Configuration ID -func ValidateVpnServerConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnServerConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Server Configuration ID -func (id VpnServerConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnServerConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnServerConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Server Configuration ID -func (id VpnServerConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnServerConfigurations", "vpnServerConfigurations", "vpnServerConfigurations"), - resourceids.UserSpecifiedSegment("vpnServerConfigurationName", "vpnServerConfigurationValue"), - } -} - -// String returns a human-readable description of this Vpn Server Configuration ID -func (id VpnServerConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Server Configuration Name: %q", id.VpnServerConfigurationName), - } - return fmt.Sprintf("Vpn Server Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpnserverconfiguration_test.go b/resource-manager/network/2022-09-01/virtualwans/id_vpnserverconfiguration_test.go deleted file mode 100644 index 1c41b70771c..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpnserverconfiguration_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnServerConfigurationId{} - -func TestNewVpnServerConfigurationID(t *testing.T) { - id := NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnServerConfigurationName != "vpnServerConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnServerConfigurationName'", id.VpnServerConfigurationName, "vpnServerConfigurationValue") - } -} - -func TestFormatVpnServerConfigurationID(t *testing.T) { - actual := NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnServerConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnServerConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnServerConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - } -} - -func TestParseVpnServerConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnServerConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnServerConfigurationName: "vPnSeRvErCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnServerConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - } -} - -func TestSegmentsForVpnServerConfigurationId(t *testing.T) { - segments := VpnServerConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnServerConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpnsite.go b/resource-manager/network/2022-09-01/virtualwans/id_vpnsite.go deleted file mode 100644 index d32b6f6dba4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpnsite.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteId{} - -// VpnSiteId is a struct representing the Resource ID for a Vpn Site -type VpnSiteId struct { - SubscriptionId string - ResourceGroupName string - VpnSiteName string -} - -// NewVpnSiteID returns a new VpnSiteId struct -func NewVpnSiteID(subscriptionId string, resourceGroupName string, vpnSiteName string) VpnSiteId { - return VpnSiteId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnSiteName: vpnSiteName, - } -} - -// ParseVpnSiteID parses 'input' into a VpnSiteId -func ParseVpnSiteID(input string) (*VpnSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - return &id, nil -} - -// ParseVpnSiteIDInsensitively parses 'input' case-insensitively into a VpnSiteId -// note: this method should only be used for API response data and not user input -func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - return &id, nil -} - -// ValidateVpnSiteID checks that 'input' can be parsed as a Vpn Site ID -func ValidateVpnSiteID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnSiteID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Site ID -func (id VpnSiteId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnSites/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnSiteName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Site ID -func (id VpnSiteId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnSites", "vpnSites", "vpnSites"), - resourceids.UserSpecifiedSegment("vpnSiteName", "vpnSiteValue"), - } -} - -// String returns a human-readable description of this Vpn Site ID -func (id VpnSiteId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Site Name: %q", id.VpnSiteName), - } - return fmt.Sprintf("Vpn Site (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpnsite_test.go b/resource-manager/network/2022-09-01/virtualwans/id_vpnsite_test.go deleted file mode 100644 index 5fb84931dc3..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpnsite_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteId{} - -func TestNewVpnSiteID(t *testing.T) { - id := NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnSiteName != "vpnSiteValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnSiteName'", id.VpnSiteName, "vpnSiteValue") - } -} - -func TestFormatVpnSiteID(t *testing.T) { - actual := NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnSiteID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - } -} - -func TestParseVpnSiteIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnSiteName: "vPnSiTeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - } -} - -func TestSegmentsForVpnSiteId(t *testing.T) { - segments := VpnSiteId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnSiteId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpnsitelink.go b/resource-manager/network/2022-09-01/virtualwans/id_vpnsitelink.go deleted file mode 100644 index e43deb2be92..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpnsitelink.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteLinkId{} - -// VpnSiteLinkId is a struct representing the Resource ID for a Vpn Site Link -type VpnSiteLinkId struct { - SubscriptionId string - ResourceGroupName string - VpnSiteName string - VpnSiteLinkName string -} - -// NewVpnSiteLinkID returns a new VpnSiteLinkId struct -func NewVpnSiteLinkID(subscriptionId string, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string) VpnSiteLinkId { - return VpnSiteLinkId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnSiteName: vpnSiteName, - VpnSiteLinkName: vpnSiteLinkName, - } -} - -// ParseVpnSiteLinkID parses 'input' into a VpnSiteLinkId -func ParseVpnSiteLinkID(input string) (*VpnSiteLinkId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteLinkId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteLinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - if id.VpnSiteLinkName, ok = parsed.Parsed["vpnSiteLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteLinkName", *parsed) - } - - return &id, nil -} - -// ParseVpnSiteLinkIDInsensitively parses 'input' case-insensitively into a VpnSiteLinkId -// note: this method should only be used for API response data and not user input -func ParseVpnSiteLinkIDInsensitively(input string) (*VpnSiteLinkId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteLinkId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteLinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - if id.VpnSiteLinkName, ok = parsed.Parsed["vpnSiteLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteLinkName", *parsed) - } - - return &id, nil -} - -// ValidateVpnSiteLinkID checks that 'input' can be parsed as a Vpn Site Link ID -func ValidateVpnSiteLinkID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnSiteLinkID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Site Link ID -func (id VpnSiteLinkId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnSites/%s/vpnSiteLinks/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnSiteName, id.VpnSiteLinkName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Site Link ID -func (id VpnSiteLinkId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnSites", "vpnSites", "vpnSites"), - resourceids.UserSpecifiedSegment("vpnSiteName", "vpnSiteValue"), - resourceids.StaticSegment("staticVpnSiteLinks", "vpnSiteLinks", "vpnSiteLinks"), - resourceids.UserSpecifiedSegment("vpnSiteLinkName", "vpnSiteLinkValue"), - } -} - -// String returns a human-readable description of this Vpn Site Link ID -func (id VpnSiteLinkId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Site Name: %q", id.VpnSiteName), - fmt.Sprintf("Vpn Site Link Name: %q", id.VpnSiteLinkName), - } - return fmt.Sprintf("Vpn Site Link (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/virtualwans/id_vpnsitelink_test.go b/resource-manager/network/2022-09-01/virtualwans/id_vpnsitelink_test.go deleted file mode 100644 index 03b59702cf9..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/id_vpnsitelink_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteLinkId{} - -func TestNewVpnSiteLinkID(t *testing.T) { - id := NewVpnSiteLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue", "vpnSiteLinkValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnSiteName != "vpnSiteValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnSiteName'", id.VpnSiteName, "vpnSiteValue") - } - - if id.VpnSiteLinkName != "vpnSiteLinkValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnSiteLinkName'", id.VpnSiteLinkName, "vpnSiteLinkValue") - } -} - -func TestFormatVpnSiteLinkID(t *testing.T) { - actual := NewVpnSiteLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue", "vpnSiteLinkValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnSiteLinkID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteLinkId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue", - Expected: &VpnSiteLinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - VpnSiteLinkName: "vpnSiteLinkValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteLinkID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - if actual.VpnSiteLinkName != v.Expected.VpnSiteLinkName { - t.Fatalf("Expected %q but got %q for VpnSiteLinkName", v.Expected.VpnSiteLinkName, actual.VpnSiteLinkName) - } - - } -} - -func TestParseVpnSiteLinkIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteLinkId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/vPnSiTeLiNkS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue", - Expected: &VpnSiteLinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - VpnSiteLinkName: "vpnSiteLinkValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/vPnSiTeLiNkS/vPnSiTeLiNkVaLuE", - Expected: &VpnSiteLinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnSiteName: "vPnSiTeVaLuE", - VpnSiteLinkName: "vPnSiTeLiNkVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/vPnSiTeLiNkS/vPnSiTeLiNkVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteLinkIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - if actual.VpnSiteLinkName != v.Expected.VpnSiteLinkName { - t.Fatalf("Expected %q but got %q for VpnSiteLinkName", v.Expected.VpnSiteLinkName, actual.VpnSiteLinkName) - } - - } -} - -func TestSegmentsForVpnSiteLinkId(t *testing.T) { - segments := VpnSiteLinkId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnSiteLinkId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupscreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupscreateorupdate.go deleted file mode 100644 index b96080c9525..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationPolicyGroupsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ConfigurationPolicyGroupsCreateOrUpdate ... -func (c VirtualWANsClient) ConfigurationPolicyGroupsCreateOrUpdate(ctx context.Context, id ConfigurationPolicyGroupId, input VpnServerConfigurationPolicyGroup) (result ConfigurationPolicyGroupsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ConfigurationPolicyGroupsCreateOrUpdateThenPoll performs ConfigurationPolicyGroupsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) ConfigurationPolicyGroupsCreateOrUpdateThenPoll(ctx context.Context, id ConfigurationPolicyGroupId, input VpnServerConfigurationPolicyGroup) error { - result, err := c.ConfigurationPolicyGroupsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ConfigurationPolicyGroupsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ConfigurationPolicyGroupsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupsdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupsdelete.go deleted file mode 100644 index faabc47e666..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationPolicyGroupsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ConfigurationPolicyGroupsDelete ... -func (c VirtualWANsClient) ConfigurationPolicyGroupsDelete(ctx context.Context, id ConfigurationPolicyGroupId) (result ConfigurationPolicyGroupsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ConfigurationPolicyGroupsDeleteThenPoll performs ConfigurationPolicyGroupsDelete then polls until it's completed -func (c VirtualWANsClient) ConfigurationPolicyGroupsDeleteThenPoll(ctx context.Context, id ConfigurationPolicyGroupId) error { - result, err := c.ConfigurationPolicyGroupsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing ConfigurationPolicyGroupsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ConfigurationPolicyGroupsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupsget.go b/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupsget.go deleted file mode 100644 index d8b7d1b03a6..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationPolicyGroupsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnServerConfigurationPolicyGroup -} - -// ConfigurationPolicyGroupsGet ... -func (c VirtualWANsClient) ConfigurationPolicyGroupsGet(ctx context.Context, id ConfigurationPolicyGroupId) (result ConfigurationPolicyGroupsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupslistbyvpnserverconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupslistbyvpnserverconfiguration.go deleted file mode 100644 index 67b957a0212..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_configurationpolicygroupslistbyvpnserverconfiguration.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationPolicyGroupsListByVpnServerConfigurationOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnServerConfigurationPolicyGroup -} - -type ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteResult struct { - Items []VpnServerConfigurationPolicyGroup -} - -// ConfigurationPolicyGroupsListByVpnServerConfiguration ... -func (c VirtualWANsClient) ConfigurationPolicyGroupsListByVpnServerConfiguration(ctx context.Context, id VpnServerConfigurationId) (result ConfigurationPolicyGroupsListByVpnServerConfigurationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/configurationPolicyGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnServerConfigurationPolicyGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ConfigurationPolicyGroupsListByVpnServerConfigurationComplete retrieves all the results into a single object -func (c VirtualWANsClient) ConfigurationPolicyGroupsListByVpnServerConfigurationComplete(ctx context.Context, id VpnServerConfigurationId) (ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteResult, error) { - return c.ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteMatchingPredicate(ctx, id, VpnServerConfigurationPolicyGroupOperationPredicate{}) -} - -// ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteMatchingPredicate(ctx context.Context, id VpnServerConfigurationId, predicate VpnServerConfigurationPolicyGroupOperationPredicate) (result ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteResult, err error) { - items := make([]VpnServerConfigurationPolicyGroup, 0) - - resp, err := c.ConfigurationPolicyGroupsListByVpnServerConfiguration(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_generatevirtualwanvpnserverconfigurationvpnprofile.go b/resource-manager/network/2022-09-01/virtualwans/method_generatevirtualwanvpnserverconfigurationvpnprofile.go deleted file mode 100644 index 81ab2e7025a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_generatevirtualwanvpnserverconfigurationvpnprofile.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GeneratevirtualwanvpnserverconfigurationvpnprofileOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Generatevirtualwanvpnserverconfigurationvpnprofile ... -func (c VirtualWANsClient) Generatevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, id VirtualWANId, input VirtualWanVpnProfileParameters) (result GeneratevirtualwanvpnserverconfigurationvpnprofileOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generateVpnProfile", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GeneratevirtualwanvpnserverconfigurationvpnprofileThenPoll performs Generatevirtualwanvpnserverconfigurationvpnprofile then polls until it's completed -func (c VirtualWANsClient) GeneratevirtualwanvpnserverconfigurationvpnprofileThenPoll(ctx context.Context, id VirtualWANId, input VirtualWanVpnProfileParameters) error { - result, err := c.Generatevirtualwanvpnserverconfigurationvpnprofile(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Generatevirtualwanvpnserverconfigurationvpnprofile: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Generatevirtualwanvpnserverconfigurationvpnprofile: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_hubroutetablescreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_hubroutetablescreateorupdate.go deleted file mode 100644 index 4b5cf462625..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_hubroutetablescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTablesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// HubRouteTablesCreateOrUpdate ... -func (c VirtualWANsClient) HubRouteTablesCreateOrUpdate(ctx context.Context, id HubRouteTableId, input HubRouteTable) (result HubRouteTablesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// HubRouteTablesCreateOrUpdateThenPoll performs HubRouteTablesCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) HubRouteTablesCreateOrUpdateThenPoll(ctx context.Context, id HubRouteTableId, input HubRouteTable) error { - result, err := c.HubRouteTablesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing HubRouteTablesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after HubRouteTablesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_hubroutetablesdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_hubroutetablesdelete.go deleted file mode 100644 index e51f251c714..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_hubroutetablesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTablesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// HubRouteTablesDelete ... -func (c VirtualWANsClient) HubRouteTablesDelete(ctx context.Context, id HubRouteTableId) (result HubRouteTablesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// HubRouteTablesDeleteThenPoll performs HubRouteTablesDelete then polls until it's completed -func (c VirtualWANsClient) HubRouteTablesDeleteThenPoll(ctx context.Context, id HubRouteTableId) error { - result, err := c.HubRouteTablesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing HubRouteTablesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after HubRouteTablesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_hubroutetablesget.go b/resource-manager/network/2022-09-01/virtualwans/method_hubroutetablesget.go deleted file mode 100644 index 15d26363bf8..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_hubroutetablesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTablesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *HubRouteTable -} - -// HubRouteTablesGet ... -func (c VirtualWANsClient) HubRouteTablesGet(ctx context.Context, id HubRouteTableId) (result HubRouteTablesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_hubroutetableslist.go b/resource-manager/network/2022-09-01/virtualwans/method_hubroutetableslist.go deleted file mode 100644 index dedcb7ed53a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_hubroutetableslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTablesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]HubRouteTable -} - -type HubRouteTablesListCompleteResult struct { - Items []HubRouteTable -} - -// HubRouteTablesList ... -func (c VirtualWANsClient) HubRouteTablesList(ctx context.Context, id VirtualHubId) (result HubRouteTablesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/hubRouteTables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]HubRouteTable `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// HubRouteTablesListComplete retrieves all the results into a single object -func (c VirtualWANsClient) HubRouteTablesListComplete(ctx context.Context, id VirtualHubId) (HubRouteTablesListCompleteResult, error) { - return c.HubRouteTablesListCompleteMatchingPredicate(ctx, id, HubRouteTableOperationPredicate{}) -} - -// HubRouteTablesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) HubRouteTablesListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate HubRouteTableOperationPredicate) (result HubRouteTablesListCompleteResult, err error) { - items := make([]HubRouteTable, 0) - - resp, err := c.HubRouteTablesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = HubRouteTablesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionscreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionscreateorupdate.go deleted file mode 100644 index e7cfb2a8130..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// HubVirtualNetworkConnectionsCreateOrUpdate ... -func (c VirtualWANsClient) HubVirtualNetworkConnectionsCreateOrUpdate(ctx context.Context, id HubVirtualNetworkConnectionId, input HubVirtualNetworkConnection) (result HubVirtualNetworkConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// HubVirtualNetworkConnectionsCreateOrUpdateThenPoll performs HubVirtualNetworkConnectionsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) HubVirtualNetworkConnectionsCreateOrUpdateThenPoll(ctx context.Context, id HubVirtualNetworkConnectionId, input HubVirtualNetworkConnection) error { - result, err := c.HubVirtualNetworkConnectionsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing HubVirtualNetworkConnectionsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after HubVirtualNetworkConnectionsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionsdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionsdelete.go deleted file mode 100644 index d26ec8f61b8..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// HubVirtualNetworkConnectionsDelete ... -func (c VirtualWANsClient) HubVirtualNetworkConnectionsDelete(ctx context.Context, id HubVirtualNetworkConnectionId) (result HubVirtualNetworkConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// HubVirtualNetworkConnectionsDeleteThenPoll performs HubVirtualNetworkConnectionsDelete then polls until it's completed -func (c VirtualWANsClient) HubVirtualNetworkConnectionsDeleteThenPoll(ctx context.Context, id HubVirtualNetworkConnectionId) error { - result, err := c.HubVirtualNetworkConnectionsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing HubVirtualNetworkConnectionsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after HubVirtualNetworkConnectionsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionsget.go b/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionsget.go deleted file mode 100644 index f596eedeb04..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *HubVirtualNetworkConnection -} - -// HubVirtualNetworkConnectionsGet ... -func (c VirtualWANsClient) HubVirtualNetworkConnectionsGet(ctx context.Context, id HubVirtualNetworkConnectionId) (result HubVirtualNetworkConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionslist.go b/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionslist.go deleted file mode 100644 index 8dc360a0f9a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_hubvirtualnetworkconnectionslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]HubVirtualNetworkConnection -} - -type HubVirtualNetworkConnectionsListCompleteResult struct { - Items []HubVirtualNetworkConnection -} - -// HubVirtualNetworkConnectionsList ... -func (c VirtualWANsClient) HubVirtualNetworkConnectionsList(ctx context.Context, id VirtualHubId) (result HubVirtualNetworkConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/hubVirtualNetworkConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]HubVirtualNetworkConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// HubVirtualNetworkConnectionsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) HubVirtualNetworkConnectionsListComplete(ctx context.Context, id VirtualHubId) (HubVirtualNetworkConnectionsListCompleteResult, error) { - return c.HubVirtualNetworkConnectionsListCompleteMatchingPredicate(ctx, id, HubVirtualNetworkConnectionOperationPredicate{}) -} - -// HubVirtualNetworkConnectionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) HubVirtualNetworkConnectionsListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate HubVirtualNetworkConnectionOperationPredicate) (result HubVirtualNetworkConnectionsListCompleteResult, err error) { - items := make([]HubVirtualNetworkConnection, 0) - - resp, err := c.HubVirtualNetworkConnectionsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = HubVirtualNetworkConnectionsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_natrulescreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_natrulescreateorupdate.go deleted file mode 100644 index ed93eaa4809..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_natrulescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NatRulesCreateOrUpdate ... -func (c VirtualWANsClient) NatRulesCreateOrUpdate(ctx context.Context, id NatRuleId, input VpnGatewayNatRule) (result NatRulesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NatRulesCreateOrUpdateThenPoll performs NatRulesCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) NatRulesCreateOrUpdateThenPoll(ctx context.Context, id NatRuleId, input VpnGatewayNatRule) error { - result, err := c.NatRulesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing NatRulesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NatRulesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_natrulesdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_natrulesdelete.go deleted file mode 100644 index 6908f8fa7a2..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_natrulesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NatRulesDelete ... -func (c VirtualWANsClient) NatRulesDelete(ctx context.Context, id NatRuleId) (result NatRulesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NatRulesDeleteThenPoll performs NatRulesDelete then polls until it's completed -func (c VirtualWANsClient) NatRulesDeleteThenPoll(ctx context.Context, id NatRuleId) error { - result, err := c.NatRulesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing NatRulesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NatRulesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_natrulesget.go b/resource-manager/network/2022-09-01/virtualwans/method_natrulesget.go deleted file mode 100644 index 2a81f289ef7..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_natrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnGatewayNatRule -} - -// NatRulesGet ... -func (c VirtualWANsClient) NatRulesGet(ctx context.Context, id NatRuleId) (result NatRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_natruleslistbyvpngateway.go b/resource-manager/network/2022-09-01/virtualwans/method_natruleslistbyvpngateway.go deleted file mode 100644 index bb8208128e1..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_natruleslistbyvpngateway.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulesListByVpnGatewayOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnGatewayNatRule -} - -type NatRulesListByVpnGatewayCompleteResult struct { - Items []VpnGatewayNatRule -} - -// NatRulesListByVpnGateway ... -func (c VirtualWANsClient) NatRulesListByVpnGateway(ctx context.Context, id VpnGatewayId) (result NatRulesListByVpnGatewayOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/natRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnGatewayNatRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// NatRulesListByVpnGatewayComplete retrieves all the results into a single object -func (c VirtualWANsClient) NatRulesListByVpnGatewayComplete(ctx context.Context, id VpnGatewayId) (NatRulesListByVpnGatewayCompleteResult, error) { - return c.NatRulesListByVpnGatewayCompleteMatchingPredicate(ctx, id, VpnGatewayNatRuleOperationPredicate{}) -} - -// NatRulesListByVpnGatewayCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) NatRulesListByVpnGatewayCompleteMatchingPredicate(ctx context.Context, id VpnGatewayId, predicate VpnGatewayNatRuleOperationPredicate) (result NatRulesListByVpnGatewayCompleteResult, err error) { - items := make([]VpnGatewayNatRule, 0) - - resp, err := c.NatRulesListByVpnGateway(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = NatRulesListByVpnGatewayCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayscreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayscreateorupdate.go deleted file mode 100644 index c86cbdc71a7..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayscreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// P2sVpnGatewaysCreateOrUpdate ... -func (c VirtualWANsClient) P2sVpnGatewaysCreateOrUpdate(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnGateway) (result P2sVpnGatewaysCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// P2sVpnGatewaysCreateOrUpdateThenPoll performs P2sVpnGatewaysCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) P2sVpnGatewaysCreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnGateway) error { - result, err := c.P2sVpnGatewaysCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing P2sVpnGatewaysCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after P2sVpnGatewaysCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewaysdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewaysdelete.go deleted file mode 100644 index 23ae30eaecd..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewaysdelete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// P2sVpnGatewaysDelete ... -func (c VirtualWANsClient) P2sVpnGatewaysDelete(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) (result P2sVpnGatewaysDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// P2sVpnGatewaysDeleteThenPoll performs P2sVpnGatewaysDelete then polls until it's completed -func (c VirtualWANsClient) P2sVpnGatewaysDeleteThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) error { - result, err := c.P2sVpnGatewaysDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing P2sVpnGatewaysDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after P2sVpnGatewaysDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewaysget.go b/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewaysget.go deleted file mode 100644 index 35e425baad0..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewaysget.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *P2SVpnGateway -} - -// P2sVpnGatewaysGet ... -func (c VirtualWANsClient) P2sVpnGatewaysGet(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) (result P2sVpnGatewaysGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayslist.go b/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayslist.go deleted file mode 100644 index 44ba4371089..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]P2SVpnGateway -} - -type P2sVpnGatewaysListCompleteResult struct { - Items []P2SVpnGateway -} - -// P2sVpnGatewaysList ... -func (c VirtualWANsClient) P2sVpnGatewaysList(ctx context.Context, id commonids.SubscriptionId) (result P2sVpnGatewaysListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/p2sVpnGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]P2SVpnGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// P2sVpnGatewaysListComplete retrieves all the results into a single object -func (c VirtualWANsClient) P2sVpnGatewaysListComplete(ctx context.Context, id commonids.SubscriptionId) (P2sVpnGatewaysListCompleteResult, error) { - return c.P2sVpnGatewaysListCompleteMatchingPredicate(ctx, id, P2SVpnGatewayOperationPredicate{}) -} - -// P2sVpnGatewaysListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) P2sVpnGatewaysListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate P2SVpnGatewayOperationPredicate) (result P2sVpnGatewaysListCompleteResult, err error) { - items := make([]P2SVpnGateway, 0) - - resp, err := c.P2sVpnGatewaysList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = P2sVpnGatewaysListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayslistbyresourcegroup.go b/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayslistbyresourcegroup.go deleted file mode 100644 index 5c0d4de5ec5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_p2svpngatewayslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]P2SVpnGateway -} - -type P2sVpnGatewaysListByResourceGroupCompleteResult struct { - Items []P2SVpnGateway -} - -// P2sVpnGatewaysListByResourceGroup ... -func (c VirtualWANsClient) P2sVpnGatewaysListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result P2sVpnGatewaysListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/p2sVpnGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]P2SVpnGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// P2sVpnGatewaysListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) P2sVpnGatewaysListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (P2sVpnGatewaysListByResourceGroupCompleteResult, error) { - return c.P2sVpnGatewaysListByResourceGroupCompleteMatchingPredicate(ctx, id, P2SVpnGatewayOperationPredicate{}) -} - -// P2sVpnGatewaysListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) P2sVpnGatewaysListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate P2SVpnGatewayOperationPredicate) (result P2sVpnGatewaysListByResourceGroupCompleteResult, err error) { - items := make([]P2SVpnGateway, 0) - - resp, err := c.P2sVpnGatewaysListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = P2sVpnGatewaysListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_routemapscreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_routemapscreateorupdate.go deleted file mode 100644 index be6848778c9..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_routemapscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// RouteMapsCreateOrUpdate ... -func (c VirtualWANsClient) RouteMapsCreateOrUpdate(ctx context.Context, id RouteMapId, input RouteMap) (result RouteMapsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// RouteMapsCreateOrUpdateThenPoll performs RouteMapsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) RouteMapsCreateOrUpdateThenPoll(ctx context.Context, id RouteMapId, input RouteMap) error { - result, err := c.RouteMapsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing RouteMapsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after RouteMapsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_routemapsdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_routemapsdelete.go deleted file mode 100644 index f89977d5d94..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_routemapsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// RouteMapsDelete ... -func (c VirtualWANsClient) RouteMapsDelete(ctx context.Context, id RouteMapId) (result RouteMapsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// RouteMapsDeleteThenPoll performs RouteMapsDelete then polls until it's completed -func (c VirtualWANsClient) RouteMapsDeleteThenPoll(ctx context.Context, id RouteMapId) error { - result, err := c.RouteMapsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing RouteMapsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after RouteMapsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_routemapsget.go b/resource-manager/network/2022-09-01/virtualwans/method_routemapsget.go deleted file mode 100644 index c2ab3a432f5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_routemapsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteMap -} - -// RouteMapsGet ... -func (c VirtualWANsClient) RouteMapsGet(ctx context.Context, id RouteMapId) (result RouteMapsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_routemapslist.go b/resource-manager/network/2022-09-01/virtualwans/method_routemapslist.go deleted file mode 100644 index beaac7240bd..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_routemapslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteMap -} - -type RouteMapsListCompleteResult struct { - Items []RouteMap -} - -// RouteMapsList ... -func (c VirtualWANsClient) RouteMapsList(ctx context.Context, id VirtualHubId) (result RouteMapsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routeMaps", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteMap `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// RouteMapsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) RouteMapsListComplete(ctx context.Context, id VirtualHubId) (RouteMapsListCompleteResult, error) { - return c.RouteMapsListCompleteMatchingPredicate(ctx, id, RouteMapOperationPredicate{}) -} - -// RouteMapsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) RouteMapsListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate RouteMapOperationPredicate) (result RouteMapsListCompleteResult, err error) { - items := make([]RouteMap, 0) - - resp, err := c.RouteMapsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = RouteMapsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_routingintentcreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_routingintentcreateorupdate.go deleted file mode 100644 index 4f9cf497bc5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_routingintentcreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// RoutingIntentCreateOrUpdate ... -func (c VirtualWANsClient) RoutingIntentCreateOrUpdate(ctx context.Context, id RoutingIntentId, input RoutingIntent) (result RoutingIntentCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// RoutingIntentCreateOrUpdateThenPoll performs RoutingIntentCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) RoutingIntentCreateOrUpdateThenPoll(ctx context.Context, id RoutingIntentId, input RoutingIntent) error { - result, err := c.RoutingIntentCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing RoutingIntentCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after RoutingIntentCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_routingintentdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_routingintentdelete.go deleted file mode 100644 index dd481f41454..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_routingintentdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// RoutingIntentDelete ... -func (c VirtualWANsClient) RoutingIntentDelete(ctx context.Context, id RoutingIntentId) (result RoutingIntentDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// RoutingIntentDeleteThenPoll performs RoutingIntentDelete then polls until it's completed -func (c VirtualWANsClient) RoutingIntentDeleteThenPoll(ctx context.Context, id RoutingIntentId) error { - result, err := c.RoutingIntentDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing RoutingIntentDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after RoutingIntentDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_routingintentget.go b/resource-manager/network/2022-09-01/virtualwans/method_routingintentget.go deleted file mode 100644 index fa8ddeee29c..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_routingintentget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RoutingIntent -} - -// RoutingIntentGet ... -func (c VirtualWANsClient) RoutingIntentGet(ctx context.Context, id RoutingIntentId) (result RoutingIntentGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_routingintentlist.go b/resource-manager/network/2022-09-01/virtualwans/method_routingintentlist.go deleted file mode 100644 index 61924f8534f..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_routingintentlist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RoutingIntent -} - -type RoutingIntentListCompleteResult struct { - Items []RoutingIntent -} - -// RoutingIntentList ... -func (c VirtualWANsClient) RoutingIntentList(ctx context.Context, id VirtualHubId) (result RoutingIntentListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routingIntent", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RoutingIntent `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// RoutingIntentListComplete retrieves all the results into a single object -func (c VirtualWANsClient) RoutingIntentListComplete(ctx context.Context, id VirtualHubId) (RoutingIntentListCompleteResult, error) { - return c.RoutingIntentListCompleteMatchingPredicate(ctx, id, RoutingIntentOperationPredicate{}) -} - -// RoutingIntentListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) RoutingIntentListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate RoutingIntentOperationPredicate) (result RoutingIntentListCompleteResult, err error) { - items := make([]RoutingIntent, 0) - - resp, err := c.RoutingIntentList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = RoutingIntentListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_supportedsecurityproviders.go b/resource-manager/network/2022-09-01/virtualwans/method_supportedsecurityproviders.go deleted file mode 100644 index a7ffada01e2..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_supportedsecurityproviders.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SupportedSecurityProvidersOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualWanSecurityProviders -} - -// SupportedSecurityProviders ... -func (c VirtualWANsClient) SupportedSecurityProviders(ctx context.Context, id VirtualWANId) (result SupportedSecurityProvidersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/supportedSecurityProviders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_updatetags.go b/resource-manager/network/2022-09-01/virtualwans/method_updatetags.go deleted file mode 100644 index 1f4b6c7114d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualWAN -} - -// UpdateTags ... -func (c VirtualWANsClient) UpdateTags(ctx context.Context, id VirtualWANId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectioncreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectioncreateorupdate.go deleted file mode 100644 index bfbbcc4c752..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectioncreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubBgpConnectionCreateOrUpdate ... -func (c VirtualWANsClient) VirtualHubBgpConnectionCreateOrUpdate(ctx context.Context, id commonids.VirtualHubBGPConnectionId, input BgpConnection) (result VirtualHubBgpConnectionCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubBgpConnectionCreateOrUpdateThenPoll performs VirtualHubBgpConnectionCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualHubBgpConnectionCreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualHubBGPConnectionId, input BgpConnection) error { - result, err := c.VirtualHubBgpConnectionCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubBgpConnectionCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubBgpConnectionCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectiondelete.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectiondelete.go deleted file mode 100644 index b8f353d5be6..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectiondelete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubBgpConnectionDelete ... -func (c VirtualWANsClient) VirtualHubBgpConnectionDelete(ctx context.Context, id commonids.VirtualHubBGPConnectionId) (result VirtualHubBgpConnectionDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubBgpConnectionDeleteThenPoll performs VirtualHubBgpConnectionDelete then polls until it's completed -func (c VirtualWANsClient) VirtualHubBgpConnectionDeleteThenPoll(ctx context.Context, id commonids.VirtualHubBGPConnectionId) error { - result, err := c.VirtualHubBgpConnectionDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubBgpConnectionDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubBgpConnectionDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionget.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionget.go deleted file mode 100644 index 404f5884207..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionget.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BgpConnection -} - -// VirtualHubBgpConnectionGet ... -func (c VirtualWANsClient) VirtualHubBgpConnectionGet(ctx context.Context, id commonids.VirtualHubBGPConnectionId) (result VirtualHubBgpConnectionGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslist.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslist.go deleted file mode 100644 index 2881195f87b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BgpConnection -} - -type VirtualHubBgpConnectionsListCompleteResult struct { - Items []BgpConnection -} - -// VirtualHubBgpConnectionsList ... -func (c VirtualWANsClient) VirtualHubBgpConnectionsList(ctx context.Context, id VirtualHubId) (result VirtualHubBgpConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/bgpConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BgpConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubBgpConnectionsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubBgpConnectionsListComplete(ctx context.Context, id VirtualHubId) (VirtualHubBgpConnectionsListCompleteResult, error) { - return c.VirtualHubBgpConnectionsListCompleteMatchingPredicate(ctx, id, BgpConnectionOperationPredicate{}) -} - -// VirtualHubBgpConnectionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubBgpConnectionsListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate BgpConnectionOperationPredicate) (result VirtualHubBgpConnectionsListCompleteResult, err error) { - items := make([]BgpConnection, 0) - - resp, err := c.VirtualHubBgpConnectionsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubBgpConnectionsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslistadvertisedroutes.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslistadvertisedroutes.go deleted file mode 100644 index 6ec6033e7c6..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslistadvertisedroutes.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionsListAdvertisedRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubBgpConnectionsListAdvertisedRoutes ... -func (c VirtualWANsClient) VirtualHubBgpConnectionsListAdvertisedRoutes(ctx context.Context, id commonids.VirtualHubBGPConnectionId) (result VirtualHubBgpConnectionsListAdvertisedRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/advertisedRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubBgpConnectionsListAdvertisedRoutesThenPoll performs VirtualHubBgpConnectionsListAdvertisedRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubBgpConnectionsListAdvertisedRoutesThenPoll(ctx context.Context, id commonids.VirtualHubBGPConnectionId) error { - result, err := c.VirtualHubBgpConnectionsListAdvertisedRoutes(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubBgpConnectionsListAdvertisedRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubBgpConnectionsListAdvertisedRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslistlearnedroutes.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslistlearnedroutes.go deleted file mode 100644 index 15707fcfac5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubbgpconnectionslistlearnedroutes.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionsListLearnedRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubBgpConnectionsListLearnedRoutes ... -func (c VirtualWANsClient) VirtualHubBgpConnectionsListLearnedRoutes(ctx context.Context, id commonids.VirtualHubBGPConnectionId) (result VirtualHubBgpConnectionsListLearnedRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/learnedRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubBgpConnectionsListLearnedRoutesThenPoll performs VirtualHubBgpConnectionsListLearnedRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubBgpConnectionsListLearnedRoutesThenPoll(ctx context.Context, id commonids.VirtualHubBGPConnectionId) error { - result, err := c.VirtualHubBgpConnectionsListLearnedRoutes(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubBgpConnectionsListLearnedRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubBgpConnectionsListLearnedRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationcreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationcreateorupdate.go deleted file mode 100644 index 79c6df9b0b3..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationcreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubIPConfigurationCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubIPConfigurationCreateOrUpdate ... -func (c VirtualWANsClient) VirtualHubIPConfigurationCreateOrUpdate(ctx context.Context, id commonids.VirtualHubIPConfigurationId, input HubIPConfiguration) (result VirtualHubIPConfigurationCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubIPConfigurationCreateOrUpdateThenPoll performs VirtualHubIPConfigurationCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualHubIPConfigurationCreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualHubIPConfigurationId, input HubIPConfiguration) error { - result, err := c.VirtualHubIPConfigurationCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubIPConfigurationCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubIPConfigurationCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationdelete.go deleted file mode 100644 index 36341aa33f7..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationdelete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubIPConfigurationDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubIPConfigurationDelete ... -func (c VirtualWANsClient) VirtualHubIPConfigurationDelete(ctx context.Context, id commonids.VirtualHubIPConfigurationId) (result VirtualHubIPConfigurationDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubIPConfigurationDeleteThenPoll performs VirtualHubIPConfigurationDelete then polls until it's completed -func (c VirtualWANsClient) VirtualHubIPConfigurationDeleteThenPoll(ctx context.Context, id commonids.VirtualHubIPConfigurationId) error { - result, err := c.VirtualHubIPConfigurationDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubIPConfigurationDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubIPConfigurationDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationget.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationget.go deleted file mode 100644 index 844b31e79e9..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationget.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubIPConfigurationGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *HubIPConfiguration -} - -// VirtualHubIPConfigurationGet ... -func (c VirtualWANsClient) VirtualHubIPConfigurationGet(ctx context.Context, id commonids.VirtualHubIPConfigurationId) (result VirtualHubIPConfigurationGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationlist.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationlist.go deleted file mode 100644 index 8a570a17df5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubipconfigurationlist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubIPConfigurationListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]HubIPConfiguration -} - -type VirtualHubIPConfigurationListCompleteResult struct { - Items []HubIPConfiguration -} - -// VirtualHubIPConfigurationList ... -func (c VirtualWANsClient) VirtualHubIPConfigurationList(ctx context.Context, id VirtualHubId) (result VirtualHubIPConfigurationListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ipConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]HubIPConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubIPConfigurationListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubIPConfigurationListComplete(ctx context.Context, id VirtualHubId) (VirtualHubIPConfigurationListCompleteResult, error) { - return c.VirtualHubIPConfigurationListCompleteMatchingPredicate(ctx, id, HubIPConfigurationOperationPredicate{}) -} - -// VirtualHubIPConfigurationListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubIPConfigurationListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate HubIPConfigurationOperationPredicate) (result VirtualHubIPConfigurationListCompleteResult, err error) { - items := make([]HubIPConfiguration, 0) - - resp, err := c.VirtualHubIPConfigurationList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubIPConfigurationListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2screateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2screateorupdate.go deleted file mode 100644 index 17c057ea65e..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2screateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2sCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubRouteTableV2sCreateOrUpdate ... -func (c VirtualWANsClient) VirtualHubRouteTableV2sCreateOrUpdate(ctx context.Context, id VirtualHubRouteTableId, input VirtualHubRouteTableV2) (result VirtualHubRouteTableV2sCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubRouteTableV2sCreateOrUpdateThenPoll performs VirtualHubRouteTableV2sCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualHubRouteTableV2sCreateOrUpdateThenPoll(ctx context.Context, id VirtualHubRouteTableId, input VirtualHubRouteTableV2) error { - result, err := c.VirtualHubRouteTableV2sCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubRouteTableV2sCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubRouteTableV2sCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2sdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2sdelete.go deleted file mode 100644 index 91cc7babd28..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2sdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2sDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubRouteTableV2sDelete ... -func (c VirtualWANsClient) VirtualHubRouteTableV2sDelete(ctx context.Context, id VirtualHubRouteTableId) (result VirtualHubRouteTableV2sDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubRouteTableV2sDeleteThenPoll performs VirtualHubRouteTableV2sDelete then polls until it's completed -func (c VirtualWANsClient) VirtualHubRouteTableV2sDeleteThenPoll(ctx context.Context, id VirtualHubRouteTableId) error { - result, err := c.VirtualHubRouteTableV2sDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubRouteTableV2sDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubRouteTableV2sDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2sget.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2sget.go deleted file mode 100644 index c421cab42b0..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2sget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2sGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualHubRouteTableV2 -} - -// VirtualHubRouteTableV2sGet ... -func (c VirtualWANsClient) VirtualHubRouteTableV2sGet(ctx context.Context, id VirtualHubRouteTableId) (result VirtualHubRouteTableV2sGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2slist.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2slist.go deleted file mode 100644 index cff86b6b3e4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubroutetablev2slist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2sListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualHubRouteTableV2 -} - -type VirtualHubRouteTableV2sListCompleteResult struct { - Items []VirtualHubRouteTableV2 -} - -// VirtualHubRouteTableV2sList ... -func (c VirtualWANsClient) VirtualHubRouteTableV2sList(ctx context.Context, id VirtualHubId) (result VirtualHubRouteTableV2sListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routeTables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualHubRouteTableV2 `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubRouteTableV2sListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubRouteTableV2sListComplete(ctx context.Context, id VirtualHubId) (VirtualHubRouteTableV2sListCompleteResult, error) { - return c.VirtualHubRouteTableV2sListCompleteMatchingPredicate(ctx, id, VirtualHubRouteTableV2OperationPredicate{}) -} - -// VirtualHubRouteTableV2sListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubRouteTableV2sListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate VirtualHubRouteTableV2OperationPredicate) (result VirtualHubRouteTableV2sListCompleteResult, err error) { - items := make([]VirtualHubRouteTableV2, 0) - - resp, err := c.VirtualHubRouteTableV2sList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubRouteTableV2sListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubscreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubscreateorupdate.go deleted file mode 100644 index 909feeeac5a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsCreateOrUpdate ... -func (c VirtualWANsClient) VirtualHubsCreateOrUpdate(ctx context.Context, id VirtualHubId, input VirtualHub) (result VirtualHubsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsCreateOrUpdateThenPoll performs VirtualHubsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualHubsCreateOrUpdateThenPoll(ctx context.Context, id VirtualHubId, input VirtualHub) error { - result, err := c.VirtualHubsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsdelete.go deleted file mode 100644 index 70eebb0a343..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsDelete ... -func (c VirtualWANsClient) VirtualHubsDelete(ctx context.Context, id VirtualHubId) (result VirtualHubsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsDeleteThenPoll performs VirtualHubsDelete then polls until it's completed -func (c VirtualWANsClient) VirtualHubsDeleteThenPoll(ctx context.Context, id VirtualHubId) error { - result, err := c.VirtualHubsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsget.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsget.go deleted file mode 100644 index 254a4824bc8..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualHub -} - -// VirtualHubsGet ... -func (c VirtualWANsClient) VirtualHubsGet(ctx context.Context, id VirtualHubId) (result VirtualHubsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgeteffectivevirtualhubroutes.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgeteffectivevirtualhubroutes.go deleted file mode 100644 index da163f2cba2..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgeteffectivevirtualhubroutes.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsGetEffectiveVirtualHubRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsGetEffectiveVirtualHubRoutes ... -func (c VirtualWANsClient) VirtualHubsGetEffectiveVirtualHubRoutes(ctx context.Context, id VirtualHubId, input EffectiveRoutesParameters) (result VirtualHubsGetEffectiveVirtualHubRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/effectiveRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsGetEffectiveVirtualHubRoutesThenPoll performs VirtualHubsGetEffectiveVirtualHubRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubsGetEffectiveVirtualHubRoutesThenPoll(ctx context.Context, id VirtualHubId, input EffectiveRoutesParameters) error { - result, err := c.VirtualHubsGetEffectiveVirtualHubRoutes(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubsGetEffectiveVirtualHubRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsGetEffectiveVirtualHubRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgetinboundroutes.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgetinboundroutes.go deleted file mode 100644 index 2bb5ea498e2..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgetinboundroutes.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsGetInboundRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsGetInboundRoutes ... -func (c VirtualWANsClient) VirtualHubsGetInboundRoutes(ctx context.Context, id VirtualHubId, input GetInboundRoutesParameters) (result VirtualHubsGetInboundRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/inboundRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsGetInboundRoutesThenPoll performs VirtualHubsGetInboundRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubsGetInboundRoutesThenPoll(ctx context.Context, id VirtualHubId, input GetInboundRoutesParameters) error { - result, err := c.VirtualHubsGetInboundRoutes(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubsGetInboundRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsGetInboundRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgetoutboundroutes.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgetoutboundroutes.go deleted file mode 100644 index 38d480f2a36..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsgetoutboundroutes.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsGetOutboundRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsGetOutboundRoutes ... -func (c VirtualWANsClient) VirtualHubsGetOutboundRoutes(ctx context.Context, id VirtualHubId, input GetOutboundRoutesParameters) (result VirtualHubsGetOutboundRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/outboundRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsGetOutboundRoutesThenPoll performs VirtualHubsGetOutboundRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubsGetOutboundRoutesThenPoll(ctx context.Context, id VirtualHubId, input GetOutboundRoutesParameters) error { - result, err := c.VirtualHubsGetOutboundRoutes(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubsGetOutboundRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsGetOutboundRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubslist.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubslist.go deleted file mode 100644 index 56f87c07d60..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualHub -} - -type VirtualHubsListCompleteResult struct { - Items []VirtualHub -} - -// VirtualHubsList ... -func (c VirtualWANsClient) VirtualHubsList(ctx context.Context, id commonids.SubscriptionId) (result VirtualHubsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualHubs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualHub `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubsListComplete(ctx context.Context, id commonids.SubscriptionId) (VirtualHubsListCompleteResult, error) { - return c.VirtualHubsListCompleteMatchingPredicate(ctx, id, VirtualHubOperationPredicate{}) -} - -// VirtualHubsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualHubOperationPredicate) (result VirtualHubsListCompleteResult, err error) { - items := make([]VirtualHub, 0) - - resp, err := c.VirtualHubsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubslistbyresourcegroup.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubslistbyresourcegroup.go deleted file mode 100644 index d406da0a2c9..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualHub -} - -type VirtualHubsListByResourceGroupCompleteResult struct { - Items []VirtualHub -} - -// VirtualHubsListByResourceGroup ... -func (c VirtualWANsClient) VirtualHubsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VirtualHubsListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualHubs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualHub `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubsListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VirtualHubsListByResourceGroupCompleteResult, error) { - return c.VirtualHubsListByResourceGroupCompleteMatchingPredicate(ctx, id, VirtualHubOperationPredicate{}) -} - -// VirtualHubsListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualHubOperationPredicate) (result VirtualHubsListByResourceGroupCompleteResult, err error) { - items := make([]VirtualHub, 0) - - resp, err := c.VirtualHubsListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubsListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsupdatetags.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsupdatetags.go deleted file mode 100644 index 0f848174d09..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualhubsupdatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsUpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualHub -} - -// VirtualHubsUpdateTags ... -func (c VirtualWANsClient) VirtualHubsUpdateTags(ctx context.Context, id VirtualHubId, input TagsObject) (result VirtualHubsUpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualwanscreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualwanscreateorupdate.go deleted file mode 100644 index 07c0e6e2488..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualwanscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualWansCreateOrUpdate ... -func (c VirtualWANsClient) VirtualWansCreateOrUpdate(ctx context.Context, id VirtualWANId, input VirtualWAN) (result VirtualWansCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualWansCreateOrUpdateThenPoll performs VirtualWansCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualWansCreateOrUpdateThenPoll(ctx context.Context, id VirtualWANId, input VirtualWAN) error { - result, err := c.VirtualWansCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualWansCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualWansCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualwansdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualwansdelete.go deleted file mode 100644 index 4ce708a8edd..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualwansdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualWansDelete ... -func (c VirtualWANsClient) VirtualWansDelete(ctx context.Context, id VirtualWANId) (result VirtualWansDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualWansDeleteThenPoll performs VirtualWansDelete then polls until it's completed -func (c VirtualWANsClient) VirtualWansDeleteThenPoll(ctx context.Context, id VirtualWANId) error { - result, err := c.VirtualWansDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualWansDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualWansDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualwansget.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualwansget.go deleted file mode 100644 index bd1e3cd5470..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualwansget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualWAN -} - -// VirtualWansGet ... -func (c VirtualWANsClient) VirtualWansGet(ctx context.Context, id VirtualWANId) (result VirtualWansGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualwanslist.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualwanslist.go deleted file mode 100644 index 6ac178d625e..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualwanslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualWAN -} - -type VirtualWansListCompleteResult struct { - Items []VirtualWAN -} - -// VirtualWansList ... -func (c VirtualWANsClient) VirtualWansList(ctx context.Context, id commonids.SubscriptionId) (result VirtualWansListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualWans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualWAN `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualWansListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualWansListComplete(ctx context.Context, id commonids.SubscriptionId) (VirtualWansListCompleteResult, error) { - return c.VirtualWansListCompleteMatchingPredicate(ctx, id, VirtualWANOperationPredicate{}) -} - -// VirtualWansListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualWansListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualWANOperationPredicate) (result VirtualWansListCompleteResult, err error) { - items := make([]VirtualWAN, 0) - - resp, err := c.VirtualWansList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualWansListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_virtualwanslistbyresourcegroup.go b/resource-manager/network/2022-09-01/virtualwans/method_virtualwanslistbyresourcegroup.go deleted file mode 100644 index 060e5901790..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_virtualwanslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualWAN -} - -type VirtualWansListByResourceGroupCompleteResult struct { - Items []VirtualWAN -} - -// VirtualWansListByResourceGroup ... -func (c VirtualWANsClient) VirtualWansListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VirtualWansListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualWans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualWAN `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualWansListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualWansListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VirtualWansListByResourceGroupCompleteResult, error) { - return c.VirtualWansListByResourceGroupCompleteMatchingPredicate(ctx, id, VirtualWANOperationPredicate{}) -} - -// VirtualWansListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualWansListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualWANOperationPredicate) (result VirtualWansListByResourceGroupCompleteResult, err error) { - items := make([]VirtualWAN, 0) - - resp, err := c.VirtualWansListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualWansListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionscreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionscreateorupdate.go deleted file mode 100644 index 7f35c0d3c62..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionscreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnConnectionsCreateOrUpdate ... -func (c VirtualWANsClient) VpnConnectionsCreateOrUpdate(ctx context.Context, id commonids.VPNConnectionId, input VpnConnection) (result VpnConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnConnectionsCreateOrUpdateThenPoll performs VpnConnectionsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VpnConnectionsCreateOrUpdateThenPoll(ctx context.Context, id commonids.VPNConnectionId, input VpnConnection) error { - result, err := c.VpnConnectionsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnConnectionsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnConnectionsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsdelete.go deleted file mode 100644 index 12193490035..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsdelete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnConnectionsDelete ... -func (c VirtualWANsClient) VpnConnectionsDelete(ctx context.Context, id commonids.VPNConnectionId) (result VpnConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnConnectionsDeleteThenPoll performs VpnConnectionsDelete then polls until it's completed -func (c VirtualWANsClient) VpnConnectionsDeleteThenPoll(ctx context.Context, id commonids.VPNConnectionId) error { - result, err := c.VpnConnectionsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnConnectionsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnConnectionsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsget.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsget.go deleted file mode 100644 index bd838056513..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsget.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnConnection -} - -// VpnConnectionsGet ... -func (c VirtualWANsClient) VpnConnectionsGet(ctx context.Context, id commonids.VPNConnectionId) (result VpnConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionslistbyvpngateway.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionslistbyvpngateway.go deleted file mode 100644 index 87be187f6da..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionslistbyvpngateway.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsListByVpnGatewayOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnConnection -} - -type VpnConnectionsListByVpnGatewayCompleteResult struct { - Items []VpnConnection -} - -// VpnConnectionsListByVpnGateway ... -func (c VirtualWANsClient) VpnConnectionsListByVpnGateway(ctx context.Context, id VpnGatewayId) (result VpnConnectionsListByVpnGatewayOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/vpnConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnConnectionsListByVpnGatewayComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnConnectionsListByVpnGatewayComplete(ctx context.Context, id VpnGatewayId) (VpnConnectionsListByVpnGatewayCompleteResult, error) { - return c.VpnConnectionsListByVpnGatewayCompleteMatchingPredicate(ctx, id, VpnConnectionOperationPredicate{}) -} - -// VpnConnectionsListByVpnGatewayCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnConnectionsListByVpnGatewayCompleteMatchingPredicate(ctx context.Context, id VpnGatewayId, predicate VpnConnectionOperationPredicate) (result VpnConnectionsListByVpnGatewayCompleteResult, err error) { - items := make([]VpnConnection, 0) - - resp, err := c.VpnConnectionsListByVpnGateway(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnConnectionsListByVpnGatewayCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsstartpacketcapture.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsstartpacketcapture.go deleted file mode 100644 index ad520efd602..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsstartpacketcapture.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsStartPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnConnectionsStartPacketCapture ... -func (c VirtualWANsClient) VpnConnectionsStartPacketCapture(ctx context.Context, id commonids.VPNConnectionId, input VpnConnectionPacketCaptureStartParameters) (result VpnConnectionsStartPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/startpacketcapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnConnectionsStartPacketCaptureThenPoll performs VpnConnectionsStartPacketCapture then polls until it's completed -func (c VirtualWANsClient) VpnConnectionsStartPacketCaptureThenPoll(ctx context.Context, id commonids.VPNConnectionId, input VpnConnectionPacketCaptureStartParameters) error { - result, err := c.VpnConnectionsStartPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnConnectionsStartPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnConnectionsStartPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsstoppacketcapture.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsstoppacketcapture.go deleted file mode 100644 index 45bf09710f6..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnconnectionsstoppacketcapture.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsStopPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnConnectionsStopPacketCapture ... -func (c VirtualWANsClient) VpnConnectionsStopPacketCapture(ctx context.Context, id commonids.VPNConnectionId, input VpnConnectionPacketCaptureStopParameters) (result VpnConnectionsStopPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stoppacketcapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnConnectionsStopPacketCaptureThenPoll performs VpnConnectionsStopPacketCapture then polls until it's completed -func (c VirtualWANsClient) VpnConnectionsStopPacketCaptureThenPoll(ctx context.Context, id commonids.VPNConnectionId, input VpnConnectionPacketCaptureStopParameters) error { - result, err := c.VpnConnectionsStopPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnConnectionsStopPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnConnectionsStopPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewayscreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_vpngatewayscreateorupdate.go deleted file mode 100644 index 539fccd78e0..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewayscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnGatewaysCreateOrUpdate ... -func (c VirtualWANsClient) VpnGatewaysCreateOrUpdate(ctx context.Context, id VpnGatewayId, input VpnGateway) (result VpnGatewaysCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnGatewaysCreateOrUpdateThenPoll performs VpnGatewaysCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VpnGatewaysCreateOrUpdateThenPoll(ctx context.Context, id VpnGatewayId, input VpnGateway) error { - result, err := c.VpnGatewaysCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnGatewaysCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnGatewaysCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewaysdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_vpngatewaysdelete.go deleted file mode 100644 index 76d02ba38d5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewaysdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnGatewaysDelete ... -func (c VirtualWANsClient) VpnGatewaysDelete(ctx context.Context, id VpnGatewayId) (result VpnGatewaysDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnGatewaysDeleteThenPoll performs VpnGatewaysDelete then polls until it's completed -func (c VirtualWANsClient) VpnGatewaysDeleteThenPoll(ctx context.Context, id VpnGatewayId) error { - result, err := c.VpnGatewaysDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnGatewaysDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnGatewaysDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewaysget.go b/resource-manager/network/2022-09-01/virtualwans/method_vpngatewaysget.go deleted file mode 100644 index 72f6e105eab..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewaysget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnGateway -} - -// VpnGatewaysGet ... -func (c VirtualWANsClient) VpnGatewaysGet(ctx context.Context, id VpnGatewayId) (result VpnGatewaysGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewayslist.go b/resource-manager/network/2022-09-01/virtualwans/method_vpngatewayslist.go deleted file mode 100644 index 03be4237a8b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewayslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnGateway -} - -type VpnGatewaysListCompleteResult struct { - Items []VpnGateway -} - -// VpnGatewaysList ... -func (c VirtualWANsClient) VpnGatewaysList(ctx context.Context, id commonids.SubscriptionId) (result VpnGatewaysListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnGatewaysListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnGatewaysListComplete(ctx context.Context, id commonids.SubscriptionId) (VpnGatewaysListCompleteResult, error) { - return c.VpnGatewaysListCompleteMatchingPredicate(ctx, id, VpnGatewayOperationPredicate{}) -} - -// VpnGatewaysListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnGatewaysListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VpnGatewayOperationPredicate) (result VpnGatewaysListCompleteResult, err error) { - items := make([]VpnGateway, 0) - - resp, err := c.VpnGatewaysList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnGatewaysListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewayslistbyresourcegroup.go b/resource-manager/network/2022-09-01/virtualwans/method_vpngatewayslistbyresourcegroup.go deleted file mode 100644 index 72a186be881..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpngatewayslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnGateway -} - -type VpnGatewaysListByResourceGroupCompleteResult struct { - Items []VpnGateway -} - -// VpnGatewaysListByResourceGroup ... -func (c VirtualWANsClient) VpnGatewaysListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VpnGatewaysListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnGatewaysListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnGatewaysListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VpnGatewaysListByResourceGroupCompleteResult, error) { - return c.VpnGatewaysListByResourceGroupCompleteMatchingPredicate(ctx, id, VpnGatewayOperationPredicate{}) -} - -// VpnGatewaysListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnGatewaysListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VpnGatewayOperationPredicate) (result VpnGatewaysListByResourceGroupCompleteResult, err error) { - items := make([]VpnGateway, 0) - - resp, err := c.VpnGatewaysListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnGatewaysListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnlinkconnectionsgetikesas.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnlinkconnectionsgetikesas.go deleted file mode 100644 index e9245bb48d4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnlinkconnectionsgetikesas.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkConnectionsGetIkeSasOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnLinkConnectionsGetIkeSas ... -func (c VirtualWANsClient) VpnLinkConnectionsGetIkeSas(ctx context.Context, id VpnLinkConnectionId) (result VpnLinkConnectionsGetIkeSasOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getikesas", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnLinkConnectionsGetIkeSasThenPoll performs VpnLinkConnectionsGetIkeSas then polls until it's completed -func (c VirtualWANsClient) VpnLinkConnectionsGetIkeSasThenPoll(ctx context.Context, id VpnLinkConnectionId) error { - result, err := c.VpnLinkConnectionsGetIkeSas(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnLinkConnectionsGetIkeSas: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnLinkConnectionsGetIkeSas: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnlinkconnectionslistbyvpnconnection.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnlinkconnectionslistbyvpnconnection.go deleted file mode 100644 index 43e0fa0b050..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnlinkconnectionslistbyvpnconnection.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkConnectionsListByVpnConnectionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnSiteLinkConnection -} - -type VpnLinkConnectionsListByVpnConnectionCompleteResult struct { - Items []VpnSiteLinkConnection -} - -// VpnLinkConnectionsListByVpnConnection ... -func (c VirtualWANsClient) VpnLinkConnectionsListByVpnConnection(ctx context.Context, id commonids.VPNConnectionId) (result VpnLinkConnectionsListByVpnConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/vpnLinkConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnSiteLinkConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnLinkConnectionsListByVpnConnectionComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnLinkConnectionsListByVpnConnectionComplete(ctx context.Context, id commonids.VPNConnectionId) (VpnLinkConnectionsListByVpnConnectionCompleteResult, error) { - return c.VpnLinkConnectionsListByVpnConnectionCompleteMatchingPredicate(ctx, id, VpnSiteLinkConnectionOperationPredicate{}) -} - -// VpnLinkConnectionsListByVpnConnectionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnLinkConnectionsListByVpnConnectionCompleteMatchingPredicate(ctx context.Context, id commonids.VPNConnectionId, predicate VpnSiteLinkConnectionOperationPredicate) (result VpnLinkConnectionsListByVpnConnectionCompleteResult, err error) { - items := make([]VpnSiteLinkConnection, 0) - - resp, err := c.VpnLinkConnectionsListByVpnConnection(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnLinkConnectionsListByVpnConnectionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsassociatedwithvirtualwanlist.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsassociatedwithvirtualwanlist.go deleted file mode 100644 index a02b8921b46..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsassociatedwithvirtualwanlist.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsAssociatedWithVirtualWanListOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnServerConfigurationsAssociatedWithVirtualWanList ... -func (c VirtualWANsClient) VpnServerConfigurationsAssociatedWithVirtualWanList(ctx context.Context, id VirtualWANId) (result VpnServerConfigurationsAssociatedWithVirtualWanListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/vpnServerConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnServerConfigurationsAssociatedWithVirtualWanListThenPoll performs VpnServerConfigurationsAssociatedWithVirtualWanList then polls until it's completed -func (c VirtualWANsClient) VpnServerConfigurationsAssociatedWithVirtualWanListThenPoll(ctx context.Context, id VirtualWANId) error { - result, err := c.VpnServerConfigurationsAssociatedWithVirtualWanList(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnServerConfigurationsAssociatedWithVirtualWanList: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnServerConfigurationsAssociatedWithVirtualWanList: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationscreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationscreateorupdate.go deleted file mode 100644 index 44fe07c321e..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnServerConfigurationsCreateOrUpdate ... -func (c VirtualWANsClient) VpnServerConfigurationsCreateOrUpdate(ctx context.Context, id VpnServerConfigurationId, input VpnServerConfiguration) (result VpnServerConfigurationsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnServerConfigurationsCreateOrUpdateThenPoll performs VpnServerConfigurationsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VpnServerConfigurationsCreateOrUpdateThenPoll(ctx context.Context, id VpnServerConfigurationId, input VpnServerConfiguration) error { - result, err := c.VpnServerConfigurationsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnServerConfigurationsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnServerConfigurationsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsdelete.go deleted file mode 100644 index 2edde34518e..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnServerConfigurationsDelete ... -func (c VirtualWANsClient) VpnServerConfigurationsDelete(ctx context.Context, id VpnServerConfigurationId) (result VpnServerConfigurationsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnServerConfigurationsDeleteThenPoll performs VpnServerConfigurationsDelete then polls until it's completed -func (c VirtualWANsClient) VpnServerConfigurationsDeleteThenPoll(ctx context.Context, id VpnServerConfigurationId) error { - result, err := c.VpnServerConfigurationsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnServerConfigurationsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnServerConfigurationsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsget.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsget.go deleted file mode 100644 index d5dc41f7804..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnServerConfiguration -} - -// VpnServerConfigurationsGet ... -func (c VirtualWANsClient) VpnServerConfigurationsGet(ctx context.Context, id VpnServerConfigurationId) (result VpnServerConfigurationsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationslist.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationslist.go deleted file mode 100644 index 2f73be8348c..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnServerConfiguration -} - -type VpnServerConfigurationsListCompleteResult struct { - Items []VpnServerConfiguration -} - -// VpnServerConfigurationsList ... -func (c VirtualWANsClient) VpnServerConfigurationsList(ctx context.Context, id commonids.SubscriptionId) (result VpnServerConfigurationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnServerConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnServerConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnServerConfigurationsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnServerConfigurationsListComplete(ctx context.Context, id commonids.SubscriptionId) (VpnServerConfigurationsListCompleteResult, error) { - return c.VpnServerConfigurationsListCompleteMatchingPredicate(ctx, id, VpnServerConfigurationOperationPredicate{}) -} - -// VpnServerConfigurationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnServerConfigurationsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VpnServerConfigurationOperationPredicate) (result VpnServerConfigurationsListCompleteResult, err error) { - items := make([]VpnServerConfiguration, 0) - - resp, err := c.VpnServerConfigurationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnServerConfigurationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationslistbyresourcegroup.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationslistbyresourcegroup.go deleted file mode 100644 index c458362b537..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnserverconfigurationslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnServerConfiguration -} - -type VpnServerConfigurationsListByResourceGroupCompleteResult struct { - Items []VpnServerConfiguration -} - -// VpnServerConfigurationsListByResourceGroup ... -func (c VirtualWANsClient) VpnServerConfigurationsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VpnServerConfigurationsListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnServerConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnServerConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnServerConfigurationsListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnServerConfigurationsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VpnServerConfigurationsListByResourceGroupCompleteResult, error) { - return c.VpnServerConfigurationsListByResourceGroupCompleteMatchingPredicate(ctx, id, VpnServerConfigurationOperationPredicate{}) -} - -// VpnServerConfigurationsListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnServerConfigurationsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VpnServerConfigurationOperationPredicate) (result VpnServerConfigurationsListByResourceGroupCompleteResult, err error) { - items := make([]VpnServerConfiguration, 0) - - resp, err := c.VpnServerConfigurationsListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnServerConfigurationsListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinkconnectionsget.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinkconnectionsget.go deleted file mode 100644 index e271896b6d2..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinkconnectionsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnSiteLinkConnection -} - -// VpnSiteLinkConnectionsGet ... -func (c VirtualWANsClient) VpnSiteLinkConnectionsGet(ctx context.Context, id VpnLinkConnectionId) (result VpnSiteLinkConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinksget.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinksget.go deleted file mode 100644 index 4beef5c44ca..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinksget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinksGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnSiteLink -} - -// VpnSiteLinksGet ... -func (c VirtualWANsClient) VpnSiteLinksGet(ctx context.Context, id VpnSiteLinkId) (result VpnSiteLinksGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinkslistbyvpnsite.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinkslistbyvpnsite.go deleted file mode 100644 index 912481bbfb2..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitelinkslistbyvpnsite.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinksListByVpnSiteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnSiteLink -} - -type VpnSiteLinksListByVpnSiteCompleteResult struct { - Items []VpnSiteLink -} - -// VpnSiteLinksListByVpnSite ... -func (c VirtualWANsClient) VpnSiteLinksListByVpnSite(ctx context.Context, id VpnSiteId) (result VpnSiteLinksListByVpnSiteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/vpnSiteLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnSiteLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnSiteLinksListByVpnSiteComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnSiteLinksListByVpnSiteComplete(ctx context.Context, id VpnSiteId) (VpnSiteLinksListByVpnSiteCompleteResult, error) { - return c.VpnSiteLinksListByVpnSiteCompleteMatchingPredicate(ctx, id, VpnSiteLinkOperationPredicate{}) -} - -// VpnSiteLinksListByVpnSiteCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnSiteLinksListByVpnSiteCompleteMatchingPredicate(ctx context.Context, id VpnSiteId, predicate VpnSiteLinkOperationPredicate) (result VpnSiteLinksListByVpnSiteCompleteResult, err error) { - items := make([]VpnSiteLink, 0) - - resp, err := c.VpnSiteLinksListByVpnSite(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnSiteLinksListByVpnSiteCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitesconfigurationdownload.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnsitesconfigurationdownload.go deleted file mode 100644 index a20fd02e0fc..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitesconfigurationdownload.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesConfigurationDownloadOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnSitesConfigurationDownload ... -func (c VirtualWANsClient) VpnSitesConfigurationDownload(ctx context.Context, id VirtualWANId, input GetVpnSitesConfigurationRequest) (result VpnSitesConfigurationDownloadOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/vpnConfiguration", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnSitesConfigurationDownloadThenPoll performs VpnSitesConfigurationDownload then polls until it's completed -func (c VirtualWANsClient) VpnSitesConfigurationDownloadThenPoll(ctx context.Context, id VirtualWANId, input GetVpnSitesConfigurationRequest) error { - result, err := c.VpnSitesConfigurationDownload(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnSitesConfigurationDownload: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnSitesConfigurationDownload: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitescreateorupdate.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnsitescreateorupdate.go deleted file mode 100644 index 7bf3c36101b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnSitesCreateOrUpdate ... -func (c VirtualWANsClient) VpnSitesCreateOrUpdate(ctx context.Context, id VpnSiteId, input VpnSite) (result VpnSitesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnSitesCreateOrUpdateThenPoll performs VpnSitesCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VpnSitesCreateOrUpdateThenPoll(ctx context.Context, id VpnSiteId, input VpnSite) error { - result, err := c.VpnSitesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnSitesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnSitesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitesdelete.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnsitesdelete.go deleted file mode 100644 index f3b27d7f18a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnSitesDelete ... -func (c VirtualWANsClient) VpnSitesDelete(ctx context.Context, id VpnSiteId) (result VpnSitesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnSitesDeleteThenPoll performs VpnSitesDelete then polls until it's completed -func (c VirtualWANsClient) VpnSitesDeleteThenPoll(ctx context.Context, id VpnSiteId) error { - result, err := c.VpnSitesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnSitesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnSitesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitesget.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnsitesget.go deleted file mode 100644 index 9e9c3b8e57f..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnsitesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnSite -} - -// VpnSitesGet ... -func (c VirtualWANsClient) VpnSitesGet(ctx context.Context, id VpnSiteId) (result VpnSitesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnsiteslist.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnsiteslist.go deleted file mode 100644 index 3de5fb382c7..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnsiteslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnSite -} - -type VpnSitesListCompleteResult struct { - Items []VpnSite -} - -// VpnSitesList ... -func (c VirtualWANsClient) VpnSitesList(ctx context.Context, id commonids.SubscriptionId) (result VpnSitesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnSites", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnSite `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnSitesListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnSitesListComplete(ctx context.Context, id commonids.SubscriptionId) (VpnSitesListCompleteResult, error) { - return c.VpnSitesListCompleteMatchingPredicate(ctx, id, VpnSiteOperationPredicate{}) -} - -// VpnSitesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnSitesListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VpnSiteOperationPredicate) (result VpnSitesListCompleteResult, err error) { - items := make([]VpnSite, 0) - - resp, err := c.VpnSitesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnSitesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/method_vpnsiteslistbyresourcegroup.go b/resource-manager/network/2022-09-01/virtualwans/method_vpnsiteslistbyresourcegroup.go deleted file mode 100644 index b7164f0e5e7..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/method_vpnsiteslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnSite -} - -type VpnSitesListByResourceGroupCompleteResult struct { - Items []VpnSite -} - -// VpnSitesListByResourceGroup ... -func (c VirtualWANsClient) VpnSitesListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VpnSitesListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnSites", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnSite `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnSitesListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnSitesListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VpnSitesListByResourceGroupCompleteResult, error) { - return c.VpnSitesListByResourceGroupCompleteMatchingPredicate(ctx, id, VpnSiteOperationPredicate{}) -} - -// VpnSitesListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnSitesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VpnSiteOperationPredicate) (result VpnSitesListByResourceGroupCompleteResult, err error) { - items := make([]VpnSite, 0) - - resp, err := c.VpnSitesListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnSitesListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_aadauthenticationparameters.go b/resource-manager/network/2022-09-01/virtualwans/model_aadauthenticationparameters.go deleted file mode 100644 index b0d5e53c358..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_aadauthenticationparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AadAuthenticationParameters struct { - AadAudience *string `json:"aadAudience,omitempty"` - AadIssuer *string `json:"aadIssuer,omitempty"` - AadTenant *string `json:"aadTenant,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_action.go b/resource-manager/network/2022-09-01/virtualwans/model_action.go deleted file mode 100644 index e3c73ef507d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_action.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Action struct { - Parameters *[]Parameter `json:"parameters,omitempty"` - Type *RouteMapActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_addressspace.go b/resource-manager/network/2022-09-01/virtualwans/model_addressspace.go deleted file mode 100644 index e1ac53861fc..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 51a23d1c2c5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index adfa8110618..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index c308084cb90..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 184f4db35ed..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 96ab63c3c70..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/virtualwans/model_applicationsecuritygroup.go deleted file mode 100644 index 8df94828320..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 0db023773ff..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_backendaddresspool.go b/resource-manager/network/2022-09-01/virtualwans/model_backendaddresspool.go deleted file mode 100644 index 75b3239a673..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index f82284cb3a4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_bgpconnection.go b/resource-manager/network/2022-09-01/virtualwans/model_bgpconnection.go deleted file mode 100644 index 13c77fe2225..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_bgpconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BgpConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_bgpconnectionproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_bgpconnectionproperties.go deleted file mode 100644 index 4666e421984..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_bgpconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpConnectionProperties struct { - ConnectionState *HubBgpConnectionStatus `json:"connectionState,omitempty"` - HubVirtualNetworkConnection *SubResource `json:"hubVirtualNetworkConnection,omitempty"` - PeerAsn *int64 `json:"peerAsn,omitempty"` - PeerIP *string `json:"peerIp,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_bgpsettings.go b/resource-manager/network/2022-09-01/virtualwans/model_bgpsettings.go deleted file mode 100644 index 5f96d5acf14..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_criterion.go b/resource-manager/network/2022-09-01/virtualwans/model_criterion.go deleted file mode 100644 index e7249b64d4d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_criterion.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Criterion struct { - AsPath *[]string `json:"asPath,omitempty"` - Community *[]string `json:"community,omitempty"` - MatchCondition *RouteMapMatchCondition `json:"matchCondition,omitempty"` - RoutePrefix *[]string `json:"routePrefix,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 557a5a01a6d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_ddossettings.go b/resource-manager/network/2022-09-01/virtualwans/model_ddossettings.go deleted file mode 100644 index 82eef09dc62..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_delegation.go b/resource-manager/network/2022-09-01/virtualwans/model_delegation.go deleted file mode 100644 index 55eeb1fff81..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_deviceproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_deviceproperties.go deleted file mode 100644 index 9c255349846..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_deviceproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeviceProperties struct { - DeviceModel *string `json:"deviceModel,omitempty"` - DeviceVendor *string `json:"deviceVendor,omitempty"` - LinkSpeedInMbps *int64 `json:"linkSpeedInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_effectiveroutesparameters.go b/resource-manager/network/2022-09-01/virtualwans/model_effectiveroutesparameters.go deleted file mode 100644 index dab27997ab5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_effectiveroutesparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRoutesParameters struct { - ResourceId *string `json:"resourceId,omitempty"` - VirtualWanResourceType *string `json:"virtualWanResourceType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_flowlog.go b/resource-manager/network/2022-09-01/virtualwans/model_flowlog.go deleted file mode 100644 index da3b4f53345..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/virtualwans/model_flowlogformatparameters.go deleted file mode 100644 index 3b64c7c567a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_flowlogpropertiesformat.go deleted file mode 100644 index 61a32b4aded..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_frontendipconfiguration.go deleted file mode 100644 index b9c97d1e6a4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 62b1635a8ed..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_gatewaycustombgpipaddressipconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_gatewaycustombgpipaddressipconfiguration.go deleted file mode 100644 index 81c747c0a4a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_gatewaycustombgpipaddressipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayCustomBgpIPAddressIPConfiguration struct { - CustomBgpIPAddress string `json:"customBgpIpAddress"` - IPConfigurationId string `json:"ipConfigurationId"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/virtualwans/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 96c5d2b39e5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_getinboundroutesparameters.go b/resource-manager/network/2022-09-01/virtualwans/model_getinboundroutesparameters.go deleted file mode 100644 index 1407618f660..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_getinboundroutesparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetInboundRoutesParameters struct { - ConnectionType *string `json:"connectionType,omitempty"` - ResourceUri *string `json:"resourceUri,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_getoutboundroutesparameters.go b/resource-manager/network/2022-09-01/virtualwans/model_getoutboundroutesparameters.go deleted file mode 100644 index 19a89a55b10..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_getoutboundroutesparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOutboundRoutesParameters struct { - ConnectionType *string `json:"connectionType,omitempty"` - ResourceUri *string `json:"resourceUri,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_getvpnsitesconfigurationrequest.go b/resource-manager/network/2022-09-01/virtualwans/model_getvpnsitesconfigurationrequest.go deleted file mode 100644 index 0dd233101ce..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_getvpnsitesconfigurationrequest.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVpnSitesConfigurationRequest struct { - OutputBlobSasUrl string `json:"outputBlobSasUrl"` - VpnSites *[]string `json:"vpnSites,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_hubipconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_hubipconfiguration.go deleted file mode 100644 index c666224646f..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_hubipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *HubIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_hubipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_hubipconfigurationpropertiesformat.go deleted file mode 100644 index 86c4674860b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_hubipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_hubroute.go b/resource-manager/network/2022-09-01/virtualwans/model_hubroute.go deleted file mode 100644 index bc12eef1a4a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_hubroute.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRoute struct { - DestinationType string `json:"destinationType"` - Destinations []string `json:"destinations"` - Name string `json:"name"` - NextHop string `json:"nextHop"` - NextHopType string `json:"nextHopType"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_hubroutetable.go b/resource-manager/network/2022-09-01/virtualwans/model_hubroutetable.go deleted file mode 100644 index 1214fb071b3..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_hubroutetable.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *HubRouteTableProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_hubroutetableproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_hubroutetableproperties.go deleted file mode 100644 index 32d33bc1ec9..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_hubroutetableproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTableProperties struct { - AssociatedConnections *[]string `json:"associatedConnections,omitempty"` - Labels *[]string `json:"labels,omitempty"` - PropagatingConnections *[]string `json:"propagatingConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Routes *[]HubRoute `json:"routes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_hubvirtualnetworkconnection.go b/resource-manager/network/2022-09-01/virtualwans/model_hubvirtualnetworkconnection.go deleted file mode 100644 index 41f20a0a732..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_hubvirtualnetworkconnection.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *HubVirtualNetworkConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_hubvirtualnetworkconnectionproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_hubvirtualnetworkconnectionproperties.go deleted file mode 100644 index 83313e30ed5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_hubvirtualnetworkconnectionproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionProperties struct { - AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"` - AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_inboundnatrule.go b/resource-manager/network/2022-09-01/virtualwans/model_inboundnatrule.go deleted file mode 100644 index eee8ea195cf..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 17b64e3d468..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_ipconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_ipconfiguration.go deleted file mode 100644 index 1241b6c2c3e..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index fbaabbf7c1b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationprofile.go deleted file mode 100644 index a710fe9c7f0..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 6b808468c3d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 58c575ad69f..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_ipsecpolicy.go b/resource-manager/network/2022-09-01/virtualwans/model_ipsecpolicy.go deleted file mode 100644 index 02267e6b24d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_iptag.go b/resource-manager/network/2022-09-01/virtualwans/model_iptag.go deleted file mode 100644 index de05365d519..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/virtualwans/model_loadbalancerbackendaddress.go deleted file mode 100644 index 37820fb13bd..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 3f6629b67eb..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_natgateway.go b/resource-manager/network/2022-09-01/virtualwans/model_natgateway.go deleted file mode 100644 index 7e1a4539e08..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_natgatewaypropertiesformat.go deleted file mode 100644 index 7f5732e1cc0..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_natgatewaysku.go b/resource-manager/network/2022-09-01/virtualwans/model_natgatewaysku.go deleted file mode 100644 index 4cd49e069a9..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_natruleportmapping.go b/resource-manager/network/2022-09-01/virtualwans/model_natruleportmapping.go deleted file mode 100644 index 2ce8b302da3..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networkinterface.go b/resource-manager/network/2022-09-01/virtualwans/model_networkinterface.go deleted file mode 100644 index b6b5bf73332..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacednssettings.go deleted file mode 100644 index d0dcb411a3e..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 5c0d1edc7ad..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 9ed5a87eb91..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 53b62677571..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 862d1f57282..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacetapconfiguration.go deleted file mode 100644 index d12531c2798..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 70fb9b73ddb..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/virtualwans/model_networksecuritygroup.go deleted file mode 100644 index c941605df94..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 54526eb4ea0..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_o365breakoutcategorypolicies.go b/resource-manager/network/2022-09-01/virtualwans/model_o365breakoutcategorypolicies.go deleted file mode 100644 index 0a9ed71a50b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_o365breakoutcategorypolicies.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type O365BreakOutCategoryPolicies struct { - Allow *bool `json:"allow,omitempty"` - Default *bool `json:"default,omitempty"` - Optimize *bool `json:"optimize,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_o365policyproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_o365policyproperties.go deleted file mode 100644 index eeae991ee3f..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_o365policyproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type O365PolicyProperties struct { - BreakOutCategories *O365BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_p2sconnectionconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_p2sconnectionconfiguration.go deleted file mode 100644 index 08a6a452843..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_p2sconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *P2SConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_p2sconnectionconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_p2sconnectionconfigurationproperties.go deleted file mode 100644 index a5558cf1e48..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_p2sconnectionconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfigurationProperties struct { - ConfigurationPolicyGroupAssociations *[]SubResource `json:"configurationPolicyGroupAssociations,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - PreviousConfigurationPolicyGroupAssociations *[]VpnServerConfigurationPolicyGroup `json:"previousConfigurationPolicyGroupAssociations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_p2svpngateway.go b/resource-manager/network/2022-09-01/virtualwans/model_p2svpngateway.go deleted file mode 100644 index 8133cc078c9..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_p2svpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *P2SVpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_p2svpngatewayproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_p2svpngatewayproperties.go deleted file mode 100644 index d337b304bbd..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_p2svpngatewayproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGatewayProperties struct { - CustomDnsServers *[]string `json:"customDnsServers,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` - VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_parameter.go b/resource-manager/network/2022-09-01/virtualwans/model_parameter.go deleted file mode 100644 index d1619c1138c..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_parameter.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Parameter struct { - AsPath *[]string `json:"asPath,omitempty"` - Community *[]string `json:"community,omitempty"` - RoutePrefix *[]string `json:"routePrefix,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_peerroute.go b/resource-manager/network/2022-09-01/virtualwans/model_peerroute.go deleted file mode 100644 index c03bdbe8722..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_peerroute.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerRoute struct { - AsPath *string `json:"asPath,omitempty"` - LocalAddress *string `json:"localAddress,omitempty"` - Network *string `json:"network,omitempty"` - NextHop *string `json:"nextHop,omitempty"` - Origin *string `json:"origin,omitempty"` - SourcePeer *string `json:"sourcePeer,omitempty"` - Weight *int64 `json:"weight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_peerroutelist.go b/resource-manager/network/2022-09-01/virtualwans/model_peerroutelist.go deleted file mode 100644 index 03e35b11bdf..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_peerroutelist.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerRouteList struct { - Value *[]PeerRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privateendpoint.go b/resource-manager/network/2022-09-01/virtualwans/model_privateendpoint.go deleted file mode 100644 index d493c3ed57a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/virtualwans/model_privateendpointconnection.go deleted file mode 100644 index 191623acf98..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_privateendpointconnectionproperties.go deleted file mode 100644 index 9c1fa6ebf3a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_privateendpointipconfiguration.go deleted file mode 100644 index 053d067b685..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index d6794440033..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_privateendpointproperties.go deleted file mode 100644 index 3af5e8a64e0..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkservice.go b/resource-manager/network/2022-09-01/virtualwans/model_privatelinkservice.go deleted file mode 100644 index 79f0f888953..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnection.go deleted file mode 100644 index b584feab35a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 5875bd90e15..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index c1664caec07..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 3558cb8095c..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 31251b67685..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceproperties.go deleted file mode 100644 index 286611e0560..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_propagatedroutetable.go b/resource-manager/network/2022-09-01/virtualwans/model_propagatedroutetable.go deleted file mode 100644 index af45ddbedf1..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_publicipaddress.go b/resource-manager/network/2022-09-01/virtualwans/model_publicipaddress.go deleted file mode 100644 index 8bd2fa402a4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/virtualwans/model_publicipaddressdnssettings.go deleted file mode 100644 index 941ad0689a8..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 48fecb8ae90..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/virtualwans/model_publicipaddresssku.go deleted file mode 100644 index 4fcf5fb0e8f..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_radiusserver.go b/resource-manager/network/2022-09-01/virtualwans/model_radiusserver.go deleted file mode 100644 index 858a67625c9..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_radiusserver.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RadiusServer struct { - RadiusServerAddress string `json:"radiusServerAddress"` - RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/virtualwans/model_resourcenavigationlink.go deleted file mode 100644 index b0d119588a3..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/virtualwans/model_resourcenavigationlinkformat.go deleted file mode 100644 index 9443c31d227..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_resourceset.go b/resource-manager/network/2022-09-01/virtualwans/model_resourceset.go deleted file mode 100644 index f8d5a3c0775..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/virtualwans/model_retentionpolicyparameters.go deleted file mode 100644 index 57394822b9d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_route.go b/resource-manager/network/2022-09-01/virtualwans/model_route.go deleted file mode 100644 index 5ae4b7a4ff8..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routemap.go b/resource-manager/network/2022-09-01/virtualwans/model_routemap.go deleted file mode 100644 index 6c5941f5a4c..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routemap.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteMapProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routemapproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_routemapproperties.go deleted file mode 100644 index a4a019429ff..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routemapproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapProperties struct { - AssociatedInboundConnections *[]string `json:"associatedInboundConnections,omitempty"` - AssociatedOutboundConnections *[]string `json:"associatedOutboundConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]RouteMapRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routemaprule.go b/resource-manager/network/2022-09-01/virtualwans/model_routemaprule.go deleted file mode 100644 index cdeacc9a78b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routemaprule.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapRule struct { - Actions *[]Action `json:"actions,omitempty"` - MatchCriteria *[]Criterion `json:"matchCriteria,omitempty"` - Name *string `json:"name,omitempty"` - NextStepIfMatched *NextStep `json:"nextStepIfMatched,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_routepropertiesformat.go deleted file mode 100644 index 51259038175..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routetable.go b/resource-manager/network/2022-09-01/virtualwans/model_routetable.go deleted file mode 100644 index 76a72a637be..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_routetablepropertiesformat.go deleted file mode 100644 index 9a5454526a4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routingconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_routingconfiguration.go deleted file mode 100644 index f4ca0018afa..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routingintent.go b/resource-manager/network/2022-09-01/virtualwans/model_routingintent.go deleted file mode 100644 index 537f1404f3d..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routingintent.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntent struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutingIntentProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routingintentproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_routingintentproperties.go deleted file mode 100644 index 38a3b8e4147..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routingintentproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingPolicies *[]RoutingPolicy `json:"routingPolicies,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_routingpolicy.go b/resource-manager/network/2022-09-01/virtualwans/model_routingpolicy.go deleted file mode 100644 index cef221dbd58..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_routingpolicy.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingPolicy struct { - Destinations []string `json:"destinations"` - Name string `json:"name"` - NextHop string `json:"nextHop"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_securityrule.go b/resource-manager/network/2022-09-01/virtualwans/model_securityrule.go deleted file mode 100644 index 72e68599476..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_securityrulepropertiesformat.go deleted file mode 100644 index 547a37a71ce..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/virtualwans/model_serviceassociationlink.go deleted file mode 100644 index 0b2b5927b19..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 1aa80542228..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_servicedelegationpropertiesformat.go deleted file mode 100644 index aaeb340b2c7..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicy.go deleted file mode 100644 index 62b85e18cbf..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 886de873aea..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 433a85d2006..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 6c09399b151..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 115ecdfed06..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_staticroute.go b/resource-manager/network/2022-09-01/virtualwans/model_staticroute.go deleted file mode 100644 index c57fdb00cea..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_staticroutesconfig.go b/resource-manager/network/2022-09-01/virtualwans/model_staticroutesconfig.go deleted file mode 100644 index c286d119b66..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_subnet.go b/resource-manager/network/2022-09-01/virtualwans/model_subnet.go deleted file mode 100644 index ecdd88e0207..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_subnetpropertiesformat.go deleted file mode 100644 index be51bf35107..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_subresource.go b/resource-manager/network/2022-09-01/virtualwans/model_subresource.go deleted file mode 100644 index 9c238c85dff..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_tagsobject.go b/resource-manager/network/2022-09-01/virtualwans/model_tagsobject.go deleted file mode 100644 index 1f55b0e7a00..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 1e6b8ac8e23..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_trafficanalyticsproperties.go deleted file mode 100644 index 56d6e09676b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_trafficselectorpolicy.go b/resource-manager/network/2022-09-01/virtualwans/model_trafficselectorpolicy.go deleted file mode 100644 index 09496a292fa..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_trafficselectorpolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficSelectorPolicy struct { - LocalAddressRanges []string `json:"localAddressRanges"` - RemoteAddressRanges []string `json:"remoteAddressRanges"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualhub.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualhub.go deleted file mode 100644 index ce664c65359..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualhub.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHub struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VirtualHubProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualhubproperties.go deleted file mode 100644 index 9b119e8889f..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubproperties.go +++ /dev/null @@ -1,29 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubProperties struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` - AzureFirewall *SubResource `json:"azureFirewall,omitempty"` - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"` - HubRoutingPreference *HubRoutingPreference `json:"hubRoutingPreference,omitempty"` - IPConfigurations *[]SubResource `json:"ipConfigurations,omitempty"` - P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"` - PreferredRoutingGateway *PreferredRoutingGateway `json:"preferredRoutingGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteMaps *[]SubResource `json:"routeMaps,omitempty"` - RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"` - RoutingState *RoutingState `json:"routingState,omitempty"` - SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"` - SecurityProviderName *string `json:"securityProviderName,omitempty"` - Sku *string `json:"sku,omitempty"` - VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"` - VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` - VirtualRouterAutoScaleConfiguration *VirtualRouterAutoScaleConfiguration `json:"virtualRouterAutoScaleConfiguration,omitempty"` - VirtualRouterIPs *[]string `json:"virtualRouterIps,omitempty"` - VirtualWAN *SubResource `json:"virtualWan,omitempty"` - VpnGateway *SubResource `json:"vpnGateway,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroute.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroute.go deleted file mode 100644 index 3b9b205ea1a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroute.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetable.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetable.go deleted file mode 100644 index 71ec2c0bca4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetable.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTable struct { - Routes *[]VirtualHubRoute `json:"routes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetablev2.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetablev2.go deleted file mode 100644 index 50fa84c35f5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetablev2.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2 struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualHubRouteTableV2Properties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetablev2properties.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetablev2properties.go deleted file mode 100644 index ed869d1c471..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutetablev2properties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2Properties struct { - AttachedConnections *[]string `json:"attachedConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutev2.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutev2.go deleted file mode 100644 index a47739aa2a5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualhubroutev2.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteV2 struct { - DestinationType *string `json:"destinationType,omitempty"` - Destinations *[]string `json:"destinations,omitempty"` - NextHopType *string `json:"nextHopType,omitempty"` - NextHops *[]string `json:"nextHops,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualnetworktap.go deleted file mode 100644 index f7d80351ab5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index efca5566dad..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualrouterautoscaleconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualrouterautoscaleconfiguration.go deleted file mode 100644 index 4ce6be45420..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualrouterautoscaleconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterAutoScaleConfiguration struct { - MinCapacity *int64 `json:"minCapacity,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualwan.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualwan.go deleted file mode 100644 index 161915279e6..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualwan.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWAN struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VirtualWanProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualwanproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualwanproperties.go deleted file mode 100644 index 65c2eb829cb..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualwanproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWanProperties struct { - AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` - AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"` - DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"` - Office365LocalBreakoutCategory *OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *string `json:"type,omitempty"` - VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"` - VpnSites *[]SubResource `json:"vpnSites,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualwansecurityprovider.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualwansecurityprovider.go deleted file mode 100644 index d41346bc4a9..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualwansecurityprovider.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWanSecurityProvider struct { - Name *string `json:"name,omitempty"` - Type *VirtualWanSecurityProviderType `json:"type,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualwansecurityproviders.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualwansecurityproviders.go deleted file mode 100644 index 6e7e4ab59f8..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualwansecurityproviders.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWanSecurityProviders struct { - SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_virtualwanvpnprofileparameters.go b/resource-manager/network/2022-09-01/virtualwans/model_virtualwanvpnprofileparameters.go deleted file mode 100644 index dd01888d247..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_virtualwanvpnprofileparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWanVpnProfileParameters struct { - AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` - VpnServerConfigurationResourceId *string `json:"vpnServerConfigurationResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vnetroute.go b/resource-manager/network/2022-09-01/virtualwans/model_vnetroute.go deleted file mode 100644 index cbd035f3e06..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnclientconnectionhealth.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnclientconnectionhealth.go deleted file mode 100644 index 82eefc44a41..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnclientconnectionhealth.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealth struct { - AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"` - TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"` - TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"` - VpnClientConnectionsCount *int64 `json:"vpnClientConnectionsCount,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnconnection.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnconnection.go deleted file mode 100644 index 9d157042c70..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnconnection.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionpacketcapturestartparameters.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionpacketcapturestartparameters.go deleted file mode 100644 index 97a9e565f9e..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionpacketcapturestartparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionPacketCaptureStartParameters struct { - FilterData *string `json:"filterData,omitempty"` - LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionpacketcapturestopparameters.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionpacketcapturestopparameters.go deleted file mode 100644 index de501375c21..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionpacketcapturestopparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionPacketCaptureStopParameters struct { - LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"` - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionproperties.go deleted file mode 100644 index 1c238229449..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnconnectionproperties.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionProperties struct { - ConnectionBandwidth *int64 `json:"connectionBandwidth,omitempty"` - ConnectionStatus *VpnConnectionStatus `json:"connectionStatus,omitempty"` - DpdTimeoutSeconds *int64 `json:"dpdTimeoutSeconds,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VpnConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpngateway.go b/resource-manager/network/2022-09-01/virtualwans/model_vpngateway.go deleted file mode 100644 index ae7433c3f55..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpngatewayipconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_vpngatewayipconfiguration.go deleted file mode 100644 index b1060397ea0..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpngatewayipconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayIPConfiguration struct { - Id *string `json:"id,omitempty"` - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpngatewaynatrule.go b/resource-manager/network/2022-09-01/virtualwans/model_vpngatewaynatrule.go deleted file mode 100644 index 2de41b7ced6..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpngatewaynatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnGatewayNatRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpngatewaynatruleproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_vpngatewaynatruleproperties.go deleted file mode 100644 index 1aaf7c8f90b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpngatewaynatruleproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayNatRuleProperties struct { - EgressVpnSiteLinkConnections *[]SubResource `json:"egressVpnSiteLinkConnections,omitempty"` - ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` - IPConfigurationId *string `json:"ipConfigurationId,omitempty"` - IngressVpnSiteLinkConnections *[]SubResource `json:"ingressVpnSiteLinkConnections,omitempty"` - InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` - Mode *VpnNatRuleMode `json:"mode,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *VpnNatRuleType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpngatewayproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_vpngatewayproperties.go deleted file mode 100644 index ab2b8b55b1b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpngatewayproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayProperties struct { - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - Connections *[]VpnConnection `json:"connections,omitempty"` - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - IPConfigurations *[]VpnGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - NatRules *[]VpnGatewayNatRule `json:"natRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnlinkbgpsettings.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnlinkbgpsettings.go deleted file mode 100644 index 72de7d65308..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnlinkbgpsettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkBgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnlinkproviderproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnlinkproviderproperties.go deleted file mode 100644 index 555f8739a9b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnlinkproviderproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkProviderProperties struct { - LinkProviderName *string `json:"linkProviderName,omitempty"` - LinkSpeedInMbps *int64 `json:"linkSpeedInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnnatrulemapping.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnnatrulemapping.go deleted file mode 100644 index 09a77912d9f..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnnatrulemapping.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnNatRuleMapping struct { - AddressSpace *string `json:"addressSpace,omitempty"` - PortRange *string `json:"portRange,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnprofileresponse.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnprofileresponse.go deleted file mode 100644 index a96c942841c..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnprofileresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnProfileResponse struct { - ProfileUrl *string `json:"profileUrl,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigradiusclientrootcertificate.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigradiusclientrootcertificate.go deleted file mode 100644 index 21a75789b34..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigradiusclientrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigRadiusClientRootCertificate struct { - Name *string `json:"name,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigradiusserverrootcertificate.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigradiusserverrootcertificate.go deleted file mode 100644 index 6f67a020c6a..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigradiusserverrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigRadiusServerRootCertificate struct { - Name *string `json:"name,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfiguration.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfiguration.go deleted file mode 100644 index debdcf03f04..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfiguration.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroup.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroup.go deleted file mode 100644 index e94549fb063..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationPolicyGroupProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroupmember.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroupmember.go deleted file mode 100644 index f832688900b..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroupproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroupproperties.go deleted file mode 100644 index 93b015d4bd1..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationpolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupProperties struct { - IsDefault *bool `json:"isDefault,omitempty"` - P2SConnectionConfigurations *[]SubResource `json:"p2SConnectionConfigurations,omitempty"` - PolicyMembers *[]VpnServerConfigurationPolicyGroupMember `json:"policyMembers,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationproperties.go deleted file mode 100644 index 1a42b30f7aa..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationproperties.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationProperties struct { - AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"` - ConfigurationPolicyGroups *[]VpnServerConfigurationPolicyGroup `json:"configurationPolicyGroups,omitempty"` - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - P2sVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"` - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` - VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - VpnClientIPsecPolicies *[]IPsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` - VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationsresponse.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationsresponse.go deleted file mode 100644 index 185d5a549d4..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigurationsresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsResponse struct { - VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigvpnclientrevokedcertificate.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigvpnclientrevokedcertificate.go deleted file mode 100644 index 9582df932b5..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigvpnclientrevokedcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigVpnClientRevokedCertificate struct { - Name *string `json:"name,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigvpnclientrootcertificate.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigvpnclientrootcertificate.go deleted file mode 100644 index 606a8393665..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnserverconfigvpnclientrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigVpnClientRootCertificate struct { - Name *string `json:"name,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnsite.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnsite.go deleted file mode 100644 index decb0a5dd27..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnsite.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSite struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelink.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelink.go deleted file mode 100644 index 9c72c0567fd..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteLinkProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkconnection.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkconnection.go deleted file mode 100644 index 88bed41fe65..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteLinkConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkconnectionproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkconnectionproperties.go deleted file mode 100644 index 23b24922441..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkconnectionproperties.go +++ /dev/null @@ -1,25 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnectionProperties struct { - ConnectionBandwidth *int64 `json:"connectionBandwidth,omitempty"` - ConnectionStatus *VpnConnectionStatus `json:"connectionStatus,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VpnConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - VpnGatewayCustomBgpAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"vpnGatewayCustomBgpAddresses,omitempty"` - VpnLinkConnectionMode *VpnLinkConnectionMode `json:"vpnLinkConnectionMode,omitempty"` - VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkproperties.go deleted file mode 100644 index fa7d9002a52..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnsitelinkproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkProperties struct { - BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/model_vpnsiteproperties.go b/resource-manager/network/2022-09-01/virtualwans/model_vpnsiteproperties.go deleted file mode 100644 index da368da2045..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/model_vpnsiteproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteProperties struct { - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` - DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IsSecuritySite *bool `json:"isSecuritySite,omitempty"` - O365Policy *O365PolicyProperties `json:"o365Policy,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SiteKey *string `json:"siteKey,omitempty"` - VirtualWAN *SubResource `json:"virtualWan,omitempty"` - VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/virtualwans/predicates.go b/resource-manager/network/2022-09-01/virtualwans/predicates.go deleted file mode 100644 index 880185945ce..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/predicates.go +++ /dev/null @@ -1,528 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p BgpConnectionOperationPredicate) Matches(input BgpConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type HubIPConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p HubIPConfigurationOperationPredicate) Matches(input HubIPConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type HubRouteTableOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p HubRouteTableOperationPredicate) Matches(input HubRouteTable) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type HubVirtualNetworkConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p HubVirtualNetworkConnectionOperationPredicate) Matches(input HubVirtualNetworkConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} - -type P2SVpnGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p P2SVpnGatewayOperationPredicate) Matches(input P2SVpnGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type RouteMapOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p RouteMapOperationPredicate) Matches(input RouteMap) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type RoutingIntentOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p RoutingIntentOperationPredicate) Matches(input RoutingIntent) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualHubOperationPredicate struct { - Etag *string - Id *string - Kind *string - Location *string - Name *string - Type *string -} - -func (p VirtualHubOperationPredicate) Matches(input VirtualHub) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualHubRouteTableV2OperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p VirtualHubRouteTableV2OperationPredicate) Matches(input VirtualHubRouteTableV2) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} - -type VirtualWANOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualWANOperationPredicate) Matches(input VirtualWAN) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p VpnConnectionOperationPredicate) Matches(input VpnConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} - -type VpnGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VpnGatewayOperationPredicate) Matches(input VpnGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnGatewayNatRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VpnGatewayNatRuleOperationPredicate) Matches(input VpnGatewayNatRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnServerConfigurationOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VpnServerConfigurationOperationPredicate) Matches(input VpnServerConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnServerConfigurationPolicyGroupOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VpnServerConfigurationPolicyGroupOperationPredicate) Matches(input VpnServerConfigurationPolicyGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnSiteOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VpnSiteOperationPredicate) Matches(input VpnSite) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnSiteLinkOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VpnSiteLinkOperationPredicate) Matches(input VpnSiteLink) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnSiteLinkConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VpnSiteLinkConnectionOperationPredicate) Matches(input VpnSiteLinkConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/virtualwans/version.go b/resource-manager/network/2022-09-01/virtualwans/version.go deleted file mode 100644 index 0099ecfc84c..00000000000 --- a/resource-manager/network/2022-09-01/virtualwans/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualwans/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/README.md b/resource-manager/network/2022-09-01/vmsspublicipaddresses/README.md deleted file mode 100644 index 6f837de39b3..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/README.md +++ /dev/null @@ -1,70 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vmsspublicipaddresses` Documentation - -The `vmsspublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vmsspublicipaddresses" -``` - - -### Client Initialization - -```go -client := vmsspublicipaddresses.NewVMSSPublicIPAddressesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VMSSPublicIPAddressesClient.PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddress` - -```go -ctx := context.TODO() -id := vmsspublicipaddresses.NewVirtualMachineScaleSetPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue", "ipConfigurationValue", "publicIPAddressValue") - -read, err := client.PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddress(ctx, id, vmsspublicipaddresses.DefaultPublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VMSSPublicIPAddressesClient.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses` - -```go -ctx := context.TODO() -id := vmsspublicipaddresses.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -// alternatively `client.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses(ctx, id)` can be used to do batched pagination -items, err := client.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VMSSPublicIPAddressesClient.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses` - -```go -ctx := context.TODO() -id := vmsspublicipaddresses.NewVirtualMachineScaleSetIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue", "ipConfigurationValue") - -// alternatively `client.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses(ctx, id)` can be used to do batched pagination -items, err := client.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/client.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/client.go deleted file mode 100644 index f563b8df586..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vmsspublicipaddresses - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VMSSPublicIPAddressesClient struct { - Client *resourcemanager.Client -} - -func NewVMSSPublicIPAddressesClientWithBaseURI(api environments.Api) (*VMSSPublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vmsspublicipaddresses", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VMSSPublicIPAddressesClient: %+v", err) - } - - return &VMSSPublicIPAddressesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/constants.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/constants.go deleted file mode 100644 index 59520ace857..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/constants.go +++ /dev/null @@ -1,1013 +0,0 @@ -package vmsspublicipaddresses - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/id_virtualmachinescaleset.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/id_virtualmachinescaleset.go deleted file mode 100644 index b798e513d2e..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/id_virtualmachinescaleset.go +++ /dev/null @@ -1,127 +0,0 @@ -package vmsspublicipaddresses - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineScaleSetId{} - -// VirtualMachineScaleSetId is a struct representing the Resource ID for a Virtual Machine Scale Set -type VirtualMachineScaleSetId struct { - SubscriptionId string - ResourceGroupName string - VirtualMachineScaleSetName string -} - -// NewVirtualMachineScaleSetID returns a new VirtualMachineScaleSetId struct -func NewVirtualMachineScaleSetID(subscriptionId string, resourceGroupName string, virtualMachineScaleSetName string) VirtualMachineScaleSetId { - return VirtualMachineScaleSetId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualMachineScaleSetName: virtualMachineScaleSetName, - } -} - -// ParseVirtualMachineScaleSetID parses 'input' into a VirtualMachineScaleSetId -func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineScaleSetId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - return &id, nil -} - -// ParseVirtualMachineScaleSetIDInsensitively parses 'input' case-insensitively into a VirtualMachineScaleSetId -// note: this method should only be used for API response data and not user input -func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineScaleSetId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineScaleSetId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualMachineScaleSetID checks that 'input' can be parsed as a Virtual Machine Scale Set ID -func ValidateVirtualMachineScaleSetID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualMachineScaleSetID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualMachineScaleSetName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticVirtualMachineScaleSets", "virtualMachineScaleSets", "virtualMachineScaleSets"), - resourceids.UserSpecifiedSegment("virtualMachineScaleSetName", "virtualMachineScaleSetValue"), - } -} - -// String returns a human-readable description of this Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Machine Scale Set Name: %q", id.VirtualMachineScaleSetName), - } - return fmt.Sprintf("Virtual Machine Scale Set (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/id_virtualmachinescaleset_test.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/id_virtualmachinescaleset_test.go deleted file mode 100644 index 752c44ba4ca..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/id_virtualmachinescaleset_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vmsspublicipaddresses - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineScaleSetId{} - -func TestNewVirtualMachineScaleSetID(t *testing.T) { - id := NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualMachineScaleSetName != "virtualMachineScaleSetValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualMachineScaleSetName'", id.VirtualMachineScaleSetName, "virtualMachineScaleSetValue") - } -} - -func TestFormatVirtualMachineScaleSetID(t *testing.T) { - actual := NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualMachineScaleSetID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineScaleSetId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineScaleSetID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - } -} - -func TestParseVirtualMachineScaleSetIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineScaleSetId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualMachineScaleSetName: "vIrTuAlMaChInEsCaLeSeTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineScaleSetIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - } -} - -func TestSegmentsForVirtualMachineScaleSetId(t *testing.T) { - segments := VirtualMachineScaleSetId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualMachineScaleSetId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go deleted file mode 100644 index 2d85c08dac0..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go +++ /dev/null @@ -1,81 +0,0 @@ -package vmsspublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPAddress -} - -type PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions struct { - Expand *string -} - -func DefaultPublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions() PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions { - return PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions{} -} - -func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddress ... -func (c VMSSPublicIPAddressesClient) PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, id commonids.VirtualMachineScaleSetPublicIPAddressId, options PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) (result PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetpublicipaddresses.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetpublicipaddresses.go deleted file mode 100644 index b1f0d6f9994..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetpublicipaddresses.go +++ /dev/null @@ -1,89 +0,0 @@ -package vmsspublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteResult struct { - Items []PublicIPAddress -} - -// PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses ... -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses(ctx context.Context, id VirtualMachineScaleSetId) (result PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesComplete retrieves all the results into a single object -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesComplete(ctx context.Context, id VirtualMachineScaleSetId) (PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteResult, error) { - return c.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteMatchingPredicate(ctx context.Context, id VirtualMachineScaleSetId, predicate PublicIPAddressOperationPredicate) (result PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetvmpublicipaddresses.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetvmpublicipaddresses.go deleted file mode 100644 index 6fd88d429a2..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetvmpublicipaddresses.go +++ /dev/null @@ -1,90 +0,0 @@ -package vmsspublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteResult struct { - Items []PublicIPAddress -} - -// PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses ... -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses(ctx context.Context, id commonids.VirtualMachineScaleSetIPConfigurationId) (result PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesComplete retrieves all the results into a single object -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesComplete(ctx context.Context, id commonids.VirtualMachineScaleSetIPConfigurationId) (PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteResult, error) { - return c.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualMachineScaleSetIPConfigurationId, predicate PublicIPAddressOperationPredicate) (result PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddress.go deleted file mode 100644 index b5e5db2cc91..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index a08e1bc2b3d..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index a1c62d3aff0..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 29707ea0cc0..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 3d43bc376d7..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationsecuritygroup.go deleted file mode 100644 index 3886b3a62a9..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 2f9f71ffdfe..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_backendaddresspool.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_backendaddresspool.go deleted file mode 100644 index 2d91da68e06..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 1066643d554..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 409dfc74f46..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ddossettings.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ddossettings.go deleted file mode 100644 index 9db9902cfa2..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_delegation.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_delegation.go deleted file mode 100644 index a81e856e7ea..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlog.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlog.go deleted file mode 100644 index b816a9fb4d8..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlogformatparameters.go deleted file mode 100644 index bbe90b3e68a..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlogpropertiesformat.go deleted file mode 100644 index 4dc53318cc3..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_frontendipconfiguration.go deleted file mode 100644 index e9d4835cde7..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 158c303f1eb..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index a997e703d5a..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_inboundnatrule.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_inboundnatrule.go deleted file mode 100644 index 8d6d17e1ee6..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 0400f6c7e24..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfiguration.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfiguration.go deleted file mode 100644 index ec14aaebfb2..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationprofile.go deleted file mode 100644 index 04f420bc9e7..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index cc1b778ec31..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 5c56fd40bae..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_iptag.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_iptag.go deleted file mode 100644 index 0f545f4b72b..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_loadbalancerbackendaddress.go deleted file mode 100644 index 6c1a542cb79..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 046c6088344..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgateway.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgateway.go deleted file mode 100644 index d11b8d3920d..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgatewaypropertiesformat.go deleted file mode 100644 index 9b3d069fdba..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgatewaysku.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgatewaysku.go deleted file mode 100644 index 3b91a6c98fb..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natruleportmapping.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natruleportmapping.go deleted file mode 100644 index 09ace168bf2..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterface.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterface.go deleted file mode 100644 index e494f13e660..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacednssettings.go deleted file mode 100644 index 178cb8cc8d0..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 5e15e82902b..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 5b63a7f1427..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index a34194f603c..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacepropertiesformat.go deleted file mode 100644 index a3373e765f6..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 89d8808f2b8..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index dd5cb5650a9..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networksecuritygroup.go deleted file mode 100644 index 390dad55504..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index fd1b9110f0b..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpoint.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpoint.go deleted file mode 100644 index 9d1b5059d51..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointconnection.go deleted file mode 100644 index 37a23931c51..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointconnectionproperties.go deleted file mode 100644 index e36b5a203af..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointipconfiguration.go deleted file mode 100644 index 7e43ad06e3b..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 13d66a23bb9..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointproperties.go deleted file mode 100644 index 9d7c5581f99..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkservice.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkservice.go deleted file mode 100644 index 35696ff7af8..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnection.go deleted file mode 100644 index 15a277940b8..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 36505cb0e91..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 87693646750..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index ffcb7babff1..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 1ac62f6b573..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceproperties.go deleted file mode 100644 index 5a3793b3967..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddress.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddress.go deleted file mode 100644 index 007f38c15a0..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddressdnssettings.go deleted file mode 100644 index ffd59c141ce..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 04e2f5851e5..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddresssku.go deleted file mode 100644 index 836d26bc7cf..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourcenavigationlink.go deleted file mode 100644 index 2001bb2021a..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourcenavigationlinkformat.go deleted file mode 100644 index 255ed3f4d7d..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourceset.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourceset.go deleted file mode 100644 index aa795989827..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_retentionpolicyparameters.go deleted file mode 100644 index 18486b1b930..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_route.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_route.go deleted file mode 100644 index d5542b4d6a2..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routepropertiesformat.go deleted file mode 100644 index 7306e155bd1..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routetable.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routetable.go deleted file mode 100644 index 0e623eb4de8..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routetablepropertiesformat.go deleted file mode 100644 index 247f8d8ff0b..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_securityrule.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_securityrule.go deleted file mode 100644 index be3c680f597..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_securityrulepropertiesformat.go deleted file mode 100644 index 45a25e92fa7..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceassociationlink.go deleted file mode 100644 index 6e209a0a72c..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 7761fb2f5e9..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 0ce0853975d..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicy.go deleted file mode 100644 index 32e2b036118..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicydefinition.go deleted file mode 100644 index d0368e894a0..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 970c54c6772..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index fd6dca6bdb5..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5857cb159be..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subnet.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subnet.go deleted file mode 100644 index fd72bf01d45..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subnetpropertiesformat.go deleted file mode 100644 index c4a547c3c94..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subresource.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subresource.go deleted file mode 100644 index c4627dc0146..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 9685e4269c8..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_trafficanalyticsproperties.go deleted file mode 100644 index e18abbc1afe..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_virtualnetworktap.go deleted file mode 100644 index 80ebd9f850d..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index cff477ca81b..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/predicates.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/predicates.go deleted file mode 100644 index 3173ab41a32..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PublicIPAddressOperationPredicate) Matches(input PublicIPAddress) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/vmsspublicipaddresses/version.go b/resource-manager/network/2022-09-01/vmsspublicipaddresses/version.go deleted file mode 100644 index f9f0426c5f8..00000000000 --- a/resource-manager/network/2022-09-01/vmsspublicipaddresses/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmsspublicipaddresses/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/vpngateways/README.md b/resource-manager/network/2022-09-01/vpngateways/README.md deleted file mode 100644 index c8fb07688ca..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/README.md +++ /dev/null @@ -1,83 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpngateways` Documentation - -The `vpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpngateways" -``` - - -### Client Initialization - -```go -client := vpngateways.NewVpnGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VpnGatewaysClient.Reset` - -```go -ctx := context.TODO() -id := vpngateways.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -if err := client.ResetThenPoll(ctx, id, vpngateways.DefaultResetOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VpnGatewaysClient.StartPacketCapture` - -```go -ctx := context.TODO() -id := vpngateways.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -payload := vpngateways.VpnGatewayPacketCaptureStartParameters{ - // ... -} - - -if err := client.StartPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VpnGatewaysClient.StopPacketCapture` - -```go -ctx := context.TODO() -id := vpngateways.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -payload := vpngateways.VpnGatewayPacketCaptureStopParameters{ - // ... -} - - -if err := client.StopPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VpnGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := vpngateways.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -payload := vpngateways.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-09-01/vpngateways/client.go b/resource-manager/network/2022-09-01/vpngateways/client.go deleted file mode 100644 index 08ab0ce47db..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpngateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewVpnGatewaysClientWithBaseURI(api environments.Api) (*VpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vpngateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VpnGatewaysClient: %+v", err) - } - - return &VpnGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/vpngateways/constants.go b/resource-manager/network/2022-09-01/vpngateways/constants.go deleted file mode 100644 index 2f1745c4980..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/constants.go +++ /dev/null @@ -1,657 +0,0 @@ -package vpngateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionProtocol string - -const ( - VirtualNetworkGatewayConnectionProtocolIKEvOne VirtualNetworkGatewayConnectionProtocol = "IKEv1" - VirtualNetworkGatewayConnectionProtocolIKEvTwo VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionProtocol() []string { - return []string{ - string(VirtualNetworkGatewayConnectionProtocolIKEvOne), - string(VirtualNetworkGatewayConnectionProtocolIKEvTwo), - } -} - -func (s *VirtualNetworkGatewayConnectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionProtocol(input string) (*VirtualNetworkGatewayConnectionProtocol, error) { - vals := map[string]VirtualNetworkGatewayConnectionProtocol{ - "ikev1": VirtualNetworkGatewayConnectionProtocolIKEvOne, - "ikev2": VirtualNetworkGatewayConnectionProtocolIKEvTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionProtocol(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} - -type VpnConnectionStatus string - -const ( - VpnConnectionStatusConnected VpnConnectionStatus = "Connected" - VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting" - VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected" - VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown" -) - -func PossibleValuesForVpnConnectionStatus() []string { - return []string{ - string(VpnConnectionStatusConnected), - string(VpnConnectionStatusConnecting), - string(VpnConnectionStatusNotConnected), - string(VpnConnectionStatusUnknown), - } -} - -func (s *VpnConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnConnectionStatus(input string) (*VpnConnectionStatus, error) { - vals := map[string]VpnConnectionStatus{ - "connected": VpnConnectionStatusConnected, - "connecting": VpnConnectionStatusConnecting, - "notconnected": VpnConnectionStatusNotConnected, - "unknown": VpnConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnConnectionStatus(input) - return &out, nil -} - -type VpnLinkConnectionMode string - -const ( - VpnLinkConnectionModeDefault VpnLinkConnectionMode = "Default" - VpnLinkConnectionModeInitiatorOnly VpnLinkConnectionMode = "InitiatorOnly" - VpnLinkConnectionModeResponderOnly VpnLinkConnectionMode = "ResponderOnly" -) - -func PossibleValuesForVpnLinkConnectionMode() []string { - return []string{ - string(VpnLinkConnectionModeDefault), - string(VpnLinkConnectionModeInitiatorOnly), - string(VpnLinkConnectionModeResponderOnly), - } -} - -func (s *VpnLinkConnectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnLinkConnectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnLinkConnectionMode(input string) (*VpnLinkConnectionMode, error) { - vals := map[string]VpnLinkConnectionMode{ - "default": VpnLinkConnectionModeDefault, - "initiatoronly": VpnLinkConnectionModeInitiatorOnly, - "responderonly": VpnLinkConnectionModeResponderOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnLinkConnectionMode(input) - return &out, nil -} - -type VpnNatRuleMode string - -const ( - VpnNatRuleModeEgressSnat VpnNatRuleMode = "EgressSnat" - VpnNatRuleModeIngressSnat VpnNatRuleMode = "IngressSnat" -) - -func PossibleValuesForVpnNatRuleMode() []string { - return []string{ - string(VpnNatRuleModeEgressSnat), - string(VpnNatRuleModeIngressSnat), - } -} - -func (s *VpnNatRuleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleMode(input string) (*VpnNatRuleMode, error) { - vals := map[string]VpnNatRuleMode{ - "egresssnat": VpnNatRuleModeEgressSnat, - "ingresssnat": VpnNatRuleModeIngressSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleMode(input) - return &out, nil -} - -type VpnNatRuleType string - -const ( - VpnNatRuleTypeDynamic VpnNatRuleType = "Dynamic" - VpnNatRuleTypeStatic VpnNatRuleType = "Static" -) - -func PossibleValuesForVpnNatRuleType() []string { - return []string{ - string(VpnNatRuleTypeDynamic), - string(VpnNatRuleTypeStatic), - } -} - -func (s *VpnNatRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleType(input string) (*VpnNatRuleType, error) { - vals := map[string]VpnNatRuleType{ - "dynamic": VpnNatRuleTypeDynamic, - "static": VpnNatRuleTypeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/vpngateways/id_vpngateway.go b/resource-manager/network/2022-09-01/vpngateways/id_vpngateway.go deleted file mode 100644 index 5e23e288887..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/id_vpngateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package vpngateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnGatewayId{} - -// VpnGatewayId is a struct representing the Resource ID for a Vpn Gateway -type VpnGatewayId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string -} - -// NewVpnGatewayID returns a new VpnGatewayId struct -func NewVpnGatewayID(subscriptionId string, resourceGroupName string, vpnGatewayName string) VpnGatewayId { - return VpnGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - } -} - -// ParseVpnGatewayID parses 'input' into a VpnGatewayId -func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - return &id, nil -} - -// ParseVpnGatewayIDInsensitively parses 'input' case-insensitively into a VpnGatewayId -// note: this method should only be used for API response data and not user input -func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateVpnGatewayID checks that 'input' can be parsed as a Vpn Gateway ID -func ValidateVpnGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Gateway ID -func (id VpnGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Gateway ID -func (id VpnGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - } -} - -// String returns a human-readable description of this Vpn Gateway ID -func (id VpnGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - } - return fmt.Sprintf("Vpn Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/vpngateways/id_vpngateway_test.go b/resource-manager/network/2022-09-01/vpngateways/id_vpngateway_test.go deleted file mode 100644 index 0e87eff4896..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/id_vpngateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vpngateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnGatewayId{} - -func TestNewVpnGatewayID(t *testing.T) { - id := NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } -} - -func TestFormatVpnGatewayID(t *testing.T) { - actual := NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - } -} - -func TestParseVpnGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - } -} - -func TestSegmentsForVpnGatewayId(t *testing.T) { - segments := VpnGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/vpngateways/method_reset.go b/resource-manager/network/2022-09-01/vpngateways/method_reset.go deleted file mode 100644 index bc4cdd7f867..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/method_reset.go +++ /dev/null @@ -1,98 +0,0 @@ -package vpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type ResetOperationOptions struct { - IPConfigurationId *string -} - -func DefaultResetOperationOptions() ResetOperationOptions { - return ResetOperationOptions{} -} - -func (o ResetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ResetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ResetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.IPConfigurationId != nil { - out.Append("ipConfigurationId", fmt.Sprintf("%v", *o.IPConfigurationId)) - } - return &out -} - -// Reset ... -func (c VpnGatewaysClient) Reset(ctx context.Context, id VpnGatewayId, options ResetOperationOptions) (result ResetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/reset", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetThenPoll performs Reset then polls until it's completed -func (c VpnGatewaysClient) ResetThenPoll(ctx context.Context, id VpnGatewayId, options ResetOperationOptions) error { - result, err := c.Reset(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Reset: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Reset: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/vpngateways/method_startpacketcapture.go b/resource-manager/network/2022-09-01/vpngateways/method_startpacketcapture.go deleted file mode 100644 index eda6646d71c..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/method_startpacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package vpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StartPacketCapture ... -func (c VpnGatewaysClient) StartPacketCapture(ctx context.Context, id VpnGatewayId, input VpnGatewayPacketCaptureStartParameters) (result StartPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/startpacketcapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartPacketCaptureThenPoll performs StartPacketCapture then polls until it's completed -func (c VpnGatewaysClient) StartPacketCaptureThenPoll(ctx context.Context, id VpnGatewayId, input VpnGatewayPacketCaptureStartParameters) error { - result, err := c.StartPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StartPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StartPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/vpngateways/method_stoppacketcapture.go b/resource-manager/network/2022-09-01/vpngateways/method_stoppacketcapture.go deleted file mode 100644 index 56d332e0683..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/method_stoppacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package vpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StopPacketCapture ... -func (c VpnGatewaysClient) StopPacketCapture(ctx context.Context, id VpnGatewayId, input VpnGatewayPacketCaptureStopParameters) (result StopPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stoppacketcapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopPacketCaptureThenPoll performs StopPacketCapture then polls until it's completed -func (c VpnGatewaysClient) StopPacketCaptureThenPoll(ctx context.Context, id VpnGatewayId, input VpnGatewayPacketCaptureStopParameters) error { - result, err := c.StopPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StopPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StopPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/vpngateways/method_updatetags.go b/resource-manager/network/2022-09-01/vpngateways/method_updatetags.go deleted file mode 100644 index 37a79201602..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package vpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c VpnGatewaysClient) UpdateTags(ctx context.Context, id VpnGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c VpnGatewaysClient) UpdateTagsThenPoll(ctx context.Context, id VpnGatewayId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_bgpsettings.go b/resource-manager/network/2022-09-01/vpngateways/model_bgpsettings.go deleted file mode 100644 index f2627d16bf7..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_gatewaycustombgpipaddressipconfiguration.go b/resource-manager/network/2022-09-01/vpngateways/model_gatewaycustombgpipaddressipconfiguration.go deleted file mode 100644 index 6b30604f2da..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_gatewaycustombgpipaddressipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayCustomBgpIPAddressIPConfiguration struct { - CustomBgpIPAddress string `json:"customBgpIpAddress"` - IPConfigurationId string `json:"ipConfigurationId"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-09-01/vpngateways/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index c3e0e46c541..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_ipsecpolicy.go b/resource-manager/network/2022-09-01/vpngateways/model_ipsecpolicy.go deleted file mode 100644 index 63c4e9184df..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_propagatedroutetable.go b/resource-manager/network/2022-09-01/vpngateways/model_propagatedroutetable.go deleted file mode 100644 index e838e6e2dc7..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_routingconfiguration.go b/resource-manager/network/2022-09-01/vpngateways/model_routingconfiguration.go deleted file mode 100644 index fe2fd37804f..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_staticroute.go b/resource-manager/network/2022-09-01/vpngateways/model_staticroute.go deleted file mode 100644 index 90806109c8c..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_staticroutesconfig.go b/resource-manager/network/2022-09-01/vpngateways/model_staticroutesconfig.go deleted file mode 100644 index b973c853be2..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_subresource.go b/resource-manager/network/2022-09-01/vpngateways/model_subresource.go deleted file mode 100644 index cf0dbcdeb10..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_tagsobject.go b/resource-manager/network/2022-09-01/vpngateways/model_tagsobject.go deleted file mode 100644 index dd09a7e7f34..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_trafficselectorpolicy.go b/resource-manager/network/2022-09-01/vpngateways/model_trafficselectorpolicy.go deleted file mode 100644 index b65874d225f..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_trafficselectorpolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficSelectorPolicy struct { - LocalAddressRanges []string `json:"localAddressRanges"` - RemoteAddressRanges []string `json:"remoteAddressRanges"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vnetroute.go b/resource-manager/network/2022-09-01/vpngateways/model_vnetroute.go deleted file mode 100644 index 31f211b1d1d..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpnconnection.go b/resource-manager/network/2022-09-01/vpngateways/model_vpnconnection.go deleted file mode 100644 index a65d73ea9e8..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpnconnection.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpnconnectionproperties.go b/resource-manager/network/2022-09-01/vpngateways/model_vpnconnectionproperties.go deleted file mode 100644 index df2da84d685..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpnconnectionproperties.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionProperties struct { - ConnectionBandwidth *int64 `json:"connectionBandwidth,omitempty"` - ConnectionStatus *VpnConnectionStatus `json:"connectionStatus,omitempty"` - DpdTimeoutSeconds *int64 `json:"dpdTimeoutSeconds,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VpnConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpngateway.go b/resource-manager/network/2022-09-01/vpngateways/model_vpngateway.go deleted file mode 100644 index 9ad0ad0bbaf..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewayipconfiguration.go b/resource-manager/network/2022-09-01/vpngateways/model_vpngatewayipconfiguration.go deleted file mode 100644 index 703d0c1d833..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewayipconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayIPConfiguration struct { - Id *string `json:"id,omitempty"` - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaynatrule.go b/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaynatrule.go deleted file mode 100644 index 833a44f9a3d..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaynatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnGatewayNatRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaynatruleproperties.go b/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaynatruleproperties.go deleted file mode 100644 index 240415bacef..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaynatruleproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayNatRuleProperties struct { - EgressVpnSiteLinkConnections *[]SubResource `json:"egressVpnSiteLinkConnections,omitempty"` - ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` - IPConfigurationId *string `json:"ipConfigurationId,omitempty"` - IngressVpnSiteLinkConnections *[]SubResource `json:"ingressVpnSiteLinkConnections,omitempty"` - InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` - Mode *VpnNatRuleMode `json:"mode,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *VpnNatRuleType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaypacketcapturestartparameters.go b/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaypacketcapturestartparameters.go deleted file mode 100644 index 4afb62c2a68..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaypacketcapturestartparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayPacketCaptureStartParameters struct { - FilterData *string `json:"filterData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaypacketcapturestopparameters.go b/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaypacketcapturestopparameters.go deleted file mode 100644 index ca9fe7cf71d..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewaypacketcapturestopparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayPacketCaptureStopParameters struct { - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewayproperties.go b/resource-manager/network/2022-09-01/vpngateways/model_vpngatewayproperties.go deleted file mode 100644 index aa5ac3cbf6c..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpngatewayproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayProperties struct { - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - Connections *[]VpnConnection `json:"connections,omitempty"` - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - IPConfigurations *[]VpnGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - NatRules *[]VpnGatewayNatRule `json:"natRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpnnatrulemapping.go b/resource-manager/network/2022-09-01/vpngateways/model_vpnnatrulemapping.go deleted file mode 100644 index 3cd7718da11..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpnnatrulemapping.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnNatRuleMapping struct { - AddressSpace *string `json:"addressSpace,omitempty"` - PortRange *string `json:"portRange,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpnsitelinkconnection.go b/resource-manager/network/2022-09-01/vpngateways/model_vpnsitelinkconnection.go deleted file mode 100644 index 874a627b999..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpnsitelinkconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteLinkConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/model_vpnsitelinkconnectionproperties.go b/resource-manager/network/2022-09-01/vpngateways/model_vpnsitelinkconnectionproperties.go deleted file mode 100644 index fc23bd1f279..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/model_vpnsitelinkconnectionproperties.go +++ /dev/null @@ -1,25 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnectionProperties struct { - ConnectionBandwidth *int64 `json:"connectionBandwidth,omitempty"` - ConnectionStatus *VpnConnectionStatus `json:"connectionStatus,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VpnConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - VpnGatewayCustomBgpAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"vpnGatewayCustomBgpAddresses,omitempty"` - VpnLinkConnectionMode *VpnLinkConnectionMode `json:"vpnLinkConnectionMode,omitempty"` - VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpngateways/version.go b/resource-manager/network/2022-09-01/vpngateways/version.go deleted file mode 100644 index ca67e9af4f5..00000000000 --- a/resource-manager/network/2022-09-01/vpngateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpngateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpngateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/vpnlinkconnections/client.go b/resource-manager/network/2022-09-01/vpnlinkconnections/client.go deleted file mode 100644 index d5db633fa84..00000000000 --- a/resource-manager/network/2022-09-01/vpnlinkconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpnlinkconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewVpnLinkConnectionsClientWithBaseURI(api environments.Api) (*VpnLinkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vpnlinkconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VpnLinkConnectionsClient: %+v", err) - } - - return &VpnLinkConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/vpnlinkconnections/id_vpnlinkconnection.go b/resource-manager/network/2022-09-01/vpnlinkconnections/id_vpnlinkconnection.go deleted file mode 100644 index 1fc8b77b7e9..00000000000 --- a/resource-manager/network/2022-09-01/vpnlinkconnections/id_vpnlinkconnection.go +++ /dev/null @@ -1,153 +0,0 @@ -package vpnlinkconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnLinkConnectionId{} - -// VpnLinkConnectionId is a struct representing the Resource ID for a Vpn Link Connection -type VpnLinkConnectionId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string - VpnConnectionName string - VpnLinkConnectionName string -} - -// NewVpnLinkConnectionID returns a new VpnLinkConnectionId struct -func NewVpnLinkConnectionID(subscriptionId string, resourceGroupName string, vpnGatewayName string, vpnConnectionName string, vpnLinkConnectionName string) VpnLinkConnectionId { - return VpnLinkConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - VpnConnectionName: vpnConnectionName, - VpnLinkConnectionName: vpnLinkConnectionName, - } -} - -// ParseVpnLinkConnectionID parses 'input' into a VpnLinkConnectionId -func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnLinkConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) - } - - return &id, nil -} - -// ParseVpnLinkConnectionIDInsensitively parses 'input' case-insensitively into a VpnLinkConnectionId -// note: this method should only be used for API response data and not user input -func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnLinkConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateVpnLinkConnectionID checks that 'input' can be parsed as a Vpn Link Connection ID -func ValidateVpnLinkConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnLinkConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Link Connection ID -func (id VpnLinkConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s/vpnConnections/%s/vpnLinkConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName, id.VpnConnectionName, id.VpnLinkConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Link Connection ID -func (id VpnLinkConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - resourceids.StaticSegment("staticVpnConnections", "vpnConnections", "vpnConnections"), - resourceids.UserSpecifiedSegment("vpnConnectionName", "vpnConnectionValue"), - resourceids.StaticSegment("staticVpnLinkConnections", "vpnLinkConnections", "vpnLinkConnections"), - resourceids.UserSpecifiedSegment("vpnLinkConnectionName", "vpnLinkConnectionValue"), - } -} - -// String returns a human-readable description of this Vpn Link Connection ID -func (id VpnLinkConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - fmt.Sprintf("Vpn Connection Name: %q", id.VpnConnectionName), - fmt.Sprintf("Vpn Link Connection Name: %q", id.VpnLinkConnectionName), - } - return fmt.Sprintf("Vpn Link Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/vpnlinkconnections/id_vpnlinkconnection_test.go b/resource-manager/network/2022-09-01/vpnlinkconnections/id_vpnlinkconnection_test.go deleted file mode 100644 index 46a88f7102c..00000000000 --- a/resource-manager/network/2022-09-01/vpnlinkconnections/id_vpnlinkconnection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package vpnlinkconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnLinkConnectionId{} - -func TestNewVpnLinkConnectionID(t *testing.T) { - id := NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } - - if id.VpnConnectionName != "vpnConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnConnectionName'", id.VpnConnectionName, "vpnConnectionValue") - } - - if id.VpnLinkConnectionName != "vpnLinkConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnLinkConnectionName'", id.VpnLinkConnectionName, "vpnLinkConnectionValue") - } -} - -func TestFormatVpnLinkConnectionID(t *testing.T) { - actual := NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnLinkConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnLinkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - VpnConnectionName: "vpnConnectionValue", - VpnLinkConnectionName: "vpnLinkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnLinkConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.VpnConnectionName != v.Expected.VpnConnectionName { - t.Fatalf("Expected %q but got %q for VpnConnectionName", v.Expected.VpnConnectionName, actual.VpnConnectionName) - } - - if actual.VpnLinkConnectionName != v.Expected.VpnLinkConnectionName { - t.Fatalf("Expected %q but got %q for VpnLinkConnectionName", v.Expected.VpnLinkConnectionName, actual.VpnLinkConnectionName) - } - - } -} - -func TestParseVpnLinkConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnLinkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - VpnConnectionName: "vpnConnectionValue", - VpnLinkConnectionName: "vpnLinkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS/vPnLiNkCoNnEcTiOnVaLuE", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - VpnConnectionName: "vPnCoNnEcTiOnVaLuE", - VpnLinkConnectionName: "vPnLiNkCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS/vPnLiNkCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnLinkConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.VpnConnectionName != v.Expected.VpnConnectionName { - t.Fatalf("Expected %q but got %q for VpnConnectionName", v.Expected.VpnConnectionName, actual.VpnConnectionName) - } - - if actual.VpnLinkConnectionName != v.Expected.VpnLinkConnectionName { - t.Fatalf("Expected %q but got %q for VpnLinkConnectionName", v.Expected.VpnLinkConnectionName, actual.VpnLinkConnectionName) - } - - } -} - -func TestSegmentsForVpnLinkConnectionId(t *testing.T) { - segments := VpnLinkConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnLinkConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/vpnlinkconnections/method_resetconnection.go b/resource-manager/network/2022-09-01/vpnlinkconnections/method_resetconnection.go deleted file mode 100644 index 526963414ea..00000000000 --- a/resource-manager/network/2022-09-01/vpnlinkconnections/method_resetconnection.go +++ /dev/null @@ -1,69 +0,0 @@ -package vpnlinkconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetConnectionOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ResetConnection ... -func (c VpnLinkConnectionsClient) ResetConnection(ctx context.Context, id VpnLinkConnectionId) (result ResetConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/resetconnection", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetConnectionThenPoll performs ResetConnection then polls until it's completed -func (c VpnLinkConnectionsClient) ResetConnectionThenPoll(ctx context.Context, id VpnLinkConnectionId) error { - result, err := c.ResetConnection(ctx, id) - if err != nil { - return fmt.Errorf("performing ResetConnection: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ResetConnection: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/vpnlinkconnections/version.go b/resource-manager/network/2022-09-01/vpnlinkconnections/version.go deleted file mode 100644 index d576716e57f..00000000000 --- a/resource-manager/network/2022-09-01/vpnlinkconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnlinkconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnlinkconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/README.md b/resource-manager/network/2022-09-01/vpnserverconfigurations/README.md deleted file mode 100644 index ecd6e71ab1c..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpnserverconfigurations` Documentation - -The `vpnserverconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpnserverconfigurations" -``` - - -### Client Initialization - -```go -client := vpnserverconfigurations.NewVpnServerConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VpnServerConfigurationsClient.UpdateTags` - -```go -ctx := context.TODO() -id := vpnserverconfigurations.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -payload := vpnserverconfigurations.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/client.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/client.go deleted file mode 100644 index 722cdb26573..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpnserverconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewVpnServerConfigurationsClientWithBaseURI(api environments.Api) (*VpnServerConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vpnserverconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VpnServerConfigurationsClient: %+v", err) - } - - return &VpnServerConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/constants.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/constants.go deleted file mode 100644 index f297d6e8b17..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/constants.go +++ /dev/null @@ -1,572 +0,0 @@ -package vpnserverconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} - -type VpnAuthenticationType string - -const ( - VpnAuthenticationTypeAAD VpnAuthenticationType = "AAD" - VpnAuthenticationTypeCertificate VpnAuthenticationType = "Certificate" - VpnAuthenticationTypeRadius VpnAuthenticationType = "Radius" -) - -func PossibleValuesForVpnAuthenticationType() []string { - return []string{ - string(VpnAuthenticationTypeAAD), - string(VpnAuthenticationTypeCertificate), - string(VpnAuthenticationTypeRadius), - } -} - -func (s *VpnAuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnAuthenticationType(input string) (*VpnAuthenticationType, error) { - vals := map[string]VpnAuthenticationType{ - "aad": VpnAuthenticationTypeAAD, - "certificate": VpnAuthenticationTypeCertificate, - "radius": VpnAuthenticationTypeRadius, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnAuthenticationType(input) - return &out, nil -} - -type VpnGatewayTunnelingProtocol string - -const ( - VpnGatewayTunnelingProtocolIkeVTwo VpnGatewayTunnelingProtocol = "IkeV2" - VpnGatewayTunnelingProtocolOpenVPN VpnGatewayTunnelingProtocol = "OpenVPN" -) - -func PossibleValuesForVpnGatewayTunnelingProtocol() []string { - return []string{ - string(VpnGatewayTunnelingProtocolIkeVTwo), - string(VpnGatewayTunnelingProtocolOpenVPN), - } -} - -func (s *VpnGatewayTunnelingProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnGatewayTunnelingProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnGatewayTunnelingProtocol(input string) (*VpnGatewayTunnelingProtocol, error) { - vals := map[string]VpnGatewayTunnelingProtocol{ - "ikev2": VpnGatewayTunnelingProtocolIkeVTwo, - "openvpn": VpnGatewayTunnelingProtocolOpenVPN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnGatewayTunnelingProtocol(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/id_vpnserverconfiguration.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/id_vpnserverconfiguration.go deleted file mode 100644 index 688f2431145..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/id_vpnserverconfiguration.go +++ /dev/null @@ -1,127 +0,0 @@ -package vpnserverconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnServerConfigurationId{} - -// VpnServerConfigurationId is a struct representing the Resource ID for a Vpn Server Configuration -type VpnServerConfigurationId struct { - SubscriptionId string - ResourceGroupName string - VpnServerConfigurationName string -} - -// NewVpnServerConfigurationID returns a new VpnServerConfigurationId struct -func NewVpnServerConfigurationID(subscriptionId string, resourceGroupName string, vpnServerConfigurationName string) VpnServerConfigurationId { - return VpnServerConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnServerConfigurationName: vpnServerConfigurationName, - } -} - -// ParseVpnServerConfigurationID parses 'input' into a VpnServerConfigurationId -func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnServerConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseVpnServerConfigurationIDInsensitively parses 'input' case-insensitively into a VpnServerConfigurationId -// note: this method should only be used for API response data and not user input -func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnServerConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateVpnServerConfigurationID checks that 'input' can be parsed as a Vpn Server Configuration ID -func ValidateVpnServerConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnServerConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Server Configuration ID -func (id VpnServerConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnServerConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnServerConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Server Configuration ID -func (id VpnServerConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnServerConfigurations", "vpnServerConfigurations", "vpnServerConfigurations"), - resourceids.UserSpecifiedSegment("vpnServerConfigurationName", "vpnServerConfigurationValue"), - } -} - -// String returns a human-readable description of this Vpn Server Configuration ID -func (id VpnServerConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Server Configuration Name: %q", id.VpnServerConfigurationName), - } - return fmt.Sprintf("Vpn Server Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/id_vpnserverconfiguration_test.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/id_vpnserverconfiguration_test.go deleted file mode 100644 index 0ea0f1fa041..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/id_vpnserverconfiguration_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vpnserverconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnServerConfigurationId{} - -func TestNewVpnServerConfigurationID(t *testing.T) { - id := NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnServerConfigurationName != "vpnServerConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnServerConfigurationName'", id.VpnServerConfigurationName, "vpnServerConfigurationValue") - } -} - -func TestFormatVpnServerConfigurationID(t *testing.T) { - actual := NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnServerConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnServerConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnServerConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - } -} - -func TestParseVpnServerConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnServerConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnServerConfigurationName: "vPnSeRvErCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnServerConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - } -} - -func TestSegmentsForVpnServerConfigurationId(t *testing.T) { - segments := VpnServerConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnServerConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/method_updatetags.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/method_updatetags.go deleted file mode 100644 index 1831ed96be5..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package vpnserverconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnServerConfiguration -} - -// UpdateTags ... -func (c VpnServerConfigurationsClient) UpdateTags(ctx context.Context, id VpnServerConfigurationId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_aadauthenticationparameters.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_aadauthenticationparameters.go deleted file mode 100644 index 8751fdb95f4..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_aadauthenticationparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AadAuthenticationParameters struct { - AadAudience *string `json:"aadAudience,omitempty"` - AadIssuer *string `json:"aadIssuer,omitempty"` - AadTenant *string `json:"aadTenant,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_addressspace.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_addressspace.go deleted file mode 100644 index 9a83a3bb7bf..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_ipsecpolicy.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_ipsecpolicy.go deleted file mode 100644 index 82c3d0cee04..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2sconnectionconfiguration.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2sconnectionconfiguration.go deleted file mode 100644 index a5da2b6e9f5..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2sconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *P2SConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2sconnectionconfigurationproperties.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2sconnectionconfigurationproperties.go deleted file mode 100644 index 5409c6397bf..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2sconnectionconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfigurationProperties struct { - ConfigurationPolicyGroupAssociations *[]SubResource `json:"configurationPolicyGroupAssociations,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - PreviousConfigurationPolicyGroupAssociations *[]VpnServerConfigurationPolicyGroup `json:"previousConfigurationPolicyGroupAssociations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2svpngateway.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2svpngateway.go deleted file mode 100644 index 29b947e0d43..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2svpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *P2SVpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2svpngatewayproperties.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2svpngatewayproperties.go deleted file mode 100644 index fcd2e68d61e..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_p2svpngatewayproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGatewayProperties struct { - CustomDnsServers *[]string `json:"customDnsServers,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` - VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_propagatedroutetable.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_propagatedroutetable.go deleted file mode 100644 index d9197431e38..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_radiusserver.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_radiusserver.go deleted file mode 100644 index 0a8e8ea7a2b..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_radiusserver.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RadiusServer struct { - RadiusServerAddress string `json:"radiusServerAddress"` - RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_routingconfiguration.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_routingconfiguration.go deleted file mode 100644 index 418b0d86c12..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_staticroute.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_staticroute.go deleted file mode 100644 index d9a40cf7abe..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_staticroutesconfig.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_staticroutesconfig.go deleted file mode 100644 index 0d9a0db3cfd..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_subresource.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_subresource.go deleted file mode 100644 index b06b768283f..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_tagsobject.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_tagsobject.go deleted file mode 100644 index 73b0464bd7d..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vnetroute.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vnetroute.go deleted file mode 100644 index 26ac1388d05..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnclientconnectionhealth.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnclientconnectionhealth.go deleted file mode 100644 index f4b6bee5adb..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnclientconnectionhealth.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealth struct { - AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"` - TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"` - TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"` - VpnClientConnectionsCount *int64 `json:"vpnClientConnectionsCount,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigradiusclientrootcertificate.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigradiusclientrootcertificate.go deleted file mode 100644 index 32cd3b0c3ce..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigradiusclientrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigRadiusClientRootCertificate struct { - Name *string `json:"name,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigradiusserverrootcertificate.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigradiusserverrootcertificate.go deleted file mode 100644 index f5a02d320d4..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigradiusserverrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigRadiusServerRootCertificate struct { - Name *string `json:"name,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfiguration.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfiguration.go deleted file mode 100644 index 1f8b56984ce..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfiguration.go +++ /dev/null @@ -1,14 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroup.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroup.go deleted file mode 100644 index df7554b1ec5..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationPolicyGroupProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupmember.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupmember.go deleted file mode 100644 index 5f72d492483..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupproperties.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupproperties.go deleted file mode 100644 index d1f956dc56b..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupProperties struct { - IsDefault *bool `json:"isDefault,omitempty"` - P2SConnectionConfigurations *[]SubResource `json:"p2SConnectionConfigurations,omitempty"` - PolicyMembers *[]VpnServerConfigurationPolicyGroupMember `json:"policyMembers,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationproperties.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationproperties.go deleted file mode 100644 index bba2bd56557..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigurationproperties.go +++ /dev/null @@ -1,23 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationProperties struct { - AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"` - ConfigurationPolicyGroups *[]VpnServerConfigurationPolicyGroup `json:"configurationPolicyGroups,omitempty"` - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - P2sVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"` - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` - VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - VpnClientIPsecPolicies *[]IPsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` - VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrevokedcertificate.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrevokedcertificate.go deleted file mode 100644 index b2e7cac735e..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrevokedcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigVpnClientRevokedCertificate struct { - Name *string `json:"name,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrootcertificate.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrootcertificate.go deleted file mode 100644 index eda4a0c8837..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigVpnClientRootCertificate struct { - Name *string `json:"name,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnserverconfigurations/version.go b/resource-manager/network/2022-09-01/vpnserverconfigurations/version.go deleted file mode 100644 index 8ab0b716b92..00000000000 --- a/resource-manager/network/2022-09-01/vpnserverconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnserverconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnserverconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/vpnsites/README.md b/resource-manager/network/2022-09-01/vpnsites/README.md deleted file mode 100644 index 8fa326eed29..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpnsites` Documentation - -The `vpnsites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/vpnsites" -``` - - -### Client Initialization - -```go -client := vpnsites.NewVpnSitesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VpnSitesClient.UpdateTags` - -```go -ctx := context.TODO() -id := vpnsites.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -payload := vpnsites.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-09-01/vpnsites/client.go b/resource-manager/network/2022-09-01/vpnsites/client.go deleted file mode 100644 index d5f3209b45d..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpnsites - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesClient struct { - Client *resourcemanager.Client -} - -func NewVpnSitesClientWithBaseURI(api environments.Api) (*VpnSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vpnsites", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VpnSitesClient: %+v", err) - } - - return &VpnSitesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/vpnsites/constants.go b/resource-manager/network/2022-09-01/vpnsites/constants.go deleted file mode 100644 index 58eca968713..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package vpnsites - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/vpnsites/id_vpnsite.go b/resource-manager/network/2022-09-01/vpnsites/id_vpnsite.go deleted file mode 100644 index 01be85624d7..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/id_vpnsite.go +++ /dev/null @@ -1,127 +0,0 @@ -package vpnsites - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteId{} - -// VpnSiteId is a struct representing the Resource ID for a Vpn Site -type VpnSiteId struct { - SubscriptionId string - ResourceGroupName string - VpnSiteName string -} - -// NewVpnSiteID returns a new VpnSiteId struct -func NewVpnSiteID(subscriptionId string, resourceGroupName string, vpnSiteName string) VpnSiteId { - return VpnSiteId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnSiteName: vpnSiteName, - } -} - -// ParseVpnSiteID parses 'input' into a VpnSiteId -func ParseVpnSiteID(input string) (*VpnSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - return &id, nil -} - -// ParseVpnSiteIDInsensitively parses 'input' case-insensitively into a VpnSiteId -// note: this method should only be used for API response data and not user input -func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - return &id, nil -} - -// ValidateVpnSiteID checks that 'input' can be parsed as a Vpn Site ID -func ValidateVpnSiteID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnSiteID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Site ID -func (id VpnSiteId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnSites/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnSiteName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Site ID -func (id VpnSiteId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnSites", "vpnSites", "vpnSites"), - resourceids.UserSpecifiedSegment("vpnSiteName", "vpnSiteValue"), - } -} - -// String returns a human-readable description of this Vpn Site ID -func (id VpnSiteId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Site Name: %q", id.VpnSiteName), - } - return fmt.Sprintf("Vpn Site (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/vpnsites/id_vpnsite_test.go b/resource-manager/network/2022-09-01/vpnsites/id_vpnsite_test.go deleted file mode 100644 index 43d1aa970b3..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/id_vpnsite_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vpnsites - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteId{} - -func TestNewVpnSiteID(t *testing.T) { - id := NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnSiteName != "vpnSiteValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnSiteName'", id.VpnSiteName, "vpnSiteValue") - } -} - -func TestFormatVpnSiteID(t *testing.T) { - actual := NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnSiteID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - } -} - -func TestParseVpnSiteIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnSiteName: "vPnSiTeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - } -} - -func TestSegmentsForVpnSiteId(t *testing.T) { - segments := VpnSiteId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnSiteId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/vpnsites/method_updatetags.go b/resource-manager/network/2022-09-01/vpnsites/method_updatetags.go deleted file mode 100644 index 9de2920fc8a..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package vpnsites - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnSite -} - -// UpdateTags ... -func (c VpnSitesClient) UpdateTags(ctx context.Context, id VpnSiteId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_addressspace.go b/resource-manager/network/2022-09-01/vpnsites/model_addressspace.go deleted file mode 100644 index 14ce21bc15a..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_bgpsettings.go b/resource-manager/network/2022-09-01/vpnsites/model_bgpsettings.go deleted file mode 100644 index 09643cee4ab..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_deviceproperties.go b/resource-manager/network/2022-09-01/vpnsites/model_deviceproperties.go deleted file mode 100644 index 6b9a69dd5df..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_deviceproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeviceProperties struct { - DeviceModel *string `json:"deviceModel,omitempty"` - DeviceVendor *string `json:"deviceVendor,omitempty"` - LinkSpeedInMbps *int64 `json:"linkSpeedInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-09-01/vpnsites/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index ce931dc8949..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_o365breakoutcategorypolicies.go b/resource-manager/network/2022-09-01/vpnsites/model_o365breakoutcategorypolicies.go deleted file mode 100644 index 2d1e7f02cf9..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_o365breakoutcategorypolicies.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type O365BreakOutCategoryPolicies struct { - Allow *bool `json:"allow,omitempty"` - Default *bool `json:"default,omitempty"` - Optimize *bool `json:"optimize,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_o365policyproperties.go b/resource-manager/network/2022-09-01/vpnsites/model_o365policyproperties.go deleted file mode 100644 index 18b5f663387..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_o365policyproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type O365PolicyProperties struct { - BreakOutCategories *O365BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_subresource.go b/resource-manager/network/2022-09-01/vpnsites/model_subresource.go deleted file mode 100644 index 2b90b3f784d..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_tagsobject.go b/resource-manager/network/2022-09-01/vpnsites/model_tagsobject.go deleted file mode 100644 index c05667ddc1a..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_vpnlinkbgpsettings.go b/resource-manager/network/2022-09-01/vpnsites/model_vpnlinkbgpsettings.go deleted file mode 100644 index cae11e9a335..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_vpnlinkbgpsettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkBgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_vpnlinkproviderproperties.go b/resource-manager/network/2022-09-01/vpnsites/model_vpnlinkproviderproperties.go deleted file mode 100644 index aa802b7bc05..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_vpnlinkproviderproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkProviderProperties struct { - LinkProviderName *string `json:"linkProviderName,omitempty"` - LinkSpeedInMbps *int64 `json:"linkSpeedInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_vpnsite.go b/resource-manager/network/2022-09-01/vpnsites/model_vpnsite.go deleted file mode 100644 index 71b5a77c121..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_vpnsite.go +++ /dev/null @@ -1,14 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSite struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_vpnsitelink.go b/resource-manager/network/2022-09-01/vpnsites/model_vpnsitelink.go deleted file mode 100644 index 0d815e3b164..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_vpnsitelink.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteLinkProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_vpnsitelinkproperties.go b/resource-manager/network/2022-09-01/vpnsites/model_vpnsitelinkproperties.go deleted file mode 100644 index 3d9dedc099d..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_vpnsitelinkproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkProperties struct { - BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/model_vpnsiteproperties.go b/resource-manager/network/2022-09-01/vpnsites/model_vpnsiteproperties.go deleted file mode 100644 index b404c9ab09b..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/model_vpnsiteproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteProperties struct { - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` - DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IsSecuritySite *bool `json:"isSecuritySite,omitempty"` - O365Policy *O365PolicyProperties `json:"o365Policy,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SiteKey *string `json:"siteKey,omitempty"` - VirtualWAN *SubResource `json:"virtualWan,omitempty"` - VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/vpnsites/version.go b/resource-manager/network/2022-09-01/vpnsites/version.go deleted file mode 100644 index 6200f4fec2f..00000000000 --- a/resource-manager/network/2022-09-01/vpnsites/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnsites - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnsites/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/README.md b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/README.md deleted file mode 100644 index 9b649e18a8b..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/README.md +++ /dev/null @@ -1,103 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/webapplicationfirewallpolicies` Documentation - -The `webapplicationfirewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/webapplicationfirewallpolicies" -``` - - -### Client Initialization - -```go -client := webapplicationfirewallpolicies.NewWebApplicationFirewallPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue") - -payload := webapplicationfirewallpolicies.WebApplicationFirewallPolicy{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.Get` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.List` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.ListAll` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/client.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/client.go deleted file mode 100644 index 10b02bcdf85..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewWebApplicationFirewallPoliciesClientWithBaseURI(api environments.Api) (*WebApplicationFirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "webapplicationfirewallpolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating WebApplicationFirewallPoliciesClient: %+v", err) - } - - return &WebApplicationFirewallPoliciesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/constants.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/constants.go deleted file mode 100644 index ee424039175..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/constants.go +++ /dev/null @@ -1,2437 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActionType string - -const ( - ActionTypeAllow ActionType = "Allow" - ActionTypeAnomalyScoring ActionType = "AnomalyScoring" - ActionTypeBlock ActionType = "Block" - ActionTypeLog ActionType = "Log" -) - -func PossibleValuesForActionType() []string { - return []string{ - string(ActionTypeAllow), - string(ActionTypeAnomalyScoring), - string(ActionTypeBlock), - string(ActionTypeLog), - } -} - -func (s *ActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseActionType(input string) (*ActionType, error) { - vals := map[string]ActionType{ - "allow": ActionTypeAllow, - "anomalyscoring": ActionTypeAnomalyScoring, - "block": ActionTypeBlock, - "log": ActionTypeLog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ActionType(input) - return &out, nil -} - -type ApplicationGatewayClientRevocationOptions string - -const ( - ApplicationGatewayClientRevocationOptionsNone ApplicationGatewayClientRevocationOptions = "None" - ApplicationGatewayClientRevocationOptionsOCSP ApplicationGatewayClientRevocationOptions = "OCSP" -) - -func PossibleValuesForApplicationGatewayClientRevocationOptions() []string { - return []string{ - string(ApplicationGatewayClientRevocationOptionsNone), - string(ApplicationGatewayClientRevocationOptionsOCSP), - } -} - -func (s *ApplicationGatewayClientRevocationOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayClientRevocationOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayClientRevocationOptions(input string) (*ApplicationGatewayClientRevocationOptions, error) { - vals := map[string]ApplicationGatewayClientRevocationOptions{ - "none": ApplicationGatewayClientRevocationOptionsNone, - "ocsp": ApplicationGatewayClientRevocationOptionsOCSP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayClientRevocationOptions(input) - return &out, nil -} - -type ApplicationGatewayCookieBasedAffinity string - -const ( - ApplicationGatewayCookieBasedAffinityDisabled ApplicationGatewayCookieBasedAffinity = "Disabled" - ApplicationGatewayCookieBasedAffinityEnabled ApplicationGatewayCookieBasedAffinity = "Enabled" -) - -func PossibleValuesForApplicationGatewayCookieBasedAffinity() []string { - return []string{ - string(ApplicationGatewayCookieBasedAffinityDisabled), - string(ApplicationGatewayCookieBasedAffinityEnabled), - } -} - -func (s *ApplicationGatewayCookieBasedAffinity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCookieBasedAffinity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCookieBasedAffinity(input string) (*ApplicationGatewayCookieBasedAffinity, error) { - vals := map[string]ApplicationGatewayCookieBasedAffinity{ - "disabled": ApplicationGatewayCookieBasedAffinityDisabled, - "enabled": ApplicationGatewayCookieBasedAffinityEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCookieBasedAffinity(input) - return &out, nil -} - -type ApplicationGatewayCustomErrorStatusCode string - -const ( - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred ApplicationGatewayCustomErrorStatusCode = "HttpStatus500" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour ApplicationGatewayCustomErrorStatusCode = "HttpStatus504" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree ApplicationGatewayCustomErrorStatusCode = "HttpStatus503" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred ApplicationGatewayCustomErrorStatusCode = "HttpStatus400" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine ApplicationGatewayCustomErrorStatusCode = "HttpStatus499" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight ApplicationGatewayCustomErrorStatusCode = "HttpStatus408" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive ApplicationGatewayCustomErrorStatusCode = "HttpStatus405" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour ApplicationGatewayCustomErrorStatusCode = "HttpStatus404" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" -) - -func PossibleValuesForApplicationGatewayCustomErrorStatusCode() []string { - return []string{ - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree), - } -} - -func (s *ApplicationGatewayCustomErrorStatusCode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCustomErrorStatusCode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCustomErrorStatusCode(input string) (*ApplicationGatewayCustomErrorStatusCode, error) { - vals := map[string]ApplicationGatewayCustomErrorStatusCode{ - "httpstatus500": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred, - "httpstatus504": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour, - "httpstatus503": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree, - "httpstatus502": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo, - "httpstatus400": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred, - "httpstatus499": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine, - "httpstatus408": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight, - "httpstatus405": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive, - "httpstatus404": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour, - "httpstatus403": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCustomErrorStatusCode(input) - return &out, nil -} - -type ApplicationGatewayFirewallMode string - -const ( - ApplicationGatewayFirewallModeDetection ApplicationGatewayFirewallMode = "Detection" - ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = "Prevention" -) - -func PossibleValuesForApplicationGatewayFirewallMode() []string { - return []string{ - string(ApplicationGatewayFirewallModeDetection), - string(ApplicationGatewayFirewallModePrevention), - } -} - -func (s *ApplicationGatewayFirewallMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayFirewallMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayFirewallMode(input string) (*ApplicationGatewayFirewallMode, error) { - vals := map[string]ApplicationGatewayFirewallMode{ - "detection": ApplicationGatewayFirewallModeDetection, - "prevention": ApplicationGatewayFirewallModePrevention, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayFirewallMode(input) - return &out, nil -} - -type ApplicationGatewayLoadDistributionAlgorithm string - -const ( - ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = "IpHash" - ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = "LeastConnections" - ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = "RoundRobin" -) - -func PossibleValuesForApplicationGatewayLoadDistributionAlgorithm() []string { - return []string{ - string(ApplicationGatewayLoadDistributionAlgorithmIPHash), - string(ApplicationGatewayLoadDistributionAlgorithmLeastConnections), - string(ApplicationGatewayLoadDistributionAlgorithmRoundRobin), - } -} - -func (s *ApplicationGatewayLoadDistributionAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayLoadDistributionAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayLoadDistributionAlgorithm(input string) (*ApplicationGatewayLoadDistributionAlgorithm, error) { - vals := map[string]ApplicationGatewayLoadDistributionAlgorithm{ - "iphash": ApplicationGatewayLoadDistributionAlgorithmIPHash, - "leastconnections": ApplicationGatewayLoadDistributionAlgorithmLeastConnections, - "roundrobin": ApplicationGatewayLoadDistributionAlgorithmRoundRobin, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayLoadDistributionAlgorithm(input) - return &out, nil -} - -type ApplicationGatewayOperationalState string - -const ( - ApplicationGatewayOperationalStateRunning ApplicationGatewayOperationalState = "Running" - ApplicationGatewayOperationalStateStarting ApplicationGatewayOperationalState = "Starting" - ApplicationGatewayOperationalStateStopped ApplicationGatewayOperationalState = "Stopped" - ApplicationGatewayOperationalStateStopping ApplicationGatewayOperationalState = "Stopping" -) - -func PossibleValuesForApplicationGatewayOperationalState() []string { - return []string{ - string(ApplicationGatewayOperationalStateRunning), - string(ApplicationGatewayOperationalStateStarting), - string(ApplicationGatewayOperationalStateStopped), - string(ApplicationGatewayOperationalStateStopping), - } -} - -func (s *ApplicationGatewayOperationalState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayOperationalState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayOperationalState(input string) (*ApplicationGatewayOperationalState, error) { - vals := map[string]ApplicationGatewayOperationalState{ - "running": ApplicationGatewayOperationalStateRunning, - "starting": ApplicationGatewayOperationalStateStarting, - "stopped": ApplicationGatewayOperationalStateStopped, - "stopping": ApplicationGatewayOperationalStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayOperationalState(input) - return &out, nil -} - -type ApplicationGatewayProtocol string - -const ( - ApplicationGatewayProtocolHTTP ApplicationGatewayProtocol = "Http" - ApplicationGatewayProtocolHTTPS ApplicationGatewayProtocol = "Https" - ApplicationGatewayProtocolTcp ApplicationGatewayProtocol = "Tcp" - ApplicationGatewayProtocolTls ApplicationGatewayProtocol = "Tls" -) - -func PossibleValuesForApplicationGatewayProtocol() []string { - return []string{ - string(ApplicationGatewayProtocolHTTP), - string(ApplicationGatewayProtocolHTTPS), - string(ApplicationGatewayProtocolTcp), - string(ApplicationGatewayProtocolTls), - } -} - -func (s *ApplicationGatewayProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayProtocol(input string) (*ApplicationGatewayProtocol, error) { - vals := map[string]ApplicationGatewayProtocol{ - "http": ApplicationGatewayProtocolHTTP, - "https": ApplicationGatewayProtocolHTTPS, - "tcp": ApplicationGatewayProtocolTcp, - "tls": ApplicationGatewayProtocolTls, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayProtocol(input) - return &out, nil -} - -type ApplicationGatewayRedirectType string - -const ( - ApplicationGatewayRedirectTypeFound ApplicationGatewayRedirectType = "Found" - ApplicationGatewayRedirectTypePermanent ApplicationGatewayRedirectType = "Permanent" - ApplicationGatewayRedirectTypeSeeOther ApplicationGatewayRedirectType = "SeeOther" - ApplicationGatewayRedirectTypeTemporary ApplicationGatewayRedirectType = "Temporary" -) - -func PossibleValuesForApplicationGatewayRedirectType() []string { - return []string{ - string(ApplicationGatewayRedirectTypeFound), - string(ApplicationGatewayRedirectTypePermanent), - string(ApplicationGatewayRedirectTypeSeeOther), - string(ApplicationGatewayRedirectTypeTemporary), - } -} - -func (s *ApplicationGatewayRedirectType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRedirectType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRedirectType(input string) (*ApplicationGatewayRedirectType, error) { - vals := map[string]ApplicationGatewayRedirectType{ - "found": ApplicationGatewayRedirectTypeFound, - "permanent": ApplicationGatewayRedirectTypePermanent, - "seeother": ApplicationGatewayRedirectTypeSeeOther, - "temporary": ApplicationGatewayRedirectTypeTemporary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRedirectType(input) - return &out, nil -} - -type ApplicationGatewayRequestRoutingRuleType string - -const ( - ApplicationGatewayRequestRoutingRuleTypeBasic ApplicationGatewayRequestRoutingRuleType = "Basic" - ApplicationGatewayRequestRoutingRuleTypePathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" -) - -func PossibleValuesForApplicationGatewayRequestRoutingRuleType() []string { - return []string{ - string(ApplicationGatewayRequestRoutingRuleTypeBasic), - string(ApplicationGatewayRequestRoutingRuleTypePathBasedRouting), - } -} - -func (s *ApplicationGatewayRequestRoutingRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRequestRoutingRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRequestRoutingRuleType(input string) (*ApplicationGatewayRequestRoutingRuleType, error) { - vals := map[string]ApplicationGatewayRequestRoutingRuleType{ - "basic": ApplicationGatewayRequestRoutingRuleTypeBasic, - "pathbasedrouting": ApplicationGatewayRequestRoutingRuleTypePathBasedRouting, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRequestRoutingRuleType(input) - return &out, nil -} - -type ApplicationGatewaySkuName string - -const ( - ApplicationGatewaySkuNameStandardLarge ApplicationGatewaySkuName = "Standard_Large" - ApplicationGatewaySkuNameStandardMedium ApplicationGatewaySkuName = "Standard_Medium" - ApplicationGatewaySkuNameStandardSmall ApplicationGatewaySkuName = "Standard_Small" - ApplicationGatewaySkuNameStandardVTwo ApplicationGatewaySkuName = "Standard_v2" - ApplicationGatewaySkuNameWAFLarge ApplicationGatewaySkuName = "WAF_Large" - ApplicationGatewaySkuNameWAFMedium ApplicationGatewaySkuName = "WAF_Medium" - ApplicationGatewaySkuNameWAFVTwo ApplicationGatewaySkuName = "WAF_v2" -) - -func PossibleValuesForApplicationGatewaySkuName() []string { - return []string{ - string(ApplicationGatewaySkuNameStandardLarge), - string(ApplicationGatewaySkuNameStandardMedium), - string(ApplicationGatewaySkuNameStandardSmall), - string(ApplicationGatewaySkuNameStandardVTwo), - string(ApplicationGatewaySkuNameWAFLarge), - string(ApplicationGatewaySkuNameWAFMedium), - string(ApplicationGatewaySkuNameWAFVTwo), - } -} - -func (s *ApplicationGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySkuName(input string) (*ApplicationGatewaySkuName, error) { - vals := map[string]ApplicationGatewaySkuName{ - "standard_large": ApplicationGatewaySkuNameStandardLarge, - "standard_medium": ApplicationGatewaySkuNameStandardMedium, - "standard_small": ApplicationGatewaySkuNameStandardSmall, - "standard_v2": ApplicationGatewaySkuNameStandardVTwo, - "waf_large": ApplicationGatewaySkuNameWAFLarge, - "waf_medium": ApplicationGatewaySkuNameWAFMedium, - "waf_v2": ApplicationGatewaySkuNameWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySkuName(input) - return &out, nil -} - -type ApplicationGatewaySslCipherSuite string - -const ( - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" -) - -func PossibleValuesForApplicationGatewaySslCipherSuite() []string { - return []string{ - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA), - } -} - -func (s *ApplicationGatewaySslCipherSuite) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslCipherSuite(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslCipherSuite(input string) (*ApplicationGatewaySslCipherSuite, error) { - vals := map[string]ApplicationGatewaySslCipherSuite{ - "tls_dhe_dss_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA, - "tls_dhe_dss_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_dhe_dss_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA, - "tls_dhe_dss_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_dhe_dss_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA, - "tls_dhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA, - "tls_dhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_dhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_dhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_rsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA, - "tls_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA, - "tls_rsa_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslCipherSuite(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyName string - -const ( - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101S" -) - -func PossibleValuesForApplicationGatewaySslPolicyName() []string { - return []string{ - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS), - } -} - -func (s *ApplicationGatewaySslPolicyName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyName(input string) (*ApplicationGatewaySslPolicyName, error) { - vals := map[string]ApplicationGatewaySslPolicyName{ - "appgwsslpolicy20150501": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne, - "appgwsslpolicy20170401": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne, - "appgwsslpolicy20170401s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS, - "appgwsslpolicy20220101": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne, - "appgwsslpolicy20220101s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyName(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyType string - -const ( - ApplicationGatewaySslPolicyTypeCustom ApplicationGatewaySslPolicyType = "Custom" - ApplicationGatewaySslPolicyTypeCustomVTwo ApplicationGatewaySslPolicyType = "CustomV2" - ApplicationGatewaySslPolicyTypePredefined ApplicationGatewaySslPolicyType = "Predefined" -) - -func PossibleValuesForApplicationGatewaySslPolicyType() []string { - return []string{ - string(ApplicationGatewaySslPolicyTypeCustom), - string(ApplicationGatewaySslPolicyTypeCustomVTwo), - string(ApplicationGatewaySslPolicyTypePredefined), - } -} - -func (s *ApplicationGatewaySslPolicyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyType(input string) (*ApplicationGatewaySslPolicyType, error) { - vals := map[string]ApplicationGatewaySslPolicyType{ - "custom": ApplicationGatewaySslPolicyTypeCustom, - "customv2": ApplicationGatewaySslPolicyTypeCustomVTwo, - "predefined": ApplicationGatewaySslPolicyTypePredefined, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyType(input) - return &out, nil -} - -type ApplicationGatewaySslProtocol string - -const ( - ApplicationGatewaySslProtocolTLSvOneOne ApplicationGatewaySslProtocol = "TLSv1_1" - ApplicationGatewaySslProtocolTLSvOneThree ApplicationGatewaySslProtocol = "TLSv1_3" - ApplicationGatewaySslProtocolTLSvOneTwo ApplicationGatewaySslProtocol = "TLSv1_2" - ApplicationGatewaySslProtocolTLSvOneZero ApplicationGatewaySslProtocol = "TLSv1_0" -) - -func PossibleValuesForApplicationGatewaySslProtocol() []string { - return []string{ - string(ApplicationGatewaySslProtocolTLSvOneOne), - string(ApplicationGatewaySslProtocolTLSvOneThree), - string(ApplicationGatewaySslProtocolTLSvOneTwo), - string(ApplicationGatewaySslProtocolTLSvOneZero), - } -} - -func (s *ApplicationGatewaySslProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslProtocol(input string) (*ApplicationGatewaySslProtocol, error) { - vals := map[string]ApplicationGatewaySslProtocol{ - "tlsv1_1": ApplicationGatewaySslProtocolTLSvOneOne, - "tlsv1_3": ApplicationGatewaySslProtocolTLSvOneThree, - "tlsv1_2": ApplicationGatewaySslProtocolTLSvOneTwo, - "tlsv1_0": ApplicationGatewaySslProtocolTLSvOneZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslProtocol(input) - return &out, nil -} - -type ApplicationGatewayTier string - -const ( - ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" - ApplicationGatewayTierStandardVTwo ApplicationGatewayTier = "Standard_v2" - ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" - ApplicationGatewayTierWAFVTwo ApplicationGatewayTier = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTier() []string { - return []string{ - string(ApplicationGatewayTierStandard), - string(ApplicationGatewayTierStandardVTwo), - string(ApplicationGatewayTierWAF), - string(ApplicationGatewayTierWAFVTwo), - } -} - -func (s *ApplicationGatewayTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTier(input string) (*ApplicationGatewayTier, error) { - vals := map[string]ApplicationGatewayTier{ - "standard": ApplicationGatewayTierStandard, - "standard_v2": ApplicationGatewayTierStandardVTwo, - "waf": ApplicationGatewayTierWAF, - "waf_v2": ApplicationGatewayTierWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTier(input) - return &out, nil -} - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateDrain), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "drain": LoadBalancerBackendAddressAdminStateDrain, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type ManagedRuleEnabledState string - -const ( - ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" - ManagedRuleEnabledStateEnabled ManagedRuleEnabledState = "Enabled" -) - -func PossibleValuesForManagedRuleEnabledState() []string { - return []string{ - string(ManagedRuleEnabledStateDisabled), - string(ManagedRuleEnabledStateEnabled), - } -} - -func (s *ManagedRuleEnabledState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedRuleEnabledState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedRuleEnabledState(input string) (*ManagedRuleEnabledState, error) { - vals := map[string]ManagedRuleEnabledState{ - "disabled": ManagedRuleEnabledStateDisabled, - "enabled": ManagedRuleEnabledStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedRuleEnabledState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type OwaspCrsExclusionEntryMatchVariable string - -const ( - OwaspCrsExclusionEntryMatchVariableRequestArgKeys OwaspCrsExclusionEntryMatchVariable = "RequestArgKeys" - OwaspCrsExclusionEntryMatchVariableRequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" - OwaspCrsExclusionEntryMatchVariableRequestArgValues OwaspCrsExclusionEntryMatchVariable = "RequestArgValues" - OwaspCrsExclusionEntryMatchVariableRequestCookieKeys OwaspCrsExclusionEntryMatchVariable = "RequestCookieKeys" - OwaspCrsExclusionEntryMatchVariableRequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" - OwaspCrsExclusionEntryMatchVariableRequestCookieValues OwaspCrsExclusionEntryMatchVariable = "RequestCookieValues" - OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys OwaspCrsExclusionEntryMatchVariable = "RequestHeaderKeys" - OwaspCrsExclusionEntryMatchVariableRequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" - OwaspCrsExclusionEntryMatchVariableRequestHeaderValues OwaspCrsExclusionEntryMatchVariable = "RequestHeaderValues" -) - -func PossibleValuesForOwaspCrsExclusionEntryMatchVariable() []string { - return []string{ - string(OwaspCrsExclusionEntryMatchVariableRequestArgKeys), - string(OwaspCrsExclusionEntryMatchVariableRequestArgNames), - string(OwaspCrsExclusionEntryMatchVariableRequestArgValues), - string(OwaspCrsExclusionEntryMatchVariableRequestCookieKeys), - string(OwaspCrsExclusionEntryMatchVariableRequestCookieNames), - string(OwaspCrsExclusionEntryMatchVariableRequestCookieValues), - string(OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys), - string(OwaspCrsExclusionEntryMatchVariableRequestHeaderNames), - string(OwaspCrsExclusionEntryMatchVariableRequestHeaderValues), - } -} - -func (s *OwaspCrsExclusionEntryMatchVariable) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOwaspCrsExclusionEntryMatchVariable(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOwaspCrsExclusionEntryMatchVariable(input string) (*OwaspCrsExclusionEntryMatchVariable, error) { - vals := map[string]OwaspCrsExclusionEntryMatchVariable{ - "requestargkeys": OwaspCrsExclusionEntryMatchVariableRequestArgKeys, - "requestargnames": OwaspCrsExclusionEntryMatchVariableRequestArgNames, - "requestargvalues": OwaspCrsExclusionEntryMatchVariableRequestArgValues, - "requestcookiekeys": OwaspCrsExclusionEntryMatchVariableRequestCookieKeys, - "requestcookienames": OwaspCrsExclusionEntryMatchVariableRequestCookieNames, - "requestcookievalues": OwaspCrsExclusionEntryMatchVariableRequestCookieValues, - "requestheaderkeys": OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys, - "requestheadernames": OwaspCrsExclusionEntryMatchVariableRequestHeaderNames, - "requestheadervalues": OwaspCrsExclusionEntryMatchVariableRequestHeaderValues, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OwaspCrsExclusionEntryMatchVariable(input) - return &out, nil -} - -type OwaspCrsExclusionEntrySelectorMatchOperator string - -const ( - OwaspCrsExclusionEntrySelectorMatchOperatorContains OwaspCrsExclusionEntrySelectorMatchOperator = "Contains" - OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith OwaspCrsExclusionEntrySelectorMatchOperator = "EndsWith" - OwaspCrsExclusionEntrySelectorMatchOperatorEquals OwaspCrsExclusionEntrySelectorMatchOperator = "Equals" - OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny OwaspCrsExclusionEntrySelectorMatchOperator = "EqualsAny" - OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith OwaspCrsExclusionEntrySelectorMatchOperator = "StartsWith" -) - -func PossibleValuesForOwaspCrsExclusionEntrySelectorMatchOperator() []string { - return []string{ - string(OwaspCrsExclusionEntrySelectorMatchOperatorContains), - string(OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith), - string(OwaspCrsExclusionEntrySelectorMatchOperatorEquals), - string(OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny), - string(OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith), - } -} - -func (s *OwaspCrsExclusionEntrySelectorMatchOperator) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOwaspCrsExclusionEntrySelectorMatchOperator(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOwaspCrsExclusionEntrySelectorMatchOperator(input string) (*OwaspCrsExclusionEntrySelectorMatchOperator, error) { - vals := map[string]OwaspCrsExclusionEntrySelectorMatchOperator{ - "contains": OwaspCrsExclusionEntrySelectorMatchOperatorContains, - "endswith": OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith, - "equals": OwaspCrsExclusionEntrySelectorMatchOperatorEquals, - "equalsany": OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny, - "startswith": OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OwaspCrsExclusionEntrySelectorMatchOperator(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} - -type WebApplicationFirewallAction string - -const ( - WebApplicationFirewallActionAllow WebApplicationFirewallAction = "Allow" - WebApplicationFirewallActionBlock WebApplicationFirewallAction = "Block" - WebApplicationFirewallActionLog WebApplicationFirewallAction = "Log" -) - -func PossibleValuesForWebApplicationFirewallAction() []string { - return []string{ - string(WebApplicationFirewallActionAllow), - string(WebApplicationFirewallActionBlock), - string(WebApplicationFirewallActionLog), - } -} - -func (s *WebApplicationFirewallAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallAction(input string) (*WebApplicationFirewallAction, error) { - vals := map[string]WebApplicationFirewallAction{ - "allow": WebApplicationFirewallActionAllow, - "block": WebApplicationFirewallActionBlock, - "log": WebApplicationFirewallActionLog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallAction(input) - return &out, nil -} - -type WebApplicationFirewallEnabledState string - -const ( - WebApplicationFirewallEnabledStateDisabled WebApplicationFirewallEnabledState = "Disabled" - WebApplicationFirewallEnabledStateEnabled WebApplicationFirewallEnabledState = "Enabled" -) - -func PossibleValuesForWebApplicationFirewallEnabledState() []string { - return []string{ - string(WebApplicationFirewallEnabledStateDisabled), - string(WebApplicationFirewallEnabledStateEnabled), - } -} - -func (s *WebApplicationFirewallEnabledState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallEnabledState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallEnabledState(input string) (*WebApplicationFirewallEnabledState, error) { - vals := map[string]WebApplicationFirewallEnabledState{ - "disabled": WebApplicationFirewallEnabledStateDisabled, - "enabled": WebApplicationFirewallEnabledStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallEnabledState(input) - return &out, nil -} - -type WebApplicationFirewallMatchVariable string - -const ( - WebApplicationFirewallMatchVariablePostArgs WebApplicationFirewallMatchVariable = "PostArgs" - WebApplicationFirewallMatchVariableQueryString WebApplicationFirewallMatchVariable = "QueryString" - WebApplicationFirewallMatchVariableRemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr" - WebApplicationFirewallMatchVariableRequestBody WebApplicationFirewallMatchVariable = "RequestBody" - WebApplicationFirewallMatchVariableRequestCookies WebApplicationFirewallMatchVariable = "RequestCookies" - WebApplicationFirewallMatchVariableRequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders" - WebApplicationFirewallMatchVariableRequestMethod WebApplicationFirewallMatchVariable = "RequestMethod" - WebApplicationFirewallMatchVariableRequestUri WebApplicationFirewallMatchVariable = "RequestUri" -) - -func PossibleValuesForWebApplicationFirewallMatchVariable() []string { - return []string{ - string(WebApplicationFirewallMatchVariablePostArgs), - string(WebApplicationFirewallMatchVariableQueryString), - string(WebApplicationFirewallMatchVariableRemoteAddr), - string(WebApplicationFirewallMatchVariableRequestBody), - string(WebApplicationFirewallMatchVariableRequestCookies), - string(WebApplicationFirewallMatchVariableRequestHeaders), - string(WebApplicationFirewallMatchVariableRequestMethod), - string(WebApplicationFirewallMatchVariableRequestUri), - } -} - -func (s *WebApplicationFirewallMatchVariable) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallMatchVariable(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallMatchVariable(input string) (*WebApplicationFirewallMatchVariable, error) { - vals := map[string]WebApplicationFirewallMatchVariable{ - "postargs": WebApplicationFirewallMatchVariablePostArgs, - "querystring": WebApplicationFirewallMatchVariableQueryString, - "remoteaddr": WebApplicationFirewallMatchVariableRemoteAddr, - "requestbody": WebApplicationFirewallMatchVariableRequestBody, - "requestcookies": WebApplicationFirewallMatchVariableRequestCookies, - "requestheaders": WebApplicationFirewallMatchVariableRequestHeaders, - "requestmethod": WebApplicationFirewallMatchVariableRequestMethod, - "requesturi": WebApplicationFirewallMatchVariableRequestUri, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallMatchVariable(input) - return &out, nil -} - -type WebApplicationFirewallMode string - -const ( - WebApplicationFirewallModeDetection WebApplicationFirewallMode = "Detection" - WebApplicationFirewallModePrevention WebApplicationFirewallMode = "Prevention" -) - -func PossibleValuesForWebApplicationFirewallMode() []string { - return []string{ - string(WebApplicationFirewallModeDetection), - string(WebApplicationFirewallModePrevention), - } -} - -func (s *WebApplicationFirewallMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallMode(input string) (*WebApplicationFirewallMode, error) { - vals := map[string]WebApplicationFirewallMode{ - "detection": WebApplicationFirewallModeDetection, - "prevention": WebApplicationFirewallModePrevention, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallMode(input) - return &out, nil -} - -type WebApplicationFirewallOperator string - -const ( - WebApplicationFirewallOperatorAny WebApplicationFirewallOperator = "Any" - WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith" - WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains" - WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" - WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal" - WebApplicationFirewallOperatorGeoMatch WebApplicationFirewallOperator = "GeoMatch" - WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan" - WebApplicationFirewallOperatorGreaterThanOrEqual WebApplicationFirewallOperator = "GreaterThanOrEqual" - WebApplicationFirewallOperatorIPMatch WebApplicationFirewallOperator = "IPMatch" - WebApplicationFirewallOperatorLessThan WebApplicationFirewallOperator = "LessThan" - WebApplicationFirewallOperatorLessThanOrEqual WebApplicationFirewallOperator = "LessThanOrEqual" - WebApplicationFirewallOperatorRegex WebApplicationFirewallOperator = "Regex" -) - -func PossibleValuesForWebApplicationFirewallOperator() []string { - return []string{ - string(WebApplicationFirewallOperatorAny), - string(WebApplicationFirewallOperatorBeginsWith), - string(WebApplicationFirewallOperatorContains), - string(WebApplicationFirewallOperatorEndsWith), - string(WebApplicationFirewallOperatorEqual), - string(WebApplicationFirewallOperatorGeoMatch), - string(WebApplicationFirewallOperatorGreaterThan), - string(WebApplicationFirewallOperatorGreaterThanOrEqual), - string(WebApplicationFirewallOperatorIPMatch), - string(WebApplicationFirewallOperatorLessThan), - string(WebApplicationFirewallOperatorLessThanOrEqual), - string(WebApplicationFirewallOperatorRegex), - } -} - -func (s *WebApplicationFirewallOperator) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallOperator(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallOperator(input string) (*WebApplicationFirewallOperator, error) { - vals := map[string]WebApplicationFirewallOperator{ - "any": WebApplicationFirewallOperatorAny, - "beginswith": WebApplicationFirewallOperatorBeginsWith, - "contains": WebApplicationFirewallOperatorContains, - "endswith": WebApplicationFirewallOperatorEndsWith, - "equal": WebApplicationFirewallOperatorEqual, - "geomatch": WebApplicationFirewallOperatorGeoMatch, - "greaterthan": WebApplicationFirewallOperatorGreaterThan, - "greaterthanorequal": WebApplicationFirewallOperatorGreaterThanOrEqual, - "ipmatch": WebApplicationFirewallOperatorIPMatch, - "lessthan": WebApplicationFirewallOperatorLessThan, - "lessthanorequal": WebApplicationFirewallOperatorLessThanOrEqual, - "regex": WebApplicationFirewallOperatorRegex, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallOperator(input) - return &out, nil -} - -type WebApplicationFirewallPolicyResourceState string - -const ( - WebApplicationFirewallPolicyResourceStateCreating WebApplicationFirewallPolicyResourceState = "Creating" - WebApplicationFirewallPolicyResourceStateDeleting WebApplicationFirewallPolicyResourceState = "Deleting" - WebApplicationFirewallPolicyResourceStateDisabled WebApplicationFirewallPolicyResourceState = "Disabled" - WebApplicationFirewallPolicyResourceStateDisabling WebApplicationFirewallPolicyResourceState = "Disabling" - WebApplicationFirewallPolicyResourceStateEnabled WebApplicationFirewallPolicyResourceState = "Enabled" - WebApplicationFirewallPolicyResourceStateEnabling WebApplicationFirewallPolicyResourceState = "Enabling" -) - -func PossibleValuesForWebApplicationFirewallPolicyResourceState() []string { - return []string{ - string(WebApplicationFirewallPolicyResourceStateCreating), - string(WebApplicationFirewallPolicyResourceStateDeleting), - string(WebApplicationFirewallPolicyResourceStateDisabled), - string(WebApplicationFirewallPolicyResourceStateDisabling), - string(WebApplicationFirewallPolicyResourceStateEnabled), - string(WebApplicationFirewallPolicyResourceStateEnabling), - } -} - -func (s *WebApplicationFirewallPolicyResourceState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallPolicyResourceState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallPolicyResourceState(input string) (*WebApplicationFirewallPolicyResourceState, error) { - vals := map[string]WebApplicationFirewallPolicyResourceState{ - "creating": WebApplicationFirewallPolicyResourceStateCreating, - "deleting": WebApplicationFirewallPolicyResourceStateDeleting, - "disabled": WebApplicationFirewallPolicyResourceStateDisabled, - "disabling": WebApplicationFirewallPolicyResourceStateDisabling, - "enabled": WebApplicationFirewallPolicyResourceStateEnabled, - "enabling": WebApplicationFirewallPolicyResourceStateEnabling, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallPolicyResourceState(input) - return &out, nil -} - -type WebApplicationFirewallRuleType string - -const ( - WebApplicationFirewallRuleTypeInvalid WebApplicationFirewallRuleType = "Invalid" - WebApplicationFirewallRuleTypeMatchRule WebApplicationFirewallRuleType = "MatchRule" -) - -func PossibleValuesForWebApplicationFirewallRuleType() []string { - return []string{ - string(WebApplicationFirewallRuleTypeInvalid), - string(WebApplicationFirewallRuleTypeMatchRule), - } -} - -func (s *WebApplicationFirewallRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallRuleType(input string) (*WebApplicationFirewallRuleType, error) { - vals := map[string]WebApplicationFirewallRuleType{ - "invalid": WebApplicationFirewallRuleTypeInvalid, - "matchrule": WebApplicationFirewallRuleTypeMatchRule, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallRuleType(input) - return &out, nil -} - -type WebApplicationFirewallState string - -const ( - WebApplicationFirewallStateDisabled WebApplicationFirewallState = "Disabled" - WebApplicationFirewallStateEnabled WebApplicationFirewallState = "Enabled" -) - -func PossibleValuesForWebApplicationFirewallState() []string { - return []string{ - string(WebApplicationFirewallStateDisabled), - string(WebApplicationFirewallStateEnabled), - } -} - -func (s *WebApplicationFirewallState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallState(input string) (*WebApplicationFirewallState, error) { - vals := map[string]WebApplicationFirewallState{ - "disabled": WebApplicationFirewallStateDisabled, - "enabled": WebApplicationFirewallStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallState(input) - return &out, nil -} - -type WebApplicationFirewallTransform string - -const ( - WebApplicationFirewallTransformHtmlEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode" - WebApplicationFirewallTransformLowercase WebApplicationFirewallTransform = "Lowercase" - WebApplicationFirewallTransformRemoveNulls WebApplicationFirewallTransform = "RemoveNulls" - WebApplicationFirewallTransformTrim WebApplicationFirewallTransform = "Trim" - WebApplicationFirewallTransformUppercase WebApplicationFirewallTransform = "Uppercase" - WebApplicationFirewallTransformUrlDecode WebApplicationFirewallTransform = "UrlDecode" - WebApplicationFirewallTransformUrlEncode WebApplicationFirewallTransform = "UrlEncode" -) - -func PossibleValuesForWebApplicationFirewallTransform() []string { - return []string{ - string(WebApplicationFirewallTransformHtmlEntityDecode), - string(WebApplicationFirewallTransformLowercase), - string(WebApplicationFirewallTransformRemoveNulls), - string(WebApplicationFirewallTransformTrim), - string(WebApplicationFirewallTransformUppercase), - string(WebApplicationFirewallTransformUrlDecode), - string(WebApplicationFirewallTransformUrlEncode), - } -} - -func (s *WebApplicationFirewallTransform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallTransform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallTransform(input string) (*WebApplicationFirewallTransform, error) { - vals := map[string]WebApplicationFirewallTransform{ - "htmlentitydecode": WebApplicationFirewallTransformHtmlEntityDecode, - "lowercase": WebApplicationFirewallTransformLowercase, - "removenulls": WebApplicationFirewallTransformRemoveNulls, - "trim": WebApplicationFirewallTransformTrim, - "uppercase": WebApplicationFirewallTransformUppercase, - "urldecode": WebApplicationFirewallTransformUrlDecode, - "urlencode": WebApplicationFirewallTransformUrlEncode, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallTransform(input) - return &out, nil -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go deleted file mode 100644 index d15af832185..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayWebApplicationFirewallPolicyId{} - -// ApplicationGatewayWebApplicationFirewallPolicyId is a struct representing the Resource ID for a Application Gateway Web Application Firewall Policy -type ApplicationGatewayWebApplicationFirewallPolicyId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayWebApplicationFirewallPolicyName string -} - -// NewApplicationGatewayWebApplicationFirewallPolicyID returns a new ApplicationGatewayWebApplicationFirewallPolicyId struct -func NewApplicationGatewayWebApplicationFirewallPolicyID(subscriptionId string, resourceGroupName string, applicationGatewayWebApplicationFirewallPolicyName string) ApplicationGatewayWebApplicationFirewallPolicyId { - return ApplicationGatewayWebApplicationFirewallPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayWebApplicationFirewallPolicyName: applicationGatewayWebApplicationFirewallPolicyName, - } -} - -// ParseApplicationGatewayWebApplicationFirewallPolicyID parses 'input' into a ApplicationGatewayWebApplicationFirewallPolicyId -func ParseApplicationGatewayWebApplicationFirewallPolicyID(input string) (*ApplicationGatewayWebApplicationFirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayWebApplicationFirewallPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayWebApplicationFirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayWebApplicationFirewallPolicyName, ok = parsed.Parsed["applicationGatewayWebApplicationFirewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayWebApplicationFirewallPolicyName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayWebApplicationFirewallPolicyId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(input string) (*ApplicationGatewayWebApplicationFirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayWebApplicationFirewallPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayWebApplicationFirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayWebApplicationFirewallPolicyName, ok = parsed.Parsed["applicationGatewayWebApplicationFirewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayWebApplicationFirewallPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayWebApplicationFirewallPolicyID checks that 'input' can be parsed as a Application Gateway Web Application Firewall Policy ID -func ValidateApplicationGatewayWebApplicationFirewallPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayWebApplicationFirewallPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway Web Application Firewall Policy ID -func (id ApplicationGatewayWebApplicationFirewallPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayWebApplicationFirewallPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway Web Application Firewall Policy ID -func (id ApplicationGatewayWebApplicationFirewallPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGatewayWebApplicationFirewallPolicies", "applicationGatewayWebApplicationFirewallPolicies", "applicationGatewayWebApplicationFirewallPolicies"), - resourceids.UserSpecifiedSegment("applicationGatewayWebApplicationFirewallPolicyName", "applicationGatewayWebApplicationFirewallPolicyValue"), - } -} - -// String returns a human-readable description of this Application Gateway Web Application Firewall Policy ID -func (id ApplicationGatewayWebApplicationFirewallPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Web Application Firewall Policy Name: %q", id.ApplicationGatewayWebApplicationFirewallPolicyName), - } - return fmt.Sprintf("Application Gateway Web Application Firewall Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy_test.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy_test.go deleted file mode 100644 index 3d6d26b84cd..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayWebApplicationFirewallPolicyId{} - -func TestNewApplicationGatewayWebApplicationFirewallPolicyID(t *testing.T) { - id := NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayWebApplicationFirewallPolicyName != "applicationGatewayWebApplicationFirewallPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayWebApplicationFirewallPolicyName'", id.ApplicationGatewayWebApplicationFirewallPolicyName, "applicationGatewayWebApplicationFirewallPolicyValue") - } -} - -func TestFormatApplicationGatewayWebApplicationFirewallPolicyID(t *testing.T) { - actual := NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayWebApplicationFirewallPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayWebApplicationFirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue", - Expected: &ApplicationGatewayWebApplicationFirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayWebApplicationFirewallPolicyName: "applicationGatewayWebApplicationFirewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayWebApplicationFirewallPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayWebApplicationFirewallPolicyName != v.Expected.ApplicationGatewayWebApplicationFirewallPolicyName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayWebApplicationFirewallPolicyName", v.Expected.ApplicationGatewayWebApplicationFirewallPolicyName, actual.ApplicationGatewayWebApplicationFirewallPolicyName) - } - - } -} - -func TestParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayWebApplicationFirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue", - Expected: &ApplicationGatewayWebApplicationFirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayWebApplicationFirewallPolicyName: "applicationGatewayWebApplicationFirewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcIeS/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcYvAlUe", - Expected: &ApplicationGatewayWebApplicationFirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayWebApplicationFirewallPolicyName: "aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcIeS/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayWebApplicationFirewallPolicyName != v.Expected.ApplicationGatewayWebApplicationFirewallPolicyName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayWebApplicationFirewallPolicyName", v.Expected.ApplicationGatewayWebApplicationFirewallPolicyName, actual.ApplicationGatewayWebApplicationFirewallPolicyName) - } - - } -} - -func TestSegmentsForApplicationGatewayWebApplicationFirewallPolicyId(t *testing.T) { - segments := ApplicationGatewayWebApplicationFirewallPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayWebApplicationFirewallPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_createorupdate.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_createorupdate.go deleted file mode 100644 index a0c9dc5da18..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *WebApplicationFirewallPolicy -} - -// CreateOrUpdate ... -func (c WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context, id ApplicationGatewayWebApplicationFirewallPolicyId, input WebApplicationFirewallPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_delete.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_delete.go deleted file mode 100644 index c4547e95952..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, id ApplicationGatewayWebApplicationFirewallPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c WebApplicationFirewallPoliciesClient) DeleteThenPoll(ctx context.Context, id ApplicationGatewayWebApplicationFirewallPolicyId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_get.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_get.go deleted file mode 100644 index 469a6ae6fa5..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *WebApplicationFirewallPolicy -} - -// Get ... -func (c WebApplicationFirewallPoliciesClient) Get(ctx context.Context, id ApplicationGatewayWebApplicationFirewallPolicyId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_list.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_list.go deleted file mode 100644 index 84af44e524c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]WebApplicationFirewallPolicy -} - -type ListCompleteResult struct { - Items []WebApplicationFirewallPolicy -} - -// List ... -func (c WebApplicationFirewallPoliciesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]WebApplicationFirewallPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c WebApplicationFirewallPoliciesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, WebApplicationFirewallPolicyOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebApplicationFirewallPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate WebApplicationFirewallPolicyOperationPredicate) (result ListCompleteResult, err error) { - items := make([]WebApplicationFirewallPolicy, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_listall.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_listall.go deleted file mode 100644 index 67391896a5c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]WebApplicationFirewallPolicy -} - -type ListAllCompleteResult struct { - Items []WebApplicationFirewallPolicy -} - -// ListAll ... -func (c WebApplicationFirewallPoliciesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]WebApplicationFirewallPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c WebApplicationFirewallPoliciesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, WebApplicationFirewallPolicyOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebApplicationFirewallPoliciesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate WebApplicationFirewallPolicyOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]WebApplicationFirewallPolicy, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgateway.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgateway.go deleted file mode 100644 index 69aa82140ea..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgateway.go +++ /dev/null @@ -1,21 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificate.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificate.go deleted file mode 100644 index 74175523bc1..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificatepropertiesformat.go deleted file mode 100644 index 7536ffa2439..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayautoscaleconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayautoscaleconfiguration.go deleted file mode 100644 index 06e7df4e24e..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayautoscaleconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAutoscaleConfiguration struct { - MaxCapacity *int64 `json:"maxCapacity,omitempty"` - MinCapacity int64 `json:"minCapacity"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddress.go deleted file mode 100644 index dcc624a13aa..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 0f188b359ad..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 64a4ed2e836..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettings.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettings.go deleted file mode 100644 index 052f312d7b3..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettingspropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettingspropertiesformat.go deleted file mode 100644 index 16305b5de81..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettingspropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { - AffinityCookieName *string `json:"affinityCookieName,omitempty"` - AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` - ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` - CookieBasedAffinity *ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` - HostName *string `json:"hostName,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - ProbeEnabled *bool `json:"probeEnabled,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestTimeout *int64 `json:"requestTimeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettings.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettings.go deleted file mode 100644 index 1bc8a5c5fe1..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettingspropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettingspropertiesformat.go deleted file mode 100644 index 5d5f77f3c8d..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettingspropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettingsPropertiesFormat struct { - HostName *string `json:"hostName,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayclientauthconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayclientauthconfiguration.go deleted file mode 100644 index 36e0f43021d..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayclientauthconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayClientAuthConfiguration struct { - VerifyClientCertIssuerDN *bool `json:"verifyClientCertIssuerDN,omitempty"` - VerifyClientRevocation *ApplicationGatewayClientRevocationOptions `json:"verifyClientRevocation,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayconnectiondraining.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayconnectiondraining.go deleted file mode 100644 index 369c8494e6f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayconnectiondraining.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayConnectionDraining struct { - DrainTimeoutInSec int64 `json:"drainTimeoutInSec"` - Enabled bool `json:"enabled"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaycustomerror.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaycustomerror.go deleted file mode 100644 index 82f3501791c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaycustomerror.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayCustomError struct { - CustomErrorPageUrl *string `json:"customErrorPageUrl,omitempty"` - StatusCode *ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfirewalldisabledrulegroup.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfirewalldisabledrulegroup.go deleted file mode 100644 index c88a33b735c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfirewalldisabledrulegroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallDisabledRuleGroup struct { - RuleGroupName string `json:"ruleGroupName"` - Rules *[]int64 `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfirewallexclusion.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfirewallexclusion.go deleted file mode 100644 index 541e5052e8f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfirewallexclusion.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallExclusion struct { - MatchVariable string `json:"matchVariable"` - Selector string `json:"selector"` - SelectorMatchOperator string `json:"selectorMatchOperator"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfiguration.go deleted file mode 100644 index f5f9c5bebc7..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfigurationpropertiesformat.go deleted file mode 100644 index 1b61dc71c1d..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendport.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendport.go deleted file mode 100644 index dfcb5e52ee3..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendport.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPort struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendportpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendportpropertiesformat.go deleted file mode 100644 index d37b168d0aa..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendportpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPortPropertiesFormat struct { - Port *int64 `json:"port,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayglobalconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayglobalconfiguration.go deleted file mode 100644 index b80dabed9a0..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayglobalconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayGlobalConfiguration struct { - EnableRequestBuffering *bool `json:"enableRequestBuffering,omitempty"` - EnableResponseBuffering *bool `json:"enableResponseBuffering,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayheaderconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayheaderconfiguration.go deleted file mode 100644 index fbbd324adce..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayheaderconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHeaderConfiguration struct { - HeaderName *string `json:"headerName,omitempty"` - HeaderValue *string `json:"headerValue,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistener.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistener.go deleted file mode 100644 index 0fd70bac201..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistenerpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistenerpropertiesformat.go deleted file mode 100644 index 9c4eb515f42..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistenerpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListenerPropertiesFormat struct { - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - HostName *string `json:"hostName,omitempty"` - HostNames *[]string `json:"hostNames,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 6ffd65f71c2..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index e8482b21e60..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaylistener.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaylistener.go deleted file mode 100644 index 71fe702c98e..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaylistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaylistenerpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaylistenerpropertiesformat.go deleted file mode 100644 index 3f3c35b3412..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaylistenerpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListenerPropertiesFormat struct { - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicy.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicy.go deleted file mode 100644 index 55e8713746c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionPolicyPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicypropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicypropertiesformat.go deleted file mode 100644 index fe721166bf2..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicypropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { - LoadDistributionAlgorithm *ApplicationGatewayLoadDistributionAlgorithm `json:"loadDistributionAlgorithm,omitempty"` - LoadDistributionTargets *[]ApplicationGatewayLoadDistributionTarget `json:"loadDistributionTargets,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontarget.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontarget.go deleted file mode 100644 index d361c4e3d97..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontarget.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTarget struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionTargetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontargetpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontargetpropertiesformat.go deleted file mode 100644 index 6ba821b2e82..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontargetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTargetPropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - WeightPerServer *int64 `json:"weightPerServer,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypathrule.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypathrule.go deleted file mode 100644 index 992b948c558..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypathrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypathrulepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypathrulepropertiesformat.go deleted file mode 100644 index 5c8b00da085..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypathrulepropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Paths *[]string `json:"paths,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnection.go deleted file mode 100644 index 5b45596cedc..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnectionproperties.go deleted file mode 100644 index c6a900feb31..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfiguration.go deleted file mode 100644 index 73e8756981a..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfigurationproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfigurationproperties.go deleted file mode 100644 index 8855a67b9ce..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfigurationproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfigurationProperties struct { - IPConfigurations *[]ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfiguration.go deleted file mode 100644 index ce8e67a68d0..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfigurationproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfigurationproperties.go deleted file mode 100644 index ff68d2052d7..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobe.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobe.go deleted file mode 100644 index 9c935a9fbba..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobe.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbe struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobehealthresponsematch.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobehealthresponsematch.go deleted file mode 100644 index 20c18109ec0..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobehealthresponsematch.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbeHealthResponseMatch struct { - Body *string `json:"body,omitempty"` - StatusCodes *[]string `json:"statusCodes,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobepropertiesformat.go deleted file mode 100644 index b36845c57bf..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayprobepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbePropertiesFormat struct { - Host *string `json:"host,omitempty"` - Interval *int64 `json:"interval,omitempty"` - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - MinServers *int64 `json:"minServers,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - PickHostNameFromBackendSettings *bool `json:"pickHostNameFromBackendSettings,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - UnhealthyThreshold *int64 `json:"unhealthyThreshold,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypropertiesformat.go deleted file mode 100644 index 4535447263c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaypropertiesformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPropertiesFormat struct { - AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` - AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` - BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` - BackendSettingsCollection *[]ApplicationGatewayBackendSettings `json:"backendSettingsCollection,omitempty"` - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - EnableFips *bool `json:"enableFips,omitempty"` - EnableHTTP2 *bool `json:"enableHttp2,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"` - FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` - GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` - GlobalConfiguration *ApplicationGatewayGlobalConfiguration `json:"globalConfiguration,omitempty"` - HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` - Listeners *[]ApplicationGatewayListener `json:"listeners,omitempty"` - LoadDistributionPolicies *[]ApplicationGatewayLoadDistributionPolicy `json:"loadDistributionPolicies,omitempty"` - OperationalState *ApplicationGatewayOperationalState `json:"operationalState,omitempty"` - PrivateEndpointConnections *[]ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - PrivateLinkConfigurations *[]ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"` - Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` - RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` - RoutingRules *[]ApplicationGatewayRoutingRule `json:"routingRules,omitempty"` - Sku *ApplicationGatewaySku `json:"sku,omitempty"` - SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - SslProfiles *[]ApplicationGatewaySslProfile `json:"sslProfiles,omitempty"` - TrustedClientCertificates *[]ApplicationGatewayTrustedClientCertificate `json:"trustedClientCertificates,omitempty"` - TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` - UrlPathMaps *[]ApplicationGatewayUrlPathMap `json:"urlPathMaps,omitempty"` - WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfiguration.go deleted file mode 100644 index 85eed147eb2..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfigurationpropertiesformat.go deleted file mode 100644 index 7808c57c7f7..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfigurationpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { - IncludePath *bool `json:"includePath,omitempty"` - IncludeQueryString *bool `json:"includeQueryString,omitempty"` - PathRules *[]SubResource `json:"pathRules,omitempty"` - RedirectType *ApplicationGatewayRedirectType `json:"redirectType,omitempty"` - RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` - TargetListener *SubResource `json:"targetListener,omitempty"` - TargetUrl *string `json:"targetUrl,omitempty"` - UrlPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrule.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrule.go deleted file mode 100644 index 9eb6ffe9c4a..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrulepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrulepropertiesformat.go deleted file mode 100644 index 53dc9f99474..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrulepropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - HTTPListener *SubResource `json:"httpListener,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` - UrlPathMap *SubResource `json:"urlPathMap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterule.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterule.go deleted file mode 100644 index 21ce81c5a24..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterule.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRule struct { - ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"` - Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"` - Name *string `json:"name,omitempty"` - RuleSequence *int64 `json:"ruleSequence,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleactionset.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleactionset.go deleted file mode 100644 index ed418b0d4a5..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleactionset.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleActionSet struct { - RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"` - ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"` - UrlConfiguration *ApplicationGatewayUrlConfiguration `json:"urlConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulecondition.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulecondition.go deleted file mode 100644 index 1e70a94ea80..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulecondition.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleCondition struct { - IgnoreCase *bool `json:"ignoreCase,omitempty"` - Negate *bool `json:"negate,omitempty"` - Pattern *string `json:"pattern,omitempty"` - Variable *string `json:"variable,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleset.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleset.go deleted file mode 100644 index a25c70e4a05..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleset.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulesetpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulesetpropertiesformat.go deleted file mode 100644 index 3a1e3374217..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulesetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrule.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrule.go deleted file mode 100644 index 78053b23a9c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrulepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrulepropertiesformat.go deleted file mode 100644 index 05ed98ab597..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrulepropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendSettings *SubResource `json:"backendSettings,omitempty"` - Listener *SubResource `json:"listener,omitempty"` - Priority int64 `json:"priority"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysku.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysku.go deleted file mode 100644 index 0b639c7628a..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysku.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *ApplicationGatewaySkuName `json:"name,omitempty"` - Tier *ApplicationGatewayTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificate.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificate.go deleted file mode 100644 index 328f6a90d88..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificatepropertiesformat.go deleted file mode 100644 index f087bfec9a8..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificatepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - Password *string `json:"password,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslpolicy.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslpolicy.go deleted file mode 100644 index ae860f1460f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPolicy struct { - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` - MinProtocolVersion *ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` - PolicyName *ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` - PolicyType *ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofile.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofile.go deleted file mode 100644 index 8c1d0630c2f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofilepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofilepropertiesformat.go deleted file mode 100644 index b89279b0c7f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofilepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfilePropertiesFormat struct { - ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration `json:"clientAuthConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - TrustedClientCertificates *[]SubResource `json:"trustedClientCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificate.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificate.go deleted file mode 100644 index f2fb2244e71..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedClientCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificatepropertiesformat.go deleted file mode 100644 index ac7454cb8f4..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificatepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct { - ClientCertIssuerDN *string `json:"clientCertIssuerDN,omitempty"` - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ValidatedCertData *string `json:"validatedCertData,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificate.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificate.go deleted file mode 100644 index 9deacd55fe8..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificatepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificatepropertiesformat.go deleted file mode 100644 index f79bf663f76..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificatepropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlconfiguration.go deleted file mode 100644 index 03021e43980..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlConfiguration struct { - ModifiedPath *string `json:"modifiedPath,omitempty"` - ModifiedQueryString *string `json:"modifiedQueryString,omitempty"` - Reroute *bool `json:"reroute,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmap.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmap.go deleted file mode 100644 index 57b9cac7aa3..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmap.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayUrlPathMapPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmappropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmappropertiesformat.go deleted file mode 100644 index e69ae8cbde4..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmappropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMapPropertiesFormat struct { - DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` - DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` - DefaultLoadDistributionPolicy *SubResource `json:"defaultLoadDistributionPolicy,omitempty"` - DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` - DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` - PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaywebapplicationfirewallconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaywebapplicationfirewallconfiguration.go deleted file mode 100644 index 0ccb185da05..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationgatewaywebapplicationfirewallconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWebApplicationFirewallConfiguration struct { - DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` - Enabled bool `json:"enabled"` - Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"` - FileUploadLimitInMb *int64 `json:"fileUploadLimitInMb,omitempty"` - FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode"` - MaxRequestBodySize *int64 `json:"maxRequestBodySize,omitempty"` - MaxRequestBodySizeInKb *int64 `json:"maxRequestBodySizeInKb,omitempty"` - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationsecuritygroup.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationsecuritygroup.go deleted file mode 100644 index 8dccd748428..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 2713b23e0a5..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_backendaddresspool.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_backendaddresspool.go deleted file mode 100644 index a5f3d1e0367..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index d3079086b6c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index e9022fbeb4f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ddossettings.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ddossettings.go deleted file mode 100644 index 4f7e1e20764..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_delegation.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_delegation.go deleted file mode 100644 index 9a088e2a507..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedrule.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedrule.go deleted file mode 100644 index ffa39b22711..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedrule.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExclusionManagedRule struct { - RuleId string `json:"ruleId"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedrulegroup.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedrulegroup.go deleted file mode 100644 index 29d30ef6bc1..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedrulegroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExclusionManagedRuleGroup struct { - RuleGroupName string `json:"ruleGroupName"` - Rules *[]ExclusionManagedRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedruleset.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedruleset.go deleted file mode 100644 index cb569797cec..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_exclusionmanagedruleset.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExclusionManagedRuleSet struct { - RuleGroups *[]ExclusionManagedRuleGroup `json:"ruleGroups,omitempty"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlog.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlog.go deleted file mode 100644 index 36d32c9316a..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlogformatparameters.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlogformatparameters.go deleted file mode 100644 index 8e97873a7c3..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlogpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlogpropertiesformat.go deleted file mode 100644 index 9e90fd9cd8a..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_frontendipconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_frontendipconfiguration.go deleted file mode 100644 index 717217cc3a2..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 4f11b119df9..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 698c1c6a1b4..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_inboundnatrule.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_inboundnatrule.go deleted file mode 100644 index f9908a65135..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 2ed26d6a6d0..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfiguration.go deleted file mode 100644 index ee1ee9f9ce3..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationprofile.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationprofile.go deleted file mode 100644 index 4467a251182..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 4746cb9a921..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 6455af984df..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_iptag.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_iptag.go deleted file mode 100644 index da603122799..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddress.go deleted file mode 100644 index 07977c08269..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index ca60fdf8735..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go deleted file mode 100644 index 2810e8e0e4d..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedRuleGroupOverride struct { - RuleGroupName string `json:"ruleGroupName"` - Rules *[]ManagedRuleOverride `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedruleoverride.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedruleoverride.go deleted file mode 100644 index c6f8a500e23..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedruleoverride.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedRuleOverride struct { - Action *ActionType `json:"action,omitempty"` - RuleId string `json:"ruleId"` - State *ManagedRuleEnabledState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedrulesdefinition.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedrulesdefinition.go deleted file mode 100644 index 720824c2670..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedrulesdefinition.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedRulesDefinition struct { - Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"` - ManagedRuleSets []ManagedRuleSet `json:"managedRuleSets"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedruleset.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedruleset.go deleted file mode 100644 index 2bbf971c792..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_managedruleset.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedRuleSet struct { - RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_matchcondition.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_matchcondition.go deleted file mode 100644 index c8d3e722c75..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_matchcondition.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MatchCondition struct { - MatchValues []string `json:"matchValues"` - MatchVariables []MatchVariable `json:"matchVariables"` - NegationConditon *bool `json:"negationConditon,omitempty"` - Operator WebApplicationFirewallOperator `json:"operator"` - Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_matchvariable.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_matchvariable.go deleted file mode 100644 index bd0473317b2..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_matchvariable.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MatchVariable struct { - Selector *string `json:"selector,omitempty"` - VariableName WebApplicationFirewallMatchVariable `json:"variableName"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgateway.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgateway.go deleted file mode 100644 index 4a594a57232..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgatewaypropertiesformat.go deleted file mode 100644 index 30e0ed98075..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgatewaysku.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgatewaysku.go deleted file mode 100644 index 01f9595dd47..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natruleportmapping.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natruleportmapping.go deleted file mode 100644 index 636fb66e30f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterface.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterface.go deleted file mode 100644 index 5f43f78eff1..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacednssettings.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacednssettings.go deleted file mode 100644 index 2d9f1326e9a..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 80650073a43..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index ed9c49c6aa3..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 244007a3148..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 2903b80c29d..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,28 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 559fab4512d..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index d28ce56ff99..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networksecuritygroup.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networksecuritygroup.go deleted file mode 100644 index 7edb20a30eb..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 63dfb0a3753..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_owaspcrsexclusionentry.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_owaspcrsexclusionentry.go deleted file mode 100644 index 447c5ce3185..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_owaspcrsexclusionentry.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OwaspCrsExclusionEntry struct { - ExclusionManagedRuleSets *[]ExclusionManagedRuleSet `json:"exclusionManagedRuleSets,omitempty"` - MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable"` - Selector string `json:"selector"` - SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_policysettings.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_policysettings.go deleted file mode 100644 index 801aaef1aa3..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_policysettings.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PolicySettings struct { - CustomBlockResponseBody *string `json:"customBlockResponseBody,omitempty"` - CustomBlockResponseStatusCode *int64 `json:"customBlockResponseStatusCode,omitempty"` - FileUploadLimitInMb *int64 `json:"fileUploadLimitInMb,omitempty"` - MaxRequestBodySizeInKb *int64 `json:"maxRequestBodySizeInKb,omitempty"` - Mode *WebApplicationFirewallMode `json:"mode,omitempty"` - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` - State *WebApplicationFirewallEnabledState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpoint.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpoint.go deleted file mode 100644 index aabcb4ef384..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointconnection.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointconnection.go deleted file mode 100644 index c66bc0045c7..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointconnectionproperties.go deleted file mode 100644 index df004959290..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointipconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointipconfiguration.go deleted file mode 100644 index 86f24c803d3..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index f40d8cf2be4..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointproperties.go deleted file mode 100644 index 93cab138813..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkservice.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkservice.go deleted file mode 100644 index 8b8ffdc399e..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnection.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnection.go deleted file mode 100644 index ac293dace51..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 164ef869982..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 3ea66cb9940..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 7d17f466192..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 814df952c03..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceproperties.go deleted file mode 100644 index c58556d385c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddress.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddress.go deleted file mode 100644 index 6f2116661f4..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddressdnssettings.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddressdnssettings.go deleted file mode 100644 index db15b0f9aab..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 76e237783ef..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddresssku.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddresssku.go deleted file mode 100644 index 1b8495a46b0..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourcenavigationlink.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourcenavigationlink.go deleted file mode 100644 index 8cf0d6ae754..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourcenavigationlinkformat.go deleted file mode 100644 index cfc65feb648..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourceset.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourceset.go deleted file mode 100644 index 7bd3ff7ff53..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_retentionpolicyparameters.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_retentionpolicyparameters.go deleted file mode 100644 index 700cf48fcef..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_route.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_route.go deleted file mode 100644 index 854dbcba973..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routepropertiesformat.go deleted file mode 100644 index 65879ed15ad..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routetable.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routetable.go deleted file mode 100644 index 73fdbc844dc..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routetablepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routetablepropertiesformat.go deleted file mode 100644 index f7082dd7d4a..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_securityrule.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_securityrule.go deleted file mode 100644 index 9a8c2e557c7..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_securityrulepropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_securityrulepropertiesformat.go deleted file mode 100644 index d40d084432c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceassociationlink.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceassociationlink.go deleted file mode 100644 index 9f75aeaec5b..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index abae149b764..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 160d9aebc9f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicy.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicy.go deleted file mode 100644 index ae5e0fd396a..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinition.go deleted file mode 100644 index ac60c21f09b..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 34679603f3a..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index aa5effcc158..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 03e37bc11f8..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subnet.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subnet.go deleted file mode 100644 index 22ae6378be5..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subnetpropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subnetpropertiesformat.go deleted file mode 100644 index e98defaa49c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subresource.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subresource.go deleted file mode 100644 index f80e970be83..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index fd4b0e7ec17..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_trafficanalyticsproperties.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_trafficanalyticsproperties.go deleted file mode 100644 index 872500d56bf..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_virtualnetworktap.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_virtualnetworktap.go deleted file mode 100644 index e2de0ca881d..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 418d09be371..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallcustomrule.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallcustomrule.go deleted file mode 100644 index b1bec35e35f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallcustomrule.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallCustomRule struct { - Action WebApplicationFirewallAction `json:"action"` - Etag *string `json:"etag,omitempty"` - MatchConditions []MatchCondition `json:"matchConditions"` - Name *string `json:"name,omitempty"` - Priority int64 `json:"priority"` - RuleType WebApplicationFirewallRuleType `json:"ruleType"` - State *WebApplicationFirewallState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicy.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicy.go deleted file mode 100644 index c79f926a28c..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicy.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicypropertiesformat.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicypropertiesformat.go deleted file mode 100644 index 0c43a36d2a8..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicypropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallPolicyPropertiesFormat struct { - ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"` - CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"` - HTTPListeners *[]SubResource `json:"httpListeners,omitempty"` - ManagedRules ManagedRulesDefinition `json:"managedRules"` - PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"` - PolicySettings *PolicySettings `json:"policySettings,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceState *WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/predicates.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/predicates.go deleted file mode 100644 index a7973b0a14f..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallPolicyOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p WebApplicationFirewallPolicyOperationPredicate) Matches(input WebApplicationFirewallPolicy) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/version.go b/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/version.go deleted file mode 100644 index cd57f0b03b9..00000000000 --- a/resource-manager/network/2022-09-01/webapplicationfirewallpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallpolicies/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-09-01/webcategories/README.md b/resource-manager/network/2022-09-01/webcategories/README.md deleted file mode 100644 index 3eba40a8276..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/webcategories` Documentation - -The `webcategories` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-09-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-09-01/webcategories" -``` - - -### Client Initialization - -```go -client := webcategories.NewWebCategoriesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `WebCategoriesClient.Get` - -```go -ctx := context.TODO() -id := webcategories.NewAzureWebCategoryID("12345678-1234-9876-4563-123456789012", "azureWebCategoryValue") - -read, err := client.Get(ctx, id, webcategories.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebCategoriesClient.ListBySubscription` - -```go -ctx := context.TODO() -id := webcategories.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-09-01/webcategories/client.go b/resource-manager/network/2022-09-01/webcategories/client.go deleted file mode 100644 index 7d213fbca46..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package webcategories - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebCategoriesClient struct { - Client *resourcemanager.Client -} - -func NewWebCategoriesClientWithBaseURI(api environments.Api) (*WebCategoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "webcategories", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating WebCategoriesClient: %+v", err) - } - - return &WebCategoriesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-09-01/webcategories/id_azurewebcategory.go b/resource-manager/network/2022-09-01/webcategories/id_azurewebcategory.go deleted file mode 100644 index 05fb4633638..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/id_azurewebcategory.go +++ /dev/null @@ -1,114 +0,0 @@ -package webcategories - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AzureWebCategoryId{} - -// AzureWebCategoryId is a struct representing the Resource ID for a Azure Web Category -type AzureWebCategoryId struct { - SubscriptionId string - AzureWebCategoryName string -} - -// NewAzureWebCategoryID returns a new AzureWebCategoryId struct -func NewAzureWebCategoryID(subscriptionId string, azureWebCategoryName string) AzureWebCategoryId { - return AzureWebCategoryId{ - SubscriptionId: subscriptionId, - AzureWebCategoryName: azureWebCategoryName, - } -} - -// ParseAzureWebCategoryID parses 'input' into a AzureWebCategoryId -func ParseAzureWebCategoryID(input string) (*AzureWebCategoryId, error) { - parser := resourceids.NewParserFromResourceIdType(AzureWebCategoryId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AzureWebCategoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.AzureWebCategoryName, ok = parsed.Parsed["azureWebCategoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureWebCategoryName", *parsed) - } - - return &id, nil -} - -// ParseAzureWebCategoryIDInsensitively parses 'input' case-insensitively into a AzureWebCategoryId -// note: this method should only be used for API response data and not user input -func ParseAzureWebCategoryIDInsensitively(input string) (*AzureWebCategoryId, error) { - parser := resourceids.NewParserFromResourceIdType(AzureWebCategoryId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AzureWebCategoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.AzureWebCategoryName, ok = parsed.Parsed["azureWebCategoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureWebCategoryName", *parsed) - } - - return &id, nil -} - -// ValidateAzureWebCategoryID checks that 'input' can be parsed as a Azure Web Category ID -func ValidateAzureWebCategoryID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAzureWebCategoryID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Azure Web Category ID -func (id AzureWebCategoryId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/azureWebCategories/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.AzureWebCategoryName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Azure Web Category ID -func (id AzureWebCategoryId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticAzureWebCategories", "azureWebCategories", "azureWebCategories"), - resourceids.UserSpecifiedSegment("azureWebCategoryName", "azureWebCategoryValue"), - } -} - -// String returns a human-readable description of this Azure Web Category ID -func (id AzureWebCategoryId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Azure Web Category Name: %q", id.AzureWebCategoryName), - } - return fmt.Sprintf("Azure Web Category (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-09-01/webcategories/id_azurewebcategory_test.go b/resource-manager/network/2022-09-01/webcategories/id_azurewebcategory_test.go deleted file mode 100644 index e93b1ae03e7..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/id_azurewebcategory_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package webcategories - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AzureWebCategoryId{} - -func TestNewAzureWebCategoryID(t *testing.T) { - id := NewAzureWebCategoryID("12345678-1234-9876-4563-123456789012", "azureWebCategoryValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.AzureWebCategoryName != "azureWebCategoryValue" { - t.Fatalf("Expected %q but got %q for Segment 'AzureWebCategoryName'", id.AzureWebCategoryName, "azureWebCategoryValue") - } -} - -func TestFormatAzureWebCategoryID(t *testing.T) { - actual := NewAzureWebCategoryID("12345678-1234-9876-4563-123456789012", "azureWebCategoryValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseAzureWebCategoryID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AzureWebCategoryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue", - Expected: &AzureWebCategoryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - AzureWebCategoryName: "azureWebCategoryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAzureWebCategoryID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.AzureWebCategoryName != v.Expected.AzureWebCategoryName { - t.Fatalf("Expected %q but got %q for AzureWebCategoryName", v.Expected.AzureWebCategoryName, actual.AzureWebCategoryName) - } - - } -} - -func TestParseAzureWebCategoryIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AzureWebCategoryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReWeBcAtEgOrIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue", - Expected: &AzureWebCategoryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - AzureWebCategoryName: "azureWebCategoryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReWeBcAtEgOrIeS/aZuReWeBcAtEgOrYvAlUe", - Expected: &AzureWebCategoryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - AzureWebCategoryName: "aZuReWeBcAtEgOrYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReWeBcAtEgOrIeS/aZuReWeBcAtEgOrYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAzureWebCategoryIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.AzureWebCategoryName != v.Expected.AzureWebCategoryName { - t.Fatalf("Expected %q but got %q for AzureWebCategoryName", v.Expected.AzureWebCategoryName, actual.AzureWebCategoryName) - } - - } -} - -func TestSegmentsForAzureWebCategoryId(t *testing.T) { - segments := AzureWebCategoryId{}.Segments() - if len(segments) == 0 { - t.Fatalf("AzureWebCategoryId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-09-01/webcategories/method_get.go b/resource-manager/network/2022-09-01/webcategories/method_get.go deleted file mode 100644 index 888ca660ced..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package webcategories - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AzureWebCategory -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c WebCategoriesClient) Get(ctx context.Context, id AzureWebCategoryId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-09-01/webcategories/method_listbysubscription.go b/resource-manager/network/2022-09-01/webcategories/method_listbysubscription.go deleted file mode 100644 index a3f741655b7..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/method_listbysubscription.go +++ /dev/null @@ -1,90 +0,0 @@ -package webcategories - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AzureWebCategory -} - -type ListBySubscriptionCompleteResult struct { - Items []AzureWebCategory -} - -// ListBySubscription ... -func (c WebCategoriesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/azureWebCategories", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AzureWebCategory `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c WebCategoriesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, AzureWebCategoryOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebCategoriesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AzureWebCategoryOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]AzureWebCategory, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-09-01/webcategories/model_azurewebcategory.go b/resource-manager/network/2022-09-01/webcategories/model_azurewebcategory.go deleted file mode 100644 index 81fe8aa1777..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/model_azurewebcategory.go +++ /dev/null @@ -1,12 +0,0 @@ -package webcategories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureWebCategory struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureWebCategoryPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webcategories/model_azurewebcategorypropertiesformat.go b/resource-manager/network/2022-09-01/webcategories/model_azurewebcategorypropertiesformat.go deleted file mode 100644 index 7e327867064..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/model_azurewebcategorypropertiesformat.go +++ /dev/null @@ -1,8 +0,0 @@ -package webcategories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureWebCategoryPropertiesFormat struct { - Group *string `json:"group,omitempty"` -} diff --git a/resource-manager/network/2022-09-01/webcategories/predicates.go b/resource-manager/network/2022-09-01/webcategories/predicates.go deleted file mode 100644 index ab82b0c92b5..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package webcategories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureWebCategoryOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p AzureWebCategoryOperationPredicate) Matches(input AzureWebCategory) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-09-01/webcategories/version.go b/resource-manager/network/2022-09-01/webcategories/version.go deleted file mode 100644 index f363a8b1a0c..00000000000 --- a/resource-manager/network/2022-09-01/webcategories/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package webcategories - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-09-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webcategories/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/README.md b/resource-manager/network/2022-11-01/adminrulecollections/README.md deleted file mode 100644 index acb490fd78f..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/adminrulecollections` Documentation - -The `adminrulecollections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/adminrulecollections" -``` - - -### Client Initialization - -```go -client := adminrulecollections.NewAdminRuleCollectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AdminRuleCollectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := adminrulecollections.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - -payload := adminrulecollections.AdminRuleCollection{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AdminRuleCollectionsClient.Delete` - -```go -ctx := context.TODO() -id := adminrulecollections.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - -if err := client.DeleteThenPoll(ctx, id, adminrulecollections.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `AdminRuleCollectionsClient.Get` - -```go -ctx := context.TODO() -id := adminrulecollections.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AdminRuleCollectionsClient.List` - -```go -ctx := context.TODO() -id := adminrulecollections.NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - -// alternatively `client.List(ctx, id, adminrulecollections.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, adminrulecollections.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/adminrulecollections/client.go b/resource-manager/network/2022-11-01/adminrulecollections/client.go deleted file mode 100644 index 8178e8ff455..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package adminrulecollections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRuleCollectionsClient struct { - Client *resourcemanager.Client -} - -func NewAdminRuleCollectionsClientWithBaseURI(api environments.Api) (*AdminRuleCollectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "adminrulecollections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AdminRuleCollectionsClient: %+v", err) - } - - return &AdminRuleCollectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/constants.go b/resource-manager/network/2022-11-01/adminrulecollections/constants.go deleted file mode 100644 index d3e735bf0f1..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package adminrulecollections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/id_rulecollection.go b/resource-manager/network/2022-11-01/adminrulecollections/id_rulecollection.go deleted file mode 100644 index 49cb86529fd..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/id_rulecollection.go +++ /dev/null @@ -1,153 +0,0 @@ -package adminrulecollections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionId{} - -// RuleCollectionId is a struct representing the Resource ID for a Rule Collection -type RuleCollectionId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string - RuleCollectionName string -} - -// NewRuleCollectionID returns a new RuleCollectionId struct -func NewRuleCollectionID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string, ruleCollectionName string) RuleCollectionId { - return RuleCollectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - RuleCollectionName: ruleCollectionName, - } -} - -// ParseRuleCollectionID parses 'input' into a RuleCollectionId -func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - return &id, nil -} - -// ParseRuleCollectionIDInsensitively parses 'input' case-insensitively into a RuleCollectionId -// note: this method should only be used for API response data and not user input -func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - return &id, nil -} - -// ValidateRuleCollectionID checks that 'input' can be parsed as a Rule Collection ID -func ValidateRuleCollectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRuleCollectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Rule Collection ID -func (id RuleCollectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s/ruleCollections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName, id.RuleCollectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Rule Collection ID -func (id RuleCollectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - resourceids.StaticSegment("staticRuleCollections", "ruleCollections", "ruleCollections"), - resourceids.UserSpecifiedSegment("ruleCollectionName", "ruleCollectionValue"), - } -} - -// String returns a human-readable description of this Rule Collection ID -func (id RuleCollectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - fmt.Sprintf("Rule Collection Name: %q", id.RuleCollectionName), - } - return fmt.Sprintf("Rule Collection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/id_rulecollection_test.go b/resource-manager/network/2022-11-01/adminrulecollections/id_rulecollection_test.go deleted file mode 100644 index 20f37dd74b2..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/id_rulecollection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package adminrulecollections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionId{} - -func TestNewRuleCollectionID(t *testing.T) { - id := NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } - - if id.RuleCollectionName != "ruleCollectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleCollectionName'", id.RuleCollectionName, "ruleCollectionValue") - } -} - -func TestFormatRuleCollectionID(t *testing.T) { - actual := NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRuleCollectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - } -} - -func TestParseRuleCollectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - RuleCollectionName: "rUlEcOlLeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - } -} - -func TestSegmentsForRuleCollectionId(t *testing.T) { - segments := RuleCollectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RuleCollectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/id_securityadminconfiguration.go b/resource-manager/network/2022-11-01/adminrulecollections/id_securityadminconfiguration.go deleted file mode 100644 index 6e36b78776a..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/id_securityadminconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package adminrulecollections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityAdminConfigurationId{} - -// SecurityAdminConfigurationId is a struct representing the Resource ID for a Security Admin Configuration -type SecurityAdminConfigurationId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string -} - -// NewSecurityAdminConfigurationID returns a new SecurityAdminConfigurationId struct -func NewSecurityAdminConfigurationID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string) SecurityAdminConfigurationId { - return SecurityAdminConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - } -} - -// ParseSecurityAdminConfigurationID parses 'input' into a SecurityAdminConfigurationId -func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityAdminConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseSecurityAdminConfigurationIDInsensitively parses 'input' case-insensitively into a SecurityAdminConfigurationId -// note: this method should only be used for API response data and not user input -func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdminConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityAdminConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateSecurityAdminConfigurationID checks that 'input' can be parsed as a Security Admin Configuration ID -func ValidateSecurityAdminConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseSecurityAdminConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Security Admin Configuration ID -func (id SecurityAdminConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Security Admin Configuration ID -func (id SecurityAdminConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - } -} - -// String returns a human-readable description of this Security Admin Configuration ID -func (id SecurityAdminConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - } - return fmt.Sprintf("Security Admin Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/id_securityadminconfiguration_test.go b/resource-manager/network/2022-11-01/adminrulecollections/id_securityadminconfiguration_test.go deleted file mode 100644 index 42b1fad13cd..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/id_securityadminconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package adminrulecollections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityAdminConfigurationId{} - -func TestNewSecurityAdminConfigurationID(t *testing.T) { - id := NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } -} - -func TestFormatSecurityAdminConfigurationID(t *testing.T) { - actual := NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseSecurityAdminConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityAdminConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityAdminConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - } -} - -func TestParseSecurityAdminConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityAdminConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityAdminConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - } -} - -func TestSegmentsForSecurityAdminConfigurationId(t *testing.T) { - segments := SecurityAdminConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("SecurityAdminConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/method_createorupdate.go b/resource-manager/network/2022-11-01/adminrulecollections/method_createorupdate.go deleted file mode 100644 index ac366ae086f..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package adminrulecollections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AdminRuleCollection -} - -// CreateOrUpdate ... -func (c AdminRuleCollectionsClient) CreateOrUpdate(ctx context.Context, id RuleCollectionId, input AdminRuleCollection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/method_delete.go b/resource-manager/network/2022-11-01/adminrulecollections/method_delete.go deleted file mode 100644 index 2a158c78562..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package adminrulecollections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c AdminRuleCollectionsClient) Delete(ctx context.Context, id RuleCollectionId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c AdminRuleCollectionsClient) DeleteThenPoll(ctx context.Context, id RuleCollectionId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/method_get.go b/resource-manager/network/2022-11-01/adminrulecollections/method_get.go deleted file mode 100644 index a1b5a99ad4e..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package adminrulecollections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AdminRuleCollection -} - -// Get ... -func (c AdminRuleCollectionsClient) Get(ctx context.Context, id RuleCollectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/method_list.go b/resource-manager/network/2022-11-01/adminrulecollections/method_list.go deleted file mode 100644 index 2297f469162..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package adminrulecollections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AdminRuleCollection -} - -type ListCompleteResult struct { - Items []AdminRuleCollection -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c AdminRuleCollectionsClient) List(ctx context.Context, id SecurityAdminConfigurationId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ruleCollections", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AdminRuleCollection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c AdminRuleCollectionsClient) ListComplete(ctx context.Context, id SecurityAdminConfigurationId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, AdminRuleCollectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AdminRuleCollectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id SecurityAdminConfigurationId, options ListOperationOptions, predicate AdminRuleCollectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]AdminRuleCollection, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/model_adminrulecollection.go b/resource-manager/network/2022-11-01/adminrulecollections/model_adminrulecollection.go deleted file mode 100644 index aea91d2ba70..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/model_adminrulecollection.go +++ /dev/null @@ -1,17 +0,0 @@ -package adminrulecollections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRuleCollection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AdminRuleCollectionPropertiesFormat `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/model_adminrulecollectionpropertiesformat.go b/resource-manager/network/2022-11-01/adminrulecollections/model_adminrulecollectionpropertiesformat.go deleted file mode 100644 index 864de2165bf..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/model_adminrulecollectionpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package adminrulecollections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRuleCollectionPropertiesFormat struct { - AppliesToGroups []NetworkManagerSecurityGroupItem `json:"appliesToGroups"` - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/model_networkmanagersecuritygroupitem.go b/resource-manager/network/2022-11-01/adminrulecollections/model_networkmanagersecuritygroupitem.go deleted file mode 100644 index ce59c38f4fd..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/model_networkmanagersecuritygroupitem.go +++ /dev/null @@ -1,8 +0,0 @@ -package adminrulecollections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerSecurityGroupItem struct { - NetworkGroupId string `json:"networkGroupId"` -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/predicates.go b/resource-manager/network/2022-11-01/adminrulecollections/predicates.go deleted file mode 100644 index 67b37b95643..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package adminrulecollections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRuleCollectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p AdminRuleCollectionOperationPredicate) Matches(input AdminRuleCollection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/adminrulecollections/version.go b/resource-manager/network/2022-11-01/adminrulecollections/version.go deleted file mode 100644 index 282d3997b83..00000000000 --- a/resource-manager/network/2022-11-01/adminrulecollections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package adminrulecollections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrulecollections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/adminrules/README.md b/resource-manager/network/2022-11-01/adminrules/README.md deleted file mode 100644 index 3dd1947cc4c..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/adminrules` Documentation - -The `adminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/adminrules" -``` - - -### Client Initialization - -```go -client := adminrules.NewAdminRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AdminRulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := adminrules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue") - -payload := adminrules.BaseAdminRule{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AdminRulesClient.Delete` - -```go -ctx := context.TODO() -id := adminrules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue") - -if err := client.DeleteThenPoll(ctx, id, adminrules.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `AdminRulesClient.Get` - -```go -ctx := context.TODO() -id := adminrules.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AdminRulesClient.List` - -```go -ctx := context.TODO() -id := adminrules.NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/adminrules/client.go b/resource-manager/network/2022-11-01/adminrules/client.go deleted file mode 100644 index 30ee4dc30a9..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package adminrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminRulesClient struct { - Client *resourcemanager.Client -} - -func NewAdminRulesClientWithBaseURI(api environments.Api) (*AdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "adminrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AdminRulesClient: %+v", err) - } - - return &AdminRulesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/adminrules/constants.go b/resource-manager/network/2022-11-01/adminrules/constants.go deleted file mode 100644 index fbaa03c5543..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/constants.go +++ /dev/null @@ -1,277 +0,0 @@ -package adminrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixType string - -const ( - AddressPrefixTypeIPPrefix AddressPrefixType = "IPPrefix" - AddressPrefixTypeServiceTag AddressPrefixType = "ServiceTag" -) - -func PossibleValuesForAddressPrefixType() []string { - return []string{ - string(AddressPrefixTypeIPPrefix), - string(AddressPrefixTypeServiceTag), - } -} - -func (s *AddressPrefixType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAddressPrefixType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAddressPrefixType(input string) (*AddressPrefixType, error) { - vals := map[string]AddressPrefixType{ - "ipprefix": AddressPrefixTypeIPPrefix, - "servicetag": AddressPrefixTypeServiceTag, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AddressPrefixType(input) - return &out, nil -} - -type AdminRuleKind string - -const ( - AdminRuleKindCustom AdminRuleKind = "Custom" - AdminRuleKindDefault AdminRuleKind = "Default" -) - -func PossibleValuesForAdminRuleKind() []string { - return []string{ - string(AdminRuleKindCustom), - string(AdminRuleKindDefault), - } -} - -func (s *AdminRuleKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAdminRuleKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAdminRuleKind(input string) (*AdminRuleKind, error) { - vals := map[string]AdminRuleKind{ - "custom": AdminRuleKindCustom, - "default": AdminRuleKindDefault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AdminRuleKind(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityConfigurationRuleAccess string - -const ( - SecurityConfigurationRuleAccessAllow SecurityConfigurationRuleAccess = "Allow" - SecurityConfigurationRuleAccessAlwaysAllow SecurityConfigurationRuleAccess = "AlwaysAllow" - SecurityConfigurationRuleAccessDeny SecurityConfigurationRuleAccess = "Deny" -) - -func PossibleValuesForSecurityConfigurationRuleAccess() []string { - return []string{ - string(SecurityConfigurationRuleAccessAllow), - string(SecurityConfigurationRuleAccessAlwaysAllow), - string(SecurityConfigurationRuleAccessDeny), - } -} - -func (s *SecurityConfigurationRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleAccess(input string) (*SecurityConfigurationRuleAccess, error) { - vals := map[string]SecurityConfigurationRuleAccess{ - "allow": SecurityConfigurationRuleAccessAllow, - "alwaysallow": SecurityConfigurationRuleAccessAlwaysAllow, - "deny": SecurityConfigurationRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleAccess(input) - return &out, nil -} - -type SecurityConfigurationRuleDirection string - -const ( - SecurityConfigurationRuleDirectionInbound SecurityConfigurationRuleDirection = "Inbound" - SecurityConfigurationRuleDirectionOutbound SecurityConfigurationRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityConfigurationRuleDirection() []string { - return []string{ - string(SecurityConfigurationRuleDirectionInbound), - string(SecurityConfigurationRuleDirectionOutbound), - } -} - -func (s *SecurityConfigurationRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleDirection(input string) (*SecurityConfigurationRuleDirection, error) { - vals := map[string]SecurityConfigurationRuleDirection{ - "inbound": SecurityConfigurationRuleDirectionInbound, - "outbound": SecurityConfigurationRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleDirection(input) - return &out, nil -} - -type SecurityConfigurationRuleProtocol string - -const ( - SecurityConfigurationRuleProtocolAh SecurityConfigurationRuleProtocol = "Ah" - SecurityConfigurationRuleProtocolAny SecurityConfigurationRuleProtocol = "Any" - SecurityConfigurationRuleProtocolEsp SecurityConfigurationRuleProtocol = "Esp" - SecurityConfigurationRuleProtocolIcmp SecurityConfigurationRuleProtocol = "Icmp" - SecurityConfigurationRuleProtocolTcp SecurityConfigurationRuleProtocol = "Tcp" - SecurityConfigurationRuleProtocolUdp SecurityConfigurationRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityConfigurationRuleProtocol() []string { - return []string{ - string(SecurityConfigurationRuleProtocolAh), - string(SecurityConfigurationRuleProtocolAny), - string(SecurityConfigurationRuleProtocolEsp), - string(SecurityConfigurationRuleProtocolIcmp), - string(SecurityConfigurationRuleProtocolTcp), - string(SecurityConfigurationRuleProtocolUdp), - } -} - -func (s *SecurityConfigurationRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleProtocol(input string) (*SecurityConfigurationRuleProtocol, error) { - vals := map[string]SecurityConfigurationRuleProtocol{ - "ah": SecurityConfigurationRuleProtocolAh, - "any": SecurityConfigurationRuleProtocolAny, - "esp": SecurityConfigurationRuleProtocolEsp, - "icmp": SecurityConfigurationRuleProtocolIcmp, - "tcp": SecurityConfigurationRuleProtocolTcp, - "udp": SecurityConfigurationRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleProtocol(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/adminrules/id_rule.go b/resource-manager/network/2022-11-01/adminrules/id_rule.go deleted file mode 100644 index d93cbce740e..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/id_rule.go +++ /dev/null @@ -1,166 +0,0 @@ -package adminrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleId{} - -// RuleId is a struct representing the Resource ID for a Rule -type RuleId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string - RuleCollectionName string - RuleName string -} - -// NewRuleID returns a new RuleId struct -func NewRuleID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string, ruleCollectionName string, ruleName string) RuleId { - return RuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - RuleCollectionName: ruleCollectionName, - RuleName: ruleName, - } -} - -// ParseRuleID parses 'input' into a RuleId -func ParseRuleID(input string) (*RuleId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) - } - - return &id, nil -} - -// ParseRuleIDInsensitively parses 'input' case-insensitively into a RuleId -// note: this method should only be used for API response data and not user input -func ParseRuleIDInsensitively(input string) (*RuleId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - if id.RuleName, ok = parsed.Parsed["ruleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleName", *parsed) - } - - return &id, nil -} - -// ValidateRuleID checks that 'input' can be parsed as a Rule ID -func ValidateRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Rule ID -func (id RuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s/ruleCollections/%s/rules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName, id.RuleCollectionName, id.RuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Rule ID -func (id RuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - resourceids.StaticSegment("staticRuleCollections", "ruleCollections", "ruleCollections"), - resourceids.UserSpecifiedSegment("ruleCollectionName", "ruleCollectionValue"), - resourceids.StaticSegment("staticRules", "rules", "rules"), - resourceids.UserSpecifiedSegment("ruleName", "ruleValue"), - } -} - -// String returns a human-readable description of this Rule ID -func (id RuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - fmt.Sprintf("Rule Collection Name: %q", id.RuleCollectionName), - fmt.Sprintf("Rule Name: %q", id.RuleName), - } - return fmt.Sprintf("Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/adminrules/id_rule_test.go b/resource-manager/network/2022-11-01/adminrules/id_rule_test.go deleted file mode 100644 index e263320ba6d..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/id_rule_test.go +++ /dev/null @@ -1,417 +0,0 @@ -package adminrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleId{} - -func TestNewRuleID(t *testing.T) { - id := NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } - - if id.RuleCollectionName != "ruleCollectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleCollectionName'", id.RuleCollectionName, "ruleCollectionValue") - } - - if id.RuleName != "ruleValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleName'", id.RuleName, "ruleValue") - } -} - -func TestFormatRuleID(t *testing.T) { - actual := NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue", "ruleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue", - Expected: &RuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - RuleName: "ruleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - if actual.RuleName != v.Expected.RuleName { - t.Fatalf("Expected %q but got %q for RuleName", v.Expected.RuleName, actual.RuleName) - } - - } -} - -func TestParseRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/rUlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue", - Expected: &RuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - RuleName: "ruleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/rules/ruleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/rUlEs/rUlEvAlUe", - Expected: &RuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - RuleCollectionName: "rUlEcOlLeCtIoNvAlUe", - RuleName: "rUlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/rUlEs/rUlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - if actual.RuleName != v.Expected.RuleName { - t.Fatalf("Expected %q but got %q for RuleName", v.Expected.RuleName, actual.RuleName) - } - - } -} - -func TestSegmentsForRuleId(t *testing.T) { - segments := RuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/adminrules/id_rulecollection.go b/resource-manager/network/2022-11-01/adminrules/id_rulecollection.go deleted file mode 100644 index 1cdbb320880..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/id_rulecollection.go +++ /dev/null @@ -1,153 +0,0 @@ -package adminrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionId{} - -// RuleCollectionId is a struct representing the Resource ID for a Rule Collection -type RuleCollectionId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string - RuleCollectionName string -} - -// NewRuleCollectionID returns a new RuleCollectionId struct -func NewRuleCollectionID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string, ruleCollectionName string) RuleCollectionId { - return RuleCollectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - RuleCollectionName: ruleCollectionName, - } -} - -// ParseRuleCollectionID parses 'input' into a RuleCollectionId -func ParseRuleCollectionID(input string) (*RuleCollectionId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - return &id, nil -} - -// ParseRuleCollectionIDInsensitively parses 'input' case-insensitively into a RuleCollectionId -// note: this method should only be used for API response data and not user input -func ParseRuleCollectionIDInsensitively(input string) (*RuleCollectionId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - if id.RuleCollectionName, ok = parsed.Parsed["ruleCollectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionName", *parsed) - } - - return &id, nil -} - -// ValidateRuleCollectionID checks that 'input' can be parsed as a Rule Collection ID -func ValidateRuleCollectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRuleCollectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Rule Collection ID -func (id RuleCollectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s/ruleCollections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName, id.RuleCollectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Rule Collection ID -func (id RuleCollectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - resourceids.StaticSegment("staticRuleCollections", "ruleCollections", "ruleCollections"), - resourceids.UserSpecifiedSegment("ruleCollectionName", "ruleCollectionValue"), - } -} - -// String returns a human-readable description of this Rule Collection ID -func (id RuleCollectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - fmt.Sprintf("Rule Collection Name: %q", id.RuleCollectionName), - } - return fmt.Sprintf("Rule Collection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/adminrules/id_rulecollection_test.go b/resource-manager/network/2022-11-01/adminrules/id_rulecollection_test.go deleted file mode 100644 index 36b3eacf798..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/id_rulecollection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package adminrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionId{} - -func TestNewRuleCollectionID(t *testing.T) { - id := NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } - - if id.RuleCollectionName != "ruleCollectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleCollectionName'", id.RuleCollectionName, "ruleCollectionValue") - } -} - -func TestFormatRuleCollectionID(t *testing.T) { - actual := NewRuleCollectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue", "ruleCollectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRuleCollectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - } -} - -func TestParseRuleCollectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - RuleCollectionName: "ruleCollectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/ruleCollections/ruleCollectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe", - Expected: &RuleCollectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - RuleCollectionName: "rUlEcOlLeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/rUlEcOlLeCtIoNs/rUlEcOlLeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - if actual.RuleCollectionName != v.Expected.RuleCollectionName { - t.Fatalf("Expected %q but got %q for RuleCollectionName", v.Expected.RuleCollectionName, actual.RuleCollectionName) - } - - } -} - -func TestSegmentsForRuleCollectionId(t *testing.T) { - segments := RuleCollectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RuleCollectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/adminrules/method_createorupdate.go b/resource-manager/network/2022-11-01/adminrules/method_createorupdate.go deleted file mode 100644 index d936a5666f1..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/method_createorupdate.go +++ /dev/null @@ -1,63 +0,0 @@ -package adminrules - -import ( - "context" - "encoding/json" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BaseAdminRule -} - -// CreateOrUpdate ... -func (c AdminRulesClient) CreateOrUpdate(ctx context.Context, id RuleId, input BaseAdminRule) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var respObj json.RawMessage - if err = resp.Unmarshal(&respObj); err != nil { - return - } - model, err := unmarshalBaseAdminRuleImplementation(respObj) - if err != nil { - return - } - result.Model = &model - - return -} diff --git a/resource-manager/network/2022-11-01/adminrules/method_delete.go b/resource-manager/network/2022-11-01/adminrules/method_delete.go deleted file mode 100644 index 6d7b0f948b8..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package adminrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c AdminRulesClient) Delete(ctx context.Context, id RuleId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c AdminRulesClient) DeleteThenPoll(ctx context.Context, id RuleId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/adminrules/method_get.go b/resource-manager/network/2022-11-01/adminrules/method_get.go deleted file mode 100644 index 94337a0e139..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/method_get.go +++ /dev/null @@ -1,58 +0,0 @@ -package adminrules - -import ( - "context" - "encoding/json" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BaseAdminRule -} - -// Get ... -func (c AdminRulesClient) Get(ctx context.Context, id RuleId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var respObj json.RawMessage - if err = resp.Unmarshal(&respObj); err != nil { - return - } - model, err := unmarshalBaseAdminRuleImplementation(respObj) - if err != nil { - return - } - result.Model = &model - - return -} diff --git a/resource-manager/network/2022-11-01/adminrules/method_list.go b/resource-manager/network/2022-11-01/adminrules/method_list.go deleted file mode 100644 index d4c3de156b2..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package adminrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BaseAdminRule -} - -type ListCompleteResult struct { - Items []BaseAdminRule -} - -// List ... -func (c AdminRulesClient) List(ctx context.Context, id RuleCollectionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/rules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BaseAdminRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c AdminRulesClient) ListComplete(ctx context.Context, id RuleCollectionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, BaseAdminRuleOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AdminRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id RuleCollectionId, predicate BaseAdminRuleOperationPredicate) (result ListCompleteResult, err error) { - items := make([]BaseAdminRule, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/adminrules/model_addressprefixitem.go b/resource-manager/network/2022-11-01/adminrules/model_addressprefixitem.go deleted file mode 100644 index 223aec22448..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/model_addressprefixitem.go +++ /dev/null @@ -1,9 +0,0 @@ -package adminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixItem struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixType *AddressPrefixType `json:"addressPrefixType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/adminrules/model_adminpropertiesformat.go b/resource-manager/network/2022-11-01/adminrules/model_adminpropertiesformat.go deleted file mode 100644 index 94884de7b5a..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/model_adminpropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package adminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminPropertiesFormat struct { - Access SecurityConfigurationRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction SecurityConfigurationRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityConfigurationRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/adminrules/model_adminrule.go b/resource-manager/network/2022-11-01/adminrules/model_adminrule.go deleted file mode 100644 index 8544cf3cd71..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/model_adminrule.go +++ /dev/null @@ -1,48 +0,0 @@ -package adminrules - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ BaseAdminRule = AdminRule{} - -type AdminRule struct { - Properties *AdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from BaseAdminRule - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = AdminRule{} - -func (s AdminRule) MarshalJSON() ([]byte, error) { - type wrapper AdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling AdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling AdminRule: %+v", err) - } - decoded["kind"] = "Custom" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling AdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-11-01/adminrules/model_baseadminrule.go b/resource-manager/network/2022-11-01/adminrules/model_baseadminrule.go deleted file mode 100644 index 3472014d9a8..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/model_baseadminrule.go +++ /dev/null @@ -1,56 +0,0 @@ -package adminrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BaseAdminRule interface { -} - -func unmarshalBaseAdminRuleImplementation(input []byte) (BaseAdminRule, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling BaseAdminRule into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Custom") { - var out AdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into AdminRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Default") { - var out DefaultAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into DefaultAdminRule: %+v", err) - } - return out, nil - } - - type RawBaseAdminRuleImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawBaseAdminRuleImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-11-01/adminrules/model_defaultadminpropertiesformat.go b/resource-manager/network/2022-11-01/adminrules/model_defaultadminpropertiesformat.go deleted file mode 100644 index e2236833f23..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/model_defaultadminpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package adminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultAdminPropertiesFormat struct { - Access *SecurityConfigurationRuleAccess `json:"access,omitempty"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction *SecurityConfigurationRuleDirection `json:"direction,omitempty"` - Flag *string `json:"flag,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *SecurityConfigurationRuleProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/adminrules/model_defaultadminrule.go b/resource-manager/network/2022-11-01/adminrules/model_defaultadminrule.go deleted file mode 100644 index 7a93ae7edc9..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/model_defaultadminrule.go +++ /dev/null @@ -1,48 +0,0 @@ -package adminrules - -import ( - "encoding/json" - "fmt" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ BaseAdminRule = DefaultAdminRule{} - -type DefaultAdminRule struct { - Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from BaseAdminRule - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} - -var _ json.Marshaler = DefaultAdminRule{} - -func (s DefaultAdminRule) MarshalJSON() ([]byte, error) { - type wrapper DefaultAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling DefaultAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling DefaultAdminRule: %+v", err) - } - decoded["kind"] = "Default" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling DefaultAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-11-01/adminrules/predicates.go b/resource-manager/network/2022-11-01/adminrules/predicates.go deleted file mode 100644 index f594b9ac1be..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/predicates.go +++ /dev/null @@ -1,12 +0,0 @@ -package adminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BaseAdminRuleOperationPredicate struct { -} - -func (p BaseAdminRuleOperationPredicate) Matches(input BaseAdminRule) bool { - - return true -} diff --git a/resource-manager/network/2022-11-01/adminrules/version.go b/resource-manager/network/2022-11-01/adminrules/version.go deleted file mode 100644 index db2599b26fe..00000000000 --- a/resource-manager/network/2022-11-01/adminrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package adminrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/adminrules/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/README.md b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/README.md deleted file mode 100644 index 64a83db84e2..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections` Documentation - -The `applicationgatewayprivateendpointconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections" -``` - - -### Client Initialization - -```go -client := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationGatewayPrivateEndpointConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewayPrivateEndpointConnectionsClient.Get` - -```go -ctx := context.TODO() -id := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewayPrivateEndpointConnectionsClient.List` - -```go -ctx := context.TODO() -id := applicationgatewayprivateendpointconnections.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewayPrivateEndpointConnectionsClient.Update` - -```go -ctx := context.TODO() -id := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue") - -payload := applicationgatewayprivateendpointconnections.ApplicationGatewayPrivateEndpointConnection{ - // ... -} - - -if err := client.UpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/client.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/client.go deleted file mode 100644 index 82e12c872f2..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(api environments.Api) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationgatewayprivateendpointconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateEndpointConnectionsClient: %+v", err) - } - - return &ApplicationGatewayPrivateEndpointConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/constants.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/constants.go deleted file mode 100644 index d95cbff29de..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go deleted file mode 100644 index 58498d25a2c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -// ApplicationGatewayId is a struct representing the Resource ID for a Application Gateway -type ApplicationGatewayId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayName string -} - -// NewApplicationGatewayID returns a new ApplicationGatewayId struct -func NewApplicationGatewayID(subscriptionId string, resourceGroupName string, applicationGatewayName string) ApplicationGatewayId { - return ApplicationGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayName: applicationGatewayName, - } -} - -// ParseApplicationGatewayID parses 'input' into a ApplicationGatewayId -func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID -func ValidateApplicationGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway ID -func (id ApplicationGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway ID -func (id ApplicationGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGateways", "applicationGateways", "applicationGateways"), - resourceids.UserSpecifiedSegment("applicationGatewayName", "applicationGatewayValue"), - } -} - -// String returns a human-readable description of this Application Gateway ID -func (id ApplicationGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Name: %q", id.ApplicationGatewayName), - } - return fmt.Sprintf("Application Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway_test.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway_test.go deleted file mode 100644 index e8baf7e3bed..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -func TestNewApplicationGatewayID(t *testing.T) { - id := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayName != "applicationGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayName'", id.ApplicationGatewayName, "applicationGatewayValue") - } -} - -func TestFormatApplicationGatewayID(t *testing.T) { - actual := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestParseApplicationGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayName: "aPpLiCaTiOnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestSegmentsForApplicationGatewayId(t *testing.T) { - segments := ApplicationGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go deleted file mode 100644 index 16e2175839e..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayPrivateEndpointConnectionId{} - -// ApplicationGatewayPrivateEndpointConnectionId is a struct representing the Resource ID for a Application Gateway Private Endpoint Connection -type ApplicationGatewayPrivateEndpointConnectionId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayName string - PrivateEndpointConnectionName string -} - -// NewApplicationGatewayPrivateEndpointConnectionID returns a new ApplicationGatewayPrivateEndpointConnectionId struct -func NewApplicationGatewayPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, applicationGatewayName string, privateEndpointConnectionName string) ApplicationGatewayPrivateEndpointConnectionId { - return ApplicationGatewayPrivateEndpointConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayName: applicationGatewayName, - PrivateEndpointConnectionName: privateEndpointConnectionName, - } -} - -// ParseApplicationGatewayPrivateEndpointConnectionID parses 'input' into a ApplicationGatewayPrivateEndpointConnectionId -func ParseApplicationGatewayPrivateEndpointConnectionID(input string) (*ApplicationGatewayPrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayPrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayPrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayPrivateEndpointConnectionId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(input string) (*ApplicationGatewayPrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayPrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayPrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayPrivateEndpointConnectionID checks that 'input' can be parsed as a Application Gateway Private Endpoint Connection ID -func ValidateApplicationGatewayPrivateEndpointConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayPrivateEndpointConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway Private Endpoint Connection ID -func (id ApplicationGatewayPrivateEndpointConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGateways/%s/privateEndpointConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayName, id.PrivateEndpointConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway Private Endpoint Connection ID -func (id ApplicationGatewayPrivateEndpointConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGateways", "applicationGateways", "applicationGateways"), - resourceids.UserSpecifiedSegment("applicationGatewayName", "applicationGatewayValue"), - resourceids.StaticSegment("staticPrivateEndpointConnections", "privateEndpointConnections", "privateEndpointConnections"), - resourceids.UserSpecifiedSegment("privateEndpointConnectionName", "privateEndpointConnectionValue"), - } -} - -// String returns a human-readable description of this Application Gateway Private Endpoint Connection ID -func (id ApplicationGatewayPrivateEndpointConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Name: %q", id.ApplicationGatewayName), - fmt.Sprintf("Private Endpoint Connection Name: %q", id.PrivateEndpointConnectionName), - } - return fmt.Sprintf("Application Gateway Private Endpoint Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection_test.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection_test.go deleted file mode 100644 index e6562f722ae..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/id_applicationgatewayprivateendpointconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayPrivateEndpointConnectionId{} - -func TestNewApplicationGatewayPrivateEndpointConnectionID(t *testing.T) { - id := NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayName != "applicationGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayName'", id.ApplicationGatewayName, "applicationGatewayValue") - } - - if id.PrivateEndpointConnectionName != "privateEndpointConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointConnectionName'", id.PrivateEndpointConnectionName, "privateEndpointConnectionValue") - } -} - -func TestFormatApplicationGatewayPrivateEndpointConnectionID(t *testing.T) { - actual := NewApplicationGatewayPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue", "privateEndpointConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayPrivateEndpointConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayPrivateEndpointConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue", - Expected: &ApplicationGatewayPrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - PrivateEndpointConnectionName: "privateEndpointConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayPrivateEndpointConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { - t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) - } - - } -} - -func TestParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayPrivateEndpointConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue", - Expected: &ApplicationGatewayPrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - PrivateEndpointConnectionName: "privateEndpointConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/privateEndpointConnections/privateEndpointConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", - Expected: &ApplicationGatewayPrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayName: "aPpLiCaTiOnGaTeWaYvAlUe", - PrivateEndpointConnectionName: "pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayPrivateEndpointConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { - t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) - } - - } -} - -func TestSegmentsForApplicationGatewayPrivateEndpointConnectionId(t *testing.T) { - segments := ApplicationGatewayPrivateEndpointConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayPrivateEndpointConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_delete.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_delete.go deleted file mode 100644 index 8a25d1654cc..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ApplicationGatewayPrivateEndpointConnectionsClient) Delete(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ApplicationGatewayPrivateEndpointConnectionsClient) DeleteThenPoll(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_get.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_get.go deleted file mode 100644 index c31c10b3d01..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayPrivateEndpointConnection -} - -// Get ... -func (c ApplicationGatewayPrivateEndpointConnectionsClient) Get(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_list.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_list.go deleted file mode 100644 index 13311f9760f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGatewayPrivateEndpointConnection -} - -type ListCompleteResult struct { - Items []ApplicationGatewayPrivateEndpointConnection -} - -// List ... -func (c ApplicationGatewayPrivateEndpointConnectionsClient) List(ctx context.Context, id ApplicationGatewayId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateEndpointConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGatewayPrivateEndpointConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ApplicationGatewayPrivateEndpointConnectionsClient) ListComplete(ctx context.Context, id ApplicationGatewayId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationGatewayPrivateEndpointConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewayPrivateEndpointConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationGatewayId, predicate ApplicationGatewayPrivateEndpointConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ApplicationGatewayPrivateEndpointConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_update.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_update.go deleted file mode 100644 index 09429f50bf3..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/method_update.go +++ /dev/null @@ -1,74 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Update ... -func (c ApplicationGatewayPrivateEndpointConnectionsClient) Update(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId, input ApplicationGatewayPrivateEndpointConnection) (result UpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateThenPoll performs Update then polls until it's completed -func (c ApplicationGatewayPrivateEndpointConnectionsClient) UpdateThenPoll(ctx context.Context, id ApplicationGatewayPrivateEndpointConnectionId, input ApplicationGatewayPrivateEndpointConnection) error { - result, err := c.Update(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Update: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Update: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 19262bd584a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 049337217fe..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 508dc9994b4..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 89d75010a65..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 5d46fc4d14d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnection.go deleted file mode 100644 index 899ea09f853..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnectionproperties.go deleted file mode 100644 index 19f24417e8b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationgatewayprivateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygroup.go deleted file mode 100644 index 6cfad393dcc..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index f494b4f811b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_backendaddresspool.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_backendaddresspool.go deleted file mode 100644 index f5906c781bd..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 3877d225eb8..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 0e7c2876d57..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ddossettings.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ddossettings.go deleted file mode 100644 index 84bb3713a5f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_delegation.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_delegation.go deleted file mode 100644 index db8d3269de6..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlog.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlog.go deleted file mode 100644 index b3f068af815..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlogformatparameters.go deleted file mode 100644 index 0b6831f6fa6..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlogpropertiesformat.go deleted file mode 100644 index 922ced2b2f1..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_frontendipconfiguration.go deleted file mode 100644 index 5d4f44391e7..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index f8184b617b0..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index d1d69ce0587..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_inboundnatrule.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_inboundnatrule.go deleted file mode 100644 index a9b0e096bd3..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 30f69829656..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfiguration.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfiguration.go deleted file mode 100644 index 38591b7aaa2..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofile.go deleted file mode 100644 index a118ebdd4e1..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 75728fa1ebe..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index b2f70477897..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_iptag.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_iptag.go deleted file mode 100644 index c1aef66c21f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddress.go deleted file mode 100644 index 7c55794d5db..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 786682fa462..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgateway.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgateway.go deleted file mode 100644 index f7258d97962..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgatewaypropertiesformat.go deleted file mode 100644 index 7384cd2e1a6..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgatewaysku.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgatewaysku.go deleted file mode 100644 index 17af8527640..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natruleportmapping.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natruleportmapping.go deleted file mode 100644 index d1f6b522fcc..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterface.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterface.go deleted file mode 100644 index 27dd4a4a08a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacednssettings.go deleted file mode 100644 index 6b7723bb374..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 5b9d0f918bf..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index fc79de05a6f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 96eeeb31d67..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 4b7b529ab7d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 54a119f8358..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 2812f9ea959..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networksecuritygroup.go deleted file mode 100644 index cb2c6128022..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 2ec03e22f7c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpoint.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpoint.go deleted file mode 100644 index c59c28f78d1..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointconnection.go deleted file mode 100644 index ad89494737c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointconnectionproperties.go deleted file mode 100644 index f1877976742..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfiguration.go deleted file mode 100644 index bd3c50f01ac..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index f3ec0dcc86e..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointproperties.go deleted file mode 100644 index d7be5354bcd..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkservice.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkservice.go deleted file mode 100644 index 78a6c7ebba8..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnection.go deleted file mode 100644 index 5cc8a8e4dbf..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 461fb1081a9..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 6be96efd9df..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 3c19c2d4de4..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index c81dae99663..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceproperties.go deleted file mode 100644 index dc3f962814c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddress.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddress.go deleted file mode 100644 index e89345d55bc..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddressdnssettings.go deleted file mode 100644 index 38e3265c5cf..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddresspropertiesformat.go deleted file mode 100644 index f699284c895..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddresssku.go deleted file mode 100644 index b74d0311a75..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlink.go deleted file mode 100644 index 0274f951e3c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlinkformat.go deleted file mode 100644 index 4182988a892..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourceset.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourceset.go deleted file mode 100644 index 075d9853046..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_retentionpolicyparameters.go deleted file mode 100644 index 2b030c17554..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_route.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_route.go deleted file mode 100644 index 939f9379822..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routepropertiesformat.go deleted file mode 100644 index 4afa3c6bed4..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routetable.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routetable.go deleted file mode 100644 index 8a1cf00052b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routetablepropertiesformat.go deleted file mode 100644 index c3a2020ea09..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_securityrule.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_securityrule.go deleted file mode 100644 index e892509d682..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_securityrulepropertiesformat.go deleted file mode 100644 index ad268f42e3d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceassociationlink.go deleted file mode 100644 index 208a786f7a0..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index eaf8e403c15..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_servicedelegationpropertiesformat.go deleted file mode 100644 index a8da5cf7bca..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicy.go deleted file mode 100644 index 0871d765423..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 9051f5afd03..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index c8f3720498a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 27a0c5e36ce..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpropertiesformat.go deleted file mode 100644 index fa1f92d606a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subnet.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subnet.go deleted file mode 100644 index 315bdbd9d59..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subnetpropertiesformat.go deleted file mode 100644 index 7d4289b8ec2..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subresource.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subresource.go deleted file mode 100644 index 7cea1d49c02..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 860948a52b3..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsproperties.go deleted file mode 100644 index 92e4c14749f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_virtualnetworktap.go deleted file mode 100644 index 7c49436256c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 131405acb48..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/predicates.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/predicates.go deleted file mode 100644 index 46757c5239b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package applicationgatewayprivateendpointconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ApplicationGatewayPrivateEndpointConnectionOperationPredicate) Matches(input ApplicationGatewayPrivateEndpointConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/version.go b/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/version.go deleted file mode 100644 index 28fef387dae..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivateendpointconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivateendpointconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/README.md b/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/README.md deleted file mode 100644 index 82df76eeb07..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources` Documentation - -The `applicationgatewayprivatelinkresources` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources" -``` - - -### Client Initialization - -```go -client := applicationgatewayprivatelinkresources.NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationGatewayPrivateLinkResourcesClient.List` - -```go -ctx := context.TODO() -id := applicationgatewayprivatelinkresources.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/client.go b/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/client.go deleted file mode 100644 index 6e8b9365411..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgatewayprivatelinkresources - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkResourcesClient struct { - Client *resourcemanager.Client -} - -func NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(api environments.Api) (*ApplicationGatewayPrivateLinkResourcesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationgatewayprivatelinkresources", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationGatewayPrivateLinkResourcesClient: %+v", err) - } - - return &ApplicationGatewayPrivateLinkResourcesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/id_applicationgateway.go b/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/id_applicationgateway.go deleted file mode 100644 index 6a994cbbf56..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/id_applicationgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package applicationgatewayprivatelinkresources - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -// ApplicationGatewayId is a struct representing the Resource ID for a Application Gateway -type ApplicationGatewayId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayName string -} - -// NewApplicationGatewayID returns a new ApplicationGatewayId struct -func NewApplicationGatewayID(subscriptionId string, resourceGroupName string, applicationGatewayName string) ApplicationGatewayId { - return ApplicationGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayName: applicationGatewayName, - } -} - -// ParseApplicationGatewayID parses 'input' into a ApplicationGatewayId -func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID -func ValidateApplicationGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway ID -func (id ApplicationGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway ID -func (id ApplicationGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGateways", "applicationGateways", "applicationGateways"), - resourceids.UserSpecifiedSegment("applicationGatewayName", "applicationGatewayValue"), - } -} - -// String returns a human-readable description of this Application Gateway ID -func (id ApplicationGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Name: %q", id.ApplicationGatewayName), - } - return fmt.Sprintf("Application Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/id_applicationgateway_test.go b/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/id_applicationgateway_test.go deleted file mode 100644 index 78a1ddf3e53..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/id_applicationgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package applicationgatewayprivatelinkresources - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -func TestNewApplicationGatewayID(t *testing.T) { - id := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayName != "applicationGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayName'", id.ApplicationGatewayName, "applicationGatewayValue") - } -} - -func TestFormatApplicationGatewayID(t *testing.T) { - actual := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestParseApplicationGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayName: "aPpLiCaTiOnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestSegmentsForApplicationGatewayId(t *testing.T) { - segments := ApplicationGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/method_list.go b/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/method_list.go deleted file mode 100644 index 25fbc771c8a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package applicationgatewayprivatelinkresources - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGatewayPrivateLinkResource -} - -type ListCompleteResult struct { - Items []ApplicationGatewayPrivateLinkResource -} - -// List ... -func (c ApplicationGatewayPrivateLinkResourcesClient) List(ctx context.Context, id ApplicationGatewayId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateLinkResources", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGatewayPrivateLinkResource `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ApplicationGatewayPrivateLinkResourcesClient) ListComplete(ctx context.Context, id ApplicationGatewayId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationGatewayPrivateLinkResourceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewayPrivateLinkResourcesClient) ListCompleteMatchingPredicate(ctx context.Context, id ApplicationGatewayId, predicate ApplicationGatewayPrivateLinkResourceOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ApplicationGatewayPrivateLinkResource, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresource.go b/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresource.go deleted file mode 100644 index c3c4b5afa06..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresource.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivatelinkresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkResource struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkResourceProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresourceproperties.go b/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresourceproperties.go deleted file mode 100644 index 0f4b9748324..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/model_applicationgatewayprivatelinkresourceproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewayprivatelinkresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkResourceProperties struct { - GroupId *string `json:"groupId,omitempty"` - RequiredMembers *[]string `json:"requiredMembers,omitempty"` - RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/predicates.go b/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/predicates.go deleted file mode 100644 index e93c21bb751..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package applicationgatewayprivatelinkresources - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkResourceOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ApplicationGatewayPrivateLinkResourceOperationPredicate) Matches(input ApplicationGatewayPrivateLinkResource) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/version.go b/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/version.go deleted file mode 100644 index f29f925a2a8..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewayprivatelinkresources - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewayprivatelinkresources/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/README.md b/resource-manager/network/2022-11-01/applicationgateways/README.md deleted file mode 100644 index 9034e34f126..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/README.md +++ /dev/null @@ -1,286 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgateways` Documentation - -The `applicationgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgateways" -``` - - -### Client Initialization - -```go -client := applicationgateways.NewApplicationGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationGatewaysClient.BackendHealth` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.BackendHealthThenPoll(ctx, id, applicationgateways.DefaultBackendHealthOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.BackendHealthOnDemand` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -payload := applicationgateways.ApplicationGatewayOnDemandProbe{ - // ... -} - - -if err := client.BackendHealthOnDemandThenPoll(ctx, id, payload, applicationgateways.DefaultBackendHealthOnDemandOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -payload := applicationgateways.ApplicationGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Get` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.GetSslPredefinedPolicy` - -```go -ctx := context.TODO() -id := applicationgateways.NewPredefinedPolicyID("12345678-1234-9876-4563-123456789012", "predefinedPolicyValue") - -read, err := client.GetSslPredefinedPolicy(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.List` - -```go -ctx := context.TODO() -id := applicationgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAll` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableRequestHeaders` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableRequestHeaders(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableResponseHeaders` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableResponseHeaders(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableServerVariables` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableServerVariables(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableSslOptions` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableSslOptions(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAvailableSslPredefinedPolicies(ctx, id)` can be used to do batched pagination -items, err := client.ListAvailableSslPredefinedPoliciesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationGatewaysClient.ListAvailableWafRuleSets` - -```go -ctx := context.TODO() -id := applicationgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAvailableWafRuleSets(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Start` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.Stop` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := applicationgateways.NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - -payload := applicationgateways.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/applicationgateways/client.go b/resource-manager/network/2022-11-01/applicationgateways/client.go deleted file mode 100644 index eeadef05934..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewApplicationGatewaysClientWithBaseURI(api environments.Api) (*ApplicationGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationgateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationGatewaysClient: %+v", err) - } - - return &ApplicationGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/constants.go b/resource-manager/network/2022-11-01/applicationgateways/constants.go deleted file mode 100644 index e2aea52bdb5..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/constants.go +++ /dev/null @@ -1,2075 +0,0 @@ -package applicationgateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthServerHealth string - -const ( - ApplicationGatewayBackendHealthServerHealthDown ApplicationGatewayBackendHealthServerHealth = "Down" - ApplicationGatewayBackendHealthServerHealthDraining ApplicationGatewayBackendHealthServerHealth = "Draining" - ApplicationGatewayBackendHealthServerHealthPartial ApplicationGatewayBackendHealthServerHealth = "Partial" - ApplicationGatewayBackendHealthServerHealthUnknown ApplicationGatewayBackendHealthServerHealth = "Unknown" - ApplicationGatewayBackendHealthServerHealthUp ApplicationGatewayBackendHealthServerHealth = "Up" -) - -func PossibleValuesForApplicationGatewayBackendHealthServerHealth() []string { - return []string{ - string(ApplicationGatewayBackendHealthServerHealthDown), - string(ApplicationGatewayBackendHealthServerHealthDraining), - string(ApplicationGatewayBackendHealthServerHealthPartial), - string(ApplicationGatewayBackendHealthServerHealthUnknown), - string(ApplicationGatewayBackendHealthServerHealthUp), - } -} - -func (s *ApplicationGatewayBackendHealthServerHealth) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayBackendHealthServerHealth(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayBackendHealthServerHealth(input string) (*ApplicationGatewayBackendHealthServerHealth, error) { - vals := map[string]ApplicationGatewayBackendHealthServerHealth{ - "down": ApplicationGatewayBackendHealthServerHealthDown, - "draining": ApplicationGatewayBackendHealthServerHealthDraining, - "partial": ApplicationGatewayBackendHealthServerHealthPartial, - "unknown": ApplicationGatewayBackendHealthServerHealthUnknown, - "up": ApplicationGatewayBackendHealthServerHealthUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayBackendHealthServerHealth(input) - return &out, nil -} - -type ApplicationGatewayClientRevocationOptions string - -const ( - ApplicationGatewayClientRevocationOptionsNone ApplicationGatewayClientRevocationOptions = "None" - ApplicationGatewayClientRevocationOptionsOCSP ApplicationGatewayClientRevocationOptions = "OCSP" -) - -func PossibleValuesForApplicationGatewayClientRevocationOptions() []string { - return []string{ - string(ApplicationGatewayClientRevocationOptionsNone), - string(ApplicationGatewayClientRevocationOptionsOCSP), - } -} - -func (s *ApplicationGatewayClientRevocationOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayClientRevocationOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayClientRevocationOptions(input string) (*ApplicationGatewayClientRevocationOptions, error) { - vals := map[string]ApplicationGatewayClientRevocationOptions{ - "none": ApplicationGatewayClientRevocationOptionsNone, - "ocsp": ApplicationGatewayClientRevocationOptionsOCSP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayClientRevocationOptions(input) - return &out, nil -} - -type ApplicationGatewayCookieBasedAffinity string - -const ( - ApplicationGatewayCookieBasedAffinityDisabled ApplicationGatewayCookieBasedAffinity = "Disabled" - ApplicationGatewayCookieBasedAffinityEnabled ApplicationGatewayCookieBasedAffinity = "Enabled" -) - -func PossibleValuesForApplicationGatewayCookieBasedAffinity() []string { - return []string{ - string(ApplicationGatewayCookieBasedAffinityDisabled), - string(ApplicationGatewayCookieBasedAffinityEnabled), - } -} - -func (s *ApplicationGatewayCookieBasedAffinity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCookieBasedAffinity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCookieBasedAffinity(input string) (*ApplicationGatewayCookieBasedAffinity, error) { - vals := map[string]ApplicationGatewayCookieBasedAffinity{ - "disabled": ApplicationGatewayCookieBasedAffinityDisabled, - "enabled": ApplicationGatewayCookieBasedAffinityEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCookieBasedAffinity(input) - return &out, nil -} - -type ApplicationGatewayCustomErrorStatusCode string - -const ( - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred ApplicationGatewayCustomErrorStatusCode = "HttpStatus500" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour ApplicationGatewayCustomErrorStatusCode = "HttpStatus504" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree ApplicationGatewayCustomErrorStatusCode = "HttpStatus503" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred ApplicationGatewayCustomErrorStatusCode = "HttpStatus400" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine ApplicationGatewayCustomErrorStatusCode = "HttpStatus499" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight ApplicationGatewayCustomErrorStatusCode = "HttpStatus408" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive ApplicationGatewayCustomErrorStatusCode = "HttpStatus405" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour ApplicationGatewayCustomErrorStatusCode = "HttpStatus404" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" -) - -func PossibleValuesForApplicationGatewayCustomErrorStatusCode() []string { - return []string{ - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree), - } -} - -func (s *ApplicationGatewayCustomErrorStatusCode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCustomErrorStatusCode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCustomErrorStatusCode(input string) (*ApplicationGatewayCustomErrorStatusCode, error) { - vals := map[string]ApplicationGatewayCustomErrorStatusCode{ - "httpstatus500": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred, - "httpstatus504": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour, - "httpstatus503": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree, - "httpstatus502": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo, - "httpstatus400": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred, - "httpstatus499": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine, - "httpstatus408": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight, - "httpstatus405": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive, - "httpstatus404": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour, - "httpstatus403": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCustomErrorStatusCode(input) - return &out, nil -} - -type ApplicationGatewayFirewallMode string - -const ( - ApplicationGatewayFirewallModeDetection ApplicationGatewayFirewallMode = "Detection" - ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = "Prevention" -) - -func PossibleValuesForApplicationGatewayFirewallMode() []string { - return []string{ - string(ApplicationGatewayFirewallModeDetection), - string(ApplicationGatewayFirewallModePrevention), - } -} - -func (s *ApplicationGatewayFirewallMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayFirewallMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayFirewallMode(input string) (*ApplicationGatewayFirewallMode, error) { - vals := map[string]ApplicationGatewayFirewallMode{ - "detection": ApplicationGatewayFirewallModeDetection, - "prevention": ApplicationGatewayFirewallModePrevention, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayFirewallMode(input) - return &out, nil -} - -type ApplicationGatewayLoadDistributionAlgorithm string - -const ( - ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = "IpHash" - ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = "LeastConnections" - ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = "RoundRobin" -) - -func PossibleValuesForApplicationGatewayLoadDistributionAlgorithm() []string { - return []string{ - string(ApplicationGatewayLoadDistributionAlgorithmIPHash), - string(ApplicationGatewayLoadDistributionAlgorithmLeastConnections), - string(ApplicationGatewayLoadDistributionAlgorithmRoundRobin), - } -} - -func (s *ApplicationGatewayLoadDistributionAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayLoadDistributionAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayLoadDistributionAlgorithm(input string) (*ApplicationGatewayLoadDistributionAlgorithm, error) { - vals := map[string]ApplicationGatewayLoadDistributionAlgorithm{ - "iphash": ApplicationGatewayLoadDistributionAlgorithmIPHash, - "leastconnections": ApplicationGatewayLoadDistributionAlgorithmLeastConnections, - "roundrobin": ApplicationGatewayLoadDistributionAlgorithmRoundRobin, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayLoadDistributionAlgorithm(input) - return &out, nil -} - -type ApplicationGatewayOperationalState string - -const ( - ApplicationGatewayOperationalStateRunning ApplicationGatewayOperationalState = "Running" - ApplicationGatewayOperationalStateStarting ApplicationGatewayOperationalState = "Starting" - ApplicationGatewayOperationalStateStopped ApplicationGatewayOperationalState = "Stopped" - ApplicationGatewayOperationalStateStopping ApplicationGatewayOperationalState = "Stopping" -) - -func PossibleValuesForApplicationGatewayOperationalState() []string { - return []string{ - string(ApplicationGatewayOperationalStateRunning), - string(ApplicationGatewayOperationalStateStarting), - string(ApplicationGatewayOperationalStateStopped), - string(ApplicationGatewayOperationalStateStopping), - } -} - -func (s *ApplicationGatewayOperationalState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayOperationalState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayOperationalState(input string) (*ApplicationGatewayOperationalState, error) { - vals := map[string]ApplicationGatewayOperationalState{ - "running": ApplicationGatewayOperationalStateRunning, - "starting": ApplicationGatewayOperationalStateStarting, - "stopped": ApplicationGatewayOperationalStateStopped, - "stopping": ApplicationGatewayOperationalStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayOperationalState(input) - return &out, nil -} - -type ApplicationGatewayProtocol string - -const ( - ApplicationGatewayProtocolHTTP ApplicationGatewayProtocol = "Http" - ApplicationGatewayProtocolHTTPS ApplicationGatewayProtocol = "Https" - ApplicationGatewayProtocolTcp ApplicationGatewayProtocol = "Tcp" - ApplicationGatewayProtocolTls ApplicationGatewayProtocol = "Tls" -) - -func PossibleValuesForApplicationGatewayProtocol() []string { - return []string{ - string(ApplicationGatewayProtocolHTTP), - string(ApplicationGatewayProtocolHTTPS), - string(ApplicationGatewayProtocolTcp), - string(ApplicationGatewayProtocolTls), - } -} - -func (s *ApplicationGatewayProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayProtocol(input string) (*ApplicationGatewayProtocol, error) { - vals := map[string]ApplicationGatewayProtocol{ - "http": ApplicationGatewayProtocolHTTP, - "https": ApplicationGatewayProtocolHTTPS, - "tcp": ApplicationGatewayProtocolTcp, - "tls": ApplicationGatewayProtocolTls, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayProtocol(input) - return &out, nil -} - -type ApplicationGatewayRedirectType string - -const ( - ApplicationGatewayRedirectTypeFound ApplicationGatewayRedirectType = "Found" - ApplicationGatewayRedirectTypePermanent ApplicationGatewayRedirectType = "Permanent" - ApplicationGatewayRedirectTypeSeeOther ApplicationGatewayRedirectType = "SeeOther" - ApplicationGatewayRedirectTypeTemporary ApplicationGatewayRedirectType = "Temporary" -) - -func PossibleValuesForApplicationGatewayRedirectType() []string { - return []string{ - string(ApplicationGatewayRedirectTypeFound), - string(ApplicationGatewayRedirectTypePermanent), - string(ApplicationGatewayRedirectTypeSeeOther), - string(ApplicationGatewayRedirectTypeTemporary), - } -} - -func (s *ApplicationGatewayRedirectType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRedirectType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRedirectType(input string) (*ApplicationGatewayRedirectType, error) { - vals := map[string]ApplicationGatewayRedirectType{ - "found": ApplicationGatewayRedirectTypeFound, - "permanent": ApplicationGatewayRedirectTypePermanent, - "seeother": ApplicationGatewayRedirectTypeSeeOther, - "temporary": ApplicationGatewayRedirectTypeTemporary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRedirectType(input) - return &out, nil -} - -type ApplicationGatewayRequestRoutingRuleType string - -const ( - ApplicationGatewayRequestRoutingRuleTypeBasic ApplicationGatewayRequestRoutingRuleType = "Basic" - ApplicationGatewayRequestRoutingRuleTypePathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" -) - -func PossibleValuesForApplicationGatewayRequestRoutingRuleType() []string { - return []string{ - string(ApplicationGatewayRequestRoutingRuleTypeBasic), - string(ApplicationGatewayRequestRoutingRuleTypePathBasedRouting), - } -} - -func (s *ApplicationGatewayRequestRoutingRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRequestRoutingRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRequestRoutingRuleType(input string) (*ApplicationGatewayRequestRoutingRuleType, error) { - vals := map[string]ApplicationGatewayRequestRoutingRuleType{ - "basic": ApplicationGatewayRequestRoutingRuleTypeBasic, - "pathbasedrouting": ApplicationGatewayRequestRoutingRuleTypePathBasedRouting, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRequestRoutingRuleType(input) - return &out, nil -} - -type ApplicationGatewaySkuName string - -const ( - ApplicationGatewaySkuNameStandardLarge ApplicationGatewaySkuName = "Standard_Large" - ApplicationGatewaySkuNameStandardMedium ApplicationGatewaySkuName = "Standard_Medium" - ApplicationGatewaySkuNameStandardSmall ApplicationGatewaySkuName = "Standard_Small" - ApplicationGatewaySkuNameStandardVTwo ApplicationGatewaySkuName = "Standard_v2" - ApplicationGatewaySkuNameWAFLarge ApplicationGatewaySkuName = "WAF_Large" - ApplicationGatewaySkuNameWAFMedium ApplicationGatewaySkuName = "WAF_Medium" - ApplicationGatewaySkuNameWAFVTwo ApplicationGatewaySkuName = "WAF_v2" -) - -func PossibleValuesForApplicationGatewaySkuName() []string { - return []string{ - string(ApplicationGatewaySkuNameStandardLarge), - string(ApplicationGatewaySkuNameStandardMedium), - string(ApplicationGatewaySkuNameStandardSmall), - string(ApplicationGatewaySkuNameStandardVTwo), - string(ApplicationGatewaySkuNameWAFLarge), - string(ApplicationGatewaySkuNameWAFMedium), - string(ApplicationGatewaySkuNameWAFVTwo), - } -} - -func (s *ApplicationGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySkuName(input string) (*ApplicationGatewaySkuName, error) { - vals := map[string]ApplicationGatewaySkuName{ - "standard_large": ApplicationGatewaySkuNameStandardLarge, - "standard_medium": ApplicationGatewaySkuNameStandardMedium, - "standard_small": ApplicationGatewaySkuNameStandardSmall, - "standard_v2": ApplicationGatewaySkuNameStandardVTwo, - "waf_large": ApplicationGatewaySkuNameWAFLarge, - "waf_medium": ApplicationGatewaySkuNameWAFMedium, - "waf_v2": ApplicationGatewaySkuNameWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySkuName(input) - return &out, nil -} - -type ApplicationGatewaySslCipherSuite string - -const ( - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" -) - -func PossibleValuesForApplicationGatewaySslCipherSuite() []string { - return []string{ - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA), - } -} - -func (s *ApplicationGatewaySslCipherSuite) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslCipherSuite(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslCipherSuite(input string) (*ApplicationGatewaySslCipherSuite, error) { - vals := map[string]ApplicationGatewaySslCipherSuite{ - "tls_dhe_dss_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA, - "tls_dhe_dss_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_dhe_dss_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA, - "tls_dhe_dss_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_dhe_dss_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA, - "tls_dhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA, - "tls_dhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_dhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_dhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_rsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA, - "tls_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA, - "tls_rsa_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslCipherSuite(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyName string - -const ( - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101S" -) - -func PossibleValuesForApplicationGatewaySslPolicyName() []string { - return []string{ - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS), - } -} - -func (s *ApplicationGatewaySslPolicyName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyName(input string) (*ApplicationGatewaySslPolicyName, error) { - vals := map[string]ApplicationGatewaySslPolicyName{ - "appgwsslpolicy20150501": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne, - "appgwsslpolicy20170401": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne, - "appgwsslpolicy20170401s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS, - "appgwsslpolicy20220101": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne, - "appgwsslpolicy20220101s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyName(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyType string - -const ( - ApplicationGatewaySslPolicyTypeCustom ApplicationGatewaySslPolicyType = "Custom" - ApplicationGatewaySslPolicyTypeCustomVTwo ApplicationGatewaySslPolicyType = "CustomV2" - ApplicationGatewaySslPolicyTypePredefined ApplicationGatewaySslPolicyType = "Predefined" -) - -func PossibleValuesForApplicationGatewaySslPolicyType() []string { - return []string{ - string(ApplicationGatewaySslPolicyTypeCustom), - string(ApplicationGatewaySslPolicyTypeCustomVTwo), - string(ApplicationGatewaySslPolicyTypePredefined), - } -} - -func (s *ApplicationGatewaySslPolicyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyType(input string) (*ApplicationGatewaySslPolicyType, error) { - vals := map[string]ApplicationGatewaySslPolicyType{ - "custom": ApplicationGatewaySslPolicyTypeCustom, - "customv2": ApplicationGatewaySslPolicyTypeCustomVTwo, - "predefined": ApplicationGatewaySslPolicyTypePredefined, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyType(input) - return &out, nil -} - -type ApplicationGatewaySslProtocol string - -const ( - ApplicationGatewaySslProtocolTLSvOneOne ApplicationGatewaySslProtocol = "TLSv1_1" - ApplicationGatewaySslProtocolTLSvOneThree ApplicationGatewaySslProtocol = "TLSv1_3" - ApplicationGatewaySslProtocolTLSvOneTwo ApplicationGatewaySslProtocol = "TLSv1_2" - ApplicationGatewaySslProtocolTLSvOneZero ApplicationGatewaySslProtocol = "TLSv1_0" -) - -func PossibleValuesForApplicationGatewaySslProtocol() []string { - return []string{ - string(ApplicationGatewaySslProtocolTLSvOneOne), - string(ApplicationGatewaySslProtocolTLSvOneThree), - string(ApplicationGatewaySslProtocolTLSvOneTwo), - string(ApplicationGatewaySslProtocolTLSvOneZero), - } -} - -func (s *ApplicationGatewaySslProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslProtocol(input string) (*ApplicationGatewaySslProtocol, error) { - vals := map[string]ApplicationGatewaySslProtocol{ - "tlsv1_1": ApplicationGatewaySslProtocolTLSvOneOne, - "tlsv1_3": ApplicationGatewaySslProtocolTLSvOneThree, - "tlsv1_2": ApplicationGatewaySslProtocolTLSvOneTwo, - "tlsv1_0": ApplicationGatewaySslProtocolTLSvOneZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslProtocol(input) - return &out, nil -} - -type ApplicationGatewayTier string - -const ( - ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" - ApplicationGatewayTierStandardVTwo ApplicationGatewayTier = "Standard_v2" - ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" - ApplicationGatewayTierWAFVTwo ApplicationGatewayTier = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTier() []string { - return []string{ - string(ApplicationGatewayTierStandard), - string(ApplicationGatewayTierStandardVTwo), - string(ApplicationGatewayTierWAF), - string(ApplicationGatewayTierWAFVTwo), - } -} - -func (s *ApplicationGatewayTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTier(input string) (*ApplicationGatewayTier, error) { - vals := map[string]ApplicationGatewayTier{ - "standard": ApplicationGatewayTierStandard, - "standard_v2": ApplicationGatewayTierStandardVTwo, - "waf": ApplicationGatewayTierWAF, - "waf_v2": ApplicationGatewayTierWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTier(input) - return &out, nil -} - -type ApplicationGatewayTierTypes string - -const ( - ApplicationGatewayTierTypesStandard ApplicationGatewayTierTypes = "Standard" - ApplicationGatewayTierTypesStandardVTwo ApplicationGatewayTierTypes = "Standard_v2" - ApplicationGatewayTierTypesWAF ApplicationGatewayTierTypes = "WAF" - ApplicationGatewayTierTypesWAFVTwo ApplicationGatewayTierTypes = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTierTypes() []string { - return []string{ - string(ApplicationGatewayTierTypesStandard), - string(ApplicationGatewayTierTypesStandardVTwo), - string(ApplicationGatewayTierTypesWAF), - string(ApplicationGatewayTierTypesWAFVTwo), - } -} - -func (s *ApplicationGatewayTierTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTierTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTierTypes(input string) (*ApplicationGatewayTierTypes, error) { - vals := map[string]ApplicationGatewayTierTypes{ - "standard": ApplicationGatewayTierTypesStandard, - "standard_v2": ApplicationGatewayTierTypesStandardVTwo, - "waf": ApplicationGatewayTierTypesWAF, - "waf_v2": ApplicationGatewayTierTypesWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTierTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleActionTypes string - -const ( - ApplicationGatewayWafRuleActionTypesAllow ApplicationGatewayWafRuleActionTypes = "Allow" - ApplicationGatewayWafRuleActionTypesAnomalyScoring ApplicationGatewayWafRuleActionTypes = "AnomalyScoring" - ApplicationGatewayWafRuleActionTypesBlock ApplicationGatewayWafRuleActionTypes = "Block" - ApplicationGatewayWafRuleActionTypesLog ApplicationGatewayWafRuleActionTypes = "Log" - ApplicationGatewayWafRuleActionTypesNone ApplicationGatewayWafRuleActionTypes = "None" -) - -func PossibleValuesForApplicationGatewayWafRuleActionTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleActionTypesAllow), - string(ApplicationGatewayWafRuleActionTypesAnomalyScoring), - string(ApplicationGatewayWafRuleActionTypesBlock), - string(ApplicationGatewayWafRuleActionTypesLog), - string(ApplicationGatewayWafRuleActionTypesNone), - } -} - -func (s *ApplicationGatewayWafRuleActionTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleActionTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleActionTypes(input string) (*ApplicationGatewayWafRuleActionTypes, error) { - vals := map[string]ApplicationGatewayWafRuleActionTypes{ - "allow": ApplicationGatewayWafRuleActionTypesAllow, - "anomalyscoring": ApplicationGatewayWafRuleActionTypesAnomalyScoring, - "block": ApplicationGatewayWafRuleActionTypesBlock, - "log": ApplicationGatewayWafRuleActionTypesLog, - "none": ApplicationGatewayWafRuleActionTypesNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleActionTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleStateTypes string - -const ( - ApplicationGatewayWafRuleStateTypesDisabled ApplicationGatewayWafRuleStateTypes = "Disabled" - ApplicationGatewayWafRuleStateTypesEnabled ApplicationGatewayWafRuleStateTypes = "Enabled" -) - -func PossibleValuesForApplicationGatewayWafRuleStateTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleStateTypesDisabled), - string(ApplicationGatewayWafRuleStateTypesEnabled), - } -} - -func (s *ApplicationGatewayWafRuleStateTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleStateTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleStateTypes(input string) (*ApplicationGatewayWafRuleStateTypes, error) { - vals := map[string]ApplicationGatewayWafRuleStateTypes{ - "disabled": ApplicationGatewayWafRuleStateTypesDisabled, - "enabled": ApplicationGatewayWafRuleStateTypesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleStateTypes(input) - return &out, nil -} - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/id_applicationgateway.go b/resource-manager/network/2022-11-01/applicationgateways/id_applicationgateway.go deleted file mode 100644 index c9e4b9d3cbb..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/id_applicationgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package applicationgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -// ApplicationGatewayId is a struct representing the Resource ID for a Application Gateway -type ApplicationGatewayId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayName string -} - -// NewApplicationGatewayID returns a new ApplicationGatewayId struct -func NewApplicationGatewayID(subscriptionId string, resourceGroupName string, applicationGatewayName string) ApplicationGatewayId { - return ApplicationGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayName: applicationGatewayName, - } -} - -// ParseApplicationGatewayID parses 'input' into a ApplicationGatewayId -func ParseApplicationGatewayID(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayIDInsensitively(input string) (*ApplicationGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayName, ok = parsed.Parsed["applicationGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayID checks that 'input' can be parsed as a Application Gateway ID -func ValidateApplicationGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway ID -func (id ApplicationGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway ID -func (id ApplicationGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGateways", "applicationGateways", "applicationGateways"), - resourceids.UserSpecifiedSegment("applicationGatewayName", "applicationGatewayValue"), - } -} - -// String returns a human-readable description of this Application Gateway ID -func (id ApplicationGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Name: %q", id.ApplicationGatewayName), - } - return fmt.Sprintf("Application Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/id_applicationgateway_test.go b/resource-manager/network/2022-11-01/applicationgateways/id_applicationgateway_test.go deleted file mode 100644 index 0fb00834ec5..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/id_applicationgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package applicationgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayId{} - -func TestNewApplicationGatewayID(t *testing.T) { - id := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayName != "applicationGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayName'", id.ApplicationGatewayName, "applicationGatewayValue") - } -} - -func TestFormatApplicationGatewayID(t *testing.T) { - actual := NewApplicationGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestParseApplicationGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayName: "applicationGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGateways/applicationGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe", - Expected: &ApplicationGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayName: "aPpLiCaTiOnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYs/aPpLiCaTiOnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayName != v.Expected.ApplicationGatewayName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayName", v.Expected.ApplicationGatewayName, actual.ApplicationGatewayName) - } - - } -} - -func TestSegmentsForApplicationGatewayId(t *testing.T) { - segments := ApplicationGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/id_predefinedpolicy.go b/resource-manager/network/2022-11-01/applicationgateways/id_predefinedpolicy.go deleted file mode 100644 index b49384e166d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/id_predefinedpolicy.go +++ /dev/null @@ -1,116 +0,0 @@ -package applicationgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PredefinedPolicyId{} - -// PredefinedPolicyId is a struct representing the Resource ID for a Predefined Policy -type PredefinedPolicyId struct { - SubscriptionId string - PredefinedPolicyName string -} - -// NewPredefinedPolicyID returns a new PredefinedPolicyId struct -func NewPredefinedPolicyID(subscriptionId string, predefinedPolicyName string) PredefinedPolicyId { - return PredefinedPolicyId{ - SubscriptionId: subscriptionId, - PredefinedPolicyName: predefinedPolicyName, - } -} - -// ParsePredefinedPolicyID parses 'input' into a PredefinedPolicyId -func ParsePredefinedPolicyID(input string) (*PredefinedPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(PredefinedPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PredefinedPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.PredefinedPolicyName, ok = parsed.Parsed["predefinedPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "predefinedPolicyName", *parsed) - } - - return &id, nil -} - -// ParsePredefinedPolicyIDInsensitively parses 'input' case-insensitively into a PredefinedPolicyId -// note: this method should only be used for API response data and not user input -func ParsePredefinedPolicyIDInsensitively(input string) (*PredefinedPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(PredefinedPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PredefinedPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.PredefinedPolicyName, ok = parsed.Parsed["predefinedPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "predefinedPolicyName", *parsed) - } - - return &id, nil -} - -// ValidatePredefinedPolicyID checks that 'input' can be parsed as a Predefined Policy ID -func ValidatePredefinedPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePredefinedPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Predefined Policy ID -func (id PredefinedPolicyId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.PredefinedPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Predefined Policy ID -func (id PredefinedPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGatewayAvailableSslOptions", "applicationGatewayAvailableSslOptions", "applicationGatewayAvailableSslOptions"), - resourceids.StaticSegment("staticDefault", "default", "default"), - resourceids.StaticSegment("staticPredefinedPolicies", "predefinedPolicies", "predefinedPolicies"), - resourceids.UserSpecifiedSegment("predefinedPolicyName", "predefinedPolicyValue"), - } -} - -// String returns a human-readable description of this Predefined Policy ID -func (id PredefinedPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Predefined Policy Name: %q", id.PredefinedPolicyName), - } - return fmt.Sprintf("Predefined Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/id_predefinedpolicy_test.go b/resource-manager/network/2022-11-01/applicationgateways/id_predefinedpolicy_test.go deleted file mode 100644 index 02a81b1d676..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/id_predefinedpolicy_test.go +++ /dev/null @@ -1,267 +0,0 @@ -package applicationgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PredefinedPolicyId{} - -func TestNewPredefinedPolicyID(t *testing.T) { - id := NewPredefinedPolicyID("12345678-1234-9876-4563-123456789012", "predefinedPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.PredefinedPolicyName != "predefinedPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'PredefinedPolicyName'", id.PredefinedPolicyName, "predefinedPolicyValue") - } -} - -func TestFormatPredefinedPolicyID(t *testing.T) { - actual := NewPredefinedPolicyID("12345678-1234-9876-4563-123456789012", "predefinedPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePredefinedPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PredefinedPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue", - Expected: &PredefinedPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - PredefinedPolicyName: "predefinedPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePredefinedPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.PredefinedPolicyName != v.Expected.PredefinedPolicyName { - t.Fatalf("Expected %q but got %q for PredefinedPolicyName", v.Expected.PredefinedPolicyName, actual.PredefinedPolicyName) - } - - } -} - -func TestParsePredefinedPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PredefinedPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs/dEfAuLt", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs/dEfAuLt/pReDeFiNeDpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue", - Expected: &PredefinedPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - PredefinedPolicyName: "predefinedPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/predefinedPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs/dEfAuLt/pReDeFiNeDpOlIcIeS/pReDeFiNeDpOlIcYvAlUe", - Expected: &PredefinedPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - PredefinedPolicyName: "pReDeFiNeDpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYaVaIlAbLeSsLoPtIoNs/dEfAuLt/pReDeFiNeDpOlIcIeS/pReDeFiNeDpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePredefinedPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.PredefinedPolicyName != v.Expected.PredefinedPolicyName { - t.Fatalf("Expected %q but got %q for PredefinedPolicyName", v.Expected.PredefinedPolicyName, actual.PredefinedPolicyName) - } - - } -} - -func TestSegmentsForPredefinedPolicyId(t *testing.T) { - segments := PredefinedPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PredefinedPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_backendhealth.go b/resource-manager/network/2022-11-01/applicationgateways/method_backendhealth.go deleted file mode 100644 index b3584e3464d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_backendhealth.go +++ /dev/null @@ -1,98 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendHealthOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type BackendHealthOperationOptions struct { - Expand *string -} - -func DefaultBackendHealthOperationOptions() BackendHealthOperationOptions { - return BackendHealthOperationOptions{} -} - -func (o BackendHealthOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o BackendHealthOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o BackendHealthOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// BackendHealth ... -func (c ApplicationGatewaysClient) BackendHealth(ctx context.Context, id ApplicationGatewayId, options BackendHealthOperationOptions) (result BackendHealthOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/backendhealth", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// BackendHealthThenPoll performs BackendHealth then polls until it's completed -func (c ApplicationGatewaysClient) BackendHealthThenPoll(ctx context.Context, id ApplicationGatewayId, options BackendHealthOperationOptions) error { - result, err := c.BackendHealth(ctx, id, options) - if err != nil { - return fmt.Errorf("performing BackendHealth: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after BackendHealth: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_backendhealthondemand.go b/resource-manager/network/2022-11-01/applicationgateways/method_backendhealthondemand.go deleted file mode 100644 index 864bdfc8f53..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_backendhealthondemand.go +++ /dev/null @@ -1,102 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendHealthOnDemandOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type BackendHealthOnDemandOperationOptions struct { - Expand *string -} - -func DefaultBackendHealthOnDemandOperationOptions() BackendHealthOnDemandOperationOptions { - return BackendHealthOnDemandOperationOptions{} -} - -func (o BackendHealthOnDemandOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o BackendHealthOnDemandOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o BackendHealthOnDemandOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// BackendHealthOnDemand ... -func (c ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Context, id ApplicationGatewayId, input ApplicationGatewayOnDemandProbe, options BackendHealthOnDemandOperationOptions) (result BackendHealthOnDemandOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getBackendHealthOnDemand", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// BackendHealthOnDemandThenPoll performs BackendHealthOnDemand then polls until it's completed -func (c ApplicationGatewaysClient) BackendHealthOnDemandThenPoll(ctx context.Context, id ApplicationGatewayId, input ApplicationGatewayOnDemandProbe, options BackendHealthOnDemandOperationOptions) error { - result, err := c.BackendHealthOnDemand(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing BackendHealthOnDemand: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after BackendHealthOnDemand: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_createorupdate.go b/resource-manager/network/2022-11-01/applicationgateways/method_createorupdate.go deleted file mode 100644 index 6b4a2af987b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, id ApplicationGatewayId, input ApplicationGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ApplicationGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id ApplicationGatewayId, input ApplicationGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_delete.go b/resource-manager/network/2022-11-01/applicationgateways/method_delete.go deleted file mode 100644 index 6769fa69c24..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ApplicationGatewaysClient) Delete(ctx context.Context, id ApplicationGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ApplicationGatewaysClient) DeleteThenPoll(ctx context.Context, id ApplicationGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_get.go b/resource-manager/network/2022-11-01/applicationgateways/method_get.go deleted file mode 100644 index b76ab4abb95..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package applicationgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGateway -} - -// Get ... -func (c ApplicationGatewaysClient) Get(ctx context.Context, id ApplicationGatewayId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_getsslpredefinedpolicy.go b/resource-manager/network/2022-11-01/applicationgateways/method_getsslpredefinedpolicy.go deleted file mode 100644 index b4867c9088b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_getsslpredefinedpolicy.go +++ /dev/null @@ -1,51 +0,0 @@ -package applicationgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetSslPredefinedPolicyOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewaySslPredefinedPolicy -} - -// GetSslPredefinedPolicy ... -func (c ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, id PredefinedPolicyId) (result GetSslPredefinedPolicyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_list.go b/resource-manager/network/2022-11-01/applicationgateways/method_list.go deleted file mode 100644 index c31250db3d1..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGateway -} - -type ListCompleteResult struct { - Items []ApplicationGateway -} - -// List ... -func (c ApplicationGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ApplicationGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationGatewayOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ApplicationGatewayOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ApplicationGateway, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_listall.go b/resource-manager/network/2022-11-01/applicationgateways/method_listall.go deleted file mode 100644 index 23020a8a7c5..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGateway -} - -type ListAllCompleteResult struct { - Items []ApplicationGateway -} - -// ListAll ... -func (c ApplicationGatewaysClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c ApplicationGatewaysClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, ApplicationGatewayOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewaysClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApplicationGatewayOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]ApplicationGateway, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_listavailablerequestheaders.go b/resource-manager/network/2022-11-01/applicationgateways/method_listavailablerequestheaders.go deleted file mode 100644 index 08d2f919615..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_listavailablerequestheaders.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableRequestHeadersOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]string -} - -// ListAvailableRequestHeaders ... -func (c ApplicationGatewaysClient) ListAvailableRequestHeaders(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableRequestHeadersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_listavailableresponseheaders.go b/resource-manager/network/2022-11-01/applicationgateways/method_listavailableresponseheaders.go deleted file mode 100644 index 6c96972a7a7..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_listavailableresponseheaders.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableResponseHeadersOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]string -} - -// ListAvailableResponseHeaders ... -func (c ApplicationGatewaysClient) ListAvailableResponseHeaders(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableResponseHeadersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_listavailableservervariables.go b/resource-manager/network/2022-11-01/applicationgateways/method_listavailableservervariables.go deleted file mode 100644 index 3065ffaa0de..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_listavailableservervariables.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableServerVariablesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]string -} - -// ListAvailableServerVariables ... -func (c ApplicationGatewaysClient) ListAvailableServerVariables(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableServerVariablesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableServerVariables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_listavailablessloptions.go b/resource-manager/network/2022-11-01/applicationgateways/method_listavailablessloptions.go deleted file mode 100644 index 3b290246c2c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_listavailablessloptions.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableSslOptionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayAvailableSslOptions -} - -// ListAvailableSslOptions ... -func (c ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableSslOptionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_listavailablesslpredefinedpolicies.go b/resource-manager/network/2022-11-01/applicationgateways/method_listavailablesslpredefinedpolicies.go deleted file mode 100644 index e3b6f96e447..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_listavailablesslpredefinedpolicies.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableSslPredefinedPoliciesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGatewaySslPredefinedPolicy -} - -type ListAvailableSslPredefinedPoliciesCompleteResult struct { - Items []ApplicationGatewaySslPredefinedPolicy -} - -// ListAvailableSslPredefinedPolicies ... -func (c ApplicationGatewaysClient) ListAvailableSslPredefinedPolicies(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableSslPredefinedPoliciesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGatewaySslPredefinedPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAvailableSslPredefinedPoliciesComplete retrieves all the results into a single object -func (c ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesComplete(ctx context.Context, id commonids.SubscriptionId) (ListAvailableSslPredefinedPoliciesCompleteResult, error) { - return c.ListAvailableSslPredefinedPoliciesCompleteMatchingPredicate(ctx, id, ApplicationGatewaySslPredefinedPolicyOperationPredicate{}) -} - -// ListAvailableSslPredefinedPoliciesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApplicationGatewaySslPredefinedPolicyOperationPredicate) (result ListAvailableSslPredefinedPoliciesCompleteResult, err error) { - items := make([]ApplicationGatewaySslPredefinedPolicy, 0) - - resp, err := c.ListAvailableSslPredefinedPolicies(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAvailableSslPredefinedPoliciesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_listavailablewafrulesets.go b/resource-manager/network/2022-11-01/applicationgateways/method_listavailablewafrulesets.go deleted file mode 100644 index e16574838a3..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_listavailablewafrulesets.go +++ /dev/null @@ -1,53 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableWafRuleSetsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayAvailableWafRuleSetsResult -} - -// ListAvailableWafRuleSets ... -func (c ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context, id commonids.SubscriptionId) (result ListAvailableWafRuleSetsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_start.go b/resource-manager/network/2022-11-01/applicationgateways/method_start.go deleted file mode 100644 index 828fc60cb3c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c ApplicationGatewaysClient) Start(ctx context.Context, id ApplicationGatewayId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c ApplicationGatewaysClient) StartThenPoll(ctx context.Context, id ApplicationGatewayId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_stop.go b/resource-manager/network/2022-11-01/applicationgateways/method_stop.go deleted file mode 100644 index 75b68cdf697..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_stop.go +++ /dev/null @@ -1,70 +0,0 @@ -package applicationgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c ApplicationGatewaysClient) Stop(ctx context.Context, id ApplicationGatewayId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c ApplicationGatewaysClient) StopThenPoll(ctx context.Context, id ApplicationGatewayId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/method_updatetags.go b/resource-manager/network/2022-11-01/applicationgateways/method_updatetags.go deleted file mode 100644 index d371aa3c27b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package applicationgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGateway -} - -// UpdateTags ... -func (c ApplicationGatewaysClient) UpdateTags(ctx context.Context, id ApplicationGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgateway.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgateway.go deleted file mode 100644 index 26c26a88927..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgateway.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go deleted file mode 100644 index 21a1fec007f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayauthenticationcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go deleted file mode 100644 index 37f5189d68a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayauthenticationcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go deleted file mode 100644 index e8f13521e07..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayautoscaleconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAutoscaleConfiguration struct { - MaxCapacity *int64 `json:"maxCapacity,omitempty"` - MinCapacity int64 `json:"minCapacity"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablessloptions.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablessloptions.go deleted file mode 100644 index 18677bfa9ad..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablessloptions.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAvailableSslOptions struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go deleted file mode 100644 index 552b956629b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablessloptionspropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct { - AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"` - AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"` - DefaultPolicy *ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"` - PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go deleted file mode 100644 index b960a888077..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayavailablewafrulesetsresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAvailableWafRuleSetsResult struct { - Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 9245b4581ff..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index e62cc5f5a6a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 92e4b6fcae0..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealth.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealth.go deleted file mode 100644 index b8439220957..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealth.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealth struct { - BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go deleted file mode 100644 index 00f4c87c142..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthhttpsettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthHTTPSettings struct { - BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` - Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go deleted file mode 100644 index 3bf6d17e80c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthondemand.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthOnDemand struct { - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - BackendHealthHTTPSettings *ApplicationGatewayBackendHealthHTTPSettings `json:"backendHealthHttpSettings,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthpool.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthpool.go deleted file mode 100644 index b32fffdf614..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthpool.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthPool struct { - BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthserver.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthserver.go deleted file mode 100644 index c11aed154b2..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhealthserver.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHealthServer struct { - Address *string `json:"address,omitempty"` - Health *ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` - HealthProbeLog *string `json:"healthProbeLog,omitempty"` - IPConfiguration *NetworkInterfaceIPConfiguration `json:"ipConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go deleted file mode 100644 index 7cfbecd3506..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhttpsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go deleted file mode 100644 index 68ccfd35301..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendhttpsettingspropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { - AffinityCookieName *string `json:"affinityCookieName,omitempty"` - AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` - ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` - CookieBasedAffinity *ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` - HostName *string `json:"hostName,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - ProbeEnabled *bool `json:"probeEnabled,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestTimeout *int64 `json:"requestTimeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendsettings.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendsettings.go deleted file mode 100644 index 435626e7296..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go deleted file mode 100644 index 5d5c1275f2e..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaybackendsettingspropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettingsPropertiesFormat struct { - HostName *string `json:"hostName,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go deleted file mode 100644 index 7be179f89f0..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayclientauthconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayClientAuthConfiguration struct { - VerifyClientCertIssuerDN *bool `json:"verifyClientCertIssuerDN,omitempty"` - VerifyClientRevocation *ApplicationGatewayClientRevocationOptions `json:"verifyClientRevocation,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayconnectiondraining.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayconnectiondraining.go deleted file mode 100644 index f40777a88f8..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayconnectiondraining.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayConnectionDraining struct { - DrainTimeoutInSec int64 `json:"drainTimeoutInSec"` - Enabled bool `json:"enabled"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaycustomerror.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaycustomerror.go deleted file mode 100644 index 532de5a8e93..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaycustomerror.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayCustomError struct { - CustomErrorPageUrl *string `json:"customErrorPageUrl,omitempty"` - StatusCode *ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go deleted file mode 100644 index 30534c50f52..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewalldisabledrulegroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallDisabledRuleGroup struct { - RuleGroupName string `json:"ruleGroupName"` - Rules *[]int64 `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallexclusion.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallexclusion.go deleted file mode 100644 index 77bfe2cf65c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallexclusion.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallExclusion struct { - MatchVariable string `json:"matchVariable"` - Selector string `json:"selector"` - SelectorMatchOperator string `json:"selectorMatchOperator"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrule.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrule.go deleted file mode 100644 index c9a89bac633..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRule struct { - Action *ApplicationGatewayWafRuleActionTypes `json:"action,omitempty"` - Description *string `json:"description,omitempty"` - RuleId int64 `json:"ruleId"` - RuleIdString *string `json:"ruleIdString,omitempty"` - State *ApplicationGatewayWafRuleStateTypes `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go deleted file mode 100644 index 06c7cbffb38..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrulegroup.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleGroup struct { - Description *string `json:"description,omitempty"` - RuleGroupName string `json:"ruleGroupName"` - Rules []ApplicationGatewayFirewallRule `json:"rules"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallruleset.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallruleset.go deleted file mode 100644 index 3eb74351624..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallruleset.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleSet struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go deleted file mode 100644 index f0bd967c325..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfirewallrulesetpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleGroups []ApplicationGatewayFirewallRuleGroup `json:"ruleGroups"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` - Tiers *[]ApplicationGatewayTierTypes `json:"tiers,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go deleted file mode 100644 index 16f3a44fe68..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go deleted file mode 100644 index 45f83bbaa11..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendport.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendport.go deleted file mode 100644 index 9b3c8763e01..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendport.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPort struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go deleted file mode 100644 index a9399610b8b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayfrontendportpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPortPropertiesFormat struct { - Port *int64 `json:"port,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayglobalconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayglobalconfiguration.go deleted file mode 100644 index 8f031b6ad38..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayglobalconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayGlobalConfiguration struct { - EnableRequestBuffering *bool `json:"enableRequestBuffering,omitempty"` - EnableResponseBuffering *bool `json:"enableResponseBuffering,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayheaderconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayheaderconfiguration.go deleted file mode 100644 index cf7e02d4617..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayheaderconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHeaderConfiguration struct { - HeaderName *string `json:"headerName,omitempty"` - HeaderValue *string `json:"headerValue,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayhttplistener.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayhttplistener.go deleted file mode 100644 index 457c3af7d7b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayhttplistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go deleted file mode 100644 index 7d3436f6186..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayhttplistenerpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListenerPropertiesFormat struct { - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - HostName *string `json:"hostName,omitempty"` - HostNames *[]string `json:"hostNames,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 7b513c56359..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 67b2b22486e..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaylistener.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaylistener.go deleted file mode 100644 index eb251dad173..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaylistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go deleted file mode 100644 index fc21e21099b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaylistenerpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListenerPropertiesFormat struct { - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go deleted file mode 100644 index 9c07ad54259..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributionpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionPolicyPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go deleted file mode 100644 index 9ae762454d0..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributionpolicypropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { - LoadDistributionAlgorithm *ApplicationGatewayLoadDistributionAlgorithm `json:"loadDistributionAlgorithm,omitempty"` - LoadDistributionTargets *[]ApplicationGatewayLoadDistributionTarget `json:"loadDistributionTargets,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go deleted file mode 100644 index 5db29bd27a5..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributiontarget.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTarget struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionTargetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go deleted file mode 100644 index cd785c4126e..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayloaddistributiontargetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTargetPropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - WeightPerServer *int64 `json:"weightPerServer,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayondemandprobe.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayondemandprobe.go deleted file mode 100644 index 6ee19e174e2..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayondemandprobe.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayOnDemandProbe struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - Host *string `json:"host,omitempty"` - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypathrule.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypathrule.go deleted file mode 100644 index ae684eb5860..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypathrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go deleted file mode 100644 index c0586444c85..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypathrulepropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Paths *[]string `json:"paths,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go deleted file mode 100644 index 8099219aff4..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go deleted file mode 100644 index 400c841d704..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go deleted file mode 100644 index 1997234fb4d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go deleted file mode 100644 index b86b3f17014..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkconfigurationproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfigurationProperties struct { - IPConfigurations *[]ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go deleted file mode 100644 index ad8bfa28be7..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go deleted file mode 100644 index b2d2b2af23a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprivatelinkipconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobe.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobe.go deleted file mode 100644 index 9b27b4f7133..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobe.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbe struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go deleted file mode 100644 index 68ccf1eaaaf..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobehealthresponsematch.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbeHealthResponseMatch struct { - Body *string `json:"body,omitempty"` - StatusCodes *[]string `json:"statusCodes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go deleted file mode 100644 index dab5ee7ae23..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayprobepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbePropertiesFormat struct { - Host *string `json:"host,omitempty"` - Interval *int64 `json:"interval,omitempty"` - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - MinServers *int64 `json:"minServers,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - PickHostNameFromBackendSettings *bool `json:"pickHostNameFromBackendSettings,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - UnhealthyThreshold *int64 `json:"unhealthyThreshold,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypropertiesformat.go deleted file mode 100644 index 8f57d0c043f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaypropertiesformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPropertiesFormat struct { - AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` - AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` - BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` - BackendSettingsCollection *[]ApplicationGatewayBackendSettings `json:"backendSettingsCollection,omitempty"` - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - EnableFips *bool `json:"enableFips,omitempty"` - EnableHTTP2 *bool `json:"enableHttp2,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"` - FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` - GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` - GlobalConfiguration *ApplicationGatewayGlobalConfiguration `json:"globalConfiguration,omitempty"` - HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` - Listeners *[]ApplicationGatewayListener `json:"listeners,omitempty"` - LoadDistributionPolicies *[]ApplicationGatewayLoadDistributionPolicy `json:"loadDistributionPolicies,omitempty"` - OperationalState *ApplicationGatewayOperationalState `json:"operationalState,omitempty"` - PrivateEndpointConnections *[]ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - PrivateLinkConfigurations *[]ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"` - Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` - RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` - RoutingRules *[]ApplicationGatewayRoutingRule `json:"routingRules,omitempty"` - Sku *ApplicationGatewaySku `json:"sku,omitempty"` - SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - SslProfiles *[]ApplicationGatewaySslProfile `json:"sslProfiles,omitempty"` - TrustedClientCertificates *[]ApplicationGatewayTrustedClientCertificate `json:"trustedClientCertificates,omitempty"` - TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` - UrlPathMaps *[]ApplicationGatewayUrlPathMap `json:"urlPathMaps,omitempty"` - WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayredirectconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayredirectconfiguration.go deleted file mode 100644 index 99a2df5f0de..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayredirectconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go deleted file mode 100644 index 07b97214f7f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayredirectconfigurationpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { - IncludePath *bool `json:"includePath,omitempty"` - IncludeQueryString *bool `json:"includeQueryString,omitempty"` - PathRules *[]SubResource `json:"pathRules,omitempty"` - RedirectType *ApplicationGatewayRedirectType `json:"redirectType,omitempty"` - RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` - TargetListener *SubResource `json:"targetListener,omitempty"` - TargetUrl *string `json:"targetUrl,omitempty"` - UrlPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrequestroutingrule.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrequestroutingrule.go deleted file mode 100644 index 8968674820d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrequestroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go deleted file mode 100644 index d7ab0f3f4d9..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrequestroutingrulepropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - HTTPListener *SubResource `json:"httpListener,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` - UrlPathMap *SubResource `json:"urlPathMap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterule.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterule.go deleted file mode 100644 index 6ce3b9a1f5d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterule.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRule struct { - ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"` - Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"` - Name *string `json:"name,omitempty"` - RuleSequence *int64 `json:"ruleSequence,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go deleted file mode 100644 index 02be2e1f37b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriteruleactionset.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleActionSet struct { - RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"` - ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"` - UrlConfiguration *ApplicationGatewayUrlConfiguration `json:"urlConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterulecondition.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterulecondition.go deleted file mode 100644 index c7e6af3b85a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterulecondition.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleCondition struct { - IgnoreCase *bool `json:"ignoreCase,omitempty"` - Negate *bool `json:"negate,omitempty"` - Pattern *string `json:"pattern,omitempty"` - Variable *string `json:"variable,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriteruleset.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriteruleset.go deleted file mode 100644 index 571e9038508..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriteruleset.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go deleted file mode 100644 index 031206c13ce..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayrewriterulesetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayroutingrule.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayroutingrule.go deleted file mode 100644 index 448709de6b4..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go deleted file mode 100644 index 5be00552534..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayroutingrulepropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendSettings *SubResource `json:"backendSettings,omitempty"` - Listener *SubResource `json:"listener,omitempty"` - Priority int64 `json:"priority"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysku.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysku.go deleted file mode 100644 index 99350cf8ec7..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysku.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *ApplicationGatewaySkuName `json:"name,omitempty"` - Tier *ApplicationGatewayTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslcertificate.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslcertificate.go deleted file mode 100644 index 1f589867862..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go deleted file mode 100644 index 1c92efb93bd..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslcertificatepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - Password *string `json:"password,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpolicy.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpolicy.go deleted file mode 100644 index be42ac49a18..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPolicy struct { - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` - MinProtocolVersion *ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` - PolicyName *ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` - PolicyType *ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go deleted file mode 100644 index a7932dc66db..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpredefinedpolicy.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPredefinedPolicy struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go deleted file mode 100644 index 15702750dea..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslpredefinedpolicypropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct { - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - MinProtocolVersion *ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslprofile.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslprofile.go deleted file mode 100644 index 609877668f8..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go deleted file mode 100644 index a7c5ae2c883..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaysslprofilepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfilePropertiesFormat struct { - ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration `json:"clientAuthConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - TrustedClientCertificates *[]SubResource `json:"trustedClientCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go deleted file mode 100644 index 731b46860d7..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedclientcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedClientCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go deleted file mode 100644 index 67b5d91461d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedclientcertificatepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct { - ClientCertIssuerDN *string `json:"clientCertIssuerDN,omitempty"` - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ValidatedCertData *string `json:"validatedCertData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go deleted file mode 100644 index 12343718b35..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedrootcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go deleted file mode 100644 index 7aeb8e0a84e..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaytrustedrootcertificatepropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlconfiguration.go deleted file mode 100644 index 18491c35f12..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlConfiguration struct { - ModifiedPath *string `json:"modifiedPath,omitempty"` - ModifiedQueryString *string `json:"modifiedQueryString,omitempty"` - Reroute *bool `json:"reroute,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlpathmap.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlpathmap.go deleted file mode 100644 index 5fc06877578..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlpathmap.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayUrlPathMapPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go deleted file mode 100644 index ef8e7e8e02f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewayurlpathmappropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMapPropertiesFormat struct { - DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` - DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` - DefaultLoadDistributionPolicy *SubResource `json:"defaultLoadDistributionPolicy,omitempty"` - DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` - DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` - PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go deleted file mode 100644 index 561512df449..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationgatewaywebapplicationfirewallconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWebApplicationFirewallConfiguration struct { - DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` - Enabled bool `json:"enabled"` - Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"` - FileUploadLimitInMb *int64 `json:"fileUploadLimitInMb,omitempty"` - FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode"` - MaxRequestBodySize *int64 `json:"maxRequestBodySize,omitempty"` - MaxRequestBodySizeInKb *int64 `json:"maxRequestBodySizeInKb,omitempty"` - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationsecuritygroup.go deleted file mode 100644 index 71e4f60a5a0..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index c8593cff776..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_backendaddresspool.go b/resource-manager/network/2022-11-01/applicationgateways/model_backendaddresspool.go deleted file mode 100644 index 1a7d2037c67..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 7dc8222f453..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 821207ea54b..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_ddossettings.go b/resource-manager/network/2022-11-01/applicationgateways/model_ddossettings.go deleted file mode 100644 index afe28edd8fc..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_delegation.go b/resource-manager/network/2022-11-01/applicationgateways/model_delegation.go deleted file mode 100644 index dde48e048ee..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_flowlog.go b/resource-manager/network/2022-11-01/applicationgateways/model_flowlog.go deleted file mode 100644 index 8d1c520da14..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/applicationgateways/model_flowlogformatparameters.go deleted file mode 100644 index 79d541b9318..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_flowlogpropertiesformat.go deleted file mode 100644 index 666f7fd230f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_frontendipconfiguration.go deleted file mode 100644 index 6af1ef34991..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index dfcbf3e5aca..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 81f73592309..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_inboundnatrule.go b/resource-manager/network/2022-11-01/applicationgateways/model_inboundnatrule.go deleted file mode 100644 index e8326d63cdd..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index e68b37342b3..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_ipconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_ipconfiguration.go deleted file mode 100644 index 3035f84c596..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationprofile.go deleted file mode 100644 index edb884d2718..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1c6df0dcda2..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 5de8de82f9e..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_iptag.go b/resource-manager/network/2022-11-01/applicationgateways/model_iptag.go deleted file mode 100644 index e423a8c0593..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/applicationgateways/model_loadbalancerbackendaddress.go deleted file mode 100644 index a4bb848daa5..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index ab1822cd6b6..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_natgateway.go b/resource-manager/network/2022-11-01/applicationgateways/model_natgateway.go deleted file mode 100644 index eb51b102cad..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_natgatewaypropertiesformat.go deleted file mode 100644 index 21ac8a2eca2..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_natgatewaysku.go b/resource-manager/network/2022-11-01/applicationgateways/model_natgatewaysku.go deleted file mode 100644 index 54ee08d2498..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_natruleportmapping.go b/resource-manager/network/2022-11-01/applicationgateways/model_natruleportmapping.go deleted file mode 100644 index 1ca2ef21443..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterface.go b/resource-manager/network/2022-11-01/applicationgateways/model_networkinterface.go deleted file mode 100644 index 73b1cb41a52..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacednssettings.go deleted file mode 100644 index 92961ce7d04..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 1be55bfe469..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index fed49bbe9de..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 70234aeb42f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 302d4c3283d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 8dc17186426..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 199c278ace0..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/applicationgateways/model_networksecuritygroup.go deleted file mode 100644 index 14268c44ed0..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index e16fb5f6fb3..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpoint.go b/resource-manager/network/2022-11-01/applicationgateways/model_privateendpoint.go deleted file mode 100644 index 4ec26559664..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointconnection.go deleted file mode 100644 index 72911c666f8..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointconnectionproperties.go deleted file mode 100644 index baec08812d8..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointipconfiguration.go deleted file mode 100644 index 7cae9c3cf71..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index f1f5adead63..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointproperties.go deleted file mode 100644 index 832b7f18a5d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkservice.go b/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkservice.go deleted file mode 100644 index 238c6ee31c6..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnection.go deleted file mode 100644 index ee88d81eb06..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 26b1b21ad32..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 2d2970905b0..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 18d6fcdf24d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 02fc04bab97..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceproperties.go deleted file mode 100644 index eb543330122..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddress.go b/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddress.go deleted file mode 100644 index c17efae3e57..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package applicationgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddressdnssettings.go deleted file mode 100644 index 4aeba6f0581..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddresspropertiesformat.go deleted file mode 100644 index d714bdf3daa..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddresssku.go deleted file mode 100644 index 976ba6d175a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/applicationgateways/model_resourcenavigationlink.go deleted file mode 100644 index 0aeedfe5241..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_resourcenavigationlinkformat.go deleted file mode 100644 index 540e9b96c41..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_resourceset.go b/resource-manager/network/2022-11-01/applicationgateways/model_resourceset.go deleted file mode 100644 index 05c6f87a097..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/applicationgateways/model_retentionpolicyparameters.go deleted file mode 100644 index aed6889cbab..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_route.go b/resource-manager/network/2022-11-01/applicationgateways/model_route.go deleted file mode 100644 index 8b16e63b0d4..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_routepropertiesformat.go deleted file mode 100644 index e5c5f698874..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_routetable.go b/resource-manager/network/2022-11-01/applicationgateways/model_routetable.go deleted file mode 100644 index 6b3d63e8b6c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_routetablepropertiesformat.go deleted file mode 100644 index af2c694b5db..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_securityrule.go b/resource-manager/network/2022-11-01/applicationgateways/model_securityrule.go deleted file mode 100644 index ef187da7432..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_securityrulepropertiesformat.go deleted file mode 100644 index c96607c5d20..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/applicationgateways/model_serviceassociationlink.go deleted file mode 100644 index fcd770e8b43..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 74146988caf..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 508b02893d3..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicy.go deleted file mode 100644 index 3c9d04af717..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 3c52f56e9ea..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 0ccd3a839f3..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index edd49bd36a4..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5cae7444005..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_subnet.go b/resource-manager/network/2022-11-01/applicationgateways/model_subnet.go deleted file mode 100644 index 9bad3a3150c..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_subnetpropertiesformat.go deleted file mode 100644 index 3ff5721db4e..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_subresource.go b/resource-manager/network/2022-11-01/applicationgateways/model_subresource.go deleted file mode 100644 index 5e7297f22b2..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_tagsobject.go b/resource-manager/network/2022-11-01/applicationgateways/model_tagsobject.go deleted file mode 100644 index d5962ed5647..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 65767115778..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/applicationgateways/model_trafficanalyticsproperties.go deleted file mode 100644 index b9b39e7b346..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/applicationgateways/model_virtualnetworktap.go deleted file mode 100644 index 610065f3a8a..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/applicationgateways/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index a7db53f1629..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/predicates.go b/resource-manager/network/2022-11-01/applicationgateways/predicates.go deleted file mode 100644 index c51e6f7b000..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/predicates.go +++ /dev/null @@ -1,55 +0,0 @@ -package applicationgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ApplicationGatewayOperationPredicate) Matches(input ApplicationGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type ApplicationGatewaySslPredefinedPolicyOperationPredicate struct { - Id *string - Name *string -} - -func (p ApplicationGatewaySslPredefinedPolicyOperationPredicate) Matches(input ApplicationGatewaySslPredefinedPolicy) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/applicationgateways/version.go b/resource-manager/network/2022-11-01/applicationgateways/version.go deleted file mode 100644 index 726b6db5a35..00000000000 --- a/resource-manager/network/2022-11-01/applicationgateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/README.md b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/README.md deleted file mode 100644 index 82ad376a256..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests` Documentation - -The `applicationgatewaywafdynamicmanifests` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests" -``` - - -### Client Initialization - -```go -client := applicationgatewaywafdynamicmanifests.NewApplicationGatewayWafDynamicManifestsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationGatewayWafDynamicManifestsClient.ApplicationGatewayWafDynamicManifestsDefaultGet` - -```go -ctx := context.TODO() -id := applicationgatewaywafdynamicmanifests.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -read, err := client.ApplicationGatewayWafDynamicManifestsDefaultGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationGatewayWafDynamicManifestsClient.ApplicationGatewayWafDynamicManifestsGet` - -```go -ctx := context.TODO() -id := applicationgatewaywafdynamicmanifests.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.ApplicationGatewayWafDynamicManifestsGet(ctx, id)` can be used to do batched pagination -items, err := client.ApplicationGatewayWafDynamicManifestsGetComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/client.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/client.go deleted file mode 100644 index 9f40236f2da..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestsClient struct { - Client *resourcemanager.Client -} - -func NewApplicationGatewayWafDynamicManifestsClientWithBaseURI(api environments.Api) (*ApplicationGatewayWafDynamicManifestsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationgatewaywafdynamicmanifests", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationGatewayWafDynamicManifestsClient: %+v", err) - } - - return &ApplicationGatewayWafDynamicManifestsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/constants.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/constants.go deleted file mode 100644 index 0d7db7ea47d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/constants.go +++ /dev/null @@ -1,195 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRuleSetStatusOptions string - -const ( - ApplicationGatewayRuleSetStatusOptionsDeprecated ApplicationGatewayRuleSetStatusOptions = "Deprecated" - ApplicationGatewayRuleSetStatusOptionsGA ApplicationGatewayRuleSetStatusOptions = "GA" - ApplicationGatewayRuleSetStatusOptionsPreview ApplicationGatewayRuleSetStatusOptions = "Preview" - ApplicationGatewayRuleSetStatusOptionsSupported ApplicationGatewayRuleSetStatusOptions = "Supported" -) - -func PossibleValuesForApplicationGatewayRuleSetStatusOptions() []string { - return []string{ - string(ApplicationGatewayRuleSetStatusOptionsDeprecated), - string(ApplicationGatewayRuleSetStatusOptionsGA), - string(ApplicationGatewayRuleSetStatusOptionsPreview), - string(ApplicationGatewayRuleSetStatusOptionsSupported), - } -} - -func (s *ApplicationGatewayRuleSetStatusOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRuleSetStatusOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRuleSetStatusOptions(input string) (*ApplicationGatewayRuleSetStatusOptions, error) { - vals := map[string]ApplicationGatewayRuleSetStatusOptions{ - "deprecated": ApplicationGatewayRuleSetStatusOptionsDeprecated, - "ga": ApplicationGatewayRuleSetStatusOptionsGA, - "preview": ApplicationGatewayRuleSetStatusOptionsPreview, - "supported": ApplicationGatewayRuleSetStatusOptionsSupported, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRuleSetStatusOptions(input) - return &out, nil -} - -type ApplicationGatewayTierTypes string - -const ( - ApplicationGatewayTierTypesStandard ApplicationGatewayTierTypes = "Standard" - ApplicationGatewayTierTypesStandardVTwo ApplicationGatewayTierTypes = "Standard_v2" - ApplicationGatewayTierTypesWAF ApplicationGatewayTierTypes = "WAF" - ApplicationGatewayTierTypesWAFVTwo ApplicationGatewayTierTypes = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTierTypes() []string { - return []string{ - string(ApplicationGatewayTierTypesStandard), - string(ApplicationGatewayTierTypesStandardVTwo), - string(ApplicationGatewayTierTypesWAF), - string(ApplicationGatewayTierTypesWAFVTwo), - } -} - -func (s *ApplicationGatewayTierTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTierTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTierTypes(input string) (*ApplicationGatewayTierTypes, error) { - vals := map[string]ApplicationGatewayTierTypes{ - "standard": ApplicationGatewayTierTypesStandard, - "standard_v2": ApplicationGatewayTierTypesStandardVTwo, - "waf": ApplicationGatewayTierTypesWAF, - "waf_v2": ApplicationGatewayTierTypesWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTierTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleActionTypes string - -const ( - ApplicationGatewayWafRuleActionTypesAllow ApplicationGatewayWafRuleActionTypes = "Allow" - ApplicationGatewayWafRuleActionTypesAnomalyScoring ApplicationGatewayWafRuleActionTypes = "AnomalyScoring" - ApplicationGatewayWafRuleActionTypesBlock ApplicationGatewayWafRuleActionTypes = "Block" - ApplicationGatewayWafRuleActionTypesLog ApplicationGatewayWafRuleActionTypes = "Log" - ApplicationGatewayWafRuleActionTypesNone ApplicationGatewayWafRuleActionTypes = "None" -) - -func PossibleValuesForApplicationGatewayWafRuleActionTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleActionTypesAllow), - string(ApplicationGatewayWafRuleActionTypesAnomalyScoring), - string(ApplicationGatewayWafRuleActionTypesBlock), - string(ApplicationGatewayWafRuleActionTypesLog), - string(ApplicationGatewayWafRuleActionTypesNone), - } -} - -func (s *ApplicationGatewayWafRuleActionTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleActionTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleActionTypes(input string) (*ApplicationGatewayWafRuleActionTypes, error) { - vals := map[string]ApplicationGatewayWafRuleActionTypes{ - "allow": ApplicationGatewayWafRuleActionTypesAllow, - "anomalyscoring": ApplicationGatewayWafRuleActionTypesAnomalyScoring, - "block": ApplicationGatewayWafRuleActionTypesBlock, - "log": ApplicationGatewayWafRuleActionTypesLog, - "none": ApplicationGatewayWafRuleActionTypesNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleActionTypes(input) - return &out, nil -} - -type ApplicationGatewayWafRuleStateTypes string - -const ( - ApplicationGatewayWafRuleStateTypesDisabled ApplicationGatewayWafRuleStateTypes = "Disabled" - ApplicationGatewayWafRuleStateTypesEnabled ApplicationGatewayWafRuleStateTypes = "Enabled" -) - -func PossibleValuesForApplicationGatewayWafRuleStateTypes() []string { - return []string{ - string(ApplicationGatewayWafRuleStateTypesDisabled), - string(ApplicationGatewayWafRuleStateTypesEnabled), - } -} - -func (s *ApplicationGatewayWafRuleStateTypes) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayWafRuleStateTypes(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayWafRuleStateTypes(input string) (*ApplicationGatewayWafRuleStateTypes, error) { - vals := map[string]ApplicationGatewayWafRuleStateTypes{ - "disabled": ApplicationGatewayWafRuleStateTypesDisabled, - "enabled": ApplicationGatewayWafRuleStateTypesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayWafRuleStateTypes(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/id_location.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/id_location.go deleted file mode 100644 index d3b01a8cfce..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/id_location_test.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/id_location_test.go deleted file mode 100644 index 276af30c32d..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsdefaultget.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsdefaultget.go deleted file mode 100644 index e9251c3e225..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsdefaultget.go +++ /dev/null @@ -1,52 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestsDefaultGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationGatewayWafDynamicManifestResult -} - -// ApplicationGatewayWafDynamicManifestsDefaultGet ... -func (c ApplicationGatewayWafDynamicManifestsClient) ApplicationGatewayWafDynamicManifestsDefaultGet(ctx context.Context, id LocationId) (result ApplicationGatewayWafDynamicManifestsDefaultGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/applicationGatewayWafDynamicManifests/dafault", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsget.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsget.go deleted file mode 100644 index b66cd668d1f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/method_applicationgatewaywafdynamicmanifestsget.go +++ /dev/null @@ -1,89 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationGatewayWafDynamicManifestResult -} - -type ApplicationGatewayWafDynamicManifestsGetCompleteResult struct { - Items []ApplicationGatewayWafDynamicManifestResult -} - -// ApplicationGatewayWafDynamicManifestsGet ... -func (c ApplicationGatewayWafDynamicManifestsClient) ApplicationGatewayWafDynamicManifestsGet(ctx context.Context, id LocationId) (result ApplicationGatewayWafDynamicManifestsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/applicationGatewayWafDynamicManifests", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationGatewayWafDynamicManifestResult `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ApplicationGatewayWafDynamicManifestsGetComplete retrieves all the results into a single object -func (c ApplicationGatewayWafDynamicManifestsClient) ApplicationGatewayWafDynamicManifestsGetComplete(ctx context.Context, id LocationId) (ApplicationGatewayWafDynamicManifestsGetCompleteResult, error) { - return c.ApplicationGatewayWafDynamicManifestsGetCompleteMatchingPredicate(ctx, id, ApplicationGatewayWafDynamicManifestResultOperationPredicate{}) -} - -// ApplicationGatewayWafDynamicManifestsGetCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationGatewayWafDynamicManifestsClient) ApplicationGatewayWafDynamicManifestsGetCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate ApplicationGatewayWafDynamicManifestResultOperationPredicate) (result ApplicationGatewayWafDynamicManifestsGetCompleteResult, err error) { - items := make([]ApplicationGatewayWafDynamicManifestResult, 0) - - resp, err := c.ApplicationGatewayWafDynamicManifestsGet(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ApplicationGatewayWafDynamicManifestsGetCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallmanifestruleset.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallmanifestruleset.go deleted file mode 100644 index 401a87a86a8..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallmanifestruleset.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallManifestRuleSet struct { - RuleGroups []ApplicationGatewayFirewallRuleGroup `json:"ruleGroups"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` - Status *ApplicationGatewayRuleSetStatusOptions `json:"status,omitempty"` - Tiers *[]ApplicationGatewayTierTypes `json:"tiers,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrule.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrule.go deleted file mode 100644 index 723193ddc36..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRule struct { - Action *ApplicationGatewayWafRuleActionTypes `json:"action,omitempty"` - Description *string `json:"description,omitempty"` - RuleId int64 `json:"ruleId"` - RuleIdString *string `json:"ruleIdString,omitempty"` - State *ApplicationGatewayWafRuleStateTypes `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrulegroup.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrulegroup.go deleted file mode 100644 index f9aefdfc147..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewayfirewallrulegroup.go +++ /dev/null @@ -1,10 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallRuleGroup struct { - Description *string `json:"description,omitempty"` - RuleGroupName string `json:"ruleGroupName"` - Rules []ApplicationGatewayFirewallRule `json:"rules"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestpropertiesresult.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestpropertiesresult.go deleted file mode 100644 index d68d61add58..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestpropertiesresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestPropertiesResult struct { - AvailableRuleSets *[]ApplicationGatewayFirewallManifestRuleSet `json:"availableRuleSets,omitempty"` - DefaultRuleSet *DefaultRuleSetPropertyFormat `json:"defaultRuleSet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestresult.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestresult.go deleted file mode 100644 index 763ec4aad23..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_applicationgatewaywafdynamicmanifestresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestResult struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayWafDynamicManifestPropertiesResult `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_defaultrulesetpropertyformat.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_defaultrulesetpropertyformat.go deleted file mode 100644 index b69c307217f..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/model_defaultrulesetpropertyformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultRuleSetPropertyFormat struct { - RuleSetType *string `json:"ruleSetType,omitempty"` - RuleSetVersion *string `json:"ruleSetVersion,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/predicates.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/predicates.go deleted file mode 100644 index 9714d21637e..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWafDynamicManifestResultOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p ApplicationGatewayWafDynamicManifestResultOperationPredicate) Matches(input ApplicationGatewayWafDynamicManifestResult) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/version.go b/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/version.go deleted file mode 100644 index e2c73c88634..00000000000 --- a/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationgatewaywafdynamicmanifests - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationgatewaywafdynamicmanifests/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/README.md b/resource-manager/network/2022-11-01/applicationsecuritygroups/README.md deleted file mode 100644 index 0e7fbf9ef12..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationsecuritygroups` Documentation - -The `applicationsecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationsecuritygroups" -``` - - -### Client Initialization - -```go -client := applicationsecuritygroups.NewApplicationSecurityGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - -payload := applicationsecuritygroups.ApplicationSecurityGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.Delete` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.Get` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.List` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.ListAll` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ApplicationSecurityGroupsClient.UpdateTags` - -```go -ctx := context.TODO() -id := applicationsecuritygroups.NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - -payload := applicationsecuritygroups.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/client.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/client.go deleted file mode 100644 index dd9e39290e5..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package applicationsecuritygroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupsClient struct { - Client *resourcemanager.Client -} - -func NewApplicationSecurityGroupsClientWithBaseURI(api environments.Api) (*ApplicationSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "applicationsecuritygroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ApplicationSecurityGroupsClient: %+v", err) - } - - return &ApplicationSecurityGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/constants.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/constants.go deleted file mode 100644 index a226eb6274e..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package applicationsecuritygroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/id_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/id_applicationsecuritygroup.go deleted file mode 100644 index 34de777e09e..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/id_applicationsecuritygroup.go +++ /dev/null @@ -1,127 +0,0 @@ -package applicationsecuritygroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationSecurityGroupId{} - -// ApplicationSecurityGroupId is a struct representing the Resource ID for a Application Security Group -type ApplicationSecurityGroupId struct { - SubscriptionId string - ResourceGroupName string - ApplicationSecurityGroupName string -} - -// NewApplicationSecurityGroupID returns a new ApplicationSecurityGroupId struct -func NewApplicationSecurityGroupID(subscriptionId string, resourceGroupName string, applicationSecurityGroupName string) ApplicationSecurityGroupId { - return ApplicationSecurityGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationSecurityGroupName: applicationSecurityGroupName, - } -} - -// ParseApplicationSecurityGroupID parses 'input' into a ApplicationSecurityGroupId -func ParseApplicationSecurityGroupID(input string) (*ApplicationSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationSecurityGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationSecurityGroupName, ok = parsed.Parsed["applicationSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ParseApplicationSecurityGroupIDInsensitively parses 'input' case-insensitively into a ApplicationSecurityGroupId -// note: this method should only be used for API response data and not user input -func ParseApplicationSecurityGroupIDInsensitively(input string) (*ApplicationSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationSecurityGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationSecurityGroupName, ok = parsed.Parsed["applicationSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationSecurityGroupID checks that 'input' can be parsed as a Application Security Group ID -func ValidateApplicationSecurityGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationSecurityGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Security Group ID -func (id ApplicationSecurityGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationSecurityGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationSecurityGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Security Group ID -func (id ApplicationSecurityGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationSecurityGroups", "applicationSecurityGroups", "applicationSecurityGroups"), - resourceids.UserSpecifiedSegment("applicationSecurityGroupName", "applicationSecurityGroupValue"), - } -} - -// String returns a human-readable description of this Application Security Group ID -func (id ApplicationSecurityGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Security Group Name: %q", id.ApplicationSecurityGroupName), - } - return fmt.Sprintf("Application Security Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/id_applicationsecuritygroup_test.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/id_applicationsecuritygroup_test.go deleted file mode 100644 index ebc46257074..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/id_applicationsecuritygroup_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package applicationsecuritygroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationSecurityGroupId{} - -func TestNewApplicationSecurityGroupID(t *testing.T) { - id := NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationSecurityGroupName != "applicationSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationSecurityGroupName'", id.ApplicationSecurityGroupName, "applicationSecurityGroupValue") - } -} - -func TestFormatApplicationSecurityGroupID(t *testing.T) { - actual := NewApplicationSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationSecurityGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationSecurityGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue", - Expected: &ApplicationSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationSecurityGroupName: "applicationSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationSecurityGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationSecurityGroupName != v.Expected.ApplicationSecurityGroupName { - t.Fatalf("Expected %q but got %q for ApplicationSecurityGroupName", v.Expected.ApplicationSecurityGroupName, actual.ApplicationSecurityGroupName) - } - - } -} - -func TestParseApplicationSecurityGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnSeCuRiTyGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue", - Expected: &ApplicationSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationSecurityGroupName: "applicationSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationSecurityGroups/applicationSecurityGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnSeCuRiTyGrOuPs/aPpLiCaTiOnSeCuRiTyGrOuPvAlUe", - Expected: &ApplicationSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationSecurityGroupName: "aPpLiCaTiOnSeCuRiTyGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnSeCuRiTyGrOuPs/aPpLiCaTiOnSeCuRiTyGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationSecurityGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationSecurityGroupName != v.Expected.ApplicationSecurityGroupName { - t.Fatalf("Expected %q but got %q for ApplicationSecurityGroupName", v.Expected.ApplicationSecurityGroupName, actual.ApplicationSecurityGroupName) - } - - } -} - -func TestSegmentsForApplicationSecurityGroupId(t *testing.T) { - segments := ApplicationSecurityGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationSecurityGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_createorupdate.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/method_createorupdate.go deleted file mode 100644 index 51dcdb4cbf6..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context, id ApplicationSecurityGroupId, input ApplicationSecurityGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ApplicationSecurityGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id ApplicationSecurityGroupId, input ApplicationSecurityGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_delete.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/method_delete.go deleted file mode 100644 index 6d16cb628e3..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ApplicationSecurityGroupsClient) Delete(ctx context.Context, id ApplicationSecurityGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ApplicationSecurityGroupsClient) DeleteThenPoll(ctx context.Context, id ApplicationSecurityGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_get.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/method_get.go deleted file mode 100644 index a81313eb113..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationSecurityGroup -} - -// Get ... -func (c ApplicationSecurityGroupsClient) Get(ctx context.Context, id ApplicationSecurityGroupId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_list.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/method_list.go deleted file mode 100644 index e51ea3e4de4..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationSecurityGroup -} - -type ListCompleteResult struct { - Items []ApplicationSecurityGroup -} - -// List ... -func (c ApplicationSecurityGroupsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationSecurityGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ApplicationSecurityGroupsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ApplicationSecurityGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationSecurityGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ApplicationSecurityGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ApplicationSecurityGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_listall.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/method_listall.go deleted file mode 100644 index 5e4e6a5c78e..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ApplicationSecurityGroup -} - -type ListAllCompleteResult struct { - Items []ApplicationSecurityGroup -} - -// ListAll ... -func (c ApplicationSecurityGroupsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ApplicationSecurityGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c ApplicationSecurityGroupsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, ApplicationSecurityGroupOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ApplicationSecurityGroupsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ApplicationSecurityGroupOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]ApplicationSecurityGroup, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_updatetags.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/method_updatetags.go deleted file mode 100644 index 028c5bdca55..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package applicationsecuritygroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ApplicationSecurityGroup -} - -// UpdateTags ... -func (c ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, id ApplicationSecurityGroupId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/model_applicationsecuritygroup.go deleted file mode 100644 index 56c89e2151e..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package applicationsecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index c54772935da..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package applicationsecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/model_tagsobject.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/model_tagsobject.go deleted file mode 100644 index b945e6c9cdf..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package applicationsecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/predicates.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/predicates.go deleted file mode 100644 index 6ea534ecd89..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package applicationsecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ApplicationSecurityGroupOperationPredicate) Matches(input ApplicationSecurityGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/applicationsecuritygroups/version.go b/resource-manager/network/2022-11-01/applicationsecuritygroups/version.go deleted file mode 100644 index f9c7cb34ba4..00000000000 --- a/resource-manager/network/2022-11-01/applicationsecuritygroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package applicationsecuritygroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/applicationsecuritygroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/README.md b/resource-manager/network/2022-11-01/availabledelegations/README.md deleted file mode 100644 index 51c76c27829..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/availabledelegations` Documentation - -The `availabledelegations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/availabledelegations" -``` - - -### Client Initialization - -```go -client := availabledelegations.NewAvailableDelegationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AvailableDelegationsClient.AvailableDelegationsList` - -```go -ctx := context.TODO() -id := availabledelegations.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailableDelegationsList(ctx, id)` can be used to do batched pagination -items, err := client.AvailableDelegationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AvailableDelegationsClient.AvailableResourceGroupDelegationsList` - -```go -ctx := context.TODO() -id := availabledelegations.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -// alternatively `client.AvailableResourceGroupDelegationsList(ctx, id)` can be used to do batched pagination -items, err := client.AvailableResourceGroupDelegationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/availabledelegations/client.go b/resource-manager/network/2022-11-01/availabledelegations/client.go deleted file mode 100644 index 89733dd49b8..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package availabledelegations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableDelegationsClient struct { - Client *resourcemanager.Client -} - -func NewAvailableDelegationsClientWithBaseURI(api environments.Api) (*AvailableDelegationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "availabledelegations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AvailableDelegationsClient: %+v", err) - } - - return &AvailableDelegationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/id_location.go b/resource-manager/network/2022-11-01/availabledelegations/id_location.go deleted file mode 100644 index a6a158e88e6..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package availabledelegations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/id_location_test.go b/resource-manager/network/2022-11-01/availabledelegations/id_location_test.go deleted file mode 100644 index a854fb044de..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package availabledelegations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/id_providerlocation.go b/resource-manager/network/2022-11-01/availabledelegations/id_providerlocation.go deleted file mode 100644 index a5f5134b65c..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/id_providerlocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package availabledelegations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -// ProviderLocationId is a struct representing the Resource ID for a Provider Location -type ProviderLocationId struct { - SubscriptionId string - ResourceGroupName string - LocationName string -} - -// NewProviderLocationID returns a new ProviderLocationId struct -func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { - return ProviderLocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocationName: locationName, - } -} - -// ParseProviderLocationID parses 'input' into a ProviderLocationId -func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId -// note: this method should only be used for API response data and not user input -func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID -func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Location ID -func (id ProviderLocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID -func (id ProviderLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Provider Location ID -func (id ProviderLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/id_providerlocation_test.go b/resource-manager/network/2022-11-01/availabledelegations/id_providerlocation_test.go deleted file mode 100644 index b985368704f..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/id_providerlocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package availabledelegations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -func TestNewProviderLocationID(t *testing.T) { - id := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatProviderLocationID(t *testing.T) { - actual := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseProviderLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForProviderLocationId(t *testing.T) { - segments := ProviderLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/method_availabledelegationslist.go b/resource-manager/network/2022-11-01/availabledelegations/method_availabledelegationslist.go deleted file mode 100644 index 599360cc21d..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/method_availabledelegationslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package availabledelegations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableDelegationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailableDelegation -} - -type AvailableDelegationsListCompleteResult struct { - Items []AvailableDelegation -} - -// AvailableDelegationsList ... -func (c AvailableDelegationsClient) AvailableDelegationsList(ctx context.Context, id LocationId) (result AvailableDelegationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableDelegations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailableDelegation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableDelegationsListComplete retrieves all the results into a single object -func (c AvailableDelegationsClient) AvailableDelegationsListComplete(ctx context.Context, id LocationId) (AvailableDelegationsListCompleteResult, error) { - return c.AvailableDelegationsListCompleteMatchingPredicate(ctx, id, AvailableDelegationOperationPredicate{}) -} - -// AvailableDelegationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AvailableDelegationsClient) AvailableDelegationsListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AvailableDelegationOperationPredicate) (result AvailableDelegationsListCompleteResult, err error) { - items := make([]AvailableDelegation, 0) - - resp, err := c.AvailableDelegationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableDelegationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/method_availableresourcegroupdelegationslist.go b/resource-manager/network/2022-11-01/availabledelegations/method_availableresourcegroupdelegationslist.go deleted file mode 100644 index a7d442c92c9..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/method_availableresourcegroupdelegationslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package availabledelegations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableResourceGroupDelegationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailableDelegation -} - -type AvailableResourceGroupDelegationsListCompleteResult struct { - Items []AvailableDelegation -} - -// AvailableResourceGroupDelegationsList ... -func (c AvailableDelegationsClient) AvailableResourceGroupDelegationsList(ctx context.Context, id ProviderLocationId) (result AvailableResourceGroupDelegationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableDelegations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailableDelegation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableResourceGroupDelegationsListComplete retrieves all the results into a single object -func (c AvailableDelegationsClient) AvailableResourceGroupDelegationsListComplete(ctx context.Context, id ProviderLocationId) (AvailableResourceGroupDelegationsListCompleteResult, error) { - return c.AvailableResourceGroupDelegationsListCompleteMatchingPredicate(ctx, id, AvailableDelegationOperationPredicate{}) -} - -// AvailableResourceGroupDelegationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AvailableDelegationsClient) AvailableResourceGroupDelegationsListCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AvailableDelegationOperationPredicate) (result AvailableResourceGroupDelegationsListCompleteResult, err error) { - items := make([]AvailableDelegation, 0) - - resp, err := c.AvailableResourceGroupDelegationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableResourceGroupDelegationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/model_availabledelegation.go b/resource-manager/network/2022-11-01/availabledelegations/model_availabledelegation.go deleted file mode 100644 index 0fa5dba60d1..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/model_availabledelegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package availabledelegations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableDelegation struct { - Actions *[]string `json:"actions,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/predicates.go b/resource-manager/network/2022-11-01/availabledelegations/predicates.go deleted file mode 100644 index caf6b904077..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package availabledelegations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableDelegationOperationPredicate struct { - Id *string - Name *string - ServiceName *string - Type *string -} - -func (p AvailableDelegationOperationPredicate) Matches(input AvailableDelegation) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.ServiceName != nil && (input.ServiceName == nil || *p.ServiceName != *input.ServiceName) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/availabledelegations/version.go b/resource-manager/network/2022-11-01/availabledelegations/version.go deleted file mode 100644 index 2fdd189c378..00000000000 --- a/resource-manager/network/2022-11-01/availabledelegations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package availabledelegations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availabledelegations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/README.md b/resource-manager/network/2022-11-01/availableservicealiases/README.md deleted file mode 100644 index c9ee65e680c..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/availableservicealiases` Documentation - -The `availableservicealiases` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/availableservicealiases" -``` - - -### Client Initialization - -```go -client := availableservicealiases.NewAvailableServiceAliasesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AvailableServiceAliasesClient.AvailableServiceAliasesList` - -```go -ctx := context.TODO() -id := availableservicealiases.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailableServiceAliasesList(ctx, id)` can be used to do batched pagination -items, err := client.AvailableServiceAliasesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AvailableServiceAliasesClient.AvailableServiceAliasesListByResourceGroup` - -```go -ctx := context.TODO() -id := availableservicealiases.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -// alternatively `client.AvailableServiceAliasesListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.AvailableServiceAliasesListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/availableservicealiases/client.go b/resource-manager/network/2022-11-01/availableservicealiases/client.go deleted file mode 100644 index d4e19363f94..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package availableservicealiases - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAliasesClient struct { - Client *resourcemanager.Client -} - -func NewAvailableServiceAliasesClientWithBaseURI(api environments.Api) (*AvailableServiceAliasesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "availableservicealiases", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AvailableServiceAliasesClient: %+v", err) - } - - return &AvailableServiceAliasesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/id_location.go b/resource-manager/network/2022-11-01/availableservicealiases/id_location.go deleted file mode 100644 index 7d25a1ec759..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package availableservicealiases - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/id_location_test.go b/resource-manager/network/2022-11-01/availableservicealiases/id_location_test.go deleted file mode 100644 index b9a374cf8e2..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package availableservicealiases - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/id_providerlocation.go b/resource-manager/network/2022-11-01/availableservicealiases/id_providerlocation.go deleted file mode 100644 index 0eb12f2b132..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/id_providerlocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package availableservicealiases - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -// ProviderLocationId is a struct representing the Resource ID for a Provider Location -type ProviderLocationId struct { - SubscriptionId string - ResourceGroupName string - LocationName string -} - -// NewProviderLocationID returns a new ProviderLocationId struct -func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { - return ProviderLocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocationName: locationName, - } -} - -// ParseProviderLocationID parses 'input' into a ProviderLocationId -func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId -// note: this method should only be used for API response data and not user input -func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID -func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Location ID -func (id ProviderLocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID -func (id ProviderLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Provider Location ID -func (id ProviderLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/id_providerlocation_test.go b/resource-manager/network/2022-11-01/availableservicealiases/id_providerlocation_test.go deleted file mode 100644 index 84a80aa5845..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/id_providerlocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package availableservicealiases - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -func TestNewProviderLocationID(t *testing.T) { - id := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatProviderLocationID(t *testing.T) { - actual := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseProviderLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForProviderLocationId(t *testing.T) { - segments := ProviderLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/method_availableservicealiaseslist.go b/resource-manager/network/2022-11-01/availableservicealiases/method_availableservicealiaseslist.go deleted file mode 100644 index 3643de63000..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/method_availableservicealiaseslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package availableservicealiases - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAliasesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailableServiceAlias -} - -type AvailableServiceAliasesListCompleteResult struct { - Items []AvailableServiceAlias -} - -// AvailableServiceAliasesList ... -func (c AvailableServiceAliasesClient) AvailableServiceAliasesList(ctx context.Context, id LocationId) (result AvailableServiceAliasesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableServiceAliases", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailableServiceAlias `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableServiceAliasesListComplete retrieves all the results into a single object -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListComplete(ctx context.Context, id LocationId) (AvailableServiceAliasesListCompleteResult, error) { - return c.AvailableServiceAliasesListCompleteMatchingPredicate(ctx, id, AvailableServiceAliasOperationPredicate{}) -} - -// AvailableServiceAliasesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AvailableServiceAliasOperationPredicate) (result AvailableServiceAliasesListCompleteResult, err error) { - items := make([]AvailableServiceAlias, 0) - - resp, err := c.AvailableServiceAliasesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableServiceAliasesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/method_availableservicealiaseslistbyresourcegroup.go b/resource-manager/network/2022-11-01/availableservicealiases/method_availableservicealiaseslistbyresourcegroup.go deleted file mode 100644 index a6ef5ba7a97..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/method_availableservicealiaseslistbyresourcegroup.go +++ /dev/null @@ -1,89 +0,0 @@ -package availableservicealiases - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAliasesListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailableServiceAlias -} - -type AvailableServiceAliasesListByResourceGroupCompleteResult struct { - Items []AvailableServiceAlias -} - -// AvailableServiceAliasesListByResourceGroup ... -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListByResourceGroup(ctx context.Context, id ProviderLocationId) (result AvailableServiceAliasesListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availableServiceAliases", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailableServiceAlias `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableServiceAliasesListByResourceGroupComplete retrieves all the results into a single object -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListByResourceGroupComplete(ctx context.Context, id ProviderLocationId) (AvailableServiceAliasesListByResourceGroupCompleteResult, error) { - return c.AvailableServiceAliasesListByResourceGroupCompleteMatchingPredicate(ctx, id, AvailableServiceAliasOperationPredicate{}) -} - -// AvailableServiceAliasesListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AvailableServiceAliasesClient) AvailableServiceAliasesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AvailableServiceAliasOperationPredicate) (result AvailableServiceAliasesListByResourceGroupCompleteResult, err error) { - items := make([]AvailableServiceAlias, 0) - - resp, err := c.AvailableServiceAliasesListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableServiceAliasesListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/model_availableservicealias.go b/resource-manager/network/2022-11-01/availableservicealiases/model_availableservicealias.go deleted file mode 100644 index b5f6cfd263b..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/model_availableservicealias.go +++ /dev/null @@ -1,11 +0,0 @@ -package availableservicealiases - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAlias struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ResourceName *string `json:"resourceName,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/predicates.go b/resource-manager/network/2022-11-01/availableservicealiases/predicates.go deleted file mode 100644 index afe2abff9ab..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package availableservicealiases - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableServiceAliasOperationPredicate struct { - Id *string - Name *string - ResourceName *string - Type *string -} - -func (p AvailableServiceAliasOperationPredicate) Matches(input AvailableServiceAlias) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.ResourceName != nil && (input.ResourceName == nil || *p.ResourceName != *input.ResourceName) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/availableservicealiases/version.go b/resource-manager/network/2022-11-01/availableservicealiases/version.go deleted file mode 100644 index a5657a9842c..00000000000 --- a/resource-manager/network/2022-11-01/availableservicealiases/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package availableservicealiases - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/availableservicealiases/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/README.md b/resource-manager/network/2022-11-01/azurefirewalls/README.md deleted file mode 100644 index 7ff48585364..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/README.md +++ /dev/null @@ -1,145 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/azurefirewalls` Documentation - -The `azurefirewalls` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/azurefirewalls" -``` - - -### Client Initialization - -```go -client := azurefirewalls.NewAzureFirewallsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `AzureFirewallsClient.AzureFirewallsListLearnedPrefixes` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -if err := client.AzureFirewallsListLearnedPrefixesThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `AzureFirewallsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -payload := azurefirewalls.AzureFirewall{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AzureFirewallsClient.Delete` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `AzureFirewallsClient.Get` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `AzureFirewallsClient.List` - -```go -ctx := context.TODO() -id := azurefirewalls.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AzureFirewallsClient.ListAll` - -```go -ctx := context.TODO() -id := azurefirewalls.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `AzureFirewallsClient.PacketCapture` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -payload := azurefirewalls.FirewallPacketCaptureParameters{ - // ... -} - - -if err := client.PacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `AzureFirewallsClient.UpdateTags` - -```go -ctx := context.TODO() -id := azurefirewalls.NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - -payload := azurefirewalls.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/azurefirewalls/client.go b/resource-manager/network/2022-11-01/azurefirewalls/client.go deleted file mode 100644 index 3ea45e69959..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package azurefirewalls - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallsClient struct { - Client *resourcemanager.Client -} - -func NewAzureFirewallsClientWithBaseURI(api environments.Api) (*AzureFirewallsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "azurefirewalls", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating AzureFirewallsClient: %+v", err) - } - - return &AzureFirewallsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/constants.go b/resource-manager/network/2022-11-01/azurefirewalls/constants.go deleted file mode 100644 index d7a3af8fb71..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/constants.go +++ /dev/null @@ -1,412 +0,0 @@ -package azurefirewalls - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRuleProtocolType string - -const ( - AzureFirewallApplicationRuleProtocolTypeHTTP AzureFirewallApplicationRuleProtocolType = "Http" - AzureFirewallApplicationRuleProtocolTypeHTTPS AzureFirewallApplicationRuleProtocolType = "Https" - AzureFirewallApplicationRuleProtocolTypeMssql AzureFirewallApplicationRuleProtocolType = "Mssql" -) - -func PossibleValuesForAzureFirewallApplicationRuleProtocolType() []string { - return []string{ - string(AzureFirewallApplicationRuleProtocolTypeHTTP), - string(AzureFirewallApplicationRuleProtocolTypeHTTPS), - string(AzureFirewallApplicationRuleProtocolTypeMssql), - } -} - -func (s *AzureFirewallApplicationRuleProtocolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallApplicationRuleProtocolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallApplicationRuleProtocolType(input string) (*AzureFirewallApplicationRuleProtocolType, error) { - vals := map[string]AzureFirewallApplicationRuleProtocolType{ - "http": AzureFirewallApplicationRuleProtocolTypeHTTP, - "https": AzureFirewallApplicationRuleProtocolTypeHTTPS, - "mssql": AzureFirewallApplicationRuleProtocolTypeMssql, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallApplicationRuleProtocolType(input) - return &out, nil -} - -type AzureFirewallNatRCActionType string - -const ( - AzureFirewallNatRCActionTypeDnat AzureFirewallNatRCActionType = "Dnat" - AzureFirewallNatRCActionTypeSnat AzureFirewallNatRCActionType = "Snat" -) - -func PossibleValuesForAzureFirewallNatRCActionType() []string { - return []string{ - string(AzureFirewallNatRCActionTypeDnat), - string(AzureFirewallNatRCActionTypeSnat), - } -} - -func (s *AzureFirewallNatRCActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallNatRCActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallNatRCActionType(input string) (*AzureFirewallNatRCActionType, error) { - vals := map[string]AzureFirewallNatRCActionType{ - "dnat": AzureFirewallNatRCActionTypeDnat, - "snat": AzureFirewallNatRCActionTypeSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallNatRCActionType(input) - return &out, nil -} - -type AzureFirewallNetworkRuleProtocol string - -const ( - AzureFirewallNetworkRuleProtocolAny AzureFirewallNetworkRuleProtocol = "Any" - AzureFirewallNetworkRuleProtocolICMP AzureFirewallNetworkRuleProtocol = "ICMP" - AzureFirewallNetworkRuleProtocolTCP AzureFirewallNetworkRuleProtocol = "TCP" - AzureFirewallNetworkRuleProtocolUDP AzureFirewallNetworkRuleProtocol = "UDP" -) - -func PossibleValuesForAzureFirewallNetworkRuleProtocol() []string { - return []string{ - string(AzureFirewallNetworkRuleProtocolAny), - string(AzureFirewallNetworkRuleProtocolICMP), - string(AzureFirewallNetworkRuleProtocolTCP), - string(AzureFirewallNetworkRuleProtocolUDP), - } -} - -func (s *AzureFirewallNetworkRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallNetworkRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallNetworkRuleProtocol(input string) (*AzureFirewallNetworkRuleProtocol, error) { - vals := map[string]AzureFirewallNetworkRuleProtocol{ - "any": AzureFirewallNetworkRuleProtocolAny, - "icmp": AzureFirewallNetworkRuleProtocolICMP, - "tcp": AzureFirewallNetworkRuleProtocolTCP, - "udp": AzureFirewallNetworkRuleProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallNetworkRuleProtocol(input) - return &out, nil -} - -type AzureFirewallPacketCaptureFlagsType string - -const ( - AzureFirewallPacketCaptureFlagsTypeAck AzureFirewallPacketCaptureFlagsType = "ack" - AzureFirewallPacketCaptureFlagsTypeFin AzureFirewallPacketCaptureFlagsType = "fin" - AzureFirewallPacketCaptureFlagsTypePush AzureFirewallPacketCaptureFlagsType = "push" - AzureFirewallPacketCaptureFlagsTypeRst AzureFirewallPacketCaptureFlagsType = "rst" - AzureFirewallPacketCaptureFlagsTypeSyn AzureFirewallPacketCaptureFlagsType = "syn" - AzureFirewallPacketCaptureFlagsTypeUrg AzureFirewallPacketCaptureFlagsType = "urg" -) - -func PossibleValuesForAzureFirewallPacketCaptureFlagsType() []string { - return []string{ - string(AzureFirewallPacketCaptureFlagsTypeAck), - string(AzureFirewallPacketCaptureFlagsTypeFin), - string(AzureFirewallPacketCaptureFlagsTypePush), - string(AzureFirewallPacketCaptureFlagsTypeRst), - string(AzureFirewallPacketCaptureFlagsTypeSyn), - string(AzureFirewallPacketCaptureFlagsTypeUrg), - } -} - -func (s *AzureFirewallPacketCaptureFlagsType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallPacketCaptureFlagsType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallPacketCaptureFlagsType(input string) (*AzureFirewallPacketCaptureFlagsType, error) { - vals := map[string]AzureFirewallPacketCaptureFlagsType{ - "ack": AzureFirewallPacketCaptureFlagsTypeAck, - "fin": AzureFirewallPacketCaptureFlagsTypeFin, - "push": AzureFirewallPacketCaptureFlagsTypePush, - "rst": AzureFirewallPacketCaptureFlagsTypeRst, - "syn": AzureFirewallPacketCaptureFlagsTypeSyn, - "urg": AzureFirewallPacketCaptureFlagsTypeUrg, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallPacketCaptureFlagsType(input) - return &out, nil -} - -type AzureFirewallRCActionType string - -const ( - AzureFirewallRCActionTypeAllow AzureFirewallRCActionType = "Allow" - AzureFirewallRCActionTypeDeny AzureFirewallRCActionType = "Deny" -) - -func PossibleValuesForAzureFirewallRCActionType() []string { - return []string{ - string(AzureFirewallRCActionTypeAllow), - string(AzureFirewallRCActionTypeDeny), - } -} - -func (s *AzureFirewallRCActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallRCActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallRCActionType(input string) (*AzureFirewallRCActionType, error) { - vals := map[string]AzureFirewallRCActionType{ - "allow": AzureFirewallRCActionTypeAllow, - "deny": AzureFirewallRCActionTypeDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallRCActionType(input) - return &out, nil -} - -type AzureFirewallSkuName string - -const ( - AzureFirewallSkuNameAZFWHub AzureFirewallSkuName = "AZFW_Hub" - AzureFirewallSkuNameAZFWVNet AzureFirewallSkuName = "AZFW_VNet" -) - -func PossibleValuesForAzureFirewallSkuName() []string { - return []string{ - string(AzureFirewallSkuNameAZFWHub), - string(AzureFirewallSkuNameAZFWVNet), - } -} - -func (s *AzureFirewallSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallSkuName(input string) (*AzureFirewallSkuName, error) { - vals := map[string]AzureFirewallSkuName{ - "azfw_hub": AzureFirewallSkuNameAZFWHub, - "azfw_vnet": AzureFirewallSkuNameAZFWVNet, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallSkuName(input) - return &out, nil -} - -type AzureFirewallSkuTier string - -const ( - AzureFirewallSkuTierBasic AzureFirewallSkuTier = "Basic" - AzureFirewallSkuTierPremium AzureFirewallSkuTier = "Premium" - AzureFirewallSkuTierStandard AzureFirewallSkuTier = "Standard" -) - -func PossibleValuesForAzureFirewallSkuTier() []string { - return []string{ - string(AzureFirewallSkuTierBasic), - string(AzureFirewallSkuTierPremium), - string(AzureFirewallSkuTierStandard), - } -} - -func (s *AzureFirewallSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallSkuTier(input string) (*AzureFirewallSkuTier, error) { - vals := map[string]AzureFirewallSkuTier{ - "basic": AzureFirewallSkuTierBasic, - "premium": AzureFirewallSkuTierPremium, - "standard": AzureFirewallSkuTierStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallSkuTier(input) - return &out, nil -} - -type AzureFirewallThreatIntelMode string - -const ( - AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" - AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" - AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" -) - -func PossibleValuesForAzureFirewallThreatIntelMode() []string { - return []string{ - string(AzureFirewallThreatIntelModeAlert), - string(AzureFirewallThreatIntelModeDeny), - string(AzureFirewallThreatIntelModeOff), - } -} - -func (s *AzureFirewallThreatIntelMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallThreatIntelMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallThreatIntelMode(input string) (*AzureFirewallThreatIntelMode, error) { - vals := map[string]AzureFirewallThreatIntelMode{ - "alert": AzureFirewallThreatIntelModeAlert, - "deny": AzureFirewallThreatIntelModeDeny, - "off": AzureFirewallThreatIntelModeOff, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallThreatIntelMode(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/id_azurefirewall.go b/resource-manager/network/2022-11-01/azurefirewalls/id_azurefirewall.go deleted file mode 100644 index 1c8e506ab97..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/id_azurefirewall.go +++ /dev/null @@ -1,127 +0,0 @@ -package azurefirewalls - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AzureFirewallId{} - -// AzureFirewallId is a struct representing the Resource ID for a Azure Firewall -type AzureFirewallId struct { - SubscriptionId string - ResourceGroupName string - AzureFirewallName string -} - -// NewAzureFirewallID returns a new AzureFirewallId struct -func NewAzureFirewallID(subscriptionId string, resourceGroupName string, azureFirewallName string) AzureFirewallId { - return AzureFirewallId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - AzureFirewallName: azureFirewallName, - } -} - -// ParseAzureFirewallID parses 'input' into a AzureFirewallId -func ParseAzureFirewallID(input string) (*AzureFirewallId, error) { - parser := resourceids.NewParserFromResourceIdType(AzureFirewallId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AzureFirewallId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AzureFirewallName, ok = parsed.Parsed["azureFirewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureFirewallName", *parsed) - } - - return &id, nil -} - -// ParseAzureFirewallIDInsensitively parses 'input' case-insensitively into a AzureFirewallId -// note: this method should only be used for API response data and not user input -func ParseAzureFirewallIDInsensitively(input string) (*AzureFirewallId, error) { - parser := resourceids.NewParserFromResourceIdType(AzureFirewallId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AzureFirewallId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.AzureFirewallName, ok = parsed.Parsed["azureFirewallName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureFirewallName", *parsed) - } - - return &id, nil -} - -// ValidateAzureFirewallID checks that 'input' can be parsed as a Azure Firewall ID -func ValidateAzureFirewallID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAzureFirewallID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Azure Firewall ID -func (id AzureFirewallId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/azureFirewalls/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.AzureFirewallName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Azure Firewall ID -func (id AzureFirewallId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticAzureFirewalls", "azureFirewalls", "azureFirewalls"), - resourceids.UserSpecifiedSegment("azureFirewallName", "azureFirewallValue"), - } -} - -// String returns a human-readable description of this Azure Firewall ID -func (id AzureFirewallId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Azure Firewall Name: %q", id.AzureFirewallName), - } - return fmt.Sprintf("Azure Firewall (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/id_azurefirewall_test.go b/resource-manager/network/2022-11-01/azurefirewalls/id_azurefirewall_test.go deleted file mode 100644 index 0eff78a3fef..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/id_azurefirewall_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package azurefirewalls - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AzureFirewallId{} - -func TestNewAzureFirewallID(t *testing.T) { - id := NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.AzureFirewallName != "azureFirewallValue" { - t.Fatalf("Expected %q but got %q for Segment 'AzureFirewallName'", id.AzureFirewallName, "azureFirewallValue") - } -} - -func TestFormatAzureFirewallID(t *testing.T) { - actual := NewAzureFirewallID("12345678-1234-9876-4563-123456789012", "example-resource-group", "azureFirewallValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseAzureFirewallID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AzureFirewallId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue", - Expected: &AzureFirewallId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - AzureFirewallName: "azureFirewallValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAzureFirewallID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.AzureFirewallName != v.Expected.AzureFirewallName { - t.Fatalf("Expected %q but got %q for AzureFirewallName", v.Expected.AzureFirewallName, actual.AzureFirewallName) - } - - } -} - -func TestParseAzureFirewallIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AzureFirewallId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReFiReWaLlS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue", - Expected: &AzureFirewallId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - AzureFirewallName: "azureFirewallValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/azureFirewalls/azureFirewallValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReFiReWaLlS/aZuReFiReWaLlVaLuE", - Expected: &AzureFirewallId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - AzureFirewallName: "aZuReFiReWaLlVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReFiReWaLlS/aZuReFiReWaLlVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAzureFirewallIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.AzureFirewallName != v.Expected.AzureFirewallName { - t.Fatalf("Expected %q but got %q for AzureFirewallName", v.Expected.AzureFirewallName, actual.AzureFirewallName) - } - - } -} - -func TestSegmentsForAzureFirewallId(t *testing.T) { - segments := AzureFirewallId{}.Segments() - if len(segments) == 0 { - t.Fatalf("AzureFirewallId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/method_azurefirewallslistlearnedprefixes.go b/resource-manager/network/2022-11-01/azurefirewalls/method_azurefirewallslistlearnedprefixes.go deleted file mode 100644 index 5485c572160..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/method_azurefirewallslistlearnedprefixes.go +++ /dev/null @@ -1,70 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallsListLearnedPrefixesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// AzureFirewallsListLearnedPrefixes ... -func (c AzureFirewallsClient) AzureFirewallsListLearnedPrefixes(ctx context.Context, id AzureFirewallId) (result AzureFirewallsListLearnedPrefixesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/learnedIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// AzureFirewallsListLearnedPrefixesThenPoll performs AzureFirewallsListLearnedPrefixes then polls until it's completed -func (c AzureFirewallsClient) AzureFirewallsListLearnedPrefixesThenPoll(ctx context.Context, id AzureFirewallId) error { - result, err := c.AzureFirewallsListLearnedPrefixes(ctx, id) - if err != nil { - return fmt.Errorf("performing AzureFirewallsListLearnedPrefixes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after AzureFirewallsListLearnedPrefixes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/method_createorupdate.go b/resource-manager/network/2022-11-01/azurefirewalls/method_createorupdate.go deleted file mode 100644 index 5c7f0b61baf..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c AzureFirewallsClient) CreateOrUpdate(ctx context.Context, id AzureFirewallId, input AzureFirewall) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c AzureFirewallsClient) CreateOrUpdateThenPoll(ctx context.Context, id AzureFirewallId, input AzureFirewall) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/method_delete.go b/resource-manager/network/2022-11-01/azurefirewalls/method_delete.go deleted file mode 100644 index 04fddc41723..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c AzureFirewallsClient) Delete(ctx context.Context, id AzureFirewallId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c AzureFirewallsClient) DeleteThenPoll(ctx context.Context, id AzureFirewallId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/method_get.go b/resource-manager/network/2022-11-01/azurefirewalls/method_get.go deleted file mode 100644 index 5644a20618e..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package azurefirewalls - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AzureFirewall -} - -// Get ... -func (c AzureFirewallsClient) Get(ctx context.Context, id AzureFirewallId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/method_list.go b/resource-manager/network/2022-11-01/azurefirewalls/method_list.go deleted file mode 100644 index 4ba29490304..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AzureFirewall -} - -type ListCompleteResult struct { - Items []AzureFirewall -} - -// List ... -func (c AzureFirewallsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/azureFirewalls", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AzureFirewall `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c AzureFirewallsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, AzureFirewallOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AzureFirewallsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AzureFirewallOperationPredicate) (result ListCompleteResult, err error) { - items := make([]AzureFirewall, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/method_listall.go b/resource-manager/network/2022-11-01/azurefirewalls/method_listall.go deleted file mode 100644 index a7b03da1fd5..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AzureFirewall -} - -type ListAllCompleteResult struct { - Items []AzureFirewall -} - -// ListAll ... -func (c AzureFirewallsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/azureFirewalls", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AzureFirewall `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c AzureFirewallsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, AzureFirewallOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c AzureFirewallsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AzureFirewallOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]AzureFirewall, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/method_packetcapture.go b/resource-manager/network/2022-11-01/azurefirewalls/method_packetcapture.go deleted file mode 100644 index a2b211da6c7..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/method_packetcapture.go +++ /dev/null @@ -1,73 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// PacketCapture ... -func (c AzureFirewallsClient) PacketCapture(ctx context.Context, id AzureFirewallId, input FirewallPacketCaptureParameters) (result PacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/packetCapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// PacketCaptureThenPoll performs PacketCapture then polls until it's completed -func (c AzureFirewallsClient) PacketCaptureThenPoll(ctx context.Context, id AzureFirewallId, input FirewallPacketCaptureParameters) error { - result, err := c.PacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing PacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after PacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/method_updatetags.go b/resource-manager/network/2022-11-01/azurefirewalls/method_updatetags.go deleted file mode 100644 index 6e0f39ddf3a..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package azurefirewalls - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c AzureFirewallsClient) UpdateTags(ctx context.Context, id AzureFirewallId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c AzureFirewallsClient) UpdateTagsThenPoll(ctx context.Context, id AzureFirewallId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewall.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewall.go deleted file mode 100644 index da4d4ccf5f7..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewall.go +++ /dev/null @@ -1,19 +0,0 @@ -package azurefirewalls - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewall struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrule.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrule.go deleted file mode 100644 index c74f6235d09..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrule.go +++ /dev/null @@ -1,14 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRule struct { - Description *string `json:"description,omitempty"` - FqdnTags *[]string `json:"fqdnTags,omitempty"` - Name *string `json:"name,omitempty"` - Protocols *[]AzureFirewallApplicationRuleProtocol `json:"protocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - TargetFqdns *[]string `json:"targetFqdns,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrulecollection.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrulecollection.go deleted file mode 100644 index 0307e6e7b33..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrulecollection.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRuleCollection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallApplicationRuleCollectionPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrulecollectionpropertiesformat.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrulecollectionpropertiesformat.go deleted file mode 100644 index bd5d09f330d..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationrulecollectionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { - Action *AzureFirewallRCAction `json:"action,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]AzureFirewallApplicationRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationruleprotocol.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationruleprotocol.go deleted file mode 100644 index 8ea63b2ef92..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallapplicationruleprotocol.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallApplicationRuleProtocol struct { - Port *int64 `json:"port,omitempty"` - ProtocolType *AzureFirewallApplicationRuleProtocolType `json:"protocolType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipconfiguration.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipconfiguration.go deleted file mode 100644 index 3456ba0b1ad..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipconfigurationpropertiesformat.go deleted file mode 100644 index cca79069337..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipconfigurationpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipgroups.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipgroups.go deleted file mode 100644 index e26c8540a65..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallipgroups.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallIPGroups struct { - ChangeNumber *string `json:"changeNumber,omitempty"` - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrcaction.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrcaction.go deleted file mode 100644 index 9c9250aef39..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrcaction.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNatRCAction struct { - Type *AzureFirewallNatRCActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrule.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrule.go deleted file mode 100644 index 70c0d009eab..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrule.go +++ /dev/null @@ -1,17 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNatRule struct { - Description *string `json:"description,omitempty"` - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - Name *string `json:"name,omitempty"` - Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - TranslatedAddress *string `json:"translatedAddress,omitempty"` - TranslatedFqdn *string `json:"translatedFqdn,omitempty"` - TranslatedPort *string `json:"translatedPort,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrulecollection.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrulecollection.go deleted file mode 100644 index d06cf19e359..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrulecollection.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNatRuleCollection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallNatRuleCollectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrulecollectionproperties.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrulecollectionproperties.go deleted file mode 100644 index 774ac6902bc..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnatrulecollectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNatRuleCollectionProperties struct { - Action *AzureFirewallNatRCAction `json:"action,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]AzureFirewallNatRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrule.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrule.go deleted file mode 100644 index 6833c1f7509..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrule.go +++ /dev/null @@ -1,16 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNetworkRule struct { - Description *string `json:"description,omitempty"` - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationFqdns *[]string `json:"destinationFqdns,omitempty"` - DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - Name *string `json:"name,omitempty"` - Protocols *[]AzureFirewallNetworkRuleProtocol `json:"protocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrulecollection.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrulecollection.go deleted file mode 100644 index ea5f2ba0d2b..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrulecollection.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNetworkRuleCollection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureFirewallNetworkRuleCollectionPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrulecollectionpropertiesformat.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrulecollectionpropertiesformat.go deleted file mode 100644 index be71e063370..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallnetworkrulecollectionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { - Action *AzureFirewallRCAction `json:"action,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]AzureFirewallNetworkRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpacketcaptureflags.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpacketcaptureflags.go deleted file mode 100644 index edcc08e5590..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpacketcaptureflags.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallPacketCaptureFlags struct { - Type *AzureFirewallPacketCaptureFlagsType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpacketcapturerule.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpacketcapturerule.go deleted file mode 100644 index 4d9921e3243..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpacketcapturerule.go +++ /dev/null @@ -1,10 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallPacketCaptureRule struct { - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - Destinations *[]string `json:"destinations,omitempty"` - Sources *[]string `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpropertiesformat.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpropertiesformat.go deleted file mode 100644 index 0e8c463423f..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpropertiesformat.go +++ /dev/null @@ -1,20 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallPropertiesFormat struct { - AdditionalProperties *map[string]string `json:"additionalProperties,omitempty"` - ApplicationRuleCollections *[]AzureFirewallApplicationRuleCollection `json:"applicationRuleCollections,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - HubIPAddresses *HubIPAddresses `json:"hubIPAddresses,omitempty"` - IPConfigurations *[]AzureFirewallIPConfiguration `json:"ipConfigurations,omitempty"` - IPGroups *[]AzureFirewallIPGroups `json:"ipGroups,omitempty"` - ManagementIPConfiguration *AzureFirewallIPConfiguration `json:"managementIpConfiguration,omitempty"` - NatRuleCollections *[]AzureFirewallNatRuleCollection `json:"natRuleCollections,omitempty"` - NetworkRuleCollections *[]AzureFirewallNetworkRuleCollection `json:"networkRuleCollections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Sku *AzureFirewallSku `json:"sku,omitempty"` - ThreatIntelMode *AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpublicipaddress.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpublicipaddress.go deleted file mode 100644 index c5dff4f3fff..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallpublicipaddress.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallPublicIPAddress struct { - Address *string `json:"address,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallrcaction.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallrcaction.go deleted file mode 100644 index 752c166b62b..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallrcaction.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallRCAction struct { - Type *AzureFirewallRCActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallsku.go b/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallsku.go deleted file mode 100644 index 46f81c15dbc..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_azurefirewallsku.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallSku struct { - Name *AzureFirewallSkuName `json:"name,omitempty"` - Tier *AzureFirewallSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_firewallpacketcaptureparameters.go b/resource-manager/network/2022-11-01/azurefirewalls/model_firewallpacketcaptureparameters.go deleted file mode 100644 index 258aca5b011..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_firewallpacketcaptureparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPacketCaptureParameters struct { - Id *string `json:"id,omitempty"` - Properties *FirewallPacketCaptureParametersFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_firewallpacketcaptureparametersformat.go b/resource-manager/network/2022-11-01/azurefirewalls/model_firewallpacketcaptureparametersformat.go deleted file mode 100644 index c0c639f2390..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_firewallpacketcaptureparametersformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPacketCaptureParametersFormat struct { - DurationInSeconds *int64 `json:"durationInSeconds,omitempty"` - FileName *string `json:"fileName,omitempty"` - Filters *[]AzureFirewallPacketCaptureRule `json:"filters,omitempty"` - Flags *[]AzureFirewallPacketCaptureFlags `json:"flags,omitempty"` - NumberOfPacketsToCapture *int64 `json:"numberOfPacketsToCapture,omitempty"` - Protocol *AzureFirewallNetworkRuleProtocol `json:"protocol,omitempty"` - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_hubipaddresses.go b/resource-manager/network/2022-11-01/azurefirewalls/model_hubipaddresses.go deleted file mode 100644 index 2fa8e41de6b..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_hubipaddresses.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubIPAddresses struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PublicIPs *HubPublicIPAddresses `json:"publicIPs,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_hubpublicipaddresses.go b/resource-manager/network/2022-11-01/azurefirewalls/model_hubpublicipaddresses.go deleted file mode 100644 index 48ee3132846..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_hubpublicipaddresses.go +++ /dev/null @@ -1,9 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubPublicIPAddresses struct { - Addresses *[]AzureFirewallPublicIPAddress `json:"addresses,omitempty"` - Count *int64 `json:"count,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_ipprefixeslist.go b/resource-manager/network/2022-11-01/azurefirewalls/model_ipprefixeslist.go deleted file mode 100644 index 3d2ea0d9a9e..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_ipprefixeslist.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPPrefixesList struct { - IPPrefixes *[]string `json:"ipPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_subresource.go b/resource-manager/network/2022-11-01/azurefirewalls/model_subresource.go deleted file mode 100644 index 3a39f2458c4..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/model_tagsobject.go b/resource-manager/network/2022-11-01/azurefirewalls/model_tagsobject.go deleted file mode 100644 index 3b70ce55bcd..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/predicates.go b/resource-manager/network/2022-11-01/azurefirewalls/predicates.go deleted file mode 100644 index 68ca8da5623..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package azurefirewalls - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureFirewallOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p AzureFirewallOperationPredicate) Matches(input AzureFirewall) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/azurefirewalls/version.go b/resource-manager/network/2022-11-01/azurefirewalls/version.go deleted file mode 100644 index 19773159469..00000000000 --- a/resource-manager/network/2022-11-01/azurefirewalls/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package azurefirewalls - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/azurefirewalls/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/README.md b/resource-manager/network/2022-11-01/bastionhosts/README.md deleted file mode 100644 index c2085867d28..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/README.md +++ /dev/null @@ -1,216 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/bastionhosts` Documentation - -The `bastionhosts` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/bastionhosts" -``` - - -### Client Initialization - -```go -client := bastionhosts.NewBastionHostsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BastionHostsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.BastionHost{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `BastionHostsClient.Delete` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `BastionHostsClient.DeleteBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.BastionShareableLinkListRequest{ - // ... -} - - -if err := client.DeleteBastionShareableLinkThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `BastionHostsClient.DisconnectActiveSessions` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.SessionIds{ - // ... -} - - -// alternatively `client.DisconnectActiveSessions(ctx, id, payload)` can be used to do batched pagination -items, err := client.DisconnectActiveSessionsComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.Get` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `BastionHostsClient.GetActiveSessions` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -// alternatively `client.GetActiveSessions(ctx, id)` can be used to do batched pagination -items, err := client.GetActiveSessionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.GetBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.BastionShareableLinkListRequest{ - // ... -} - - -// alternatively `client.GetBastionShareableLink(ctx, id, payload)` can be used to do batched pagination -items, err := client.GetBastionShareableLinkComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.List` - -```go -ctx := context.TODO() -id := bastionhosts.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := bastionhosts.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.PutBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.BastionShareableLinkListRequest{ - // ... -} - - -// alternatively `client.PutBastionShareableLink(ctx, id, payload)` can be used to do batched pagination -items, err := client.PutBastionShareableLinkComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionHostsClient.UpdateTags` - -```go -ctx := context.TODO() -id := bastionhosts.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionhosts.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/bastionhosts/client.go b/resource-manager/network/2022-11-01/bastionhosts/client.go deleted file mode 100644 index 1cea8c22bf7..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package bastionhosts - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHostsClient struct { - Client *resourcemanager.Client -} - -func NewBastionHostsClientWithBaseURI(api environments.Api) (*BastionHostsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "bastionhosts", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating BastionHostsClient: %+v", err) - } - - return &BastionHostsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/constants.go b/resource-manager/network/2022-11-01/bastionhosts/constants.go deleted file mode 100644 index d218831ec92..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/constants.go +++ /dev/null @@ -1,180 +0,0 @@ -package bastionhosts - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionConnectProtocol string - -const ( - BastionConnectProtocolRDP BastionConnectProtocol = "RDP" - BastionConnectProtocolSSH BastionConnectProtocol = "SSH" -) - -func PossibleValuesForBastionConnectProtocol() []string { - return []string{ - string(BastionConnectProtocolRDP), - string(BastionConnectProtocolSSH), - } -} - -func (s *BastionConnectProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBastionConnectProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBastionConnectProtocol(input string) (*BastionConnectProtocol, error) { - vals := map[string]BastionConnectProtocol{ - "rdp": BastionConnectProtocolRDP, - "ssh": BastionConnectProtocolSSH, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BastionConnectProtocol(input) - return &out, nil -} - -type BastionHostSkuName string - -const ( - BastionHostSkuNameBasic BastionHostSkuName = "Basic" - BastionHostSkuNameStandard BastionHostSkuName = "Standard" -) - -func PossibleValuesForBastionHostSkuName() []string { - return []string{ - string(BastionHostSkuNameBasic), - string(BastionHostSkuNameStandard), - } -} - -func (s *BastionHostSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBastionHostSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBastionHostSkuName(input string) (*BastionHostSkuName, error) { - vals := map[string]BastionHostSkuName{ - "basic": BastionHostSkuNameBasic, - "standard": BastionHostSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BastionHostSkuName(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/id_bastionhost.go b/resource-manager/network/2022-11-01/bastionhosts/id_bastionhost.go deleted file mode 100644 index deb83136787..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/id_bastionhost.go +++ /dev/null @@ -1,127 +0,0 @@ -package bastionhosts - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BastionHostId{} - -// BastionHostId is a struct representing the Resource ID for a Bastion Host -type BastionHostId struct { - SubscriptionId string - ResourceGroupName string - BastionHostName string -} - -// NewBastionHostID returns a new BastionHostId struct -func NewBastionHostID(subscriptionId string, resourceGroupName string, bastionHostName string) BastionHostId { - return BastionHostId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - BastionHostName: bastionHostName, - } -} - -// ParseBastionHostID parses 'input' into a BastionHostId -func ParseBastionHostID(input string) (*BastionHostId, error) { - parser := resourceids.NewParserFromResourceIdType(BastionHostId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) - } - - return &id, nil -} - -// ParseBastionHostIDInsensitively parses 'input' case-insensitively into a BastionHostId -// note: this method should only be used for API response data and not user input -func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { - parser := resourceids.NewParserFromResourceIdType(BastionHostId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) - } - - return &id, nil -} - -// ValidateBastionHostID checks that 'input' can be parsed as a Bastion Host ID -func ValidateBastionHostID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseBastionHostID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Bastion Host ID -func (id BastionHostId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/bastionHosts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BastionHostName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Bastion Host ID -func (id BastionHostId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticBastionHosts", "bastionHosts", "bastionHosts"), - resourceids.UserSpecifiedSegment("bastionHostName", "bastionHostValue"), - } -} - -// String returns a human-readable description of this Bastion Host ID -func (id BastionHostId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Bastion Host Name: %q", id.BastionHostName), - } - return fmt.Sprintf("Bastion Host (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/id_bastionhost_test.go b/resource-manager/network/2022-11-01/bastionhosts/id_bastionhost_test.go deleted file mode 100644 index 7c17f9ad7d2..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/id_bastionhost_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package bastionhosts - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BastionHostId{} - -func TestNewBastionHostID(t *testing.T) { - id := NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.BastionHostName != "bastionHostValue" { - t.Fatalf("Expected %q but got %q for Segment 'BastionHostName'", id.BastionHostName, "bastionHostValue") - } -} - -func TestFormatBastionHostID(t *testing.T) { - actual := NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseBastionHostID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BastionHostId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BastionHostName: "bastionHostValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBastionHostID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BastionHostName != v.Expected.BastionHostName { - t.Fatalf("Expected %q but got %q for BastionHostName", v.Expected.BastionHostName, actual.BastionHostName) - } - - } -} - -func TestParseBastionHostIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BastionHostId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BastionHostName: "bastionHostValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS/bAsTiOnHoStVaLuE", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - BastionHostName: "bAsTiOnHoStVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS/bAsTiOnHoStVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBastionHostIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BastionHostName != v.Expected.BastionHostName { - t.Fatalf("Expected %q but got %q for BastionHostName", v.Expected.BastionHostName, actual.BastionHostName) - } - - } -} - -func TestSegmentsForBastionHostId(t *testing.T) { - segments := BastionHostId{}.Segments() - if len(segments) == 0 { - t.Fatalf("BastionHostId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_createorupdate.go b/resource-manager/network/2022-11-01/bastionhosts/method_createorupdate.go deleted file mode 100644 index 1e140a16a91..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c BastionHostsClient) CreateOrUpdate(ctx context.Context, id BastionHostId, input BastionHost) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c BastionHostsClient) CreateOrUpdateThenPoll(ctx context.Context, id BastionHostId, input BastionHost) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_delete.go b/resource-manager/network/2022-11-01/bastionhosts/method_delete.go deleted file mode 100644 index 5eebbeeeed3..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c BastionHostsClient) Delete(ctx context.Context, id BastionHostId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c BastionHostsClient) DeleteThenPoll(ctx context.Context, id BastionHostId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_deletebastionshareablelink.go b/resource-manager/network/2022-11-01/bastionhosts/method_deletebastionshareablelink.go deleted file mode 100644 index 24694223a11..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_deletebastionshareablelink.go +++ /dev/null @@ -1,74 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteBastionShareableLinkOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DeleteBastionShareableLink ... -func (c BastionHostsClient) DeleteBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result DeleteBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/deleteShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteBastionShareableLinkThenPoll performs DeleteBastionShareableLink then polls until it's completed -func (c BastionHostsClient) DeleteBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { - result, err := c.DeleteBastionShareableLink(ctx, id, input) - if err != nil { - return fmt.Errorf("performing DeleteBastionShareableLink: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DeleteBastionShareableLink: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_disconnectactivesessions.go b/resource-manager/network/2022-11-01/bastionhosts/method_disconnectactivesessions.go deleted file mode 100644 index 627d4aaa5d5..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_disconnectactivesessions.go +++ /dev/null @@ -1,89 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DisconnectActiveSessionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionSessionState -} - -type DisconnectActiveSessionsCompleteResult struct { - Items []BastionSessionState -} - -// DisconnectActiveSessions ... -func (c BastionHostsClient) DisconnectActiveSessions(ctx context.Context, id BastionHostId, input SessionIds) (result DisconnectActiveSessionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/disconnectActiveSessions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionSessionState `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// DisconnectActiveSessionsComplete retrieves all the results into a single object -func (c BastionHostsClient) DisconnectActiveSessionsComplete(ctx context.Context, id BastionHostId, input SessionIds) (DisconnectActiveSessionsCompleteResult, error) { - return c.DisconnectActiveSessionsCompleteMatchingPredicate(ctx, id, input, BastionSessionStateOperationPredicate{}) -} - -// DisconnectActiveSessionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) DisconnectActiveSessionsCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input SessionIds, predicate BastionSessionStateOperationPredicate) (result DisconnectActiveSessionsCompleteResult, err error) { - items := make([]BastionSessionState, 0) - - resp, err := c.DisconnectActiveSessions(ctx, id, input) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = DisconnectActiveSessionsCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_get.go b/resource-manager/network/2022-11-01/bastionhosts/method_get.go deleted file mode 100644 index 0e5b36012f3..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package bastionhosts - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BastionHost -} - -// Get ... -func (c BastionHostsClient) Get(ctx context.Context, id BastionHostId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_getactivesessions.go b/resource-manager/network/2022-11-01/bastionhosts/method_getactivesessions.go deleted file mode 100644 index e56b6da8351..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_getactivesessions.go +++ /dev/null @@ -1,84 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetActiveSessionsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionActiveSession -} - -type GetActiveSessionsCompleteResult struct { - Items []BastionActiveSession -} - -// GetActiveSessions ... -func (c BastionHostsClient) GetActiveSessions(ctx context.Context, id BastionHostId) (result GetActiveSessionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getActiveSessions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionActiveSession `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetActiveSessionsThenPoll performs GetActiveSessions then polls until it's completed -func (c BastionHostsClient) GetActiveSessionsThenPoll(ctx context.Context, id BastionHostId) error { - result, err := c.GetActiveSessions(ctx, id) - if err != nil { - return fmt.Errorf("performing GetActiveSessions: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetActiveSessions: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_getbastionshareablelink.go b/resource-manager/network/2022-11-01/bastionhosts/method_getbastionshareablelink.go deleted file mode 100644 index 4599102aa78..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_getbastionshareablelink.go +++ /dev/null @@ -1,89 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetBastionShareableLinkOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionShareableLink -} - -type GetBastionShareableLinkCompleteResult struct { - Items []BastionShareableLink -} - -// GetBastionShareableLink ... -func (c BastionHostsClient) GetBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result GetBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionShareableLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// GetBastionShareableLinkComplete retrieves all the results into a single object -func (c BastionHostsClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) -} - -// GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLink, 0) - - resp, err := c.GetBastionShareableLink(ctx, id, input) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = GetBastionShareableLinkCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_list.go b/resource-manager/network/2022-11-01/bastionhosts/method_list.go deleted file mode 100644 index 82891884e31..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionHost -} - -type ListCompleteResult struct { - Items []BastionHost -} - -// List ... -func (c BastionHostsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/bastionHosts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionHost `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c BastionHostsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, BastionHostOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate BastionHostOperationPredicate) (result ListCompleteResult, err error) { - items := make([]BastionHost, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/bastionhosts/method_listbyresourcegroup.go deleted file mode 100644 index 4920998f509..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionHost -} - -type ListByResourceGroupCompleteResult struct { - Items []BastionHost -} - -// ListByResourceGroup ... -func (c BastionHostsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/bastionHosts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionHost `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c BastionHostsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, BastionHostOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionHostsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate BastionHostOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]BastionHost, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_putbastionshareablelink.go b/resource-manager/network/2022-11-01/bastionhosts/method_putbastionshareablelink.go deleted file mode 100644 index 02212827290..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_putbastionshareablelink.go +++ /dev/null @@ -1,88 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PutBastionShareableLinkOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionShareableLink -} - -type PutBastionShareableLinkCompleteResult struct { - Items []BastionShareableLink -} - -// PutBastionShareableLink ... -func (c BastionHostsClient) PutBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result PutBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/createShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionShareableLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// PutBastionShareableLinkThenPoll performs PutBastionShareableLink then polls until it's completed -func (c BastionHostsClient) PutBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { - result, err := c.PutBastionShareableLink(ctx, id, input) - if err != nil { - return fmt.Errorf("performing PutBastionShareableLink: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after PutBastionShareableLink: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/method_updatetags.go b/resource-manager/network/2022-11-01/bastionhosts/method_updatetags.go deleted file mode 100644 index ce8661b54a8..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package bastionhosts - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c BastionHostsClient) UpdateTags(ctx context.Context, id BastionHostId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c BastionHostsClient) UpdateTagsThenPoll(ctx context.Context, id BastionHostId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_bastionactivesession.go b/resource-manager/network/2022-11-01/bastionhosts/model_bastionactivesession.go deleted file mode 100644 index 4f5fe8c844e..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_bastionactivesession.go +++ /dev/null @@ -1,18 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionActiveSession struct { - Protocol *BastionConnectProtocol `json:"protocol,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` - SessionDurationInMins *float64 `json:"sessionDurationInMins,omitempty"` - SessionId *string `json:"sessionId,omitempty"` - StartTime *interface{} `json:"startTime,omitempty"` - TargetHostName *string `json:"targetHostName,omitempty"` - TargetIPAddress *string `json:"targetIpAddress,omitempty"` - TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` - TargetResourceId *string `json:"targetResourceId,omitempty"` - TargetSubscriptionId *string `json:"targetSubscriptionId,omitempty"` - UserName *string `json:"userName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_bastionhost.go b/resource-manager/network/2022-11-01/bastionhosts/model_bastionhost.go deleted file mode 100644 index e9545c59424..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_bastionhost.go +++ /dev/null @@ -1,15 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHost struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BastionHostPropertiesFormat `json:"properties,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_bastionhostipconfiguration.go b/resource-manager/network/2022-11-01/bastionhosts/model_bastionhostipconfiguration.go deleted file mode 100644 index efda704773c..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_bastionhostipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHostIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BastionHostIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go deleted file mode 100644 index 34d950723a1..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_bastionhostipconfigurationpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHostIPConfigurationPropertiesFormat struct { - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress SubResource `json:"publicIPAddress"` - Subnet SubResource `json:"subnet"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_bastionhostpropertiesformat.go b/resource-manager/network/2022-11-01/bastionhosts/model_bastionhostpropertiesformat.go deleted file mode 100644 index 925008fd0ce..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_bastionhostpropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionHostPropertiesFormat struct { - DisableCopyPaste *bool `json:"disableCopyPaste,omitempty"` - DnsName *string `json:"dnsName,omitempty"` - EnableFileCopy *bool `json:"enableFileCopy,omitempty"` - EnableIPConnect *bool `json:"enableIpConnect,omitempty"` - EnableKerberos *bool `json:"enableKerberos,omitempty"` - EnableShareableLink *bool `json:"enableShareableLink,omitempty"` - EnableTunneling *bool `json:"enableTunneling,omitempty"` - IPConfigurations *[]BastionHostIPConfiguration `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ScaleUnits *int64 `json:"scaleUnits,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_bastionsessionstate.go b/resource-manager/network/2022-11-01/bastionhosts/model_bastionsessionstate.go deleted file mode 100644 index f60a5f77620..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_bastionsessionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionSessionState struct { - Message *string `json:"message,omitempty"` - SessionId *string `json:"sessionId,omitempty"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_bastionshareablelink.go b/resource-manager/network/2022-11-01/bastionhosts/model_bastionshareablelink.go deleted file mode 100644 index 4da004b8f53..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_bastionshareablelink.go +++ /dev/null @@ -1,11 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLink struct { - Bsl *string `json:"bsl,omitempty"` - CreatedAt *string `json:"createdAt,omitempty"` - Message *string `json:"message,omitempty"` - VM Resource `json:"vm"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_bastionshareablelinklistrequest.go b/resource-manager/network/2022-11-01/bastionhosts/model_bastionshareablelinklistrequest.go deleted file mode 100644 index 925995fca64..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_bastionshareablelinklistrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListRequest struct { - VMs *[]BastionShareableLink `json:"vms,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_resource.go b/resource-manager/network/2022-11-01/bastionhosts/model_resource.go deleted file mode 100644 index 17e7756ce3c..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_resource.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Resource struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_sessionids.go b/resource-manager/network/2022-11-01/bastionhosts/model_sessionids.go deleted file mode 100644 index a74e44a3ebd..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_sessionids.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SessionIds struct { - SessionIds *[]string `json:"sessionIds,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_sku.go b/resource-manager/network/2022-11-01/bastionhosts/model_sku.go deleted file mode 100644 index 1a8a8749a46..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_sku.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Sku struct { - Name *BastionHostSkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_subresource.go b/resource-manager/network/2022-11-01/bastionhosts/model_subresource.go deleted file mode 100644 index 7a0a23a149a..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/model_tagsobject.go b/resource-manager/network/2022-11-01/bastionhosts/model_tagsobject.go deleted file mode 100644 index 73566b88f0b..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/predicates.go b/resource-manager/network/2022-11-01/bastionhosts/predicates.go deleted file mode 100644 index 3c3835a32d0..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/predicates.go +++ /dev/null @@ -1,141 +0,0 @@ -package bastionhosts - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionActiveSessionOperationPredicate struct { - ResourceType *string - SessionDurationInMins *float64 - SessionId *string - StartTime *interface{} - TargetHostName *string - TargetIPAddress *string - TargetResourceGroup *string - TargetResourceId *string - TargetSubscriptionId *string - UserName *string -} - -func (p BastionActiveSessionOperationPredicate) Matches(input BastionActiveSession) bool { - - if p.ResourceType != nil && (input.ResourceType == nil || *p.ResourceType != *input.ResourceType) { - return false - } - - if p.SessionDurationInMins != nil && (input.SessionDurationInMins == nil || *p.SessionDurationInMins != *input.SessionDurationInMins) { - return false - } - - if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { - return false - } - - if p.StartTime != nil && (input.StartTime == nil || *p.StartTime != *input.StartTime) { - return false - } - - if p.TargetHostName != nil && (input.TargetHostName == nil || *p.TargetHostName != *input.TargetHostName) { - return false - } - - if p.TargetIPAddress != nil && (input.TargetIPAddress == nil || *p.TargetIPAddress != *input.TargetIPAddress) { - return false - } - - if p.TargetResourceGroup != nil && (input.TargetResourceGroup == nil || *p.TargetResourceGroup != *input.TargetResourceGroup) { - return false - } - - if p.TargetResourceId != nil && (input.TargetResourceId == nil || *p.TargetResourceId != *input.TargetResourceId) { - return false - } - - if p.TargetSubscriptionId != nil && (input.TargetSubscriptionId == nil || *p.TargetSubscriptionId != *input.TargetSubscriptionId) { - return false - } - - if p.UserName != nil && (input.UserName == nil || *p.UserName != *input.UserName) { - return false - } - - return true -} - -type BastionHostOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p BastionHostOperationPredicate) Matches(input BastionHost) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type BastionSessionStateOperationPredicate struct { - Message *string - SessionId *string - State *string -} - -func (p BastionSessionStateOperationPredicate) Matches(input BastionSessionState) bool { - - if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { - return false - } - - if p.SessionId != nil && (input.SessionId == nil || *p.SessionId != *input.SessionId) { - return false - } - - if p.State != nil && (input.State == nil || *p.State != *input.State) { - return false - } - - return true -} - -type BastionShareableLinkOperationPredicate struct { - Bsl *string - CreatedAt *string - Message *string -} - -func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { - - if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { - return false - } - - if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { - return false - } - - if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/bastionhosts/version.go b/resource-manager/network/2022-11-01/bastionhosts/version.go deleted file mode 100644 index ed5a40d0991..00000000000 --- a/resource-manager/network/2022-11-01/bastionhosts/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionhosts - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionhosts/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/README.md b/resource-manager/network/2022-11-01/bastionshareablelink/README.md deleted file mode 100644 index 9d41083f541..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/README.md +++ /dev/null @@ -1,81 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/bastionshareablelink` Documentation - -The `bastionshareablelink` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/bastionshareablelink" -``` - - -### Client Initialization - -```go -client := bastionshareablelink.NewBastionShareableLinkClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BastionShareableLinkClient.DeleteBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionshareablelink.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionshareablelink.BastionShareableLinkListRequest{ - // ... -} - - -if err := client.DeleteBastionShareableLinkThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `BastionShareableLinkClient.GetBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionshareablelink.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionshareablelink.BastionShareableLinkListRequest{ - // ... -} - - -// alternatively `client.GetBastionShareableLink(ctx, id, payload)` can be used to do batched pagination -items, err := client.GetBastionShareableLinkComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `BastionShareableLinkClient.PutBastionShareableLink` - -```go -ctx := context.TODO() -id := bastionshareablelink.NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - -payload := bastionshareablelink.BastionShareableLinkListRequest{ - // ... -} - - -// alternatively `client.PutBastionShareableLink(ctx, id, payload)` can be used to do batched pagination -items, err := client.PutBastionShareableLinkComplete(ctx, id, payload) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/client.go b/resource-manager/network/2022-11-01/bastionshareablelink/client.go deleted file mode 100644 index 6a702fa865f..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package bastionshareablelink - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkClient struct { - Client *resourcemanager.Client -} - -func NewBastionShareableLinkClientWithBaseURI(api environments.Api) (*BastionShareableLinkClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "bastionshareablelink", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating BastionShareableLinkClient: %+v", err) - } - - return &BastionShareableLinkClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/id_bastionhost.go b/resource-manager/network/2022-11-01/bastionshareablelink/id_bastionhost.go deleted file mode 100644 index 28c97854f8d..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/id_bastionhost.go +++ /dev/null @@ -1,127 +0,0 @@ -package bastionshareablelink - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BastionHostId{} - -// BastionHostId is a struct representing the Resource ID for a Bastion Host -type BastionHostId struct { - SubscriptionId string - ResourceGroupName string - BastionHostName string -} - -// NewBastionHostID returns a new BastionHostId struct -func NewBastionHostID(subscriptionId string, resourceGroupName string, bastionHostName string) BastionHostId { - return BastionHostId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - BastionHostName: bastionHostName, - } -} - -// ParseBastionHostID parses 'input' into a BastionHostId -func ParseBastionHostID(input string) (*BastionHostId, error) { - parser := resourceids.NewParserFromResourceIdType(BastionHostId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) - } - - return &id, nil -} - -// ParseBastionHostIDInsensitively parses 'input' case-insensitively into a BastionHostId -// note: this method should only be used for API response data and not user input -func ParseBastionHostIDInsensitively(input string) (*BastionHostId, error) { - parser := resourceids.NewParserFromResourceIdType(BastionHostId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BastionHostId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.BastionHostName, ok = parsed.Parsed["bastionHostName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "bastionHostName", *parsed) - } - - return &id, nil -} - -// ValidateBastionHostID checks that 'input' can be parsed as a Bastion Host ID -func ValidateBastionHostID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseBastionHostID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Bastion Host ID -func (id BastionHostId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/bastionHosts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.BastionHostName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Bastion Host ID -func (id BastionHostId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticBastionHosts", "bastionHosts", "bastionHosts"), - resourceids.UserSpecifiedSegment("bastionHostName", "bastionHostValue"), - } -} - -// String returns a human-readable description of this Bastion Host ID -func (id BastionHostId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Bastion Host Name: %q", id.BastionHostName), - } - return fmt.Sprintf("Bastion Host (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/id_bastionhost_test.go b/resource-manager/network/2022-11-01/bastionshareablelink/id_bastionhost_test.go deleted file mode 100644 index 2cfc4709d36..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/id_bastionhost_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package bastionshareablelink - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BastionHostId{} - -func TestNewBastionHostID(t *testing.T) { - id := NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.BastionHostName != "bastionHostValue" { - t.Fatalf("Expected %q but got %q for Segment 'BastionHostName'", id.BastionHostName, "bastionHostValue") - } -} - -func TestFormatBastionHostID(t *testing.T) { - actual := NewBastionHostID("12345678-1234-9876-4563-123456789012", "example-resource-group", "bastionHostValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseBastionHostID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BastionHostId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BastionHostName: "bastionHostValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBastionHostID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BastionHostName != v.Expected.BastionHostName { - t.Fatalf("Expected %q but got %q for BastionHostName", v.Expected.BastionHostName, actual.BastionHostName) - } - - } -} - -func TestParseBastionHostIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BastionHostId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - BastionHostName: "bastionHostValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/bastionHosts/bastionHostValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS/bAsTiOnHoStVaLuE", - Expected: &BastionHostId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - BastionHostName: "bAsTiOnHoStVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/bAsTiOnHoStS/bAsTiOnHoStVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBastionHostIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.BastionHostName != v.Expected.BastionHostName { - t.Fatalf("Expected %q but got %q for BastionHostName", v.Expected.BastionHostName, actual.BastionHostName) - } - - } -} - -func TestSegmentsForBastionHostId(t *testing.T) { - segments := BastionHostId{}.Segments() - if len(segments) == 0 { - t.Fatalf("BastionHostId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/method_deletebastionshareablelink.go b/resource-manager/network/2022-11-01/bastionshareablelink/method_deletebastionshareablelink.go deleted file mode 100644 index 6b46bbc5fea..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/method_deletebastionshareablelink.go +++ /dev/null @@ -1,74 +0,0 @@ -package bastionshareablelink - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteBastionShareableLinkOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DeleteBastionShareableLink ... -func (c BastionShareableLinkClient) DeleteBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result DeleteBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/deleteShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteBastionShareableLinkThenPoll performs DeleteBastionShareableLink then polls until it's completed -func (c BastionShareableLinkClient) DeleteBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { - result, err := c.DeleteBastionShareableLink(ctx, id, input) - if err != nil { - return fmt.Errorf("performing DeleteBastionShareableLink: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DeleteBastionShareableLink: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/method_getbastionshareablelink.go b/resource-manager/network/2022-11-01/bastionshareablelink/method_getbastionshareablelink.go deleted file mode 100644 index 2dcc0422fc6..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/method_getbastionshareablelink.go +++ /dev/null @@ -1,89 +0,0 @@ -package bastionshareablelink - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetBastionShareableLinkOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionShareableLink -} - -type GetBastionShareableLinkCompleteResult struct { - Items []BastionShareableLink -} - -// GetBastionShareableLink ... -func (c BastionShareableLinkClient) GetBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result GetBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionShareableLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// GetBastionShareableLinkComplete retrieves all the results into a single object -func (c BastionShareableLinkClient) GetBastionShareableLinkComplete(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (GetBastionShareableLinkCompleteResult, error) { - return c.GetBastionShareableLinkCompleteMatchingPredicate(ctx, id, input, BastionShareableLinkOperationPredicate{}) -} - -// GetBastionShareableLinkCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BastionShareableLinkClient) GetBastionShareableLinkCompleteMatchingPredicate(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest, predicate BastionShareableLinkOperationPredicate) (result GetBastionShareableLinkCompleteResult, err error) { - items := make([]BastionShareableLink, 0) - - resp, err := c.GetBastionShareableLink(ctx, id, input) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = GetBastionShareableLinkCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/method_putbastionshareablelink.go b/resource-manager/network/2022-11-01/bastionshareablelink/method_putbastionshareablelink.go deleted file mode 100644 index acca80488fd..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/method_putbastionshareablelink.go +++ /dev/null @@ -1,88 +0,0 @@ -package bastionshareablelink - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PutBastionShareableLinkOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *[]BastionShareableLink -} - -type PutBastionShareableLinkCompleteResult struct { - Items []BastionShareableLink -} - -// PutBastionShareableLink ... -func (c BastionShareableLinkClient) PutBastionShareableLink(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) (result PutBastionShareableLinkOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/createShareableLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BastionShareableLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// PutBastionShareableLinkThenPoll performs PutBastionShareableLink then polls until it's completed -func (c BastionShareableLinkClient) PutBastionShareableLinkThenPoll(ctx context.Context, id BastionHostId, input BastionShareableLinkListRequest) error { - result, err := c.PutBastionShareableLink(ctx, id, input) - if err != nil { - return fmt.Errorf("performing PutBastionShareableLink: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after PutBastionShareableLink: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/model_bastionshareablelink.go b/resource-manager/network/2022-11-01/bastionshareablelink/model_bastionshareablelink.go deleted file mode 100644 index a0bc0647825..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/model_bastionshareablelink.go +++ /dev/null @@ -1,11 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLink struct { - Bsl *string `json:"bsl,omitempty"` - CreatedAt *string `json:"createdAt,omitempty"` - Message *string `json:"message,omitempty"` - VM Resource `json:"vm"` -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/model_bastionshareablelinklistrequest.go b/resource-manager/network/2022-11-01/bastionshareablelink/model_bastionshareablelinklistrequest.go deleted file mode 100644 index e41fcb083d8..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/model_bastionshareablelinklistrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkListRequest struct { - VMs *[]BastionShareableLink `json:"vms,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/model_resource.go b/resource-manager/network/2022-11-01/bastionshareablelink/model_resource.go deleted file mode 100644 index 31d5ef85703..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/model_resource.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Resource struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/predicates.go b/resource-manager/network/2022-11-01/bastionshareablelink/predicates.go deleted file mode 100644 index 15f07095262..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package bastionshareablelink - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BastionShareableLinkOperationPredicate struct { - Bsl *string - CreatedAt *string - Message *string -} - -func (p BastionShareableLinkOperationPredicate) Matches(input BastionShareableLink) bool { - - if p.Bsl != nil && (input.Bsl == nil || *p.Bsl != *input.Bsl) { - return false - } - - if p.CreatedAt != nil && (input.CreatedAt == nil || *p.CreatedAt != *input.CreatedAt) { - return false - } - - if p.Message != nil && (input.Message == nil || *p.Message != *input.Message) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/bastionshareablelink/version.go b/resource-manager/network/2022-11-01/bastionshareablelink/version.go deleted file mode 100644 index 4cc7e74556e..00000000000 --- a/resource-manager/network/2022-11-01/bastionshareablelink/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package bastionshareablelink - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bastionshareablelink/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/bgpservicecommunities/README.md b/resource-manager/network/2022-11-01/bgpservicecommunities/README.md deleted file mode 100644 index 059051a47a2..00000000000 --- a/resource-manager/network/2022-11-01/bgpservicecommunities/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/bgpservicecommunities` Documentation - -The `bgpservicecommunities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/bgpservicecommunities" -``` - - -### Client Initialization - -```go -client := bgpservicecommunities.NewBgpServiceCommunitiesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `BgpServiceCommunitiesClient.List` - -```go -ctx := context.TODO() -id := bgpservicecommunities.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/bgpservicecommunities/client.go b/resource-manager/network/2022-11-01/bgpservicecommunities/client.go deleted file mode 100644 index 8b4af98886b..00000000000 --- a/resource-manager/network/2022-11-01/bgpservicecommunities/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package bgpservicecommunities - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpServiceCommunitiesClient struct { - Client *resourcemanager.Client -} - -func NewBgpServiceCommunitiesClientWithBaseURI(api environments.Api) (*BgpServiceCommunitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "bgpservicecommunities", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating BgpServiceCommunitiesClient: %+v", err) - } - - return &BgpServiceCommunitiesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/bgpservicecommunities/method_list.go b/resource-manager/network/2022-11-01/bgpservicecommunities/method_list.go deleted file mode 100644 index 8dd2a05cc17..00000000000 --- a/resource-manager/network/2022-11-01/bgpservicecommunities/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package bgpservicecommunities - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BgpServiceCommunity -} - -type ListCompleteResult struct { - Items []BgpServiceCommunity -} - -// List ... -func (c BgpServiceCommunitiesClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/bgpServiceCommunities", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BgpServiceCommunity `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c BgpServiceCommunitiesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, BgpServiceCommunityOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c BgpServiceCommunitiesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate BgpServiceCommunityOperationPredicate) (result ListCompleteResult, err error) { - items := make([]BgpServiceCommunity, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpcommunity.go b/resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpcommunity.go deleted file mode 100644 index 87cd63647eb..00000000000 --- a/resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpcommunity.go +++ /dev/null @@ -1,13 +0,0 @@ -package bgpservicecommunities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BGPCommunity struct { - CommunityName *string `json:"communityName,omitempty"` - CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` - CommunityValue *string `json:"communityValue,omitempty"` - IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` - ServiceGroup *string `json:"serviceGroup,omitempty"` - ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpservicecommunity.go b/resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpservicecommunity.go deleted file mode 100644 index 0fad9ca63e5..00000000000 --- a/resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpservicecommunity.go +++ /dev/null @@ -1,13 +0,0 @@ -package bgpservicecommunities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpServiceCommunity struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpservicecommunitypropertiesformat.go b/resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpservicecommunitypropertiesformat.go deleted file mode 100644 index 5bf2c270ecc..00000000000 --- a/resource-manager/network/2022-11-01/bgpservicecommunities/model_bgpservicecommunitypropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package bgpservicecommunities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpServiceCommunityPropertiesFormat struct { - BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/bgpservicecommunities/predicates.go b/resource-manager/network/2022-11-01/bgpservicecommunities/predicates.go deleted file mode 100644 index 2e90f55ae55..00000000000 --- a/resource-manager/network/2022-11-01/bgpservicecommunities/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package bgpservicecommunities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpServiceCommunityOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p BgpServiceCommunityOperationPredicate) Matches(input BgpServiceCommunity) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/bgpservicecommunities/version.go b/resource-manager/network/2022-11-01/bgpservicecommunities/version.go deleted file mode 100644 index ceec2f7a41e..00000000000 --- a/resource-manager/network/2022-11-01/bgpservicecommunities/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package bgpservicecommunities - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/bgpservicecommunities/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/checkdnsavailabilities/README.md b/resource-manager/network/2022-11-01/checkdnsavailabilities/README.md deleted file mode 100644 index 6312d6fa0b0..00000000000 --- a/resource-manager/network/2022-11-01/checkdnsavailabilities/README.md +++ /dev/null @@ -1,36 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/checkdnsavailabilities` Documentation - -The `checkdnsavailabilities` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/checkdnsavailabilities" -``` - - -### Client Initialization - -```go -client := checkdnsavailabilities.NewCheckDnsAvailabilitiesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CheckDnsAvailabilitiesClient.CheckDnsNameAvailability` - -```go -ctx := context.TODO() -id := checkdnsavailabilities.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -read, err := client.CheckDnsNameAvailability(ctx, id, checkdnsavailabilities.DefaultCheckDnsNameAvailabilityOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/checkdnsavailabilities/client.go b/resource-manager/network/2022-11-01/checkdnsavailabilities/client.go deleted file mode 100644 index 9e9e5e81b3f..00000000000 --- a/resource-manager/network/2022-11-01/checkdnsavailabilities/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package checkdnsavailabilities - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckDnsAvailabilitiesClient struct { - Client *resourcemanager.Client -} - -func NewCheckDnsAvailabilitiesClientWithBaseURI(api environments.Api) (*CheckDnsAvailabilitiesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "checkdnsavailabilities", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CheckDnsAvailabilitiesClient: %+v", err) - } - - return &CheckDnsAvailabilitiesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/checkdnsavailabilities/id_location.go b/resource-manager/network/2022-11-01/checkdnsavailabilities/id_location.go deleted file mode 100644 index 474bff1709b..00000000000 --- a/resource-manager/network/2022-11-01/checkdnsavailabilities/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package checkdnsavailabilities - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/checkdnsavailabilities/id_location_test.go b/resource-manager/network/2022-11-01/checkdnsavailabilities/id_location_test.go deleted file mode 100644 index 04b275adb48..00000000000 --- a/resource-manager/network/2022-11-01/checkdnsavailabilities/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package checkdnsavailabilities - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/checkdnsavailabilities/method_checkdnsnameavailability.go b/resource-manager/network/2022-11-01/checkdnsavailabilities/method_checkdnsnameavailability.go deleted file mode 100644 index 25886646fd3..00000000000 --- a/resource-manager/network/2022-11-01/checkdnsavailabilities/method_checkdnsnameavailability.go +++ /dev/null @@ -1,80 +0,0 @@ -package checkdnsavailabilities - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckDnsNameAvailabilityOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DnsNameAvailabilityResult -} - -type CheckDnsNameAvailabilityOperationOptions struct { - DomainNameLabel *string -} - -func DefaultCheckDnsNameAvailabilityOperationOptions() CheckDnsNameAvailabilityOperationOptions { - return CheckDnsNameAvailabilityOperationOptions{} -} - -func (o CheckDnsNameAvailabilityOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CheckDnsNameAvailabilityOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CheckDnsNameAvailabilityOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.DomainNameLabel != nil { - out.Append("domainNameLabel", fmt.Sprintf("%v", *o.DomainNameLabel)) - } - return &out -} - -// CheckDnsNameAvailability ... -func (c CheckDnsAvailabilitiesClient) CheckDnsNameAvailability(ctx context.Context, id LocationId, options CheckDnsNameAvailabilityOperationOptions) (result CheckDnsNameAvailabilityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/checkDnsNameAvailability", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/checkdnsavailabilities/model_dnsnameavailabilityresult.go b/resource-manager/network/2022-11-01/checkdnsavailabilities/model_dnsnameavailabilityresult.go deleted file mode 100644 index e12398a149f..00000000000 --- a/resource-manager/network/2022-11-01/checkdnsavailabilities/model_dnsnameavailabilityresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package checkdnsavailabilities - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DnsNameAvailabilityResult struct { - Available *bool `json:"available,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/checkdnsavailabilities/version.go b/resource-manager/network/2022-11-01/checkdnsavailabilities/version.go deleted file mode 100644 index bcf5b7e5b5b..00000000000 --- a/resource-manager/network/2022-11-01/checkdnsavailabilities/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package checkdnsavailabilities - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/checkdnsavailabilities/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/client.go b/resource-manager/network/2022-11-01/client.go deleted file mode 100644 index 566bae46dab..00000000000 --- a/resource-manager/network/2022-11-01/client.go +++ /dev/null @@ -1,982 +0,0 @@ -package v2022_11_01 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/adminrulecollections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/adminrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgatewayprivateendpointconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgatewayprivatelinkresources" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationgatewaywafdynamicmanifests" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/applicationsecuritygroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/availabledelegations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/availableservicealiases" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/azurefirewalls" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/bastionhosts" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/bastionshareablelink" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/bgpservicecommunities" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/checkdnsavailabilities" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/cloudservicepublicipaddresses" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/connectionmonitors" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/connectivityconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/customipprefixes" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ddoscustompolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ddosprotectionplans" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/dscpconfiguration" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/dscpconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/endpointservices" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitarptable" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitauthorizations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitpeerings" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitroutestable" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuits" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitstats" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutegateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutelinks" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteportauthorizations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteports" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteportslocations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteproviderports" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteserviceproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/firewallpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/flowlogs" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ipallocations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ipgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/loadbalancers" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/localnetworkgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/natgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkgroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkinterfaces" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanageractiveconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagerconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagers" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkprofiles" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networksecuritygroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkvirtualappliances" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkwatchers" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/p2svpngateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/packetcaptures" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privatednszonegroups" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privateendpoints" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privatelinkservice" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privatelinkservices" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/publicipaddresses" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/publicipprefixes" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routefilterrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routefilters" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routes" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routetables" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/scopeconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/securityadminconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/securitypartnerproviders" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/securityrules" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/serviceendpointpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/servicetags" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/staticmembers" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/subnets" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/trafficanalytics" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/usages" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vipswap" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualappliancesites" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualapplianceskus" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworkgateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworkpeerings" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworks" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworktap" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworktaps" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualrouterpeerings" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualrouters" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualwans" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vmsspublicipaddresses" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpngateways" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpnlinkconnections" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpnserverconfigurations" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpnsites" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/webapplicationfirewallpolicies" - "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/webcategories" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -type Client struct { - AdminRuleCollections *adminrulecollections.AdminRuleCollectionsClient - AdminRules *adminrules.AdminRulesClient - ApplicationGatewayPrivateEndpointConnections *applicationgatewayprivateendpointconnections.ApplicationGatewayPrivateEndpointConnectionsClient - ApplicationGatewayPrivateLinkResources *applicationgatewayprivatelinkresources.ApplicationGatewayPrivateLinkResourcesClient - ApplicationGatewayWafDynamicManifests *applicationgatewaywafdynamicmanifests.ApplicationGatewayWafDynamicManifestsClient - ApplicationGateways *applicationgateways.ApplicationGatewaysClient - ApplicationSecurityGroups *applicationsecuritygroups.ApplicationSecurityGroupsClient - AvailableDelegations *availabledelegations.AvailableDelegationsClient - AvailableServiceAliases *availableservicealiases.AvailableServiceAliasesClient - AzureFirewalls *azurefirewalls.AzureFirewallsClient - BastionHosts *bastionhosts.BastionHostsClient - BastionShareableLink *bastionshareablelink.BastionShareableLinkClient - BgpServiceCommunities *bgpservicecommunities.BgpServiceCommunitiesClient - CheckDnsAvailabilities *checkdnsavailabilities.CheckDnsAvailabilitiesClient - CloudServicePublicIPAddresses *cloudservicepublicipaddresses.CloudServicePublicIPAddressesClient - ConnectionMonitors *connectionmonitors.ConnectionMonitorsClient - ConnectivityConfigurations *connectivityconfigurations.ConnectivityConfigurationsClient - CustomIPPrefixes *customipprefixes.CustomIPPrefixesClient - DdosCustomPolicies *ddoscustompolicies.DdosCustomPoliciesClient - DdosProtectionPlans *ddosprotectionplans.DdosProtectionPlansClient - DscpConfiguration *dscpconfiguration.DscpConfigurationClient - DscpConfigurations *dscpconfigurations.DscpConfigurationsClient - EndpointServices *endpointservices.EndpointServicesClient - ExpressRouteCircuitArpTable *expressroutecircuitarptable.ExpressRouteCircuitArpTableClient - ExpressRouteCircuitAuthorizations *expressroutecircuitauthorizations.ExpressRouteCircuitAuthorizationsClient - ExpressRouteCircuitConnections *expressroutecircuitconnections.ExpressRouteCircuitConnectionsClient - ExpressRouteCircuitPeerings *expressroutecircuitpeerings.ExpressRouteCircuitPeeringsClient - ExpressRouteCircuitRoutesTable *expressroutecircuitroutestable.ExpressRouteCircuitRoutesTableClient - ExpressRouteCircuitRoutesTableSummary *expressroutecircuitroutestablesummary.ExpressRouteCircuitRoutesTableSummaryClient - ExpressRouteCircuitStats *expressroutecircuitstats.ExpressRouteCircuitStatsClient - ExpressRouteCircuits *expressroutecircuits.ExpressRouteCircuitsClient - ExpressRouteConnections *expressrouteconnections.ExpressRouteConnectionsClient - ExpressRouteCrossConnectionArpTable *expressroutecrossconnectionarptable.ExpressRouteCrossConnectionArpTableClient - ExpressRouteCrossConnectionPeerings *expressroutecrossconnectionpeerings.ExpressRouteCrossConnectionPeeringsClient - ExpressRouteCrossConnectionRouteTable *expressroutecrossconnectionroutetable.ExpressRouteCrossConnectionRouteTableClient - ExpressRouteCrossConnectionRouteTableSummary *expressroutecrossconnectionroutetablesummary.ExpressRouteCrossConnectionRouteTableSummaryClient - ExpressRouteCrossConnections *expressroutecrossconnections.ExpressRouteCrossConnectionsClient - ExpressRouteGateways *expressroutegateways.ExpressRouteGatewaysClient - ExpressRouteLinks *expressroutelinks.ExpressRouteLinksClient - ExpressRoutePortAuthorizations *expressrouteportauthorizations.ExpressRoutePortAuthorizationsClient - ExpressRoutePorts *expressrouteports.ExpressRoutePortsClient - ExpressRoutePortsLocations *expressrouteportslocations.ExpressRoutePortsLocationsClient - ExpressRouteProviderPorts *expressrouteproviderports.ExpressRouteProviderPortsClient - ExpressRouteServiceProviders *expressrouteserviceproviders.ExpressRouteServiceProvidersClient - FirewallPolicies *firewallpolicies.FirewallPoliciesClient - FirewallPolicyRuleCollectionGroups *firewallpolicyrulecollectiongroups.FirewallPolicyRuleCollectionGroupsClient - FlowLogs *flowlogs.FlowLogsClient - IPAllocations *ipallocations.IPAllocationsClient - IPGroups *ipgroups.IPGroupsClient - LoadBalancers *loadbalancers.LoadBalancersClient - LocalNetworkGateways *localnetworkgateways.LocalNetworkGatewaysClient - NatGateways *natgateways.NatGatewaysClient - NetworkGroups *networkgroups.NetworkGroupsClient - NetworkInterfaces *networkinterfaces.NetworkInterfacesClient - NetworkManagerActiveConfigurations *networkmanageractiveconfigurations.NetworkManagerActiveConfigurationsClient - NetworkManagerActiveConnectivityConfigurations *networkmanageractiveconnectivityconfigurations.NetworkManagerActiveConnectivityConfigurationsClient - NetworkManagerConnections *networkmanagerconnections.NetworkManagerConnectionsClient - NetworkManagerEffectiveConnectivityConfiguration *networkmanagereffectiveconnectivityconfiguration.NetworkManagerEffectiveConnectivityConfigurationClient - NetworkManagerEffectiveSecurityAdminRules *networkmanagereffectivesecurityadminrules.NetworkManagerEffectiveSecurityAdminRulesClient - NetworkManagers *networkmanagers.NetworkManagersClient - NetworkProfiles *networkprofiles.NetworkProfilesClient - NetworkSecurityGroups *networksecuritygroups.NetworkSecurityGroupsClient - NetworkVirtualAppliances *networkvirtualappliances.NetworkVirtualAppliancesClient - NetworkWatchers *networkwatchers.NetworkWatchersClient - P2sVpnGateways *p2svpngateways.P2sVpnGatewaysClient - PacketCaptures *packetcaptures.PacketCapturesClient - PeerExpressRouteCircuitConnections *peerexpressroutecircuitconnections.PeerExpressRouteCircuitConnectionsClient - PrivateDnsZoneGroups *privatednszonegroups.PrivateDnsZoneGroupsClient - PrivateEndpoints *privateendpoints.PrivateEndpointsClient - PrivateLinkService *privatelinkservice.PrivateLinkServiceClient - PrivateLinkServices *privatelinkservices.PrivateLinkServicesClient - PublicIPAddresses *publicipaddresses.PublicIPAddressesClient - PublicIPPrefixes *publicipprefixes.PublicIPPrefixesClient - RouteFilterRules *routefilterrules.RouteFilterRulesClient - RouteFilters *routefilters.RouteFiltersClient - RouteTables *routetables.RouteTablesClient - Routes *routes.RoutesClient - ScopeConnections *scopeconnections.ScopeConnectionsClient - SecurityAdminConfigurations *securityadminconfigurations.SecurityAdminConfigurationsClient - SecurityPartnerProviders *securitypartnerproviders.SecurityPartnerProvidersClient - SecurityRules *securityrules.SecurityRulesClient - ServiceEndpointPolicies *serviceendpointpolicies.ServiceEndpointPoliciesClient - ServiceEndpointPolicyDefinitions *serviceendpointpolicydefinitions.ServiceEndpointPolicyDefinitionsClient - ServiceTags *servicetags.ServiceTagsClient - StaticMembers *staticmembers.StaticMembersClient - Subnets *subnets.SubnetsClient - TrafficAnalytics *trafficanalytics.TrafficAnalyticsClient - Usages *usages.UsagesClient - VMSSPublicIPAddresses *vmsspublicipaddresses.VMSSPublicIPAddressesClient - VipSwap *vipswap.VipSwapClient - VirtualApplianceSites *virtualappliancesites.VirtualApplianceSitesClient - VirtualApplianceSkus *virtualapplianceskus.VirtualApplianceSkusClient - VirtualNetworkGatewayConnections *virtualnetworkgatewayconnections.VirtualNetworkGatewayConnectionsClient - VirtualNetworkGateways *virtualnetworkgateways.VirtualNetworkGatewaysClient - VirtualNetworkPeerings *virtualnetworkpeerings.VirtualNetworkPeeringsClient - VirtualNetworkTap *virtualnetworktap.VirtualNetworkTapClient - VirtualNetworkTaps *virtualnetworktaps.VirtualNetworkTapsClient - VirtualNetworks *virtualnetworks.VirtualNetworksClient - VirtualRouterPeerings *virtualrouterpeerings.VirtualRouterPeeringsClient - VirtualRouters *virtualrouters.VirtualRoutersClient - VirtualWANs *virtualwans.VirtualWANsClient - VpnGateways *vpngateways.VpnGatewaysClient - VpnLinkConnections *vpnlinkconnections.VpnLinkConnectionsClient - VpnServerConfigurations *vpnserverconfigurations.VpnServerConfigurationsClient - VpnSites *vpnsites.VpnSitesClient - WebApplicationFirewallPolicies *webapplicationfirewallpolicies.WebApplicationFirewallPoliciesClient - WebCategories *webcategories.WebCategoriesClient -} - -func NewClientWithBaseURI(api environments.Api, configureFunc func(c *resourcemanager.Client)) (*Client, error) { - adminRuleCollectionsClient, err := adminrulecollections.NewAdminRuleCollectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AdminRuleCollections client: %+v", err) - } - configureFunc(adminRuleCollectionsClient.Client) - - adminRulesClient, err := adminrules.NewAdminRulesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AdminRules client: %+v", err) - } - configureFunc(adminRulesClient.Client) - - applicationGatewayPrivateEndpointConnectionsClient, err := applicationgatewayprivateendpointconnections.NewApplicationGatewayPrivateEndpointConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationGatewayPrivateEndpointConnections client: %+v", err) - } - configureFunc(applicationGatewayPrivateEndpointConnectionsClient.Client) - - applicationGatewayPrivateLinkResourcesClient, err := applicationgatewayprivatelinkresources.NewApplicationGatewayPrivateLinkResourcesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationGatewayPrivateLinkResources client: %+v", err) - } - configureFunc(applicationGatewayPrivateLinkResourcesClient.Client) - - applicationGatewayWafDynamicManifestsClient, err := applicationgatewaywafdynamicmanifests.NewApplicationGatewayWafDynamicManifestsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationGatewayWafDynamicManifests client: %+v", err) - } - configureFunc(applicationGatewayWafDynamicManifestsClient.Client) - - applicationGatewaysClient, err := applicationgateways.NewApplicationGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationGateways client: %+v", err) - } - configureFunc(applicationGatewaysClient.Client) - - applicationSecurityGroupsClient, err := applicationsecuritygroups.NewApplicationSecurityGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ApplicationSecurityGroups client: %+v", err) - } - configureFunc(applicationSecurityGroupsClient.Client) - - availableDelegationsClient, err := availabledelegations.NewAvailableDelegationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AvailableDelegations client: %+v", err) - } - configureFunc(availableDelegationsClient.Client) - - availableServiceAliasesClient, err := availableservicealiases.NewAvailableServiceAliasesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AvailableServiceAliases client: %+v", err) - } - configureFunc(availableServiceAliasesClient.Client) - - azureFirewallsClient, err := azurefirewalls.NewAzureFirewallsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building AzureFirewalls client: %+v", err) - } - configureFunc(azureFirewallsClient.Client) - - bastionHostsClient, err := bastionhosts.NewBastionHostsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building BastionHosts client: %+v", err) - } - configureFunc(bastionHostsClient.Client) - - bastionShareableLinkClient, err := bastionshareablelink.NewBastionShareableLinkClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building BastionShareableLink client: %+v", err) - } - configureFunc(bastionShareableLinkClient.Client) - - bgpServiceCommunitiesClient, err := bgpservicecommunities.NewBgpServiceCommunitiesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building BgpServiceCommunities client: %+v", err) - } - configureFunc(bgpServiceCommunitiesClient.Client) - - checkDnsAvailabilitiesClient, err := checkdnsavailabilities.NewCheckDnsAvailabilitiesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building CheckDnsAvailabilities client: %+v", err) - } - configureFunc(checkDnsAvailabilitiesClient.Client) - - cloudServicePublicIPAddressesClient, err := cloudservicepublicipaddresses.NewCloudServicePublicIPAddressesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building CloudServicePublicIPAddresses client: %+v", err) - } - configureFunc(cloudServicePublicIPAddressesClient.Client) - - connectionMonitorsClient, err := connectionmonitors.NewConnectionMonitorsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ConnectionMonitors client: %+v", err) - } - configureFunc(connectionMonitorsClient.Client) - - connectivityConfigurationsClient, err := connectivityconfigurations.NewConnectivityConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ConnectivityConfigurations client: %+v", err) - } - configureFunc(connectivityConfigurationsClient.Client) - - customIPPrefixesClient, err := customipprefixes.NewCustomIPPrefixesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building CustomIPPrefixes client: %+v", err) - } - configureFunc(customIPPrefixesClient.Client) - - ddosCustomPoliciesClient, err := ddoscustompolicies.NewDdosCustomPoliciesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building DdosCustomPolicies client: %+v", err) - } - configureFunc(ddosCustomPoliciesClient.Client) - - ddosProtectionPlansClient, err := ddosprotectionplans.NewDdosProtectionPlansClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building DdosProtectionPlans client: %+v", err) - } - configureFunc(ddosProtectionPlansClient.Client) - - dscpConfigurationClient, err := dscpconfiguration.NewDscpConfigurationClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building DscpConfiguration client: %+v", err) - } - configureFunc(dscpConfigurationClient.Client) - - dscpConfigurationsClient, err := dscpconfigurations.NewDscpConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building DscpConfigurations client: %+v", err) - } - configureFunc(dscpConfigurationsClient.Client) - - endpointServicesClient, err := endpointservices.NewEndpointServicesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building EndpointServices client: %+v", err) - } - configureFunc(endpointServicesClient.Client) - - expressRouteCircuitArpTableClient, err := expressroutecircuitarptable.NewExpressRouteCircuitArpTableClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitArpTable client: %+v", err) - } - configureFunc(expressRouteCircuitArpTableClient.Client) - - expressRouteCircuitAuthorizationsClient, err := expressroutecircuitauthorizations.NewExpressRouteCircuitAuthorizationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitAuthorizations client: %+v", err) - } - configureFunc(expressRouteCircuitAuthorizationsClient.Client) - - expressRouteCircuitConnectionsClient, err := expressroutecircuitconnections.NewExpressRouteCircuitConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitConnections client: %+v", err) - } - configureFunc(expressRouteCircuitConnectionsClient.Client) - - expressRouteCircuitPeeringsClient, err := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitPeerings client: %+v", err) - } - configureFunc(expressRouteCircuitPeeringsClient.Client) - - expressRouteCircuitRoutesTableClient, err := expressroutecircuitroutestable.NewExpressRouteCircuitRoutesTableClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitRoutesTable client: %+v", err) - } - configureFunc(expressRouteCircuitRoutesTableClient.Client) - - expressRouteCircuitRoutesTableSummaryClient, err := expressroutecircuitroutestablesummary.NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitRoutesTableSummary client: %+v", err) - } - configureFunc(expressRouteCircuitRoutesTableSummaryClient.Client) - - expressRouteCircuitStatsClient, err := expressroutecircuitstats.NewExpressRouteCircuitStatsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuitStats client: %+v", err) - } - configureFunc(expressRouteCircuitStatsClient.Client) - - expressRouteCircuitsClient, err := expressroutecircuits.NewExpressRouteCircuitsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCircuits client: %+v", err) - } - configureFunc(expressRouteCircuitsClient.Client) - - expressRouteConnectionsClient, err := expressrouteconnections.NewExpressRouteConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteConnections client: %+v", err) - } - configureFunc(expressRouteConnectionsClient.Client) - - expressRouteCrossConnectionArpTableClient, err := expressroutecrossconnectionarptable.NewExpressRouteCrossConnectionArpTableClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnectionArpTable client: %+v", err) - } - configureFunc(expressRouteCrossConnectionArpTableClient.Client) - - expressRouteCrossConnectionPeeringsClient, err := expressroutecrossconnectionpeerings.NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnectionPeerings client: %+v", err) - } - configureFunc(expressRouteCrossConnectionPeeringsClient.Client) - - expressRouteCrossConnectionRouteTableClient, err := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionRouteTableClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnectionRouteTable client: %+v", err) - } - configureFunc(expressRouteCrossConnectionRouteTableClient.Client) - - expressRouteCrossConnectionRouteTableSummaryClient, err := expressroutecrossconnectionroutetablesummary.NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnectionRouteTableSummary client: %+v", err) - } - configureFunc(expressRouteCrossConnectionRouteTableSummaryClient.Client) - - expressRouteCrossConnectionsClient, err := expressroutecrossconnections.NewExpressRouteCrossConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteCrossConnections client: %+v", err) - } - configureFunc(expressRouteCrossConnectionsClient.Client) - - expressRouteGatewaysClient, err := expressroutegateways.NewExpressRouteGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteGateways client: %+v", err) - } - configureFunc(expressRouteGatewaysClient.Client) - - expressRouteLinksClient, err := expressroutelinks.NewExpressRouteLinksClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteLinks client: %+v", err) - } - configureFunc(expressRouteLinksClient.Client) - - expressRoutePortAuthorizationsClient, err := expressrouteportauthorizations.NewExpressRoutePortAuthorizationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRoutePortAuthorizations client: %+v", err) - } - configureFunc(expressRoutePortAuthorizationsClient.Client) - - expressRoutePortsClient, err := expressrouteports.NewExpressRoutePortsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRoutePorts client: %+v", err) - } - configureFunc(expressRoutePortsClient.Client) - - expressRoutePortsLocationsClient, err := expressrouteportslocations.NewExpressRoutePortsLocationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRoutePortsLocations client: %+v", err) - } - configureFunc(expressRoutePortsLocationsClient.Client) - - expressRouteProviderPortsClient, err := expressrouteproviderports.NewExpressRouteProviderPortsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteProviderPorts client: %+v", err) - } - configureFunc(expressRouteProviderPortsClient.Client) - - expressRouteServiceProvidersClient, err := expressrouteserviceproviders.NewExpressRouteServiceProvidersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ExpressRouteServiceProviders client: %+v", err) - } - configureFunc(expressRouteServiceProvidersClient.Client) - - firewallPoliciesClient, err := firewallpolicies.NewFirewallPoliciesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building FirewallPolicies client: %+v", err) - } - configureFunc(firewallPoliciesClient.Client) - - firewallPolicyRuleCollectionGroupsClient, err := firewallpolicyrulecollectiongroups.NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building FirewallPolicyRuleCollectionGroups client: %+v", err) - } - configureFunc(firewallPolicyRuleCollectionGroupsClient.Client) - - flowLogsClient, err := flowlogs.NewFlowLogsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building FlowLogs client: %+v", err) - } - configureFunc(flowLogsClient.Client) - - iPAllocationsClient, err := ipallocations.NewIPAllocationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building IPAllocations client: %+v", err) - } - configureFunc(iPAllocationsClient.Client) - - iPGroupsClient, err := ipgroups.NewIPGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building IPGroups client: %+v", err) - } - configureFunc(iPGroupsClient.Client) - - loadBalancersClient, err := loadbalancers.NewLoadBalancersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building LoadBalancers client: %+v", err) - } - configureFunc(loadBalancersClient.Client) - - localNetworkGatewaysClient, err := localnetworkgateways.NewLocalNetworkGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building LocalNetworkGateways client: %+v", err) - } - configureFunc(localNetworkGatewaysClient.Client) - - natGatewaysClient, err := natgateways.NewNatGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NatGateways client: %+v", err) - } - configureFunc(natGatewaysClient.Client) - - networkGroupsClient, err := networkgroups.NewNetworkGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkGroups client: %+v", err) - } - configureFunc(networkGroupsClient.Client) - - networkInterfacesClient, err := networkinterfaces.NewNetworkInterfacesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkInterfaces client: %+v", err) - } - configureFunc(networkInterfacesClient.Client) - - networkManagerActiveConfigurationsClient, err := networkmanageractiveconfigurations.NewNetworkManagerActiveConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerActiveConfigurations client: %+v", err) - } - configureFunc(networkManagerActiveConfigurationsClient.Client) - - networkManagerActiveConnectivityConfigurationsClient, err := networkmanageractiveconnectivityconfigurations.NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerActiveConnectivityConfigurations client: %+v", err) - } - configureFunc(networkManagerActiveConnectivityConfigurationsClient.Client) - - networkManagerConnectionsClient, err := networkmanagerconnections.NewNetworkManagerConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerConnections client: %+v", err) - } - configureFunc(networkManagerConnectionsClient.Client) - - networkManagerEffectiveConnectivityConfigurationClient, err := networkmanagereffectiveconnectivityconfiguration.NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerEffectiveConnectivityConfiguration client: %+v", err) - } - configureFunc(networkManagerEffectiveConnectivityConfigurationClient.Client) - - networkManagerEffectiveSecurityAdminRulesClient, err := networkmanagereffectivesecurityadminrules.NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagerEffectiveSecurityAdminRules client: %+v", err) - } - configureFunc(networkManagerEffectiveSecurityAdminRulesClient.Client) - - networkManagersClient, err := networkmanagers.NewNetworkManagersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkManagers client: %+v", err) - } - configureFunc(networkManagersClient.Client) - - networkProfilesClient, err := networkprofiles.NewNetworkProfilesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkProfiles client: %+v", err) - } - configureFunc(networkProfilesClient.Client) - - networkSecurityGroupsClient, err := networksecuritygroups.NewNetworkSecurityGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkSecurityGroups client: %+v", err) - } - configureFunc(networkSecurityGroupsClient.Client) - - networkVirtualAppliancesClient, err := networkvirtualappliances.NewNetworkVirtualAppliancesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkVirtualAppliances client: %+v", err) - } - configureFunc(networkVirtualAppliancesClient.Client) - - networkWatchersClient, err := networkwatchers.NewNetworkWatchersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building NetworkWatchers client: %+v", err) - } - configureFunc(networkWatchersClient.Client) - - p2sVpnGatewaysClient, err := p2svpngateways.NewP2sVpnGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building P2sVpnGateways client: %+v", err) - } - configureFunc(p2sVpnGatewaysClient.Client) - - packetCapturesClient, err := packetcaptures.NewPacketCapturesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PacketCaptures client: %+v", err) - } - configureFunc(packetCapturesClient.Client) - - peerExpressRouteCircuitConnectionsClient, err := peerexpressroutecircuitconnections.NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PeerExpressRouteCircuitConnections client: %+v", err) - } - configureFunc(peerExpressRouteCircuitConnectionsClient.Client) - - privateDnsZoneGroupsClient, err := privatednszonegroups.NewPrivateDnsZoneGroupsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PrivateDnsZoneGroups client: %+v", err) - } - configureFunc(privateDnsZoneGroupsClient.Client) - - privateEndpointsClient, err := privateendpoints.NewPrivateEndpointsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PrivateEndpoints client: %+v", err) - } - configureFunc(privateEndpointsClient.Client) - - privateLinkServiceClient, err := privatelinkservice.NewPrivateLinkServiceClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PrivateLinkService client: %+v", err) - } - configureFunc(privateLinkServiceClient.Client) - - privateLinkServicesClient, err := privatelinkservices.NewPrivateLinkServicesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PrivateLinkServices client: %+v", err) - } - configureFunc(privateLinkServicesClient.Client) - - publicIPAddressesClient, err := publicipaddresses.NewPublicIPAddressesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PublicIPAddresses client: %+v", err) - } - configureFunc(publicIPAddressesClient.Client) - - publicIPPrefixesClient, err := publicipprefixes.NewPublicIPPrefixesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building PublicIPPrefixes client: %+v", err) - } - configureFunc(publicIPPrefixesClient.Client) - - routeFilterRulesClient, err := routefilterrules.NewRouteFilterRulesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building RouteFilterRules client: %+v", err) - } - configureFunc(routeFilterRulesClient.Client) - - routeFiltersClient, err := routefilters.NewRouteFiltersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building RouteFilters client: %+v", err) - } - configureFunc(routeFiltersClient.Client) - - routeTablesClient, err := routetables.NewRouteTablesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building RouteTables client: %+v", err) - } - configureFunc(routeTablesClient.Client) - - routesClient, err := routes.NewRoutesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building Routes client: %+v", err) - } - configureFunc(routesClient.Client) - - scopeConnectionsClient, err := scopeconnections.NewScopeConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ScopeConnections client: %+v", err) - } - configureFunc(scopeConnectionsClient.Client) - - securityAdminConfigurationsClient, err := securityadminconfigurations.NewSecurityAdminConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building SecurityAdminConfigurations client: %+v", err) - } - configureFunc(securityAdminConfigurationsClient.Client) - - securityPartnerProvidersClient, err := securitypartnerproviders.NewSecurityPartnerProvidersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building SecurityPartnerProviders client: %+v", err) - } - configureFunc(securityPartnerProvidersClient.Client) - - securityRulesClient, err := securityrules.NewSecurityRulesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building SecurityRules client: %+v", err) - } - configureFunc(securityRulesClient.Client) - - serviceEndpointPoliciesClient, err := serviceendpointpolicies.NewServiceEndpointPoliciesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ServiceEndpointPolicies client: %+v", err) - } - configureFunc(serviceEndpointPoliciesClient.Client) - - serviceEndpointPolicyDefinitionsClient, err := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ServiceEndpointPolicyDefinitions client: %+v", err) - } - configureFunc(serviceEndpointPolicyDefinitionsClient.Client) - - serviceTagsClient, err := servicetags.NewServiceTagsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building ServiceTags client: %+v", err) - } - configureFunc(serviceTagsClient.Client) - - staticMembersClient, err := staticmembers.NewStaticMembersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building StaticMembers client: %+v", err) - } - configureFunc(staticMembersClient.Client) - - subnetsClient, err := subnets.NewSubnetsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building Subnets client: %+v", err) - } - configureFunc(subnetsClient.Client) - - trafficAnalyticsClient, err := trafficanalytics.NewTrafficAnalyticsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building TrafficAnalytics client: %+v", err) - } - configureFunc(trafficAnalyticsClient.Client) - - usagesClient, err := usages.NewUsagesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building Usages client: %+v", err) - } - configureFunc(usagesClient.Client) - - vMSSPublicIPAddressesClient, err := vmsspublicipaddresses.NewVMSSPublicIPAddressesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VMSSPublicIPAddresses client: %+v", err) - } - configureFunc(vMSSPublicIPAddressesClient.Client) - - vipSwapClient, err := vipswap.NewVipSwapClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VipSwap client: %+v", err) - } - configureFunc(vipSwapClient.Client) - - virtualApplianceSitesClient, err := virtualappliancesites.NewVirtualApplianceSitesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualApplianceSites client: %+v", err) - } - configureFunc(virtualApplianceSitesClient.Client) - - virtualApplianceSkusClient, err := virtualapplianceskus.NewVirtualApplianceSkusClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualApplianceSkus client: %+v", err) - } - configureFunc(virtualApplianceSkusClient.Client) - - virtualNetworkGatewayConnectionsClient, err := virtualnetworkgatewayconnections.NewVirtualNetworkGatewayConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkGatewayConnections client: %+v", err) - } - configureFunc(virtualNetworkGatewayConnectionsClient.Client) - - virtualNetworkGatewaysClient, err := virtualnetworkgateways.NewVirtualNetworkGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkGateways client: %+v", err) - } - configureFunc(virtualNetworkGatewaysClient.Client) - - virtualNetworkPeeringsClient, err := virtualnetworkpeerings.NewVirtualNetworkPeeringsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkPeerings client: %+v", err) - } - configureFunc(virtualNetworkPeeringsClient.Client) - - virtualNetworkTapClient, err := virtualnetworktap.NewVirtualNetworkTapClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkTap client: %+v", err) - } - configureFunc(virtualNetworkTapClient.Client) - - virtualNetworkTapsClient, err := virtualnetworktaps.NewVirtualNetworkTapsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworkTaps client: %+v", err) - } - configureFunc(virtualNetworkTapsClient.Client) - - virtualNetworksClient, err := virtualnetworks.NewVirtualNetworksClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualNetworks client: %+v", err) - } - configureFunc(virtualNetworksClient.Client) - - virtualRouterPeeringsClient, err := virtualrouterpeerings.NewVirtualRouterPeeringsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualRouterPeerings client: %+v", err) - } - configureFunc(virtualRouterPeeringsClient.Client) - - virtualRoutersClient, err := virtualrouters.NewVirtualRoutersClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualRouters client: %+v", err) - } - configureFunc(virtualRoutersClient.Client) - - virtualWANsClient, err := virtualwans.NewVirtualWANsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VirtualWANs client: %+v", err) - } - configureFunc(virtualWANsClient.Client) - - vpnGatewaysClient, err := vpngateways.NewVpnGatewaysClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VpnGateways client: %+v", err) - } - configureFunc(vpnGatewaysClient.Client) - - vpnLinkConnectionsClient, err := vpnlinkconnections.NewVpnLinkConnectionsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VpnLinkConnections client: %+v", err) - } - configureFunc(vpnLinkConnectionsClient.Client) - - vpnServerConfigurationsClient, err := vpnserverconfigurations.NewVpnServerConfigurationsClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VpnServerConfigurations client: %+v", err) - } - configureFunc(vpnServerConfigurationsClient.Client) - - vpnSitesClient, err := vpnsites.NewVpnSitesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building VpnSites client: %+v", err) - } - configureFunc(vpnSitesClient.Client) - - webApplicationFirewallPoliciesClient, err := webapplicationfirewallpolicies.NewWebApplicationFirewallPoliciesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building WebApplicationFirewallPolicies client: %+v", err) - } - configureFunc(webApplicationFirewallPoliciesClient.Client) - - webCategoriesClient, err := webcategories.NewWebCategoriesClientWithBaseURI(api) - if err != nil { - return nil, fmt.Errorf("building WebCategories client: %+v", err) - } - configureFunc(webCategoriesClient.Client) - - return &Client{ - AdminRuleCollections: adminRuleCollectionsClient, - AdminRules: adminRulesClient, - ApplicationGatewayPrivateEndpointConnections: applicationGatewayPrivateEndpointConnectionsClient, - ApplicationGatewayPrivateLinkResources: applicationGatewayPrivateLinkResourcesClient, - ApplicationGatewayWafDynamicManifests: applicationGatewayWafDynamicManifestsClient, - ApplicationGateways: applicationGatewaysClient, - ApplicationSecurityGroups: applicationSecurityGroupsClient, - AvailableDelegations: availableDelegationsClient, - AvailableServiceAliases: availableServiceAliasesClient, - AzureFirewalls: azureFirewallsClient, - BastionHosts: bastionHostsClient, - BastionShareableLink: bastionShareableLinkClient, - BgpServiceCommunities: bgpServiceCommunitiesClient, - CheckDnsAvailabilities: checkDnsAvailabilitiesClient, - CloudServicePublicIPAddresses: cloudServicePublicIPAddressesClient, - ConnectionMonitors: connectionMonitorsClient, - ConnectivityConfigurations: connectivityConfigurationsClient, - CustomIPPrefixes: customIPPrefixesClient, - DdosCustomPolicies: ddosCustomPoliciesClient, - DdosProtectionPlans: ddosProtectionPlansClient, - DscpConfiguration: dscpConfigurationClient, - DscpConfigurations: dscpConfigurationsClient, - EndpointServices: endpointServicesClient, - ExpressRouteCircuitArpTable: expressRouteCircuitArpTableClient, - ExpressRouteCircuitAuthorizations: expressRouteCircuitAuthorizationsClient, - ExpressRouteCircuitConnections: expressRouteCircuitConnectionsClient, - ExpressRouteCircuitPeerings: expressRouteCircuitPeeringsClient, - ExpressRouteCircuitRoutesTable: expressRouteCircuitRoutesTableClient, - ExpressRouteCircuitRoutesTableSummary: expressRouteCircuitRoutesTableSummaryClient, - ExpressRouteCircuitStats: expressRouteCircuitStatsClient, - ExpressRouteCircuits: expressRouteCircuitsClient, - ExpressRouteConnections: expressRouteConnectionsClient, - ExpressRouteCrossConnectionArpTable: expressRouteCrossConnectionArpTableClient, - ExpressRouteCrossConnectionPeerings: expressRouteCrossConnectionPeeringsClient, - ExpressRouteCrossConnectionRouteTable: expressRouteCrossConnectionRouteTableClient, - ExpressRouteCrossConnectionRouteTableSummary: expressRouteCrossConnectionRouteTableSummaryClient, - ExpressRouteCrossConnections: expressRouteCrossConnectionsClient, - ExpressRouteGateways: expressRouteGatewaysClient, - ExpressRouteLinks: expressRouteLinksClient, - ExpressRoutePortAuthorizations: expressRoutePortAuthorizationsClient, - ExpressRoutePorts: expressRoutePortsClient, - ExpressRoutePortsLocations: expressRoutePortsLocationsClient, - ExpressRouteProviderPorts: expressRouteProviderPortsClient, - ExpressRouteServiceProviders: expressRouteServiceProvidersClient, - FirewallPolicies: firewallPoliciesClient, - FirewallPolicyRuleCollectionGroups: firewallPolicyRuleCollectionGroupsClient, - FlowLogs: flowLogsClient, - IPAllocations: iPAllocationsClient, - IPGroups: iPGroupsClient, - LoadBalancers: loadBalancersClient, - LocalNetworkGateways: localNetworkGatewaysClient, - NatGateways: natGatewaysClient, - NetworkGroups: networkGroupsClient, - NetworkInterfaces: networkInterfacesClient, - NetworkManagerActiveConfigurations: networkManagerActiveConfigurationsClient, - NetworkManagerActiveConnectivityConfigurations: networkManagerActiveConnectivityConfigurationsClient, - NetworkManagerConnections: networkManagerConnectionsClient, - NetworkManagerEffectiveConnectivityConfiguration: networkManagerEffectiveConnectivityConfigurationClient, - NetworkManagerEffectiveSecurityAdminRules: networkManagerEffectiveSecurityAdminRulesClient, - NetworkManagers: networkManagersClient, - NetworkProfiles: networkProfilesClient, - NetworkSecurityGroups: networkSecurityGroupsClient, - NetworkVirtualAppliances: networkVirtualAppliancesClient, - NetworkWatchers: networkWatchersClient, - P2sVpnGateways: p2sVpnGatewaysClient, - PacketCaptures: packetCapturesClient, - PeerExpressRouteCircuitConnections: peerExpressRouteCircuitConnectionsClient, - PrivateDnsZoneGroups: privateDnsZoneGroupsClient, - PrivateEndpoints: privateEndpointsClient, - PrivateLinkService: privateLinkServiceClient, - PrivateLinkServices: privateLinkServicesClient, - PublicIPAddresses: publicIPAddressesClient, - PublicIPPrefixes: publicIPPrefixesClient, - RouteFilterRules: routeFilterRulesClient, - RouteFilters: routeFiltersClient, - RouteTables: routeTablesClient, - Routes: routesClient, - ScopeConnections: scopeConnectionsClient, - SecurityAdminConfigurations: securityAdminConfigurationsClient, - SecurityPartnerProviders: securityPartnerProvidersClient, - SecurityRules: securityRulesClient, - ServiceEndpointPolicies: serviceEndpointPoliciesClient, - ServiceEndpointPolicyDefinitions: serviceEndpointPolicyDefinitionsClient, - ServiceTags: serviceTagsClient, - StaticMembers: staticMembersClient, - Subnets: subnetsClient, - TrafficAnalytics: trafficAnalyticsClient, - Usages: usagesClient, - VMSSPublicIPAddresses: vMSSPublicIPAddressesClient, - VipSwap: vipSwapClient, - VirtualApplianceSites: virtualApplianceSitesClient, - VirtualApplianceSkus: virtualApplianceSkusClient, - VirtualNetworkGatewayConnections: virtualNetworkGatewayConnectionsClient, - VirtualNetworkGateways: virtualNetworkGatewaysClient, - VirtualNetworkPeerings: virtualNetworkPeeringsClient, - VirtualNetworkTap: virtualNetworkTapClient, - VirtualNetworkTaps: virtualNetworkTapsClient, - VirtualNetworks: virtualNetworksClient, - VirtualRouterPeerings: virtualRouterPeeringsClient, - VirtualRouters: virtualRoutersClient, - VirtualWANs: virtualWANsClient, - VpnGateways: vpnGatewaysClient, - VpnLinkConnections: vpnLinkConnectionsClient, - VpnServerConfigurations: vpnServerConfigurationsClient, - VpnSites: vpnSitesClient, - WebApplicationFirewallPolicies: webApplicationFirewallPoliciesClient, - WebCategories: webCategoriesClient, - }, nil -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/README.md b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/README.md deleted file mode 100644 index 730c3f05ea6..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/README.md +++ /dev/null @@ -1,70 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/cloudservicepublicipaddresses` Documentation - -The `cloudservicepublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/cloudservicepublicipaddresses" -``` - - -### Client Initialization - -```go -client := cloudservicepublicipaddresses.NewCloudServicePublicIPAddressesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CloudServicePublicIPAddressesClient.PublicIPAddressesGetCloudServicePublicIPAddress` - -```go -ctx := context.TODO() -id := cloudservicepublicipaddresses.NewCloudServicesPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue", "ipConfigurationValue", "publicIPAddressValue") - -read, err := client.PublicIPAddressesGetCloudServicePublicIPAddress(ctx, id, cloudservicepublicipaddresses.DefaultPublicIPAddressesGetCloudServicePublicIPAddressOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `CloudServicePublicIPAddressesClient.PublicIPAddressesListCloudServicePublicIPAddresses` - -```go -ctx := context.TODO() -id := cloudservicepublicipaddresses.NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue") - -// alternatively `client.PublicIPAddressesListCloudServicePublicIPAddresses(ctx, id)` can be used to do batched pagination -items, err := client.PublicIPAddressesListCloudServicePublicIPAddressesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `CloudServicePublicIPAddressesClient.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses` - -```go -ctx := context.TODO() -id := cloudservicepublicipaddresses.NewCloudServicesIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue", "ipConfigurationValue") - -// alternatively `client.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses(ctx, id)` can be used to do batched pagination -items, err := client.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/client.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/client.go deleted file mode 100644 index 621129e8737..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CloudServicePublicIPAddressesClient struct { - Client *resourcemanager.Client -} - -func NewCloudServicePublicIPAddressesClientWithBaseURI(api environments.Api) (*CloudServicePublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "cloudservicepublicipaddresses", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CloudServicePublicIPAddressesClient: %+v", err) - } - - return &CloudServicePublicIPAddressesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/constants.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/constants.go deleted file mode 100644 index 9a2b3e1f627..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/id_providercloudservice.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/id_providercloudservice.go deleted file mode 100644 index 0a86336f5d8..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/id_providercloudservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderCloudServiceId{} - -// ProviderCloudServiceId is a struct representing the Resource ID for a Provider Cloud Service -type ProviderCloudServiceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string -} - -// NewProviderCloudServiceID returns a new ProviderCloudServiceId struct -func NewProviderCloudServiceID(subscriptionId string, resourceGroupName string, cloudServiceName string) ProviderCloudServiceId { - return ProviderCloudServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - } -} - -// ParseProviderCloudServiceID parses 'input' into a ProviderCloudServiceId -func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderCloudServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ParseProviderCloudServiceIDInsensitively parses 'input' case-insensitively into a ProviderCloudServiceId -// note: this method should only be used for API response data and not user input -func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderCloudServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ValidateProviderCloudServiceID checks that 'input' can be parsed as a Provider Cloud Service ID -func ValidateProviderCloudServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderCloudServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Cloud Service ID -func (id ProviderCloudServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Cloud Service ID -func (id ProviderCloudServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - } -} - -// String returns a human-readable description of this Provider Cloud Service ID -func (id ProviderCloudServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - } - return fmt.Sprintf("Provider Cloud Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/id_providercloudservice_test.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/id_providercloudservice_test.go deleted file mode 100644 index 8d3c42ae6e0..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/id_providercloudservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderCloudServiceId{} - -func TestNewProviderCloudServiceID(t *testing.T) { - id := NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } -} - -func TestFormatProviderCloudServiceID(t *testing.T) { - actual := NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderCloudServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderCloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderCloudServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestParseProviderCloudServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderCloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderCloudServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestSegmentsForProviderCloudServiceId(t *testing.T) { - segments := ProviderCloudServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderCloudServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go deleted file mode 100644 index 5ee69f5501a..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddressesgetcloudservicepublicipaddress.go +++ /dev/null @@ -1,81 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesGetCloudServicePublicIPAddressOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPAddress -} - -type PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions struct { - Expand *string -} - -func DefaultPublicIPAddressesGetCloudServicePublicIPAddressOperationOptions() PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions { - return PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions{} -} - -func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// PublicIPAddressesGetCloudServicePublicIPAddress ... -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesGetCloudServicePublicIPAddress(ctx context.Context, id commonids.CloudServicesPublicIPAddressId, options PublicIPAddressesGetCloudServicePublicIPAddressOperationOptions) (result PublicIPAddressesGetCloudServicePublicIPAddressOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudservicepublicipaddresses.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudservicepublicipaddresses.go deleted file mode 100644 index 08be57dc021..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudservicepublicipaddresses.go +++ /dev/null @@ -1,89 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesListCloudServicePublicIPAddressesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type PublicIPAddressesListCloudServicePublicIPAddressesCompleteResult struct { - Items []PublicIPAddress -} - -// PublicIPAddressesListCloudServicePublicIPAddresses ... -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServicePublicIPAddresses(ctx context.Context, id ProviderCloudServiceId) (result PublicIPAddressesListCloudServicePublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// PublicIPAddressesListCloudServicePublicIPAddressesComplete retrieves all the results into a single object -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServicePublicIPAddressesComplete(ctx context.Context, id ProviderCloudServiceId) (PublicIPAddressesListCloudServicePublicIPAddressesCompleteResult, error) { - return c.PublicIPAddressesListCloudServicePublicIPAddressesCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// PublicIPAddressesListCloudServicePublicIPAddressesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServicePublicIPAddressesCompleteMatchingPredicate(ctx context.Context, id ProviderCloudServiceId, predicate PublicIPAddressOperationPredicate) (result PublicIPAddressesListCloudServicePublicIPAddressesCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.PublicIPAddressesListCloudServicePublicIPAddresses(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = PublicIPAddressesListCloudServicePublicIPAddressesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudserviceroleinstancepublicipaddresses.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudserviceroleinstancepublicipaddresses.go deleted file mode 100644 index a8cfda96bda..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/method_publicipaddresseslistcloudserviceroleinstancepublicipaddresses.go +++ /dev/null @@ -1,90 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteResult struct { - Items []PublicIPAddress -} - -// PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses ... -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses(ctx context.Context, id commonids.CloudServicesIPConfigurationId) (result PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesComplete retrieves all the results into a single object -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesComplete(ctx context.Context, id commonids.CloudServicesIPConfigurationId) (PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteResult, error) { - return c.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CloudServicePublicIPAddressesClient) PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteMatchingPredicate(ctx context.Context, id commonids.CloudServicesIPConfigurationId, predicate PublicIPAddressOperationPredicate) (result PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.PublicIPAddressesListCloudServiceRoleInstancePublicIPAddresses(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = PublicIPAddressesListCloudServiceRoleInstancePublicIPAddressesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddress.go deleted file mode 100644 index da0843dfe84..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 0752ac86606..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index c5e25b3ac40..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 3301a914b9a..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index d142ad28f06..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationsecuritygroup.go deleted file mode 100644 index db43b3a90d7..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 26c6e3c6d63..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_backendaddresspool.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_backendaddresspool.go deleted file mode 100644 index 11a0db48c3e..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index b0cb1d74343..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 852fda62a32..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ddossettings.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ddossettings.go deleted file mode 100644 index e76df1830ad..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_delegation.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_delegation.go deleted file mode 100644 index 37ba2738f03..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlog.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlog.go deleted file mode 100644 index b5951b65269..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlogformatparameters.go deleted file mode 100644 index 22cce73755f..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlogpropertiesformat.go deleted file mode 100644 index 81d0d4ee738..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_frontendipconfiguration.go deleted file mode 100644 index 6ef8b18a318..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index d76b004d004..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 623add5b390..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_inboundnatrule.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_inboundnatrule.go deleted file mode 100644 index 2bf55038c2e..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 9e9fd000882..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfiguration.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfiguration.go deleted file mode 100644 index 7aa8cbae351..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationprofile.go deleted file mode 100644 index cae99b1bc9d..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index d32ff6abc99..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index f1c212d87d9..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_iptag.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_iptag.go deleted file mode 100644 index 9cd0c420107..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddress.go deleted file mode 100644 index e95c784d170..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index f2cc5fa6b36..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgateway.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgateway.go deleted file mode 100644 index d2e737891d0..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgatewaypropertiesformat.go deleted file mode 100644 index 6e1be1ad8f0..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgatewaysku.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgatewaysku.go deleted file mode 100644 index 0e1a31e6f56..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natruleportmapping.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natruleportmapping.go deleted file mode 100644 index 9f648ba378f..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterface.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterface.go deleted file mode 100644 index 8fa35f5b27b..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacednssettings.go deleted file mode 100644 index 7841bbdaa74..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 2060396975d..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 331b8b4a8b7..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index e933a3bcc7e..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 32854c40bbf..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 417528f526c..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 800ba33402b..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networksecuritygroup.go deleted file mode 100644 index 4a17b77a5f7..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 75b57179c0e..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpoint.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpoint.go deleted file mode 100644 index 092678d20e9..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointconnection.go deleted file mode 100644 index 390ed6a1a9e..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointconnectionproperties.go deleted file mode 100644 index a4a672bb9ea..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointipconfiguration.go deleted file mode 100644 index f4475d0d46b..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index cd3b594722d..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointproperties.go deleted file mode 100644 index b6fab9bddb7..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkservice.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkservice.go deleted file mode 100644 index 47d7bc6cfba..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnection.go deleted file mode 100644 index c2e1ed2f2bb..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 12d313e2c8e..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 9c295f72e4e..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 2293fa06105..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index f0b249690b3..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceproperties.go deleted file mode 100644 index fea2fefdf6d..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddress.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddress.go deleted file mode 100644 index 0d91d1ce77a..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package cloudservicepublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddressdnssettings.go deleted file mode 100644 index 59fc873f762..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 5a1a9082ad9..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddresssku.go deleted file mode 100644 index 0d24d3ce3e2..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourcenavigationlink.go deleted file mode 100644 index a374b51e3ce..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourcenavigationlinkformat.go deleted file mode 100644 index bb8074b7c24..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourceset.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourceset.go deleted file mode 100644 index ea408a54b5a..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_retentionpolicyparameters.go deleted file mode 100644 index a92e570a340..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_route.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_route.go deleted file mode 100644 index ca309e6a8db..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routepropertiesformat.go deleted file mode 100644 index e981b239ff0..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routetable.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routetable.go deleted file mode 100644 index cfe4b1aaec3..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routetablepropertiesformat.go deleted file mode 100644 index 14537e9f6ea..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_securityrule.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_securityrule.go deleted file mode 100644 index 68880b23db6..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_securityrulepropertiesformat.go deleted file mode 100644 index 3918c59b2ce..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceassociationlink.go deleted file mode 100644 index 18402efabea..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 283dae7d051..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_servicedelegationpropertiesformat.go deleted file mode 100644 index cb30d331149..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicy.go deleted file mode 100644 index 51af3fd8470..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 84bd144ecd4..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 723f9f28975..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index de8c74ebf8a..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 63759ece07d..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subnet.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subnet.go deleted file mode 100644 index 4ae7149a7a9..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subnetpropertiesformat.go deleted file mode 100644 index 7ab10544095..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subresource.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subresource.go deleted file mode 100644 index ee542355418..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 6e884100df3..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_trafficanalyticsproperties.go deleted file mode 100644 index e38b924bdf6..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_virtualnetworktap.go deleted file mode 100644 index 9dc686dd12f..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index c0dae0b7388..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/predicates.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/predicates.go deleted file mode 100644 index f27f03144ee..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package cloudservicepublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PublicIPAddressOperationPredicate) Matches(input PublicIPAddress) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/version.go b/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/version.go deleted file mode 100644 index e2de5cb209a..00000000000 --- a/resource-manager/network/2022-11-01/cloudservicepublicipaddresses/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package cloudservicepublicipaddresses - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/cloudservicepublicipaddresses/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/README.md b/resource-manager/network/2022-11-01/connectionmonitors/README.md deleted file mode 100644 index 4797116d645..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/README.md +++ /dev/null @@ -1,138 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/connectionmonitors` Documentation - -The `connectionmonitors` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/connectionmonitors" -``` - - -### Client Initialization - -```go -client := connectionmonitors.NewConnectionMonitorsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ConnectionMonitorsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -payload := connectionmonitors.ConnectionMonitor{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload, connectionmonitors.DefaultCreateOrUpdateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Delete` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Get` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConnectionMonitorsClient.List` - -```go -ctx := context.TODO() -id := connectionmonitors.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Query` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -if err := client.QueryThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Start` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -if err := client.StartThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.Stop` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectionMonitorsClient.UpdateTags` - -```go -ctx := context.TODO() -id := connectionmonitors.NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - -payload := connectionmonitors.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/connectionmonitors/client.go b/resource-manager/network/2022-11-01/connectionmonitors/client.go deleted file mode 100644 index 75b9acef7e8..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connectionmonitors - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorsClient struct { - Client *resourcemanager.Client -} - -func NewConnectionMonitorsClientWithBaseURI(api environments.Api) (*ConnectionMonitorsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "connectionmonitors", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectionMonitorsClient: %+v", err) - } - - return &ConnectionMonitorsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/constants.go b/resource-manager/network/2022-11-01/connectionmonitors/constants.go deleted file mode 100644 index 7747a3a8316..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/constants.go +++ /dev/null @@ -1,770 +0,0 @@ -package connectionmonitors - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointFilterItemType string - -const ( - ConnectionMonitorEndpointFilterItemTypeAgentAddress ConnectionMonitorEndpointFilterItemType = "AgentAddress" -) - -func PossibleValuesForConnectionMonitorEndpointFilterItemType() []string { - return []string{ - string(ConnectionMonitorEndpointFilterItemTypeAgentAddress), - } -} - -func (s *ConnectionMonitorEndpointFilterItemType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorEndpointFilterItemType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorEndpointFilterItemType(input string) (*ConnectionMonitorEndpointFilterItemType, error) { - vals := map[string]ConnectionMonitorEndpointFilterItemType{ - "agentaddress": ConnectionMonitorEndpointFilterItemTypeAgentAddress, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorEndpointFilterItemType(input) - return &out, nil -} - -type ConnectionMonitorEndpointFilterType string - -const ( - ConnectionMonitorEndpointFilterTypeInclude ConnectionMonitorEndpointFilterType = "Include" -) - -func PossibleValuesForConnectionMonitorEndpointFilterType() []string { - return []string{ - string(ConnectionMonitorEndpointFilterTypeInclude), - } -} - -func (s *ConnectionMonitorEndpointFilterType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorEndpointFilterType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorEndpointFilterType(input string) (*ConnectionMonitorEndpointFilterType, error) { - vals := map[string]ConnectionMonitorEndpointFilterType{ - "include": ConnectionMonitorEndpointFilterTypeInclude, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorEndpointFilterType(input) - return &out, nil -} - -type ConnectionMonitorSourceStatus string - -const ( - ConnectionMonitorSourceStatusActive ConnectionMonitorSourceStatus = "Active" - ConnectionMonitorSourceStatusInactive ConnectionMonitorSourceStatus = "Inactive" - ConnectionMonitorSourceStatusUnknown ConnectionMonitorSourceStatus = "Unknown" -) - -func PossibleValuesForConnectionMonitorSourceStatus() []string { - return []string{ - string(ConnectionMonitorSourceStatusActive), - string(ConnectionMonitorSourceStatusInactive), - string(ConnectionMonitorSourceStatusUnknown), - } -} - -func (s *ConnectionMonitorSourceStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorSourceStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorSourceStatus(input string) (*ConnectionMonitorSourceStatus, error) { - vals := map[string]ConnectionMonitorSourceStatus{ - "active": ConnectionMonitorSourceStatusActive, - "inactive": ConnectionMonitorSourceStatusInactive, - "unknown": ConnectionMonitorSourceStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorSourceStatus(input) - return &out, nil -} - -type ConnectionMonitorTestConfigurationProtocol string - -const ( - ConnectionMonitorTestConfigurationProtocolHTTP ConnectionMonitorTestConfigurationProtocol = "Http" - ConnectionMonitorTestConfigurationProtocolIcmp ConnectionMonitorTestConfigurationProtocol = "Icmp" - ConnectionMonitorTestConfigurationProtocolTcp ConnectionMonitorTestConfigurationProtocol = "Tcp" -) - -func PossibleValuesForConnectionMonitorTestConfigurationProtocol() []string { - return []string{ - string(ConnectionMonitorTestConfigurationProtocolHTTP), - string(ConnectionMonitorTestConfigurationProtocolIcmp), - string(ConnectionMonitorTestConfigurationProtocolTcp), - } -} - -func (s *ConnectionMonitorTestConfigurationProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorTestConfigurationProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorTestConfigurationProtocol(input string) (*ConnectionMonitorTestConfigurationProtocol, error) { - vals := map[string]ConnectionMonitorTestConfigurationProtocol{ - "http": ConnectionMonitorTestConfigurationProtocolHTTP, - "icmp": ConnectionMonitorTestConfigurationProtocolIcmp, - "tcp": ConnectionMonitorTestConfigurationProtocolTcp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorTestConfigurationProtocol(input) - return &out, nil -} - -type ConnectionMonitorType string - -const ( - ConnectionMonitorTypeMultiEndpoint ConnectionMonitorType = "MultiEndpoint" - ConnectionMonitorTypeSingleSourceDestination ConnectionMonitorType = "SingleSourceDestination" -) - -func PossibleValuesForConnectionMonitorType() []string { - return []string{ - string(ConnectionMonitorTypeMultiEndpoint), - string(ConnectionMonitorTypeSingleSourceDestination), - } -} - -func (s *ConnectionMonitorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionMonitorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionMonitorType(input string) (*ConnectionMonitorType, error) { - vals := map[string]ConnectionMonitorType{ - "multiendpoint": ConnectionMonitorTypeMultiEndpoint, - "singlesourcedestination": ConnectionMonitorTypeSingleSourceDestination, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionMonitorType(input) - return &out, nil -} - -type ConnectionState string - -const ( - ConnectionStateReachable ConnectionState = "Reachable" - ConnectionStateUnknown ConnectionState = "Unknown" - ConnectionStateUnreachable ConnectionState = "Unreachable" -) - -func PossibleValuesForConnectionState() []string { - return []string{ - string(ConnectionStateReachable), - string(ConnectionStateUnknown), - string(ConnectionStateUnreachable), - } -} - -func (s *ConnectionState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionState(input string) (*ConnectionState, error) { - vals := map[string]ConnectionState{ - "reachable": ConnectionStateReachable, - "unknown": ConnectionStateUnknown, - "unreachable": ConnectionStateUnreachable, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionState(input) - return &out, nil -} - -type CoverageLevel string - -const ( - CoverageLevelAboveAverage CoverageLevel = "AboveAverage" - CoverageLevelAverage CoverageLevel = "Average" - CoverageLevelBelowAverage CoverageLevel = "BelowAverage" - CoverageLevelDefault CoverageLevel = "Default" - CoverageLevelFull CoverageLevel = "Full" - CoverageLevelLow CoverageLevel = "Low" -) - -func PossibleValuesForCoverageLevel() []string { - return []string{ - string(CoverageLevelAboveAverage), - string(CoverageLevelAverage), - string(CoverageLevelBelowAverage), - string(CoverageLevelDefault), - string(CoverageLevelFull), - string(CoverageLevelLow), - } -} - -func (s *CoverageLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCoverageLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCoverageLevel(input string) (*CoverageLevel, error) { - vals := map[string]CoverageLevel{ - "aboveaverage": CoverageLevelAboveAverage, - "average": CoverageLevelAverage, - "belowaverage": CoverageLevelBelowAverage, - "default": CoverageLevelDefault, - "full": CoverageLevelFull, - "low": CoverageLevelLow, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CoverageLevel(input) - return &out, nil -} - -type DestinationPortBehavior string - -const ( - DestinationPortBehaviorListenIfAvailable DestinationPortBehavior = "ListenIfAvailable" - DestinationPortBehaviorNone DestinationPortBehavior = "None" -) - -func PossibleValuesForDestinationPortBehavior() []string { - return []string{ - string(DestinationPortBehaviorListenIfAvailable), - string(DestinationPortBehaviorNone), - } -} - -func (s *DestinationPortBehavior) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDestinationPortBehavior(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDestinationPortBehavior(input string) (*DestinationPortBehavior, error) { - vals := map[string]DestinationPortBehavior{ - "listenifavailable": DestinationPortBehaviorListenIfAvailable, - "none": DestinationPortBehaviorNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DestinationPortBehavior(input) - return &out, nil -} - -type EndpointType string - -const ( - EndpointTypeAzureArcVM EndpointType = "AzureArcVM" - EndpointTypeAzureSubnet EndpointType = "AzureSubnet" - EndpointTypeAzureVM EndpointType = "AzureVM" - EndpointTypeAzureVMSS EndpointType = "AzureVMSS" - EndpointTypeAzureVNet EndpointType = "AzureVNet" - EndpointTypeExternalAddress EndpointType = "ExternalAddress" - EndpointTypeMMAWorkspaceMachine EndpointType = "MMAWorkspaceMachine" - EndpointTypeMMAWorkspaceNetwork EndpointType = "MMAWorkspaceNetwork" -) - -func PossibleValuesForEndpointType() []string { - return []string{ - string(EndpointTypeAzureArcVM), - string(EndpointTypeAzureSubnet), - string(EndpointTypeAzureVM), - string(EndpointTypeAzureVMSS), - string(EndpointTypeAzureVNet), - string(EndpointTypeExternalAddress), - string(EndpointTypeMMAWorkspaceMachine), - string(EndpointTypeMMAWorkspaceNetwork), - } -} - -func (s *EndpointType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEndpointType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEndpointType(input string) (*EndpointType, error) { - vals := map[string]EndpointType{ - "azurearcvm": EndpointTypeAzureArcVM, - "azuresubnet": EndpointTypeAzureSubnet, - "azurevm": EndpointTypeAzureVM, - "azurevmss": EndpointTypeAzureVMSS, - "azurevnet": EndpointTypeAzureVNet, - "externaladdress": EndpointTypeExternalAddress, - "mmaworkspacemachine": EndpointTypeMMAWorkspaceMachine, - "mmaworkspacenetwork": EndpointTypeMMAWorkspaceNetwork, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EndpointType(input) - return &out, nil -} - -type EvaluationState string - -const ( - EvaluationStateCompleted EvaluationState = "Completed" - EvaluationStateInProgress EvaluationState = "InProgress" - EvaluationStateNotStarted EvaluationState = "NotStarted" -) - -func PossibleValuesForEvaluationState() []string { - return []string{ - string(EvaluationStateCompleted), - string(EvaluationStateInProgress), - string(EvaluationStateNotStarted), - } -} - -func (s *EvaluationState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEvaluationState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEvaluationState(input string) (*EvaluationState, error) { - vals := map[string]EvaluationState{ - "completed": EvaluationStateCompleted, - "inprogress": EvaluationStateInProgress, - "notstarted": EvaluationStateNotStarted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EvaluationState(input) - return &out, nil -} - -type HTTPConfigurationMethod string - -const ( - HTTPConfigurationMethodGet HTTPConfigurationMethod = "Get" - HTTPConfigurationMethodPost HTTPConfigurationMethod = "Post" -) - -func PossibleValuesForHTTPConfigurationMethod() []string { - return []string{ - string(HTTPConfigurationMethodGet), - string(HTTPConfigurationMethodPost), - } -} - -func (s *HTTPConfigurationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHTTPConfigurationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHTTPConfigurationMethod(input string) (*HTTPConfigurationMethod, error) { - vals := map[string]HTTPConfigurationMethod{ - "get": HTTPConfigurationMethodGet, - "post": HTTPConfigurationMethodPost, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HTTPConfigurationMethod(input) - return &out, nil -} - -type IssueType string - -const ( - IssueTypeAgentStopped IssueType = "AgentStopped" - IssueTypeDnsResolution IssueType = "DnsResolution" - IssueTypeGuestFirewall IssueType = "GuestFirewall" - IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" - IssueTypePlatform IssueType = "Platform" - IssueTypePortThrottled IssueType = "PortThrottled" - IssueTypeSocketBind IssueType = "SocketBind" - IssueTypeUnknown IssueType = "Unknown" - IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" -) - -func PossibleValuesForIssueType() []string { - return []string{ - string(IssueTypeAgentStopped), - string(IssueTypeDnsResolution), - string(IssueTypeGuestFirewall), - string(IssueTypeNetworkSecurityRule), - string(IssueTypePlatform), - string(IssueTypePortThrottled), - string(IssueTypeSocketBind), - string(IssueTypeUnknown), - string(IssueTypeUserDefinedRoute), - } -} - -func (s *IssueType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIssueType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIssueType(input string) (*IssueType, error) { - vals := map[string]IssueType{ - "agentstopped": IssueTypeAgentStopped, - "dnsresolution": IssueTypeDnsResolution, - "guestfirewall": IssueTypeGuestFirewall, - "networksecurityrule": IssueTypeNetworkSecurityRule, - "platform": IssueTypePlatform, - "portthrottled": IssueTypePortThrottled, - "socketbind": IssueTypeSocketBind, - "unknown": IssueTypeUnknown, - "userdefinedroute": IssueTypeUserDefinedRoute, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IssueType(input) - return &out, nil -} - -type Origin string - -const ( - OriginInbound Origin = "Inbound" - OriginLocal Origin = "Local" - OriginOutbound Origin = "Outbound" -) - -func PossibleValuesForOrigin() []string { - return []string{ - string(OriginInbound), - string(OriginLocal), - string(OriginOutbound), - } -} - -func (s *Origin) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOrigin(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOrigin(input string) (*Origin, error) { - vals := map[string]Origin{ - "inbound": OriginInbound, - "local": OriginLocal, - "outbound": OriginOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Origin(input) - return &out, nil -} - -type OutputType string - -const ( - OutputTypeWorkspace OutputType = "Workspace" -) - -func PossibleValuesForOutputType() []string { - return []string{ - string(OutputTypeWorkspace), - } -} - -func (s *OutputType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOutputType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOutputType(input string) (*OutputType, error) { - vals := map[string]OutputType{ - "workspace": OutputTypeWorkspace, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OutputType(input) - return &out, nil -} - -type PreferredIPVersion string - -const ( - PreferredIPVersionIPvFour PreferredIPVersion = "IPv4" - PreferredIPVersionIPvSix PreferredIPVersion = "IPv6" -) - -func PossibleValuesForPreferredIPVersion() []string { - return []string{ - string(PreferredIPVersionIPvFour), - string(PreferredIPVersionIPvSix), - } -} - -func (s *PreferredIPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePreferredIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePreferredIPVersion(input string) (*PreferredIPVersion, error) { - vals := map[string]PreferredIPVersion{ - "ipv4": PreferredIPVersionIPvFour, - "ipv6": PreferredIPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PreferredIPVersion(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type Severity string - -const ( - SeverityError Severity = "Error" - SeverityWarning Severity = "Warning" -) - -func PossibleValuesForSeverity() []string { - return []string{ - string(SeverityError), - string(SeverityWarning), - } -} - -func (s *Severity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSeverity(input string) (*Severity, error) { - vals := map[string]Severity{ - "error": SeverityError, - "warning": SeverityWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Severity(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/id_connectionmonitor.go b/resource-manager/network/2022-11-01/connectionmonitors/id_connectionmonitor.go deleted file mode 100644 index a7922c2d666..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/id_connectionmonitor.go +++ /dev/null @@ -1,140 +0,0 @@ -package connectionmonitors - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionMonitorId{} - -// ConnectionMonitorId is a struct representing the Resource ID for a Connection Monitor -type ConnectionMonitorId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string - ConnectionMonitorName string -} - -// NewConnectionMonitorID returns a new ConnectionMonitorId struct -func NewConnectionMonitorID(subscriptionId string, resourceGroupName string, networkWatcherName string, connectionMonitorName string) ConnectionMonitorId { - return ConnectionMonitorId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - ConnectionMonitorName: connectionMonitorName, - } -} - -// ParseConnectionMonitorID parses 'input' into a ConnectionMonitorId -func ParseConnectionMonitorID(input string) (*ConnectionMonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionMonitorId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionMonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.ConnectionMonitorName, ok = parsed.Parsed["connectionMonitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionMonitorName", *parsed) - } - - return &id, nil -} - -// ParseConnectionMonitorIDInsensitively parses 'input' case-insensitively into a ConnectionMonitorId -// note: this method should only be used for API response data and not user input -func ParseConnectionMonitorIDInsensitively(input string) (*ConnectionMonitorId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionMonitorId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionMonitorId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.ConnectionMonitorName, ok = parsed.Parsed["connectionMonitorName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionMonitorName", *parsed) - } - - return &id, nil -} - -// ValidateConnectionMonitorID checks that 'input' can be parsed as a Connection Monitor ID -func ValidateConnectionMonitorID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConnectionMonitorID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Connection Monitor ID -func (id ConnectionMonitorId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s/connectionMonitors/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName, id.ConnectionMonitorName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Connection Monitor ID -func (id ConnectionMonitorId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - resourceids.StaticSegment("staticConnectionMonitors", "connectionMonitors", "connectionMonitors"), - resourceids.UserSpecifiedSegment("connectionMonitorName", "connectionMonitorValue"), - } -} - -// String returns a human-readable description of this Connection Monitor ID -func (id ConnectionMonitorId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - fmt.Sprintf("Connection Monitor Name: %q", id.ConnectionMonitorName), - } - return fmt.Sprintf("Connection Monitor (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/id_connectionmonitor_test.go b/resource-manager/network/2022-11-01/connectionmonitors/id_connectionmonitor_test.go deleted file mode 100644 index 8a7f7a826f6..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/id_connectionmonitor_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package connectionmonitors - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionMonitorId{} - -func TestNewConnectionMonitorID(t *testing.T) { - id := NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } - - if id.ConnectionMonitorName != "connectionMonitorValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectionMonitorName'", id.ConnectionMonitorName, "connectionMonitorValue") - } -} - -func TestFormatConnectionMonitorID(t *testing.T) { - actual := NewConnectionMonitorID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "connectionMonitorValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConnectionMonitorID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionMonitorId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue", - Expected: &ConnectionMonitorId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - ConnectionMonitorName: "connectionMonitorValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionMonitorID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.ConnectionMonitorName != v.Expected.ConnectionMonitorName { - t.Fatalf("Expected %q but got %q for ConnectionMonitorName", v.Expected.ConnectionMonitorName, actual.ConnectionMonitorName) - } - - } -} - -func TestParseConnectionMonitorIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionMonitorId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/cOnNeCtIoNmOnItOrS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue", - Expected: &ConnectionMonitorId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - ConnectionMonitorName: "connectionMonitorValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/connectionMonitors/connectionMonitorValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/cOnNeCtIoNmOnItOrS/cOnNeCtIoNmOnItOrVaLuE", - Expected: &ConnectionMonitorId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - ConnectionMonitorName: "cOnNeCtIoNmOnItOrVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/cOnNeCtIoNmOnItOrS/cOnNeCtIoNmOnItOrVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionMonitorIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.ConnectionMonitorName != v.Expected.ConnectionMonitorName { - t.Fatalf("Expected %q but got %q for ConnectionMonitorName", v.Expected.ConnectionMonitorName, actual.ConnectionMonitorName) - } - - } -} - -func TestSegmentsForConnectionMonitorId(t *testing.T) { - segments := ConnectionMonitorId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConnectionMonitorId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/id_networkwatcher.go b/resource-manager/network/2022-11-01/connectionmonitors/id_networkwatcher.go deleted file mode 100644 index 9827216a58b..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package connectionmonitors - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/id_networkwatcher_test.go b/resource-manager/network/2022-11-01/connectionmonitors/id_networkwatcher_test.go deleted file mode 100644 index eb93638077e..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package connectionmonitors - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/method_createorupdate.go b/resource-manager/network/2022-11-01/connectionmonitors/method_createorupdate.go deleted file mode 100644 index 4130b4eb39e..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/method_createorupdate.go +++ /dev/null @@ -1,102 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type CreateOrUpdateOperationOptions struct { - Migrate *string -} - -func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions { - return CreateOrUpdateOperationOptions{} -} - -func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Migrate != nil { - out.Append("migrate", fmt.Sprintf("%v", *o.Migrate)) - } - return &out -} - -// CreateOrUpdate ... -func (c ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, id ConnectionMonitorId, input ConnectionMonitor, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ConnectionMonitorsClient) CreateOrUpdateThenPoll(ctx context.Context, id ConnectionMonitorId, input ConnectionMonitor, options CreateOrUpdateOperationOptions) error { - result, err := c.CreateOrUpdate(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/method_delete.go b/resource-manager/network/2022-11-01/connectionmonitors/method_delete.go deleted file mode 100644 index a0d6aebb3f1..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/method_delete.go +++ /dev/null @@ -1,70 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ConnectionMonitorsClient) Delete(ctx context.Context, id ConnectionMonitorId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ConnectionMonitorsClient) DeleteThenPoll(ctx context.Context, id ConnectionMonitorId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/method_get.go b/resource-manager/network/2022-11-01/connectionmonitors/method_get.go deleted file mode 100644 index 477def7af5b..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package connectionmonitors - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectionMonitorResult -} - -// Get ... -func (c ConnectionMonitorsClient) Get(ctx context.Context, id ConnectionMonitorId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/method_list.go b/resource-manager/network/2022-11-01/connectionmonitors/method_list.go deleted file mode 100644 index 685feebb9fa..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/method_list.go +++ /dev/null @@ -1,52 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectionMonitorListResult -} - -// List ... -func (c ConnectionMonitorsClient) List(ctx context.Context, id NetworkWatcherId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/connectionMonitors", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/method_query.go b/resource-manager/network/2022-11-01/connectionmonitors/method_query.go deleted file mode 100644 index 21ab620f1ae..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/method_query.go +++ /dev/null @@ -1,70 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Query ... -func (c ConnectionMonitorsClient) Query(ctx context.Context, id ConnectionMonitorId) (result QueryOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/query", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// QueryThenPoll performs Query then polls until it's completed -func (c ConnectionMonitorsClient) QueryThenPoll(ctx context.Context, id ConnectionMonitorId) error { - result, err := c.Query(ctx, id) - if err != nil { - return fmt.Errorf("performing Query: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Query: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/method_start.go b/resource-manager/network/2022-11-01/connectionmonitors/method_start.go deleted file mode 100644 index f5f3ef3ba4e..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/method_start.go +++ /dev/null @@ -1,70 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Start ... -func (c ConnectionMonitorsClient) Start(ctx context.Context, id ConnectionMonitorId) (result StartOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/start", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartThenPoll performs Start then polls until it's completed -func (c ConnectionMonitorsClient) StartThenPoll(ctx context.Context, id ConnectionMonitorId) error { - result, err := c.Start(ctx, id) - if err != nil { - return fmt.Errorf("performing Start: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Start: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/method_stop.go b/resource-manager/network/2022-11-01/connectionmonitors/method_stop.go deleted file mode 100644 index 44a5d3c56a7..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/method_stop.go +++ /dev/null @@ -1,70 +0,0 @@ -package connectionmonitors - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c ConnectionMonitorsClient) Stop(ctx context.Context, id ConnectionMonitorId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c ConnectionMonitorsClient) StopThenPoll(ctx context.Context, id ConnectionMonitorId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/method_updatetags.go b/resource-manager/network/2022-11-01/connectionmonitors/method_updatetags.go deleted file mode 100644 index 71a655d6486..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package connectionmonitors - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectionMonitorResult -} - -// UpdateTags ... -func (c ConnectionMonitorsClient) UpdateTags(ctx context.Context, id ConnectionMonitorId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitor.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitor.go deleted file mode 100644 index 0257ef7bed9..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitor.go +++ /dev/null @@ -1,10 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitor struct { - Location *string `json:"location,omitempty"` - Properties ConnectionMonitorParameters `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitordestination.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitordestination.go deleted file mode 100644 index 2c1eaeadd69..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitordestination.go +++ /dev/null @@ -1,10 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorDestination struct { - Address *string `json:"address,omitempty"` - Port *int64 `json:"port,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpoint.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpoint.go deleted file mode 100644 index 570c394f371..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpoint.go +++ /dev/null @@ -1,14 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpoint struct { - Address *string `json:"address,omitempty"` - CoverageLevel *CoverageLevel `json:"coverageLevel,omitempty"` - Filter *ConnectionMonitorEndpointFilter `json:"filter,omitempty"` - Name string `json:"name"` - ResourceId *string `json:"resourceId,omitempty"` - Scope *ConnectionMonitorEndpointScope `json:"scope,omitempty"` - Type *EndpointType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointfilter.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointfilter.go deleted file mode 100644 index f861681a10c..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointfilter.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointFilter struct { - Items *[]ConnectionMonitorEndpointFilterItem `json:"items,omitempty"` - Type *ConnectionMonitorEndpointFilterType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointfilteritem.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointfilteritem.go deleted file mode 100644 index 49a3320062d..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointfilteritem.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointFilterItem struct { - Address *string `json:"address,omitempty"` - Type *ConnectionMonitorEndpointFilterItemType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointscope.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointscope.go deleted file mode 100644 index 36bb68efcaa..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointscope.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointScope struct { - Exclude *[]ConnectionMonitorEndpointScopeItem `json:"exclude,omitempty"` - Include *[]ConnectionMonitorEndpointScopeItem `json:"include,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointscopeitem.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointscopeitem.go deleted file mode 100644 index e73b5e20b3b..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorendpointscopeitem.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorEndpointScopeItem struct { - Address *string `json:"address,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorhttpconfiguration.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorhttpconfiguration.go deleted file mode 100644 index 51af2309e94..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorhttpconfiguration.go +++ /dev/null @@ -1,13 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorHTTPConfiguration struct { - Method *HTTPConfigurationMethod `json:"method,omitempty"` - Path *string `json:"path,omitempty"` - Port *int64 `json:"port,omitempty"` - PreferHTTPS *bool `json:"preferHTTPS,omitempty"` - RequestHeaders *[]HTTPHeader `json:"requestHeaders,omitempty"` - ValidStatusCodeRanges *[]string `json:"validStatusCodeRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitoricmpconfiguration.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitoricmpconfiguration.go deleted file mode 100644 index 6468613d1af..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitoricmpconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorIcmpConfiguration struct { - DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorlistresult.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorlistresult.go deleted file mode 100644 index 2e3014360ae..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorlistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorListResult struct { - Value *[]ConnectionMonitorResult `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitoroutput.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitoroutput.go deleted file mode 100644 index fcacc064d79..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitoroutput.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorOutput struct { - Type *OutputType `json:"type,omitempty"` - WorkspaceSettings *ConnectionMonitorWorkspaceSettings `json:"workspaceSettings,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorparameters.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorparameters.go deleted file mode 100644 index d529e518683..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorparameters.go +++ /dev/null @@ -1,16 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorParameters struct { - AutoStart *bool `json:"autoStart,omitempty"` - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"` - MonitoringIntervalInSeconds *int64 `json:"monitoringIntervalInSeconds,omitempty"` - Notes *string `json:"notes,omitempty"` - Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"` - Source *ConnectionMonitorSource `json:"source,omitempty"` - TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"` - TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorqueryresult.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorqueryresult.go deleted file mode 100644 index 455f34530d5..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorqueryresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorQueryResult struct { - SourceStatus *ConnectionMonitorSourceStatus `json:"sourceStatus,omitempty"` - States *[]ConnectionStateSnapshot `json:"states,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorresult.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorresult.go deleted file mode 100644 index 439794014f7..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorresult.go +++ /dev/null @@ -1,14 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorResult struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ConnectionMonitorResultProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorresultproperties.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorresultproperties.go deleted file mode 100644 index 0299f7f69a7..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorresultproperties.go +++ /dev/null @@ -1,38 +0,0 @@ -package connectionmonitors - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorResultProperties struct { - AutoStart *bool `json:"autoStart,omitempty"` - ConnectionMonitorType *ConnectionMonitorType `json:"connectionMonitorType,omitempty"` - Destination *ConnectionMonitorDestination `json:"destination,omitempty"` - Endpoints *[]ConnectionMonitorEndpoint `json:"endpoints,omitempty"` - MonitoringIntervalInSeconds *int64 `json:"monitoringIntervalInSeconds,omitempty"` - MonitoringStatus *string `json:"monitoringStatus,omitempty"` - Notes *string `json:"notes,omitempty"` - Outputs *[]ConnectionMonitorOutput `json:"outputs,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Source *ConnectionMonitorSource `json:"source,omitempty"` - StartTime *string `json:"startTime,omitempty"` - TestConfigurations *[]ConnectionMonitorTestConfiguration `json:"testConfigurations,omitempty"` - TestGroups *[]ConnectionMonitorTestGroup `json:"testGroups,omitempty"` -} - -func (o *ConnectionMonitorResultProperties) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ConnectionMonitorResultProperties) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorsource.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorsource.go deleted file mode 100644 index 39fa1ef2bdc..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorsource.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorSource struct { - Port *int64 `json:"port,omitempty"` - ResourceId string `json:"resourceId"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorsuccessthreshold.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorsuccessthreshold.go deleted file mode 100644 index 9f6ca6fac8b..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorsuccessthreshold.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorSuccessThreshold struct { - ChecksFailedPercent *int64 `json:"checksFailedPercent,omitempty"` - RoundTripTimeMs *float64 `json:"roundTripTimeMs,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortcpconfiguration.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortcpconfiguration.go deleted file mode 100644 index 99fdbf40239..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortcpconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorTcpConfiguration struct { - DestinationPortBehavior *DestinationPortBehavior `json:"destinationPortBehavior,omitempty"` - DisableTraceRoute *bool `json:"disableTraceRoute,omitempty"` - Port *int64 `json:"port,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortestconfiguration.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortestconfiguration.go deleted file mode 100644 index c4aa04feaba..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortestconfiguration.go +++ /dev/null @@ -1,15 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorTestConfiguration struct { - HTTPConfiguration *ConnectionMonitorHTTPConfiguration `json:"httpConfiguration,omitempty"` - IcmpConfiguration *ConnectionMonitorIcmpConfiguration `json:"icmpConfiguration,omitempty"` - Name string `json:"name"` - PreferredIPVersion *PreferredIPVersion `json:"preferredIPVersion,omitempty"` - Protocol ConnectionMonitorTestConfigurationProtocol `json:"protocol"` - SuccessThreshold *ConnectionMonitorSuccessThreshold `json:"successThreshold,omitempty"` - TcpConfiguration *ConnectionMonitorTcpConfiguration `json:"tcpConfiguration,omitempty"` - TestFrequencySec *int64 `json:"testFrequencySec,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortestgroup.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortestgroup.go deleted file mode 100644 index 6eaa922f55a..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitortestgroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorTestGroup struct { - Destinations []string `json:"destinations"` - Disable *bool `json:"disable,omitempty"` - Name string `json:"name"` - Sources []string `json:"sources"` - TestConfigurations []string `json:"testConfigurations"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorworkspacesettings.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorworkspacesettings.go deleted file mode 100644 index ae23c31662f..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionmonitorworkspacesettings.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionMonitorWorkspaceSettings struct { - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionstatesnapshot.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectionstatesnapshot.go deleted file mode 100644 index 060c3bece81..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectionstatesnapshot.go +++ /dev/null @@ -1,47 +0,0 @@ -package connectionmonitors - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionStateSnapshot struct { - AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty"` - ConnectionState *ConnectionState `json:"connectionState,omitempty"` - EndTime *string `json:"endTime,omitempty"` - EvaluationState *EvaluationState `json:"evaluationState,omitempty"` - Hops *[]ConnectivityHop `json:"hops,omitempty"` - MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty"` - MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty"` - ProbesFailed *int64 `json:"probesFailed,omitempty"` - ProbesSent *int64 `json:"probesSent,omitempty"` - StartTime *string `json:"startTime,omitempty"` -} - -func (o *ConnectionStateSnapshot) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ConnectionStateSnapshot) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *ConnectionStateSnapshot) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ConnectionStateSnapshot) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectivityhop.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectivityhop.go deleted file mode 100644 index b93b627ac70..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectivityhop.go +++ /dev/null @@ -1,16 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityHop struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` - Issues *[]ConnectivityIssue `json:"issues,omitempty"` - Links *[]HopLink `json:"links,omitempty"` - NextHopIds *[]string `json:"nextHopIds,omitempty"` - PreviousHopIds *[]string `json:"previousHopIds,omitempty"` - PreviousLinks *[]HopLink `json:"previousLinks,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_connectivityissue.go b/resource-manager/network/2022-11-01/connectionmonitors/model_connectivityissue.go deleted file mode 100644 index ff7c6cdaf11..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_connectivityissue.go +++ /dev/null @@ -1,11 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityIssue struct { - Context *[]map[string]string `json:"context,omitempty"` - Origin *Origin `json:"origin,omitempty"` - Severity *Severity `json:"severity,omitempty"` - Type *IssueType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_hoplink.go b/resource-manager/network/2022-11-01/connectionmonitors/model_hoplink.go deleted file mode 100644 index c2b18cd5be1..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_hoplink.go +++ /dev/null @@ -1,13 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HopLink struct { - Context *map[string]string `json:"context,omitempty"` - Issues *[]ConnectivityIssue `json:"issues,omitempty"` - LinkType *string `json:"linkType,omitempty"` - NextHopId *string `json:"nextHopId,omitempty"` - Properties *HopLinkProperties `json:"properties,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_hoplinkproperties.go b/resource-manager/network/2022-11-01/connectionmonitors/model_hoplinkproperties.go deleted file mode 100644 index d38f1875957..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_hoplinkproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HopLinkProperties struct { - RoundTripTimeAvg *int64 `json:"roundTripTimeAvg,omitempty"` - RoundTripTimeMax *int64 `json:"roundTripTimeMax,omitempty"` - RoundTripTimeMin *int64 `json:"roundTripTimeMin,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_httpheader.go b/resource-manager/network/2022-11-01/connectionmonitors/model_httpheader.go deleted file mode 100644 index 7cae34688aa..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_httpheader.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HTTPHeader struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/model_tagsobject.go b/resource-manager/network/2022-11-01/connectionmonitors/model_tagsobject.go deleted file mode 100644 index d9e7e6413ff..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package connectionmonitors - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectionmonitors/version.go b/resource-manager/network/2022-11-01/connectionmonitors/version.go deleted file mode 100644 index b93725331dc..00000000000 --- a/resource-manager/network/2022-11-01/connectionmonitors/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connectionmonitors - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectionmonitors/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/README.md b/resource-manager/network/2022-11-01/connectivityconfigurations/README.md deleted file mode 100644 index dafc24420ae..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/connectivityconfigurations` Documentation - -The `connectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/connectivityconfigurations" -``` - - -### Client Initialization - -```go -client := connectivityconfigurations.NewConnectivityConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ConnectivityConfigurationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := connectivityconfigurations.NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue") - -payload := connectivityconfigurations.ConnectivityConfiguration{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConnectivityConfigurationsClient.Delete` - -```go -ctx := context.TODO() -id := connectivityconfigurations.NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue") - -if err := client.DeleteThenPoll(ctx, id, connectivityconfigurations.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `ConnectivityConfigurationsClient.Get` - -```go -ctx := context.TODO() -id := connectivityconfigurations.NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ConnectivityConfigurationsClient.List` - -```go -ctx := context.TODO() -id := connectivityconfigurations.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -// alternatively `client.List(ctx, id, connectivityconfigurations.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, connectivityconfigurations.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/client.go b/resource-manager/network/2022-11-01/connectivityconfigurations/client.go deleted file mode 100644 index ff548b06d0f..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package connectivityconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewConnectivityConfigurationsClientWithBaseURI(api environments.Api) (*ConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "connectivityconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ConnectivityConfigurationsClient: %+v", err) - } - - return &ConnectivityConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/constants.go b/resource-manager/network/2022-11-01/connectivityconfigurations/constants.go deleted file mode 100644 index e9642441352..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/constants.go +++ /dev/null @@ -1,262 +0,0 @@ -package connectivityconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityTopology string - -const ( - ConnectivityTopologyHubAndSpoke ConnectivityTopology = "HubAndSpoke" - ConnectivityTopologyMesh ConnectivityTopology = "Mesh" -) - -func PossibleValuesForConnectivityTopology() []string { - return []string{ - string(ConnectivityTopologyHubAndSpoke), - string(ConnectivityTopologyMesh), - } -} - -func (s *ConnectivityTopology) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectivityTopology(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectivityTopology(input string) (*ConnectivityTopology, error) { - vals := map[string]ConnectivityTopology{ - "hubandspoke": ConnectivityTopologyHubAndSpoke, - "mesh": ConnectivityTopologyMesh, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectivityTopology(input) - return &out, nil -} - -type DeleteExistingPeering string - -const ( - DeleteExistingPeeringFalse DeleteExistingPeering = "False" - DeleteExistingPeeringTrue DeleteExistingPeering = "True" -) - -func PossibleValuesForDeleteExistingPeering() []string { - return []string{ - string(DeleteExistingPeeringFalse), - string(DeleteExistingPeeringTrue), - } -} - -func (s *DeleteExistingPeering) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteExistingPeering(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteExistingPeering(input string) (*DeleteExistingPeering, error) { - vals := map[string]DeleteExistingPeering{ - "false": DeleteExistingPeeringFalse, - "true": DeleteExistingPeeringTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteExistingPeering(input) - return &out, nil -} - -type GroupConnectivity string - -const ( - GroupConnectivityDirectlyConnected GroupConnectivity = "DirectlyConnected" - GroupConnectivityNone GroupConnectivity = "None" -) - -func PossibleValuesForGroupConnectivity() []string { - return []string{ - string(GroupConnectivityDirectlyConnected), - string(GroupConnectivityNone), - } -} - -func (s *GroupConnectivity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGroupConnectivity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGroupConnectivity(input string) (*GroupConnectivity, error) { - vals := map[string]GroupConnectivity{ - "directlyconnected": GroupConnectivityDirectlyConnected, - "none": GroupConnectivityNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GroupConnectivity(input) - return &out, nil -} - -type IsGlobal string - -const ( - IsGlobalFalse IsGlobal = "False" - IsGlobalTrue IsGlobal = "True" -) - -func PossibleValuesForIsGlobal() []string { - return []string{ - string(IsGlobalFalse), - string(IsGlobalTrue), - } -} - -func (s *IsGlobal) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsGlobal(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsGlobal(input string) (*IsGlobal, error) { - vals := map[string]IsGlobal{ - "false": IsGlobalFalse, - "true": IsGlobalTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsGlobal(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type UseHubGateway string - -const ( - UseHubGatewayFalse UseHubGateway = "False" - UseHubGatewayTrue UseHubGateway = "True" -) - -func PossibleValuesForUseHubGateway() []string { - return []string{ - string(UseHubGatewayFalse), - string(UseHubGatewayTrue), - } -} - -func (s *UseHubGateway) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUseHubGateway(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUseHubGateway(input string) (*UseHubGateway, error) { - vals := map[string]UseHubGateway{ - "false": UseHubGatewayFalse, - "true": UseHubGatewayTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UseHubGateway(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/id_connectivityconfiguration.go b/resource-manager/network/2022-11-01/connectivityconfigurations/id_connectivityconfiguration.go deleted file mode 100644 index 65487e1c102..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/id_connectivityconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package connectivityconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectivityConfigurationId{} - -// ConnectivityConfigurationId is a struct representing the Resource ID for a Connectivity Configuration -type ConnectivityConfigurationId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - ConnectivityConfigurationName string -} - -// NewConnectivityConfigurationID returns a new ConnectivityConfigurationId struct -func NewConnectivityConfigurationID(subscriptionId string, resourceGroupName string, networkManagerName string, connectivityConfigurationName string) ConnectivityConfigurationId { - return ConnectivityConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - ConnectivityConfigurationName: connectivityConfigurationName, - } -} - -// ParseConnectivityConfigurationID parses 'input' into a ConnectivityConfigurationId -func ParseConnectivityConfigurationID(input string) (*ConnectivityConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectivityConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectivityConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ConnectivityConfigurationName, ok = parsed.Parsed["connectivityConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectivityConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseConnectivityConfigurationIDInsensitively parses 'input' case-insensitively into a ConnectivityConfigurationId -// note: this method should only be used for API response data and not user input -func ParseConnectivityConfigurationIDInsensitively(input string) (*ConnectivityConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectivityConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectivityConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ConnectivityConfigurationName, ok = parsed.Parsed["connectivityConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectivityConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateConnectivityConfigurationID checks that 'input' can be parsed as a Connectivity Configuration ID -func ValidateConnectivityConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConnectivityConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Connectivity Configuration ID -func (id ConnectivityConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/connectivityConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.ConnectivityConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Connectivity Configuration ID -func (id ConnectivityConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticConnectivityConfigurations", "connectivityConfigurations", "connectivityConfigurations"), - resourceids.UserSpecifiedSegment("connectivityConfigurationName", "connectivityConfigurationValue"), - } -} - -// String returns a human-readable description of this Connectivity Configuration ID -func (id ConnectivityConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Connectivity Configuration Name: %q", id.ConnectivityConfigurationName), - } - return fmt.Sprintf("Connectivity Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/id_connectivityconfiguration_test.go b/resource-manager/network/2022-11-01/connectivityconfigurations/id_connectivityconfiguration_test.go deleted file mode 100644 index 0a8c1296cbd..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/id_connectivityconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package connectivityconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectivityConfigurationId{} - -func TestNewConnectivityConfigurationID(t *testing.T) { - id := NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.ConnectivityConfigurationName != "connectivityConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectivityConfigurationName'", id.ConnectivityConfigurationName, "connectivityConfigurationValue") - } -} - -func TestFormatConnectivityConfigurationID(t *testing.T) { - actual := NewConnectivityConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "connectivityConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConnectivityConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectivityConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue", - Expected: &ConnectivityConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - ConnectivityConfigurationName: "connectivityConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectivityConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.ConnectivityConfigurationName != v.Expected.ConnectivityConfigurationName { - t.Fatalf("Expected %q but got %q for ConnectivityConfigurationName", v.Expected.ConnectivityConfigurationName, actual.ConnectivityConfigurationName) - } - - } -} - -func TestParseConnectivityConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectivityConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/cOnNeCtIvItYcOnFiGuRaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue", - Expected: &ConnectivityConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - ConnectivityConfigurationName: "connectivityConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/connectivityConfigurations/connectivityConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/cOnNeCtIvItYcOnFiGuRaTiOnS/cOnNeCtIvItYcOnFiGuRaTiOnVaLuE", - Expected: &ConnectivityConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - ConnectivityConfigurationName: "cOnNeCtIvItYcOnFiGuRaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/cOnNeCtIvItYcOnFiGuRaTiOnS/cOnNeCtIvItYcOnFiGuRaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectivityConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.ConnectivityConfigurationName != v.Expected.ConnectivityConfigurationName { - t.Fatalf("Expected %q but got %q for ConnectivityConfigurationName", v.Expected.ConnectivityConfigurationName, actual.ConnectivityConfigurationName) - } - - } -} - -func TestSegmentsForConnectivityConfigurationId(t *testing.T) { - segments := ConnectivityConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConnectivityConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/id_networkmanager.go b/resource-manager/network/2022-11-01/connectivityconfigurations/id_networkmanager.go deleted file mode 100644 index 087c284a6d4..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package connectivityconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/id_networkmanager_test.go b/resource-manager/network/2022-11-01/connectivityconfigurations/id_networkmanager_test.go deleted file mode 100644 index d38666765bd..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package connectivityconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/method_createorupdate.go b/resource-manager/network/2022-11-01/connectivityconfigurations/method_createorupdate.go deleted file mode 100644 index cd89fc849fc..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package connectivityconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectivityConfiguration -} - -// CreateOrUpdate ... -func (c ConnectivityConfigurationsClient) CreateOrUpdate(ctx context.Context, id ConnectivityConfigurationId, input ConnectivityConfiguration) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/method_delete.go b/resource-manager/network/2022-11-01/connectivityconfigurations/method_delete.go deleted file mode 100644 index 39d9c109838..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package connectivityconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c ConnectivityConfigurationsClient) Delete(ctx context.Context, id ConnectivityConfigurationId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ConnectivityConfigurationsClient) DeleteThenPoll(ctx context.Context, id ConnectivityConfigurationId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/method_get.go b/resource-manager/network/2022-11-01/connectivityconfigurations/method_get.go deleted file mode 100644 index 089d6865d51..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package connectivityconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectivityConfiguration -} - -// Get ... -func (c ConnectivityConfigurationsClient) Get(ctx context.Context, id ConnectivityConfigurationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/method_list.go b/resource-manager/network/2022-11-01/connectivityconfigurations/method_list.go deleted file mode 100644 index ca6616b1fb6..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package connectivityconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ConnectivityConfiguration -} - -type ListCompleteResult struct { - Items []ConnectivityConfiguration -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c ConnectivityConfigurationsClient) List(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/connectivityConfigurations", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ConnectivityConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ConnectivityConfigurationsClient) ListComplete(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, ConnectivityConfigurationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ConnectivityConfigurationsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate ConnectivityConfigurationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ConnectivityConfiguration, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivityconfiguration.go b/resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivityconfiguration.go deleted file mode 100644 index 7c6238540d1..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivityconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package connectivityconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ConnectivityConfigurationProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivityconfigurationproperties.go b/resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivityconfigurationproperties.go deleted file mode 100644 index ccdec2929c7..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivityconfigurationproperties.go +++ /dev/null @@ -1,14 +0,0 @@ -package connectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationProperties struct { - AppliesToGroups []ConnectivityGroupItem `json:"appliesToGroups"` - ConnectivityTopology ConnectivityTopology `json:"connectivityTopology"` - DeleteExistingPeering *DeleteExistingPeering `json:"deleteExistingPeering,omitempty"` - Description *string `json:"description,omitempty"` - Hubs *[]Hub `json:"hubs,omitempty"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivitygroupitem.go b/resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivitygroupitem.go deleted file mode 100644 index 0ac02d12f1a..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/model_connectivitygroupitem.go +++ /dev/null @@ -1,11 +0,0 @@ -package connectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityGroupItem struct { - GroupConnectivity GroupConnectivity `json:"groupConnectivity"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - NetworkGroupId string `json:"networkGroupId"` - UseHubGateway *UseHubGateway `json:"useHubGateway,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/model_hub.go b/resource-manager/network/2022-11-01/connectivityconfigurations/model_hub.go deleted file mode 100644 index 5e43da03fdd..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/model_hub.go +++ /dev/null @@ -1,9 +0,0 @@ -package connectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Hub struct { - ResourceId *string `json:"resourceId,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/predicates.go b/resource-manager/network/2022-11-01/connectivityconfigurations/predicates.go deleted file mode 100644 index ecab73247f2..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package connectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ConnectivityConfigurationOperationPredicate) Matches(input ConnectivityConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/connectivityconfigurations/version.go b/resource-manager/network/2022-11-01/connectivityconfigurations/version.go deleted file mode 100644 index 98740500b8c..00000000000 --- a/resource-manager/network/2022-11-01/connectivityconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package connectivityconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/connectivityconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/README.md b/resource-manager/network/2022-11-01/customipprefixes/README.md deleted file mode 100644 index 74072c70db0..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/customipprefixes` Documentation - -The `customipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/customipprefixes" -``` - - -### Client Initialization - -```go -client := customipprefixes.NewCustomIPPrefixesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `CustomIPPrefixesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := customipprefixes.NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - -payload := customipprefixes.CustomIPPrefix{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `CustomIPPrefixesClient.Delete` - -```go -ctx := context.TODO() -id := customipprefixes.NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `CustomIPPrefixesClient.Get` - -```go -ctx := context.TODO() -id := customipprefixes.NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - -read, err := client.Get(ctx, id, customipprefixes.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `CustomIPPrefixesClient.List` - -```go -ctx := context.TODO() -id := customipprefixes.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `CustomIPPrefixesClient.ListAll` - -```go -ctx := context.TODO() -id := customipprefixes.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `CustomIPPrefixesClient.UpdateTags` - -```go -ctx := context.TODO() -id := customipprefixes.NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - -payload := customipprefixes.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/customipprefixes/client.go b/resource-manager/network/2022-11-01/customipprefixes/client.go deleted file mode 100644 index 31f10177172..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package customipprefixes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomIPPrefixesClient struct { - Client *resourcemanager.Client -} - -func NewCustomIPPrefixesClientWithBaseURI(api environments.Api) (*CustomIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "customipprefixes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating CustomIPPrefixesClient: %+v", err) - } - - return &CustomIPPrefixesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/constants.go b/resource-manager/network/2022-11-01/customipprefixes/constants.go deleted file mode 100644 index 2c9a9f7c2e2..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/constants.go +++ /dev/null @@ -1,222 +0,0 @@ -package customipprefixes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CommissionedState string - -const ( - CommissionedStateCommissioned CommissionedState = "Commissioned" - CommissionedStateCommissionedNoInternetAdvertise CommissionedState = "CommissionedNoInternetAdvertise" - CommissionedStateCommissioning CommissionedState = "Commissioning" - CommissionedStateDecommissioning CommissionedState = "Decommissioning" - CommissionedStateDeprovisioned CommissionedState = "Deprovisioned" - CommissionedStateDeprovisioning CommissionedState = "Deprovisioning" - CommissionedStateProvisioned CommissionedState = "Provisioned" - CommissionedStateProvisioning CommissionedState = "Provisioning" -) - -func PossibleValuesForCommissionedState() []string { - return []string{ - string(CommissionedStateCommissioned), - string(CommissionedStateCommissionedNoInternetAdvertise), - string(CommissionedStateCommissioning), - string(CommissionedStateDecommissioning), - string(CommissionedStateDeprovisioned), - string(CommissionedStateDeprovisioning), - string(CommissionedStateProvisioned), - string(CommissionedStateProvisioning), - } -} - -func (s *CommissionedState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCommissionedState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCommissionedState(input string) (*CommissionedState, error) { - vals := map[string]CommissionedState{ - "commissioned": CommissionedStateCommissioned, - "commissionednointernetadvertise": CommissionedStateCommissionedNoInternetAdvertise, - "commissioning": CommissionedStateCommissioning, - "decommissioning": CommissionedStateDecommissioning, - "deprovisioned": CommissionedStateDeprovisioned, - "deprovisioning": CommissionedStateDeprovisioning, - "provisioned": CommissionedStateProvisioned, - "provisioning": CommissionedStateProvisioning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CommissionedState(input) - return &out, nil -} - -type CustomIPPrefixType string - -const ( - CustomIPPrefixTypeChild CustomIPPrefixType = "Child" - CustomIPPrefixTypeParent CustomIPPrefixType = "Parent" - CustomIPPrefixTypeSingular CustomIPPrefixType = "Singular" -) - -func PossibleValuesForCustomIPPrefixType() []string { - return []string{ - string(CustomIPPrefixTypeChild), - string(CustomIPPrefixTypeParent), - string(CustomIPPrefixTypeSingular), - } -} - -func (s *CustomIPPrefixType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCustomIPPrefixType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCustomIPPrefixType(input string) (*CustomIPPrefixType, error) { - vals := map[string]CustomIPPrefixType{ - "child": CustomIPPrefixTypeChild, - "parent": CustomIPPrefixTypeParent, - "singular": CustomIPPrefixTypeSingular, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CustomIPPrefixType(input) - return &out, nil -} - -type Geo string - -const ( - GeoAFRI Geo = "AFRI" - GeoAPAC Geo = "APAC" - GeoAQ Geo = "AQ" - GeoEURO Geo = "EURO" - GeoGLOBAL Geo = "GLOBAL" - GeoLATAM Geo = "LATAM" - GeoME Geo = "ME" - GeoNAM Geo = "NAM" - GeoOCEANIA Geo = "OCEANIA" -) - -func PossibleValuesForGeo() []string { - return []string{ - string(GeoAFRI), - string(GeoAPAC), - string(GeoAQ), - string(GeoEURO), - string(GeoGLOBAL), - string(GeoLATAM), - string(GeoME), - string(GeoNAM), - string(GeoOCEANIA), - } -} - -func (s *Geo) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGeo(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGeo(input string) (*Geo, error) { - vals := map[string]Geo{ - "afri": GeoAFRI, - "apac": GeoAPAC, - "aq": GeoAQ, - "euro": GeoEURO, - "global": GeoGLOBAL, - "latam": GeoLATAM, - "me": GeoME, - "nam": GeoNAM, - "oceania": GeoOCEANIA, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Geo(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/id_customipprefix.go b/resource-manager/network/2022-11-01/customipprefixes/id_customipprefix.go deleted file mode 100644 index 088e2b59a9a..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/id_customipprefix.go +++ /dev/null @@ -1,127 +0,0 @@ -package customipprefixes - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = CustomIPPrefixId{} - -// CustomIPPrefixId is a struct representing the Resource ID for a Custom I P Prefix -type CustomIPPrefixId struct { - SubscriptionId string - ResourceGroupName string - CustomIPPrefixName string -} - -// NewCustomIPPrefixID returns a new CustomIPPrefixId struct -func NewCustomIPPrefixID(subscriptionId string, resourceGroupName string, customIPPrefixName string) CustomIPPrefixId { - return CustomIPPrefixId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CustomIPPrefixName: customIPPrefixName, - } -} - -// ParseCustomIPPrefixID parses 'input' into a CustomIPPrefixId -func ParseCustomIPPrefixID(input string) (*CustomIPPrefixId, error) { - parser := resourceids.NewParserFromResourceIdType(CustomIPPrefixId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CustomIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CustomIPPrefixName, ok = parsed.Parsed["customIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customIPPrefixName", *parsed) - } - - return &id, nil -} - -// ParseCustomIPPrefixIDInsensitively parses 'input' case-insensitively into a CustomIPPrefixId -// note: this method should only be used for API response data and not user input -func ParseCustomIPPrefixIDInsensitively(input string) (*CustomIPPrefixId, error) { - parser := resourceids.NewParserFromResourceIdType(CustomIPPrefixId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CustomIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CustomIPPrefixName, ok = parsed.Parsed["customIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "customIPPrefixName", *parsed) - } - - return &id, nil -} - -// ValidateCustomIPPrefixID checks that 'input' can be parsed as a Custom I P Prefix ID -func ValidateCustomIPPrefixID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseCustomIPPrefixID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Custom I P Prefix ID -func (id CustomIPPrefixId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/customIPPrefixes/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CustomIPPrefixName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Custom I P Prefix ID -func (id CustomIPPrefixId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticCustomIPPrefixes", "customIPPrefixes", "customIPPrefixes"), - resourceids.UserSpecifiedSegment("customIPPrefixName", "customIPPrefixValue"), - } -} - -// String returns a human-readable description of this Custom I P Prefix ID -func (id CustomIPPrefixId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Custom I P Prefix Name: %q", id.CustomIPPrefixName), - } - return fmt.Sprintf("Custom I P Prefix (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/id_customipprefix_test.go b/resource-manager/network/2022-11-01/customipprefixes/id_customipprefix_test.go deleted file mode 100644 index 7059a6cd0b3..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/id_customipprefix_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package customipprefixes - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = CustomIPPrefixId{} - -func TestNewCustomIPPrefixID(t *testing.T) { - id := NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CustomIPPrefixName != "customIPPrefixValue" { - t.Fatalf("Expected %q but got %q for Segment 'CustomIPPrefixName'", id.CustomIPPrefixName, "customIPPrefixValue") - } -} - -func TestFormatCustomIPPrefixID(t *testing.T) { - actual := NewCustomIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "customIPPrefixValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseCustomIPPrefixID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *CustomIPPrefixId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue", - Expected: &CustomIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CustomIPPrefixName: "customIPPrefixValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseCustomIPPrefixID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CustomIPPrefixName != v.Expected.CustomIPPrefixName { - t.Fatalf("Expected %q but got %q for CustomIPPrefixName", v.Expected.CustomIPPrefixName, actual.CustomIPPrefixName) - } - - } -} - -func TestParseCustomIPPrefixIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *CustomIPPrefixId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cUsToMiPpReFiXeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue", - Expected: &CustomIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CustomIPPrefixName: "customIPPrefixValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/customIPPrefixes/customIPPrefixValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cUsToMiPpReFiXeS/cUsToMiPpReFiXvAlUe", - Expected: &CustomIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CustomIPPrefixName: "cUsToMiPpReFiXvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cUsToMiPpReFiXeS/cUsToMiPpReFiXvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseCustomIPPrefixIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CustomIPPrefixName != v.Expected.CustomIPPrefixName { - t.Fatalf("Expected %q but got %q for CustomIPPrefixName", v.Expected.CustomIPPrefixName, actual.CustomIPPrefixName) - } - - } -} - -func TestSegmentsForCustomIPPrefixId(t *testing.T) { - segments := CustomIPPrefixId{}.Segments() - if len(segments) == 0 { - t.Fatalf("CustomIPPrefixId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/method_createorupdate.go b/resource-manager/network/2022-11-01/customipprefixes/method_createorupdate.go deleted file mode 100644 index f8a8154eb4e..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c CustomIPPrefixesClient) CreateOrUpdate(ctx context.Context, id CustomIPPrefixId, input CustomIPPrefix) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c CustomIPPrefixesClient) CreateOrUpdateThenPoll(ctx context.Context, id CustomIPPrefixId, input CustomIPPrefix) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/method_delete.go b/resource-manager/network/2022-11-01/customipprefixes/method_delete.go deleted file mode 100644 index 2233d70928d..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c CustomIPPrefixesClient) Delete(ctx context.Context, id CustomIPPrefixId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c CustomIPPrefixesClient) DeleteThenPoll(ctx context.Context, id CustomIPPrefixId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/method_get.go b/resource-manager/network/2022-11-01/customipprefixes/method_get.go deleted file mode 100644 index 507b06faa12..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *CustomIPPrefix -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c CustomIPPrefixesClient) Get(ctx context.Context, id CustomIPPrefixId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/method_list.go b/resource-manager/network/2022-11-01/customipprefixes/method_list.go deleted file mode 100644 index 566e12ef55f..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]CustomIPPrefix -} - -type ListCompleteResult struct { - Items []CustomIPPrefix -} - -// List ... -func (c CustomIPPrefixesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/customIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]CustomIPPrefix `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c CustomIPPrefixesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, CustomIPPrefixOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CustomIPPrefixesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate CustomIPPrefixOperationPredicate) (result ListCompleteResult, err error) { - items := make([]CustomIPPrefix, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/method_listall.go b/resource-manager/network/2022-11-01/customipprefixes/method_listall.go deleted file mode 100644 index 8b2d2f67382..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package customipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]CustomIPPrefix -} - -type ListAllCompleteResult struct { - Items []CustomIPPrefix -} - -// ListAll ... -func (c CustomIPPrefixesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/customIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]CustomIPPrefix `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c CustomIPPrefixesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, CustomIPPrefixOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c CustomIPPrefixesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate CustomIPPrefixOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]CustomIPPrefix, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/method_updatetags.go b/resource-manager/network/2022-11-01/customipprefixes/method_updatetags.go deleted file mode 100644 index 77f5b87dd8a..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package customipprefixes - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *CustomIPPrefix -} - -// UpdateTags ... -func (c CustomIPPrefixesClient) UpdateTags(ctx context.Context, id CustomIPPrefixId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/model_customipprefix.go b/resource-manager/network/2022-11-01/customipprefixes/model_customipprefix.go deleted file mode 100644 index fc3d26ef7a4..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/model_customipprefix.go +++ /dev/null @@ -1,21 +0,0 @@ -package customipprefixes - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomIPPrefix struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *CustomIPPrefixPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/model_customipprefixpropertiesformat.go b/resource-manager/network/2022-11-01/customipprefixes/model_customipprefixpropertiesformat.go deleted file mode 100644 index f26a83b6b83..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/model_customipprefixpropertiesformat.go +++ /dev/null @@ -1,22 +0,0 @@ -package customipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomIPPrefixPropertiesFormat struct { - Asn *string `json:"asn,omitempty"` - AuthorizationMessage *string `json:"authorizationMessage,omitempty"` - ChildCustomIPPrefixes *[]SubResource `json:"childCustomIpPrefixes,omitempty"` - Cidr *string `json:"cidr,omitempty"` - CommissionedState *CommissionedState `json:"commissionedState,omitempty"` - CustomIPPrefixParent *SubResource `json:"customIpPrefixParent,omitempty"` - ExpressRouteAdvertise *bool `json:"expressRouteAdvertise,omitempty"` - FailedReason *string `json:"failedReason,omitempty"` - Geo *Geo `json:"geo,omitempty"` - NoInternetAdvertise *bool `json:"noInternetAdvertise,omitempty"` - PrefixType *CustomIPPrefixType `json:"prefixType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SignedMessage *string `json:"signedMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/model_subresource.go b/resource-manager/network/2022-11-01/customipprefixes/model_subresource.go deleted file mode 100644 index 2428ad08fc0..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package customipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/model_tagsobject.go b/resource-manager/network/2022-11-01/customipprefixes/model_tagsobject.go deleted file mode 100644 index f1f3aea2b6e..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package customipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/predicates.go b/resource-manager/network/2022-11-01/customipprefixes/predicates.go deleted file mode 100644 index 288f9cfa042..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package customipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomIPPrefixOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p CustomIPPrefixOperationPredicate) Matches(input CustomIPPrefix) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/customipprefixes/version.go b/resource-manager/network/2022-11-01/customipprefixes/version.go deleted file mode 100644 index 3d5f7d2ed6c..00000000000 --- a/resource-manager/network/2022-11-01/customipprefixes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package customipprefixes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/customipprefixes/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/README.md b/resource-manager/network/2022-11-01/ddoscustompolicies/README.md deleted file mode 100644 index 79def8e9069..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ddoscustompolicies` Documentation - -The `ddoscustompolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ddoscustompolicies" -``` - - -### Client Initialization - -```go -client := ddoscustompolicies.NewDdosCustomPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DdosCustomPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - -payload := ddoscustompolicies.DdosCustomPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DdosCustomPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DdosCustomPoliciesClient.Get` - -```go -ctx := context.TODO() -id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DdosCustomPoliciesClient.UpdateTags` - -```go -ctx := context.TODO() -id := ddoscustompolicies.NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - -payload := ddoscustompolicies.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/client.go b/resource-manager/network/2022-11-01/ddoscustompolicies/client.go deleted file mode 100644 index e9d35f8b060..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package ddoscustompolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosCustomPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewDdosCustomPoliciesClientWithBaseURI(api environments.Api) (*DdosCustomPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "ddoscustompolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DdosCustomPoliciesClient: %+v", err) - } - - return &DdosCustomPoliciesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/constants.go b/resource-manager/network/2022-11-01/ddoscustompolicies/constants.go deleted file mode 100644 index e62adb4c84b..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package ddoscustompolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/id_ddoscustompolicy.go b/resource-manager/network/2022-11-01/ddoscustompolicies/id_ddoscustompolicy.go deleted file mode 100644 index 311930ea740..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/id_ddoscustompolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package ddoscustompolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DdosCustomPolicyId{} - -// DdosCustomPolicyId is a struct representing the Resource ID for a Ddos Custom Policy -type DdosCustomPolicyId struct { - SubscriptionId string - ResourceGroupName string - DdosCustomPolicyName string -} - -// NewDdosCustomPolicyID returns a new DdosCustomPolicyId struct -func NewDdosCustomPolicyID(subscriptionId string, resourceGroupName string, ddosCustomPolicyName string) DdosCustomPolicyId { - return DdosCustomPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - DdosCustomPolicyName: ddosCustomPolicyName, - } -} - -// ParseDdosCustomPolicyID parses 'input' into a DdosCustomPolicyId -func ParseDdosCustomPolicyID(input string) (*DdosCustomPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(DdosCustomPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DdosCustomPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosCustomPolicyName, ok = parsed.Parsed["ddosCustomPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosCustomPolicyName", *parsed) - } - - return &id, nil -} - -// ParseDdosCustomPolicyIDInsensitively parses 'input' case-insensitively into a DdosCustomPolicyId -// note: this method should only be used for API response data and not user input -func ParseDdosCustomPolicyIDInsensitively(input string) (*DdosCustomPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(DdosCustomPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DdosCustomPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosCustomPolicyName, ok = parsed.Parsed["ddosCustomPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosCustomPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateDdosCustomPolicyID checks that 'input' can be parsed as a Ddos Custom Policy ID -func ValidateDdosCustomPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDdosCustomPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Ddos Custom Policy ID -func (id DdosCustomPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/ddosCustomPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DdosCustomPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Ddos Custom Policy ID -func (id DdosCustomPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticDdosCustomPolicies", "ddosCustomPolicies", "ddosCustomPolicies"), - resourceids.UserSpecifiedSegment("ddosCustomPolicyName", "ddosCustomPolicyValue"), - } -} - -// String returns a human-readable description of this Ddos Custom Policy ID -func (id DdosCustomPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Ddos Custom Policy Name: %q", id.DdosCustomPolicyName), - } - return fmt.Sprintf("Ddos Custom Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/id_ddoscustompolicy_test.go b/resource-manager/network/2022-11-01/ddoscustompolicies/id_ddoscustompolicy_test.go deleted file mode 100644 index 9db69710d31..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/id_ddoscustompolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package ddoscustompolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DdosCustomPolicyId{} - -func TestNewDdosCustomPolicyID(t *testing.T) { - id := NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.DdosCustomPolicyName != "ddosCustomPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'DdosCustomPolicyName'", id.DdosCustomPolicyName, "ddosCustomPolicyValue") - } -} - -func TestFormatDdosCustomPolicyID(t *testing.T) { - actual := NewDdosCustomPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosCustomPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseDdosCustomPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DdosCustomPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue", - Expected: &DdosCustomPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DdosCustomPolicyName: "ddosCustomPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDdosCustomPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DdosCustomPolicyName != v.Expected.DdosCustomPolicyName { - t.Fatalf("Expected %q but got %q for DdosCustomPolicyName", v.Expected.DdosCustomPolicyName, actual.DdosCustomPolicyName) - } - - } -} - -func TestParseDdosCustomPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DdosCustomPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoScUsToMpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue", - Expected: &DdosCustomPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DdosCustomPolicyName: "ddosCustomPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosCustomPolicies/ddosCustomPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoScUsToMpOlIcIeS/dDoScUsToMpOlIcYvAlUe", - Expected: &DdosCustomPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - DdosCustomPolicyName: "dDoScUsToMpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoScUsToMpOlIcIeS/dDoScUsToMpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDdosCustomPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DdosCustomPolicyName != v.Expected.DdosCustomPolicyName { - t.Fatalf("Expected %q but got %q for DdosCustomPolicyName", v.Expected.DdosCustomPolicyName, actual.DdosCustomPolicyName) - } - - } -} - -func TestSegmentsForDdosCustomPolicyId(t *testing.T) { - segments := DdosCustomPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("DdosCustomPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/method_createorupdate.go b/resource-manager/network/2022-11-01/ddoscustompolicies/method_createorupdate.go deleted file mode 100644 index 6672d518a57..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package ddoscustompolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, id DdosCustomPolicyId, input DdosCustomPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c DdosCustomPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id DdosCustomPolicyId, input DdosCustomPolicy) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/method_delete.go b/resource-manager/network/2022-11-01/ddoscustompolicies/method_delete.go deleted file mode 100644 index 78624333195..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package ddoscustompolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c DdosCustomPoliciesClient) Delete(ctx context.Context, id DdosCustomPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c DdosCustomPoliciesClient) DeleteThenPoll(ctx context.Context, id DdosCustomPolicyId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/method_get.go b/resource-manager/network/2022-11-01/ddoscustompolicies/method_get.go deleted file mode 100644 index 7af9f8f0806..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package ddoscustompolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DdosCustomPolicy -} - -// Get ... -func (c DdosCustomPoliciesClient) Get(ctx context.Context, id DdosCustomPolicyId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/method_updatetags.go b/resource-manager/network/2022-11-01/ddoscustompolicies/method_updatetags.go deleted file mode 100644 index 287538aa3c8..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package ddoscustompolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DdosCustomPolicy -} - -// UpdateTags ... -func (c DdosCustomPoliciesClient) UpdateTags(ctx context.Context, id DdosCustomPolicyId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/model_ddoscustompolicy.go b/resource-manager/network/2022-11-01/ddoscustompolicies/model_ddoscustompolicy.go deleted file mode 100644 index 21c20585880..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/model_ddoscustompolicy.go +++ /dev/null @@ -1,14 +0,0 @@ -package ddoscustompolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosCustomPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *DdosCustomPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/model_ddoscustompolicypropertiesformat.go b/resource-manager/network/2022-11-01/ddoscustompolicies/model_ddoscustompolicypropertiesformat.go deleted file mode 100644 index fad59051390..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/model_ddoscustompolicypropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package ddoscustompolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosCustomPolicyPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/model_tagsobject.go b/resource-manager/network/2022-11-01/ddoscustompolicies/model_tagsobject.go deleted file mode 100644 index 3b93ba90100..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package ddoscustompolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ddoscustompolicies/version.go b/resource-manager/network/2022-11-01/ddoscustompolicies/version.go deleted file mode 100644 index a087e441008..00000000000 --- a/resource-manager/network/2022-11-01/ddoscustompolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package ddoscustompolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddoscustompolicies/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/README.md b/resource-manager/network/2022-11-01/ddosprotectionplans/README.md deleted file mode 100644 index 479f5879223..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ddosprotectionplans` Documentation - -The `ddosprotectionplans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ddosprotectionplans" -``` - - -### Client Initialization - -```go -client := ddosprotectionplans.NewDdosProtectionPlansClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DdosProtectionPlansClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - -payload := ddosprotectionplans.DdosProtectionPlan{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DdosProtectionPlansClient.Delete` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DdosProtectionPlansClient.Get` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `DdosProtectionPlansClient.List` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DdosProtectionPlansClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DdosProtectionPlansClient.UpdateTags` - -```go -ctx := context.TODO() -id := ddosprotectionplans.NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - -payload := ddosprotectionplans.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/client.go b/resource-manager/network/2022-11-01/ddosprotectionplans/client.go deleted file mode 100644 index df2917fd5cf..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package ddosprotectionplans - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionPlansClient struct { - Client *resourcemanager.Client -} - -func NewDdosProtectionPlansClientWithBaseURI(api environments.Api) (*DdosProtectionPlansClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "ddosprotectionplans", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DdosProtectionPlansClient: %+v", err) - } - - return &DdosProtectionPlansClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/constants.go b/resource-manager/network/2022-11-01/ddosprotectionplans/constants.go deleted file mode 100644 index ec2a63ded59..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package ddosprotectionplans - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/id_ddosprotectionplan.go b/resource-manager/network/2022-11-01/ddosprotectionplans/id_ddosprotectionplan.go deleted file mode 100644 index 24d6a8f8f24..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/id_ddosprotectionplan.go +++ /dev/null @@ -1,127 +0,0 @@ -package ddosprotectionplans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DdosProtectionPlanId{} - -// DdosProtectionPlanId is a struct representing the Resource ID for a Ddos Protection Plan -type DdosProtectionPlanId struct { - SubscriptionId string - ResourceGroupName string - DdosProtectionPlanName string -} - -// NewDdosProtectionPlanID returns a new DdosProtectionPlanId struct -func NewDdosProtectionPlanID(subscriptionId string, resourceGroupName string, ddosProtectionPlanName string) DdosProtectionPlanId { - return DdosProtectionPlanId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - DdosProtectionPlanName: ddosProtectionPlanName, - } -} - -// ParseDdosProtectionPlanID parses 'input' into a DdosProtectionPlanId -func ParseDdosProtectionPlanID(input string) (*DdosProtectionPlanId, error) { - parser := resourceids.NewParserFromResourceIdType(DdosProtectionPlanId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DdosProtectionPlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosProtectionPlanName, ok = parsed.Parsed["ddosProtectionPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosProtectionPlanName", *parsed) - } - - return &id, nil -} - -// ParseDdosProtectionPlanIDInsensitively parses 'input' case-insensitively into a DdosProtectionPlanId -// note: this method should only be used for API response data and not user input -func ParseDdosProtectionPlanIDInsensitively(input string) (*DdosProtectionPlanId, error) { - parser := resourceids.NewParserFromResourceIdType(DdosProtectionPlanId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DdosProtectionPlanId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DdosProtectionPlanName, ok = parsed.Parsed["ddosProtectionPlanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ddosProtectionPlanName", *parsed) - } - - return &id, nil -} - -// ValidateDdosProtectionPlanID checks that 'input' can be parsed as a Ddos Protection Plan ID -func ValidateDdosProtectionPlanID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDdosProtectionPlanID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Ddos Protection Plan ID -func (id DdosProtectionPlanId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/ddosProtectionPlans/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DdosProtectionPlanName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Ddos Protection Plan ID -func (id DdosProtectionPlanId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticDdosProtectionPlans", "ddosProtectionPlans", "ddosProtectionPlans"), - resourceids.UserSpecifiedSegment("ddosProtectionPlanName", "ddosProtectionPlanValue"), - } -} - -// String returns a human-readable description of this Ddos Protection Plan ID -func (id DdosProtectionPlanId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Ddos Protection Plan Name: %q", id.DdosProtectionPlanName), - } - return fmt.Sprintf("Ddos Protection Plan (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/id_ddosprotectionplan_test.go b/resource-manager/network/2022-11-01/ddosprotectionplans/id_ddosprotectionplan_test.go deleted file mode 100644 index 061b10bc0fa..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/id_ddosprotectionplan_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package ddosprotectionplans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DdosProtectionPlanId{} - -func TestNewDdosProtectionPlanID(t *testing.T) { - id := NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.DdosProtectionPlanName != "ddosProtectionPlanValue" { - t.Fatalf("Expected %q but got %q for Segment 'DdosProtectionPlanName'", id.DdosProtectionPlanName, "ddosProtectionPlanValue") - } -} - -func TestFormatDdosProtectionPlanID(t *testing.T) { - actual := NewDdosProtectionPlanID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ddosProtectionPlanValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseDdosProtectionPlanID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DdosProtectionPlanId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue", - Expected: &DdosProtectionPlanId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DdosProtectionPlanName: "ddosProtectionPlanValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDdosProtectionPlanID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DdosProtectionPlanName != v.Expected.DdosProtectionPlanName { - t.Fatalf("Expected %q but got %q for DdosProtectionPlanName", v.Expected.DdosProtectionPlanName, actual.DdosProtectionPlanName) - } - - } -} - -func TestParseDdosProtectionPlanIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DdosProtectionPlanId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoSpRoTeCtIoNpLaNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue", - Expected: &DdosProtectionPlanId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DdosProtectionPlanName: "ddosProtectionPlanValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ddosProtectionPlans/ddosProtectionPlanValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoSpRoTeCtIoNpLaNs/dDoSpRoTeCtIoNpLaNvAlUe", - Expected: &DdosProtectionPlanId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - DdosProtectionPlanName: "dDoSpRoTeCtIoNpLaNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dDoSpRoTeCtIoNpLaNs/dDoSpRoTeCtIoNpLaNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDdosProtectionPlanIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DdosProtectionPlanName != v.Expected.DdosProtectionPlanName { - t.Fatalf("Expected %q but got %q for DdosProtectionPlanName", v.Expected.DdosProtectionPlanName, actual.DdosProtectionPlanName) - } - - } -} - -func TestSegmentsForDdosProtectionPlanId(t *testing.T) { - segments := DdosProtectionPlanId{}.Segments() - if len(segments) == 0 { - t.Fatalf("DdosProtectionPlanId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/method_createorupdate.go b/resource-manager/network/2022-11-01/ddosprotectionplans/method_createorupdate.go deleted file mode 100644 index 9bf1d6b0a4a..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, id DdosProtectionPlanId, input DdosProtectionPlan) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c DdosProtectionPlansClient) CreateOrUpdateThenPoll(ctx context.Context, id DdosProtectionPlanId, input DdosProtectionPlan) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/method_delete.go b/resource-manager/network/2022-11-01/ddosprotectionplans/method_delete.go deleted file mode 100644 index 43d058cf8b8..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c DdosProtectionPlansClient) Delete(ctx context.Context, id DdosProtectionPlanId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c DdosProtectionPlansClient) DeleteThenPoll(ctx context.Context, id DdosProtectionPlanId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/method_get.go b/resource-manager/network/2022-11-01/ddosprotectionplans/method_get.go deleted file mode 100644 index 41e842df975..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DdosProtectionPlan -} - -// Get ... -func (c DdosProtectionPlansClient) Get(ctx context.Context, id DdosProtectionPlanId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/method_list.go b/resource-manager/network/2022-11-01/ddosprotectionplans/method_list.go deleted file mode 100644 index 25e4384d481..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DdosProtectionPlan -} - -type ListCompleteResult struct { - Items []DdosProtectionPlan -} - -// List ... -func (c DdosProtectionPlansClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ddosProtectionPlans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DdosProtectionPlan `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c DdosProtectionPlansClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, DdosProtectionPlanOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DdosProtectionPlansClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DdosProtectionPlanOperationPredicate) (result ListCompleteResult, err error) { - items := make([]DdosProtectionPlan, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/ddosprotectionplans/method_listbyresourcegroup.go deleted file mode 100644 index 8d293a4a99e..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DdosProtectionPlan -} - -type ListByResourceGroupCompleteResult struct { - Items []DdosProtectionPlan -} - -// ListByResourceGroup ... -func (c DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ddosProtectionPlans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DdosProtectionPlan `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, DdosProtectionPlanOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DdosProtectionPlansClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DdosProtectionPlanOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]DdosProtectionPlan, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/method_updatetags.go b/resource-manager/network/2022-11-01/ddosprotectionplans/method_updatetags.go deleted file mode 100644 index 1426567ca75..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package ddosprotectionplans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DdosProtectionPlan -} - -// UpdateTags ... -func (c DdosProtectionPlansClient) UpdateTags(ctx context.Context, id DdosProtectionPlanId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/model_ddosprotectionplan.go b/resource-manager/network/2022-11-01/ddosprotectionplans/model_ddosprotectionplan.go deleted file mode 100644 index 3313192e51b..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/model_ddosprotectionplan.go +++ /dev/null @@ -1,14 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionPlan struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *DdosProtectionPlanPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/model_ddosprotectionplanpropertiesformat.go b/resource-manager/network/2022-11-01/ddosprotectionplans/model_ddosprotectionplanpropertiesformat.go deleted file mode 100644 index b1f0f51665d..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/model_ddosprotectionplanpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionPlanPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIPAddresses,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - VirtualNetworks *[]SubResource `json:"virtualNetworks,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/model_subresource.go b/resource-manager/network/2022-11-01/ddosprotectionplans/model_subresource.go deleted file mode 100644 index 066803386d8..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/model_tagsobject.go b/resource-manager/network/2022-11-01/ddosprotectionplans/model_tagsobject.go deleted file mode 100644 index 99bf4d851b5..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/predicates.go b/resource-manager/network/2022-11-01/ddosprotectionplans/predicates.go deleted file mode 100644 index 6ad9bbf5374..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package ddosprotectionplans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionPlanOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p DdosProtectionPlanOperationPredicate) Matches(input DdosProtectionPlan) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/ddosprotectionplans/version.go b/resource-manager/network/2022-11-01/ddosprotectionplans/version.go deleted file mode 100644 index c2a08398c27..00000000000 --- a/resource-manager/network/2022-11-01/ddosprotectionplans/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package ddosprotectionplans - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ddosprotectionplans/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/README.md b/resource-manager/network/2022-11-01/dscpconfiguration/README.md deleted file mode 100644 index 07a12c239ce..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/README.md +++ /dev/null @@ -1,65 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/dscpconfiguration` Documentation - -The `dscpconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/dscpconfiguration" -``` - - -### Client Initialization - -```go -client := dscpconfiguration.NewDscpConfigurationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DscpConfigurationClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := dscpconfiguration.NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue") - -payload := dscpconfiguration.DscpConfiguration{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `DscpConfigurationClient.Delete` - -```go -ctx := context.TODO() -id := dscpconfiguration.NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `DscpConfigurationClient.Get` - -```go -ctx := context.TODO() -id := dscpconfiguration.NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/client.go b/resource-manager/network/2022-11-01/dscpconfiguration/client.go deleted file mode 100644 index dd1ba400a66..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package dscpconfiguration - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationClient struct { - Client *resourcemanager.Client -} - -func NewDscpConfigurationClientWithBaseURI(api environments.Api) (*DscpConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "dscpconfiguration", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DscpConfigurationClient: %+v", err) - } - - return &DscpConfigurationClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/constants.go b/resource-manager/network/2022-11-01/dscpconfiguration/constants.go deleted file mode 100644 index 223f801758c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/constants.go +++ /dev/null @@ -1,1172 +0,0 @@ -package dscpconfiguration - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProtocolType string - -const ( - ProtocolTypeAh ProtocolType = "Ah" - ProtocolTypeAll ProtocolType = "All" - ProtocolTypeDoNotUse ProtocolType = "DoNotUse" - ProtocolTypeEsp ProtocolType = "Esp" - ProtocolTypeGre ProtocolType = "Gre" - ProtocolTypeIcmp ProtocolType = "Icmp" - ProtocolTypeTcp ProtocolType = "Tcp" - ProtocolTypeUdp ProtocolType = "Udp" - ProtocolTypeVxlan ProtocolType = "Vxlan" -) - -func PossibleValuesForProtocolType() []string { - return []string{ - string(ProtocolTypeAh), - string(ProtocolTypeAll), - string(ProtocolTypeDoNotUse), - string(ProtocolTypeEsp), - string(ProtocolTypeGre), - string(ProtocolTypeIcmp), - string(ProtocolTypeTcp), - string(ProtocolTypeUdp), - string(ProtocolTypeVxlan), - } -} - -func (s *ProtocolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProtocolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProtocolType(input string) (*ProtocolType, error) { - vals := map[string]ProtocolType{ - "ah": ProtocolTypeAh, - "all": ProtocolTypeAll, - "donotuse": ProtocolTypeDoNotUse, - "esp": ProtocolTypeEsp, - "gre": ProtocolTypeGre, - "icmp": ProtocolTypeIcmp, - "tcp": ProtocolTypeTcp, - "udp": ProtocolTypeUdp, - "vxlan": ProtocolTypeVxlan, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProtocolType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/id_dscpconfiguration.go b/resource-manager/network/2022-11-01/dscpconfiguration/id_dscpconfiguration.go deleted file mode 100644 index 4f0d024833c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/id_dscpconfiguration.go +++ /dev/null @@ -1,127 +0,0 @@ -package dscpconfiguration - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DscpConfigurationId{} - -// DscpConfigurationId is a struct representing the Resource ID for a Dscp Configuration -type DscpConfigurationId struct { - SubscriptionId string - ResourceGroupName string - DscpConfigurationName string -} - -// NewDscpConfigurationID returns a new DscpConfigurationId struct -func NewDscpConfigurationID(subscriptionId string, resourceGroupName string, dscpConfigurationName string) DscpConfigurationId { - return DscpConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - DscpConfigurationName: dscpConfigurationName, - } -} - -// ParseDscpConfigurationID parses 'input' into a DscpConfigurationId -func ParseDscpConfigurationID(input string) (*DscpConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(DscpConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DscpConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DscpConfigurationName, ok = parsed.Parsed["dscpConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dscpConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseDscpConfigurationIDInsensitively parses 'input' case-insensitively into a DscpConfigurationId -// note: this method should only be used for API response data and not user input -func ParseDscpConfigurationIDInsensitively(input string) (*DscpConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(DscpConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DscpConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.DscpConfigurationName, ok = parsed.Parsed["dscpConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "dscpConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateDscpConfigurationID checks that 'input' can be parsed as a Dscp Configuration ID -func ValidateDscpConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDscpConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Dscp Configuration ID -func (id DscpConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/dscpConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.DscpConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Dscp Configuration ID -func (id DscpConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticDscpConfigurations", "dscpConfigurations", "dscpConfigurations"), - resourceids.UserSpecifiedSegment("dscpConfigurationName", "dscpConfigurationValue"), - } -} - -// String returns a human-readable description of this Dscp Configuration ID -func (id DscpConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Dscp Configuration Name: %q", id.DscpConfigurationName), - } - return fmt.Sprintf("Dscp Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/id_dscpconfiguration_test.go b/resource-manager/network/2022-11-01/dscpconfiguration/id_dscpconfiguration_test.go deleted file mode 100644 index d5bb2d22a28..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/id_dscpconfiguration_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package dscpconfiguration - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DscpConfigurationId{} - -func TestNewDscpConfigurationID(t *testing.T) { - id := NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.DscpConfigurationName != "dscpConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'DscpConfigurationName'", id.DscpConfigurationName, "dscpConfigurationValue") - } -} - -func TestFormatDscpConfigurationID(t *testing.T) { - actual := NewDscpConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dscpConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseDscpConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DscpConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue", - Expected: &DscpConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DscpConfigurationName: "dscpConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDscpConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DscpConfigurationName != v.Expected.DscpConfigurationName { - t.Fatalf("Expected %q but got %q for DscpConfigurationName", v.Expected.DscpConfigurationName, actual.DscpConfigurationName) - } - - } -} - -func TestParseDscpConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DscpConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dScPcOnFiGuRaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue", - Expected: &DscpConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - DscpConfigurationName: "dscpConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/dscpConfigurations/dscpConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dScPcOnFiGuRaTiOnS/dScPcOnFiGuRaTiOnVaLuE", - Expected: &DscpConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - DscpConfigurationName: "dScPcOnFiGuRaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/dScPcOnFiGuRaTiOnS/dScPcOnFiGuRaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDscpConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.DscpConfigurationName != v.Expected.DscpConfigurationName { - t.Fatalf("Expected %q but got %q for DscpConfigurationName", v.Expected.DscpConfigurationName, actual.DscpConfigurationName) - } - - } -} - -func TestSegmentsForDscpConfigurationId(t *testing.T) { - segments := DscpConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("DscpConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/method_createorupdate.go b/resource-manager/network/2022-11-01/dscpconfiguration/method_createorupdate.go deleted file mode 100644 index 541feca6849..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package dscpconfiguration - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c DscpConfigurationClient) CreateOrUpdate(ctx context.Context, id DscpConfigurationId, input DscpConfiguration) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c DscpConfigurationClient) CreateOrUpdateThenPoll(ctx context.Context, id DscpConfigurationId, input DscpConfiguration) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/method_delete.go b/resource-manager/network/2022-11-01/dscpconfiguration/method_delete.go deleted file mode 100644 index 85639c01f9b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package dscpconfiguration - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c DscpConfigurationClient) Delete(ctx context.Context, id DscpConfigurationId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c DscpConfigurationClient) DeleteThenPoll(ctx context.Context, id DscpConfigurationId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/method_get.go b/resource-manager/network/2022-11-01/dscpconfiguration/method_get.go deleted file mode 100644 index 2749ede127e..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package dscpconfiguration - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *DscpConfiguration -} - -// Get ... -func (c DscpConfigurationClient) Get(ctx context.Context, id DscpConfigurationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 440846baae7..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 663b98879ff..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 5070a712a0c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewayipconfiguration.go deleted file mode 100644 index a3ca72a1804..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 2072ac671c8..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationsecuritygroup.go deleted file mode 100644 index 067b344a691..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 4a7009c2a6b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_backendaddresspool.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_backendaddresspool.go deleted file mode 100644 index fdc704e5a94..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 3e973574814..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 2a2e974962b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_ddossettings.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_ddossettings.go deleted file mode 100644 index dca2e7cd55f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_delegation.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_delegation.go deleted file mode 100644 index 8c1fa9b43c0..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_dscpconfiguration.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_dscpconfiguration.go deleted file mode 100644 index 04e403de3a4..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_dscpconfiguration.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *DscpConfigurationPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_dscpconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_dscpconfigurationpropertiesformat.go deleted file mode 100644 index 97130781ef7..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_dscpconfigurationpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationPropertiesFormat struct { - AssociatedNetworkInterfaces *[]NetworkInterface `json:"associatedNetworkInterfaces,omitempty"` - DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` - DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` - Markings *[]int64 `json:"markings,omitempty"` - Protocol *ProtocolType `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - QosCollectionId *string `json:"qosCollectionId,omitempty"` - QosDefinitionCollection *[]QosDefinition `json:"qosDefinitionCollection,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` - SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_flowlog.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_flowlog.go deleted file mode 100644 index f4d7ea329fc..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_flowlogformatparameters.go deleted file mode 100644 index f759162156c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_flowlogpropertiesformat.go deleted file mode 100644 index 71ebfa45fde..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_frontendipconfiguration.go deleted file mode 100644 index e5b91931aa4..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index cc67d340130..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index c498ae3b999..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_inboundnatrule.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_inboundnatrule.go deleted file mode 100644 index cae42b6f078..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 6ee4c243e27..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfiguration.go deleted file mode 100644 index b79aa52af20..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationprofile.go deleted file mode 100644 index 51858f8645f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1a288ffd425..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 1c2988eec98..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_iptag.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_iptag.go deleted file mode 100644 index f54e708d614..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_loadbalancerbackendaddress.go deleted file mode 100644 index cf9e4a0b97f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index f1b9e0732ac..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_natgateway.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_natgateway.go deleted file mode 100644 index bd2135c7219..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_natgatewaypropertiesformat.go deleted file mode 100644 index a748c883e51..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_natgatewaysku.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_natgatewaysku.go deleted file mode 100644 index 38065785ee7..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_natruleportmapping.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_natruleportmapping.go deleted file mode 100644 index 4f0a40c3c84..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterface.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterface.go deleted file mode 100644 index 2c8dff0b372..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacednssettings.go deleted file mode 100644 index db01e0a6931..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfiguration.go deleted file mode 100644 index cbe1f2ef1bc..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 1901cc2fecb..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 235a6d0bfc4..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacepropertiesformat.go deleted file mode 100644 index d01f01f77fa..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 9141e163666..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index b1504509e4c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networksecuritygroup.go deleted file mode 100644 index 79ddb5537a1..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 76177bde258..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpoint.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpoint.go deleted file mode 100644 index b8b7f950b24..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointconnection.go deleted file mode 100644 index f374ac95239..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointconnectionproperties.go deleted file mode 100644 index a3590daea44..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointipconfiguration.go deleted file mode 100644 index d15e9404362..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index fbd74e39c9c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointproperties.go deleted file mode 100644 index 9bddc7a4349..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkservice.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkservice.go deleted file mode 100644 index 3f4dea0d52f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnection.go deleted file mode 100644 index ca5cf780e20..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 7fa3b795937..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 003e73140c9..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 1a98c978c4e..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 298e27cde46..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceproperties.go deleted file mode 100644 index 1852ce3fa31..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddress.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddress.go deleted file mode 100644 index d57ce42d098..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package dscpconfiguration - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddressdnssettings.go deleted file mode 100644 index 9c3cb7a4ffe..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 2745ba7952e..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddresssku.go deleted file mode 100644 index 184f29e9bf9..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_qosdefinition.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_qosdefinition.go deleted file mode 100644 index ad3c5e88a17..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_qosdefinition.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosDefinition struct { - DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` - DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` - Markings *[]int64 `json:"markings,omitempty"` - Protocol *ProtocolType `json:"protocol,omitempty"` - SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` - SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_qosiprange.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_qosiprange.go deleted file mode 100644 index 9de17d31fd5..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_qosiprange.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosIPRange struct { - EndIP *string `json:"endIP,omitempty"` - StartIP *string `json:"startIP,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_qosportrange.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_qosportrange.go deleted file mode 100644 index fec0d277115..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_qosportrange.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosPortRange struct { - End *int64 `json:"end,omitempty"` - Start *int64 `json:"start,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_resourcenavigationlink.go deleted file mode 100644 index e5b6bc9921c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_resourcenavigationlinkformat.go deleted file mode 100644 index 7119a8ad8fd..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_resourceset.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_resourceset.go deleted file mode 100644 index eb8146e0601..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_retentionpolicyparameters.go deleted file mode 100644 index 73bc84cb5f0..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_route.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_route.go deleted file mode 100644 index 43d479a10b9..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_routepropertiesformat.go deleted file mode 100644 index f0ba5752c84..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_routetable.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_routetable.go deleted file mode 100644 index ffa38a33f5c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_routetablepropertiesformat.go deleted file mode 100644 index f2d7db2da04..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_securityrule.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_securityrule.go deleted file mode 100644 index 670a04f125b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_securityrulepropertiesformat.go deleted file mode 100644 index 313bad92221..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceassociationlink.go deleted file mode 100644 index 51b7b88b0b4..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index e74136ad481..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_servicedelegationpropertiesformat.go deleted file mode 100644 index ee33b9b67db..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicy.go deleted file mode 100644 index a4c7c550a6c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicydefinition.go deleted file mode 100644 index d902694b0cc..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index acf884117e3..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 94a2649c90d..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 638a6d73f52..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_subnet.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_subnet.go deleted file mode 100644 index 0c94d71385f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_subnetpropertiesformat.go deleted file mode 100644 index 2321b7e8d12..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_subresource.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_subresource.go deleted file mode 100644 index 16bee506d8d..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 84d2f9e07a1..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_trafficanalyticsproperties.go deleted file mode 100644 index a1e61262ce4..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_virtualnetworktap.go deleted file mode 100644 index 6b0b8a746c6..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfiguration/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index cbbb01641bc..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfiguration/version.go b/resource-manager/network/2022-11-01/dscpconfiguration/version.go deleted file mode 100644 index 7fac2e669bf..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfiguration/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfiguration - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfiguration/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/README.md b/resource-manager/network/2022-11-01/dscpconfigurations/README.md deleted file mode 100644 index da29bf75b50..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/dscpconfigurations` Documentation - -The `dscpconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/dscpconfigurations" -``` - - -### Client Initialization - -```go -client := dscpconfigurations.NewDscpConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `DscpConfigurationsClient.DscpConfigurationList` - -```go -ctx := context.TODO() -id := dscpconfigurations.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.DscpConfigurationList(ctx, id)` can be used to do batched pagination -items, err := client.DscpConfigurationListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `DscpConfigurationsClient.DscpConfigurationListAll` - -```go -ctx := context.TODO() -id := dscpconfigurations.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.DscpConfigurationListAll(ctx, id)` can be used to do batched pagination -items, err := client.DscpConfigurationListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/client.go b/resource-manager/network/2022-11-01/dscpconfigurations/client.go deleted file mode 100644 index 23c3e89b48f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package dscpconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewDscpConfigurationsClientWithBaseURI(api environments.Api) (*DscpConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "dscpconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating DscpConfigurationsClient: %+v", err) - } - - return &DscpConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/constants.go b/resource-manager/network/2022-11-01/dscpconfigurations/constants.go deleted file mode 100644 index 2c4f9493b72..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/constants.go +++ /dev/null @@ -1,1172 +0,0 @@ -package dscpconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProtocolType string - -const ( - ProtocolTypeAh ProtocolType = "Ah" - ProtocolTypeAll ProtocolType = "All" - ProtocolTypeDoNotUse ProtocolType = "DoNotUse" - ProtocolTypeEsp ProtocolType = "Esp" - ProtocolTypeGre ProtocolType = "Gre" - ProtocolTypeIcmp ProtocolType = "Icmp" - ProtocolTypeTcp ProtocolType = "Tcp" - ProtocolTypeUdp ProtocolType = "Udp" - ProtocolTypeVxlan ProtocolType = "Vxlan" -) - -func PossibleValuesForProtocolType() []string { - return []string{ - string(ProtocolTypeAh), - string(ProtocolTypeAll), - string(ProtocolTypeDoNotUse), - string(ProtocolTypeEsp), - string(ProtocolTypeGre), - string(ProtocolTypeIcmp), - string(ProtocolTypeTcp), - string(ProtocolTypeUdp), - string(ProtocolTypeVxlan), - } -} - -func (s *ProtocolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProtocolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProtocolType(input string) (*ProtocolType, error) { - vals := map[string]ProtocolType{ - "ah": ProtocolTypeAh, - "all": ProtocolTypeAll, - "donotuse": ProtocolTypeDoNotUse, - "esp": ProtocolTypeEsp, - "gre": ProtocolTypeGre, - "icmp": ProtocolTypeIcmp, - "tcp": ProtocolTypeTcp, - "udp": ProtocolTypeUdp, - "vxlan": ProtocolTypeVxlan, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProtocolType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/method_dscpconfigurationlist.go b/resource-manager/network/2022-11-01/dscpconfigurations/method_dscpconfigurationlist.go deleted file mode 100644 index 853bbcc22f3..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/method_dscpconfigurationlist.go +++ /dev/null @@ -1,90 +0,0 @@ -package dscpconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DscpConfiguration -} - -type DscpConfigurationListCompleteResult struct { - Items []DscpConfiguration -} - -// DscpConfigurationList ... -func (c DscpConfigurationsClient) DscpConfigurationList(ctx context.Context, id commonids.ResourceGroupId) (result DscpConfigurationListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/dscpConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DscpConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// DscpConfigurationListComplete retrieves all the results into a single object -func (c DscpConfigurationsClient) DscpConfigurationListComplete(ctx context.Context, id commonids.ResourceGroupId) (DscpConfigurationListCompleteResult, error) { - return c.DscpConfigurationListCompleteMatchingPredicate(ctx, id, DscpConfigurationOperationPredicate{}) -} - -// DscpConfigurationListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DscpConfigurationsClient) DscpConfigurationListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate DscpConfigurationOperationPredicate) (result DscpConfigurationListCompleteResult, err error) { - items := make([]DscpConfiguration, 0) - - resp, err := c.DscpConfigurationList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = DscpConfigurationListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/method_dscpconfigurationlistall.go b/resource-manager/network/2022-11-01/dscpconfigurations/method_dscpconfigurationlistall.go deleted file mode 100644 index bff5d5a2a9b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/method_dscpconfigurationlistall.go +++ /dev/null @@ -1,90 +0,0 @@ -package dscpconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]DscpConfiguration -} - -type DscpConfigurationListAllCompleteResult struct { - Items []DscpConfiguration -} - -// DscpConfigurationListAll ... -func (c DscpConfigurationsClient) DscpConfigurationListAll(ctx context.Context, id commonids.SubscriptionId) (result DscpConfigurationListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/dscpConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]DscpConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// DscpConfigurationListAllComplete retrieves all the results into a single object -func (c DscpConfigurationsClient) DscpConfigurationListAllComplete(ctx context.Context, id commonids.SubscriptionId) (DscpConfigurationListAllCompleteResult, error) { - return c.DscpConfigurationListAllCompleteMatchingPredicate(ctx, id, DscpConfigurationOperationPredicate{}) -} - -// DscpConfigurationListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c DscpConfigurationsClient) DscpConfigurationListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate DscpConfigurationOperationPredicate) (result DscpConfigurationListAllCompleteResult, err error) { - items := make([]DscpConfiguration, 0) - - resp, err := c.DscpConfigurationListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = DscpConfigurationListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddress.go deleted file mode 100644 index b7b1e084f2c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 2ee5c1c3577..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index e420a9bdc67..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 1c532c8b751..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 461f708325f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationsecuritygroup.go deleted file mode 100644 index 7c885418df4..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 06db97d0e6f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_backendaddresspool.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_backendaddresspool.go deleted file mode 100644 index 9063fe9528b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index b2db6065b70..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 29791c2c31f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_ddossettings.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_ddossettings.go deleted file mode 100644 index 0a6ba1cc0f5..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_delegation.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_delegation.go deleted file mode 100644 index 3db69c6181a..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_dscpconfiguration.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_dscpconfiguration.go deleted file mode 100644 index addfd61ed3c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_dscpconfiguration.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *DscpConfigurationPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_dscpconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_dscpconfigurationpropertiesformat.go deleted file mode 100644 index 3de3861ee9e..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_dscpconfigurationpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationPropertiesFormat struct { - AssociatedNetworkInterfaces *[]NetworkInterface `json:"associatedNetworkInterfaces,omitempty"` - DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` - DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` - Markings *[]int64 `json:"markings,omitempty"` - Protocol *ProtocolType `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - QosCollectionId *string `json:"qosCollectionId,omitempty"` - QosDefinitionCollection *[]QosDefinition `json:"qosDefinitionCollection,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` - SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_flowlog.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_flowlog.go deleted file mode 100644 index b06c467c3bc..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_flowlogformatparameters.go deleted file mode 100644 index c2ca6492542..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_flowlogpropertiesformat.go deleted file mode 100644 index 70fecb2d852..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_frontendipconfiguration.go deleted file mode 100644 index 55b02b251ca..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 04b3e1aafc3..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index fba1a411047..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_inboundnatrule.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_inboundnatrule.go deleted file mode 100644 index b60bfcd7088..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 598cd5d43a5..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfiguration.go deleted file mode 100644 index 2532732b5b2..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationprofile.go deleted file mode 100644 index ce6d532c39b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index afde579aaa3..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index c5919fd2db3..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_iptag.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_iptag.go deleted file mode 100644 index f38ed9d8c65..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_loadbalancerbackendaddress.go deleted file mode 100644 index 7ad5779c262..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 313080c155c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_natgateway.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_natgateway.go deleted file mode 100644 index 64ee487573f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_natgatewaypropertiesformat.go deleted file mode 100644 index d6a3124790e..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_natgatewaysku.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_natgatewaysku.go deleted file mode 100644 index f13dbd3d8fa..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_natruleportmapping.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_natruleportmapping.go deleted file mode 100644 index 4f09709144d..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterface.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterface.go deleted file mode 100644 index 0b5454d16ca..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacednssettings.go deleted file mode 100644 index 11f9a45a307..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfiguration.go deleted file mode 100644 index d4cb1b886b6..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 0b175cf4025..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 483630c9a12..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 1d542c19b57..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 134cf5c3661..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index f77ecd6167d..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networksecuritygroup.go deleted file mode 100644 index f9ea08d3a85..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 0cac57de47f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpoint.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpoint.go deleted file mode 100644 index 0e5fb891d8c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointconnection.go deleted file mode 100644 index 64a8a54e559..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointconnectionproperties.go deleted file mode 100644 index b41f2269c5b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointipconfiguration.go deleted file mode 100644 index cee431f3b19..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 8ffd50d3002..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointproperties.go deleted file mode 100644 index b098e9d6023..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkservice.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkservice.go deleted file mode 100644 index 60b183ef94a..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnection.go deleted file mode 100644 index 963c255ab64..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 9f2e27f4720..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 3662d04a08f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index d0932cbb597..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index b471f35042f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceproperties.go deleted file mode 100644 index 0054e8840ee..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddress.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddress.go deleted file mode 100644 index 4fc95713929..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package dscpconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddressdnssettings.go deleted file mode 100644 index adee4abe556..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddresspropertiesformat.go deleted file mode 100644 index b1758ec95ac..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddresssku.go deleted file mode 100644 index a429ae17ad7..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_qosdefinition.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_qosdefinition.go deleted file mode 100644 index c578549b24d..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_qosdefinition.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosDefinition struct { - DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` - DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` - Markings *[]int64 `json:"markings,omitempty"` - Protocol *ProtocolType `json:"protocol,omitempty"` - SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` - SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_qosiprange.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_qosiprange.go deleted file mode 100644 index a7109f45e97..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_qosiprange.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosIPRange struct { - EndIP *string `json:"endIP,omitempty"` - StartIP *string `json:"startIP,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_qosportrange.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_qosportrange.go deleted file mode 100644 index 1c241e416d6..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_qosportrange.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QosPortRange struct { - End *int64 `json:"end,omitempty"` - Start *int64 `json:"start,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_resourcenavigationlink.go deleted file mode 100644 index a441a261d0b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_resourcenavigationlinkformat.go deleted file mode 100644 index 42c361f9ff9..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_resourceset.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_resourceset.go deleted file mode 100644 index 36c2929fe5c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_retentionpolicyparameters.go deleted file mode 100644 index 6cb1197a4d8..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_route.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_route.go deleted file mode 100644 index 58b9462885c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_routepropertiesformat.go deleted file mode 100644 index 57d611a55aa..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_routetable.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_routetable.go deleted file mode 100644 index 3c19f2937d7..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_routetablepropertiesformat.go deleted file mode 100644 index 8d9f9c65d1c..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_securityrule.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_securityrule.go deleted file mode 100644 index eefb302d3d0..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_securityrulepropertiesformat.go deleted file mode 100644 index d43f1f5f3b1..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceassociationlink.go deleted file mode 100644 index e968a6667b0..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 3756e4aca2b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 4576bcc01d0..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicy.go deleted file mode 100644 index e1bf0604459..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 9693e4de6b7..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index c277cb3ff86..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 31009213cca..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpropertiesformat.go deleted file mode 100644 index a134bda64bd..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_subnet.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_subnet.go deleted file mode 100644 index 6c58caf5de4..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_subnetpropertiesformat.go deleted file mode 100644 index 6fc0633d4d9..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_subresource.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_subresource.go deleted file mode 100644 index f4f23a8234b..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index f9dd4dab77f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_trafficanalyticsproperties.go deleted file mode 100644 index 6e509b308b5..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_virtualnetworktap.go deleted file mode 100644 index ae0f9ad6412..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/dscpconfigurations/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index bc1c19bd39f..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/predicates.go b/resource-manager/network/2022-11-01/dscpconfigurations/predicates.go deleted file mode 100644 index 7628df6beb6..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package dscpconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DscpConfigurationOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p DscpConfigurationOperationPredicate) Matches(input DscpConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/dscpconfigurations/version.go b/resource-manager/network/2022-11-01/dscpconfigurations/version.go deleted file mode 100644 index 357d9d806b8..00000000000 --- a/resource-manager/network/2022-11-01/dscpconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package dscpconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/dscpconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/endpointservices/README.md b/resource-manager/network/2022-11-01/endpointservices/README.md deleted file mode 100644 index d6d6626c10f..00000000000 --- a/resource-manager/network/2022-11-01/endpointservices/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/endpointservices` Documentation - -The `endpointservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/endpointservices" -``` - - -### Client Initialization - -```go -client := endpointservices.NewEndpointServicesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `EndpointServicesClient.AvailableEndpointServicesList` - -```go -ctx := context.TODO() -id := endpointservices.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailableEndpointServicesList(ctx, id)` can be used to do batched pagination -items, err := client.AvailableEndpointServicesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/endpointservices/client.go b/resource-manager/network/2022-11-01/endpointservices/client.go deleted file mode 100644 index 2cf01f43cdd..00000000000 --- a/resource-manager/network/2022-11-01/endpointservices/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package endpointservices - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EndpointServicesClient struct { - Client *resourcemanager.Client -} - -func NewEndpointServicesClientWithBaseURI(api environments.Api) (*EndpointServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "endpointservices", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating EndpointServicesClient: %+v", err) - } - - return &EndpointServicesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/endpointservices/id_location.go b/resource-manager/network/2022-11-01/endpointservices/id_location.go deleted file mode 100644 index cb3d2ffd4c8..00000000000 --- a/resource-manager/network/2022-11-01/endpointservices/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package endpointservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/endpointservices/id_location_test.go b/resource-manager/network/2022-11-01/endpointservices/id_location_test.go deleted file mode 100644 index 5bb6cb407b3..00000000000 --- a/resource-manager/network/2022-11-01/endpointservices/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package endpointservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/endpointservices/method_availableendpointserviceslist.go b/resource-manager/network/2022-11-01/endpointservices/method_availableendpointserviceslist.go deleted file mode 100644 index 42469b04dfc..00000000000 --- a/resource-manager/network/2022-11-01/endpointservices/method_availableendpointserviceslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package endpointservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableEndpointServicesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]EndpointServiceResult -} - -type AvailableEndpointServicesListCompleteResult struct { - Items []EndpointServiceResult -} - -// AvailableEndpointServicesList ... -func (c EndpointServicesClient) AvailableEndpointServicesList(ctx context.Context, id LocationId) (result AvailableEndpointServicesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/virtualNetworkAvailableEndpointServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]EndpointServiceResult `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailableEndpointServicesListComplete retrieves all the results into a single object -func (c EndpointServicesClient) AvailableEndpointServicesListComplete(ctx context.Context, id LocationId) (AvailableEndpointServicesListCompleteResult, error) { - return c.AvailableEndpointServicesListCompleteMatchingPredicate(ctx, id, EndpointServiceResultOperationPredicate{}) -} - -// AvailableEndpointServicesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c EndpointServicesClient) AvailableEndpointServicesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate EndpointServiceResultOperationPredicate) (result AvailableEndpointServicesListCompleteResult, err error) { - items := make([]EndpointServiceResult, 0) - - resp, err := c.AvailableEndpointServicesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailableEndpointServicesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/endpointservices/model_endpointserviceresult.go b/resource-manager/network/2022-11-01/endpointservices/model_endpointserviceresult.go deleted file mode 100644 index eae6c698d45..00000000000 --- a/resource-manager/network/2022-11-01/endpointservices/model_endpointserviceresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package endpointservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EndpointServiceResult struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/endpointservices/predicates.go b/resource-manager/network/2022-11-01/endpointservices/predicates.go deleted file mode 100644 index 9a5ec06a288..00000000000 --- a/resource-manager/network/2022-11-01/endpointservices/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package endpointservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EndpointServiceResultOperationPredicate struct { - Id *string - Name *string - Type *string -} - -func (p EndpointServiceResultOperationPredicate) Matches(input EndpointServiceResult) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/endpointservices/version.go b/resource-manager/network/2022-11-01/endpointservices/version.go deleted file mode 100644 index 7908ff77ad5..00000000000 --- a/resource-manager/network/2022-11-01/endpointservices/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package endpointservices - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/endpointservices/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitarptable/README.md b/resource-manager/network/2022-11-01/expressroutecircuitarptable/README.md deleted file mode 100644 index 7352cbb2069..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitarptable/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitarptable` Documentation - -The `expressroutecircuitarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitarptable" -``` - - -### Client Initialization - -```go -client := expressroutecircuitarptable.NewExpressRouteCircuitArpTableClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitArpTableClient.ExpressRouteCircuitsListArpTable` - -```go -ctx := context.TODO() -id := expressroutecircuitarptable.NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue") - -if err := client.ExpressRouteCircuitsListArpTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecircuitarptable/client.go b/resource-manager/network/2022-11-01/expressroutecircuitarptable/client.go deleted file mode 100644 index daef3b62246..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitarptable/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitarptable - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitArpTableClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitArpTableClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitarptable", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitArpTableClient: %+v", err) - } - - return &ExpressRouteCircuitArpTableClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitarptable/id_arptable.go b/resource-manager/network/2022-11-01/expressroutecircuitarptable/id_arptable.go deleted file mode 100644 index 0771397d6bb..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitarptable/id_arptable.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecircuitarptable - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ArpTableId{} - -// ArpTableId is a struct representing the Resource ID for a Arp Table -type ArpTableId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - ArpTableName string -} - -// NewArpTableID returns a new ArpTableId struct -func NewArpTableID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, arpTableName string) ArpTableId { - return ArpTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - ArpTableName: arpTableName, - } -} - -// ParseArpTableID parses 'input' into a ArpTableId -func ParseArpTableID(input string) (*ArpTableId, error) { - parser := resourceids.NewParserFromResourceIdType(ArpTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) - } - - return &id, nil -} - -// ParseArpTableIDInsensitively parses 'input' case-insensitively into a ArpTableId -// note: this method should only be used for API response data and not user input -func ParseArpTableIDInsensitively(input string) (*ArpTableId, error) { - parser := resourceids.NewParserFromResourceIdType(ArpTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) - } - - return &id, nil -} - -// ValidateArpTableID checks that 'input' can be parsed as a Arp Table ID -func ValidateArpTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseArpTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Arp Table ID -func (id ArpTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/arpTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.ArpTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Arp Table ID -func (id ArpTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticArpTables", "arpTables", "arpTables"), - resourceids.UserSpecifiedSegment("arpTableName", "arpTableValue"), - } -} - -// String returns a human-readable description of this Arp Table ID -func (id ArpTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Arp Table Name: %q", id.ArpTableName), - } - return fmt.Sprintf("Arp Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitarptable/id_arptable_test.go b/resource-manager/network/2022-11-01/expressroutecircuitarptable/id_arptable_test.go deleted file mode 100644 index 7e3bd95ef27..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitarptable/id_arptable_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecircuitarptable - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ArpTableId{} - -func TestNewArpTableID(t *testing.T) { - id := NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.ArpTableName != "arpTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'ArpTableName'", id.ArpTableName, "arpTableValue") - } -} - -func TestFormatArpTableID(t *testing.T) { - actual := NewArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "arpTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseArpTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ArpTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue", - Expected: &ArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - ArpTableName: "arpTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseArpTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ArpTableName != v.Expected.ArpTableName { - t.Fatalf("Expected %q but got %q for ArpTableName", v.Expected.ArpTableName, actual.ArpTableName) - } - - } -} - -func TestParseArpTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ArpTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue", - Expected: &ArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - ArpTableName: "arpTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/arpTables/arpTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs/aRpTaBlEvAlUe", - Expected: &ArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - ArpTableName: "aRpTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs/aRpTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseArpTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ArpTableName != v.Expected.ArpTableName { - t.Fatalf("Expected %q but got %q for ArpTableName", v.Expected.ArpTableName, actual.ArpTableName) - } - - } -} - -func TestSegmentsForArpTableId(t *testing.T) { - segments := ArpTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ArpTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go b/resource-manager/network/2022-11-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go deleted file mode 100644 index 54e09f740ce..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitarptable/method_expressroutecircuitslistarptable.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecircuitarptable - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsListArpTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCircuitsListArpTable ... -func (c ExpressRouteCircuitArpTableClient) ExpressRouteCircuitsListArpTable(ctx context.Context, id ArpTableId) (result ExpressRouteCircuitsListArpTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCircuitsListArpTableThenPoll performs ExpressRouteCircuitsListArpTable then polls until it's completed -func (c ExpressRouteCircuitArpTableClient) ExpressRouteCircuitsListArpTableThenPoll(ctx context.Context, id ArpTableId) error { - result, err := c.ExpressRouteCircuitsListArpTable(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCircuitsListArpTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCircuitsListArpTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitarptable/model_expressroutecircuitarptable.go b/resource-manager/network/2022-11-01/expressroutecircuitarptable/model_expressroutecircuitarptable.go deleted file mode 100644 index 8b4183dd49f..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitarptable/model_expressroutecircuitarptable.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecircuitarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitArpTable struct { - Age *int64 `json:"age,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - Interface *string `json:"interface,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2022-11-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index a6f3b3f86f5..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitarptable/version.go b/resource-manager/network/2022-11-01/expressroutecircuitarptable/version.go deleted file mode 100644 index 04caf1d1454..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitarptable/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitarptable - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitarptable/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/README.md b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/README.md deleted file mode 100644 index 045e3936b42..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitauthorizations` Documentation - -The `expressroutecircuitauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitauthorizations" -``` - - -### Client Initialization - -```go -client := expressroutecircuitauthorizations.NewExpressRouteCircuitAuthorizationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecircuitauthorizations.NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue") - -payload := expressroutecircuitauthorizations.ExpressRouteCircuitAuthorization{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitAuthorizationsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecircuitauthorizations.NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitAuthorizationsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecircuitauthorizations.NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitAuthorizationsClient.List` - -```go -ctx := context.TODO() -id := expressroutecircuitauthorizations.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/client.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/client.go deleted file mode 100644 index 8ee64242c49..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitAuthorizationsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitauthorizations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitAuthorizationsClient: %+v", err) - } - - return &ExpressRouteCircuitAuthorizationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/constants.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/constants.go deleted file mode 100644 index 052d235a64f..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthorizationUseStatus string - -const ( - AuthorizationUseStatusAvailable AuthorizationUseStatus = "Available" - AuthorizationUseStatusInUse AuthorizationUseStatus = "InUse" -) - -func PossibleValuesForAuthorizationUseStatus() []string { - return []string{ - string(AuthorizationUseStatusAvailable), - string(AuthorizationUseStatusInUse), - } -} - -func (s *AuthorizationUseStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthorizationUseStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthorizationUseStatus(input string) (*AuthorizationUseStatus, error) { - vals := map[string]AuthorizationUseStatus{ - "available": AuthorizationUseStatusAvailable, - "inuse": AuthorizationUseStatusInUse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthorizationUseStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_authorization.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_authorization.go deleted file mode 100644 index 614f1572fa7..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_authorization.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AuthorizationId{} - -// AuthorizationId is a struct representing the Resource ID for a Authorization -type AuthorizationId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - AuthorizationName string -} - -// NewAuthorizationID returns a new AuthorizationId struct -func NewAuthorizationID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, authorizationName string) AuthorizationId { - return AuthorizationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - AuthorizationName: authorizationName, - } -} - -// ParseAuthorizationID parses 'input' into a AuthorizationId -func ParseAuthorizationID(input string) (*AuthorizationId, error) { - parser := resourceids.NewParserFromResourceIdType(AuthorizationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) - } - - return &id, nil -} - -// ParseAuthorizationIDInsensitively parses 'input' case-insensitively into a AuthorizationId -// note: this method should only be used for API response data and not user input -func ParseAuthorizationIDInsensitively(input string) (*AuthorizationId, error) { - parser := resourceids.NewParserFromResourceIdType(AuthorizationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) - } - - return &id, nil -} - -// ValidateAuthorizationID checks that 'input' can be parsed as a Authorization ID -func ValidateAuthorizationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAuthorizationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Authorization ID -func (id AuthorizationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/authorizations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.AuthorizationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Authorization ID -func (id AuthorizationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticAuthorizations", "authorizations", "authorizations"), - resourceids.UserSpecifiedSegment("authorizationName", "authorizationValue"), - } -} - -// String returns a human-readable description of this Authorization ID -func (id AuthorizationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Authorization Name: %q", id.AuthorizationName), - } - return fmt.Sprintf("Authorization (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_authorization_test.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_authorization_test.go deleted file mode 100644 index ce2bf236ad0..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_authorization_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AuthorizationId{} - -func TestNewAuthorizationID(t *testing.T) { - id := NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.AuthorizationName != "authorizationValue" { - t.Fatalf("Expected %q but got %q for Segment 'AuthorizationName'", id.AuthorizationName, "authorizationValue") - } -} - -func TestFormatAuthorizationID(t *testing.T) { - actual := NewAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "authorizationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseAuthorizationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AuthorizationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue", - Expected: &AuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - AuthorizationName: "authorizationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAuthorizationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.AuthorizationName != v.Expected.AuthorizationName { - t.Fatalf("Expected %q but got %q for AuthorizationName", v.Expected.AuthorizationName, actual.AuthorizationName) - } - - } -} - -func TestParseAuthorizationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AuthorizationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/aUtHoRiZaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue", - Expected: &AuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - AuthorizationName: "authorizationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/authorizations/authorizationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/aUtHoRiZaTiOnS/aUtHoRiZaTiOnVaLuE", - Expected: &AuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - AuthorizationName: "aUtHoRiZaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/aUtHoRiZaTiOnS/aUtHoRiZaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAuthorizationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.AuthorizationName != v.Expected.AuthorizationName { - t.Fatalf("Expected %q but got %q for AuthorizationName", v.Expected.AuthorizationName, actual.AuthorizationName) - } - - } -} - -func TestSegmentsForAuthorizationId(t *testing.T) { - segments := AuthorizationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("AuthorizationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_expressroutecircuit.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_expressroutecircuit.go deleted file mode 100644 index 502b311d236..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_expressroutecircuit.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -// ExpressRouteCircuitId is a struct representing the Resource ID for a Express Route Circuit -type ExpressRouteCircuitId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string -} - -// NewExpressRouteCircuitID returns a new ExpressRouteCircuitId struct -func NewExpressRouteCircuitID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string) ExpressRouteCircuitId { - return ExpressRouteCircuitId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - } -} - -// ParseExpressRouteCircuitID parses 'input' into a ExpressRouteCircuitId -func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCircuitIDInsensitively parses 'input' case-insensitively into a ExpressRouteCircuitId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID -func ValidateExpressRouteCircuitID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCircuitID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Circuit ID -func (id ExpressRouteCircuitId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Circuit ID -func (id ExpressRouteCircuitId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - } -} - -// String returns a human-readable description of this Express Route Circuit ID -func (id ExpressRouteCircuitId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - } - return fmt.Sprintf("Express Route Circuit (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_expressroutecircuit_test.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_expressroutecircuit_test.go deleted file mode 100644 index cdb083b9f85..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/id_expressroutecircuit_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -func TestNewExpressRouteCircuitID(t *testing.T) { - id := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } -} - -func TestFormatExpressRouteCircuitID(t *testing.T) { - actual := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCircuitID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestParseExpressRouteCircuitIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestSegmentsForExpressRouteCircuitId(t *testing.T) { - segments := ExpressRouteCircuitId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCircuitId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_createorupdate.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_createorupdate.go deleted file mode 100644 index c92e38b0d99..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context.Context, id AuthorizationId, input ExpressRouteCircuitAuthorization) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateThenPoll(ctx context.Context, id AuthorizationId, input ExpressRouteCircuitAuthorization) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_delete.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_delete.go deleted file mode 100644 index b2c01bb7f11..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context, id AuthorizationId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCircuitAuthorizationsClient) DeleteThenPoll(ctx context.Context, id AuthorizationId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_get.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_get.go deleted file mode 100644 index eceb10caf72..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitAuthorization -} - -// Get ... -func (c ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, id AuthorizationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_list.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_list.go deleted file mode 100644 index 6c95caf99fb..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressroutecircuitauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuitAuthorization -} - -type ListCompleteResult struct { - Items []ExpressRouteCircuitAuthorization -} - -// List ... -func (c ExpressRouteCircuitAuthorizationsClient) List(ctx context.Context, id ExpressRouteCircuitId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/authorizations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuitAuthorization `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCircuitAuthorizationsClient) ListComplete(ctx context.Context, id ExpressRouteCircuitId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitAuthorizationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitAuthorizationsClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRouteCircuitId, predicate ExpressRouteCircuitAuthorizationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCircuitAuthorization, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/model_authorizationpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/model_authorizationpropertiesformat.go deleted file mode 100644 index e3d3f2bdb8d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/model_authorizationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutecircuitauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthorizationPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - AuthorizationUseStatus *AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/model_expressroutecircuitauthorization.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/model_expressroutecircuitauthorization.go deleted file mode 100644 index b4b084362fc..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/model_expressroutecircuitauthorization.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitAuthorization struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AuthorizationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/predicates.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/predicates.go deleted file mode 100644 index 3533e80a13e..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressroutecircuitauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitAuthorizationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ExpressRouteCircuitAuthorizationOperationPredicate) Matches(input ExpressRouteCircuitAuthorization) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/version.go b/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/version.go deleted file mode 100644 index 28863944cff..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitauthorizations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitauthorizations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitauthorizations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/README.md b/resource-manager/network/2022-11-01/expressroutecircuitconnections/README.md deleted file mode 100644 index 3323f21b191..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitconnections` Documentation - -The `expressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitconnections" -``` - - -### Client Initialization - -```go -client := expressroutecircuitconnections.NewExpressRouteCircuitConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecircuitconnections.NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue") - -payload := expressroutecircuitconnections.ExpressRouteCircuitConnection{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecircuitconnections.NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitConnectionsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecircuitconnections.NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitConnectionsClient.List` - -```go -ctx := context.TODO() -id := expressroutecircuitconnections.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/client.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/client.go deleted file mode 100644 index 0fc743a7f46..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitConnectionsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitConnectionsClient: %+v", err) - } - - return &ExpressRouteCircuitConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/constants.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/constants.go deleted file mode 100644 index 8bfeb3344f9..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/constants.go +++ /dev/null @@ -1,101 +0,0 @@ -package expressroutecircuitconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/id_peeringconnection.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/id_peeringconnection.go deleted file mode 100644 index 4bdac2a095a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/id_peeringconnection.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecircuitconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringConnectionId{} - -// PeeringConnectionId is a struct representing the Resource ID for a Peering Connection -type PeeringConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - ConnectionName string -} - -// NewPeeringConnectionID returns a new PeeringConnectionId struct -func NewPeeringConnectionID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, connectionName string) PeeringConnectionId { - return PeeringConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - ConnectionName: connectionName, - } -} - -// ParsePeeringConnectionID parses 'input' into a PeeringConnectionId -func ParsePeeringConnectionID(input string) (*PeeringConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ParsePeeringConnectionIDInsensitively parses 'input' case-insensitively into a PeeringConnectionId -// note: this method should only be used for API response data and not user input -func ParsePeeringConnectionIDInsensitively(input string) (*PeeringConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringConnectionID checks that 'input' can be parsed as a Peering Connection ID -func ValidatePeeringConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering Connection ID -func (id PeeringConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/connections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.ConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering Connection ID -func (id PeeringConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticConnections", "connections", "connections"), - resourceids.UserSpecifiedSegment("connectionName", "connectionValue"), - } -} - -// String returns a human-readable description of this Peering Connection ID -func (id PeeringConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Connection Name: %q", id.ConnectionName), - } - return fmt.Sprintf("Peering Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/id_peeringconnection_test.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/id_peeringconnection_test.go deleted file mode 100644 index 478f263c359..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/id_peeringconnection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecircuitconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringConnectionId{} - -func TestNewPeeringConnectionID(t *testing.T) { - id := NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.ConnectionName != "connectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectionName'", id.ConnectionName, "connectionValue") - } -} - -func TestFormatPeeringConnectionID(t *testing.T) { - actual := NewPeeringConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "connectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue", - Expected: &PeeringConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestParsePeeringConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/cOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue", - Expected: &PeeringConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/connections/connectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/cOnNeCtIoNs/cOnNeCtIoNvAlUe", - Expected: &PeeringConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - ConnectionName: "cOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/cOnNeCtIoNs/cOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestSegmentsForPeeringConnectionId(t *testing.T) { - segments := PeeringConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_createorupdate.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_createorupdate.go deleted file mode 100644 index b06791a5b4e..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutecircuitconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Context, id PeeringConnectionId, input ExpressRouteCircuitConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCircuitConnectionsClient) CreateOrUpdateThenPoll(ctx context.Context, id PeeringConnectionId, input ExpressRouteCircuitConnection) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_delete.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_delete.go deleted file mode 100644 index 1d813338ead..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutecircuitconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, id PeeringConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCircuitConnectionsClient) DeleteThenPoll(ctx context.Context, id PeeringConnectionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_get.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_get.go deleted file mode 100644 index daae7f42996..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecircuitconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitConnection -} - -// Get ... -func (c ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id PeeringConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_list.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_list.go deleted file mode 100644 index 53452b0dcdd..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecircuitconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuitConnection -} - -type ListCompleteResult struct { - Items []ExpressRouteCircuitConnection -} - -// List ... -func (c ExpressRouteCircuitConnectionsClient) List(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/connections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuitConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId, predicate ExpressRouteCircuitConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCircuitConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_expressroutecircuitconnection.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_expressroutecircuitconnection.go deleted file mode 100644 index 689bf9a8e12..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_expressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_expressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_expressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index a1bf981acf3..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_expressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_ipv6circuitconnectionconfig.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_ipv6circuitconnectionconfig.go deleted file mode 100644 index 580b8a8dcd7..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_ipv6circuitconnectionconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6CircuitConnectionConfig struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_subresource.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_subresource.go deleted file mode 100644 index d6673ed96dc..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/predicates.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/predicates.go deleted file mode 100644 index 6c65b4df05d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ExpressRouteCircuitConnectionOperationPredicate) Matches(input ExpressRouteCircuitConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitconnections/version.go b/resource-manager/network/2022-11-01/expressroutecircuitconnections/version.go deleted file mode 100644 index 560cf4f5914..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/README.md b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/README.md deleted file mode 100644 index 6f886b69739..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitpeerings` Documentation - -The `expressroutecircuitpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitpeerings" -``` - - -### Client Initialization - -```go -client := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitPeeringsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -payload := expressroutecircuitpeerings.ExpressRouteCircuitPeering{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitPeeringsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitPeeringsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecircuitpeerings.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitPeeringsClient.List` - -```go -ctx := context.TODO() -id := expressroutecircuitpeerings.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/client.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/client.go deleted file mode 100644 index 3d549f1e88d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitPeeringsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitpeerings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitPeeringsClient: %+v", err) - } - - return &ExpressRouteCircuitPeeringsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/constants.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/constants.go deleted file mode 100644 index 98d21da2c70..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/constants.go +++ /dev/null @@ -1,274 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/id_expressroutecircuit.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/id_expressroutecircuit.go deleted file mode 100644 index 80bd7e639d7..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/id_expressroutecircuit.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -// ExpressRouteCircuitId is a struct representing the Resource ID for a Express Route Circuit -type ExpressRouteCircuitId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string -} - -// NewExpressRouteCircuitID returns a new ExpressRouteCircuitId struct -func NewExpressRouteCircuitID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string) ExpressRouteCircuitId { - return ExpressRouteCircuitId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - } -} - -// ParseExpressRouteCircuitID parses 'input' into a ExpressRouteCircuitId -func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCircuitIDInsensitively parses 'input' case-insensitively into a ExpressRouteCircuitId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID -func ValidateExpressRouteCircuitID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCircuitID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Circuit ID -func (id ExpressRouteCircuitId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Circuit ID -func (id ExpressRouteCircuitId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - } -} - -// String returns a human-readable description of this Express Route Circuit ID -func (id ExpressRouteCircuitId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - } - return fmt.Sprintf("Express Route Circuit (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/id_expressroutecircuit_test.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/id_expressroutecircuit_test.go deleted file mode 100644 index a251772566c..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/id_expressroutecircuit_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -func TestNewExpressRouteCircuitID(t *testing.T) { - id := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } -} - -func TestFormatExpressRouteCircuitID(t *testing.T) { - actual := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCircuitID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestParseExpressRouteCircuitIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestSegmentsForExpressRouteCircuitId(t *testing.T) { - segments := ExpressRouteCircuitId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCircuitId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_createorupdate.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_createorupdate.go deleted file mode 100644 index 9fd584ff838..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId, input ExpressRouteCircuitPeering) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCircuitPeeringsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId, input ExpressRouteCircuitPeering) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_delete.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_delete.go deleted file mode 100644 index 241c45fa414..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCircuitPeeringsClient) DeleteThenPoll(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_get.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_get.go deleted file mode 100644 index 0a712bb204d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_get.go +++ /dev/null @@ -1,52 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitPeering -} - -// Get ... -func (c ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_list.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_list.go deleted file mode 100644 index 928c768cf49..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressroutecircuitpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuitPeering -} - -type ListCompleteResult struct { - Items []ExpressRouteCircuitPeering -} - -// List ... -func (c ExpressRouteCircuitPeeringsClient) List(ctx context.Context, id ExpressRouteCircuitId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/peerings", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuitPeering `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCircuitPeeringsClient) ListComplete(ctx context.Context, id ExpressRouteCircuitId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitPeeringOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitPeeringsClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRouteCircuitId, predicate ExpressRouteCircuitPeeringOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCircuitPeering, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitconnection.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitconnection.go deleted file mode 100644 index f0bf62174ce..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index f89ab3b51e4..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeering.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeering.go deleted file mode 100644 index 5e47a7f0266..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 67b575213fe..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringpropertiesformat.go deleted file mode 100644 index a54ef389df4..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitpeeringpropertiesformat.go +++ /dev/null @@ -1,27 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringPropertiesFormat struct { - AzureASN *int64 `json:"azureASN,omitempty"` - Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` - ExpressRouteConnection *ExpressRouteConnectionId `json:"expressRouteConnection,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitstats.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitstats.go deleted file mode 100644 index 8239e6299db..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressroutecircuitstats.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStats struct { - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressrouteconnectionid.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressrouteconnectionid.go deleted file mode 100644 index f06a355d7fa..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_expressrouteconnectionid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_ipv6circuitconnectionconfig.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_ipv6circuitconnectionconfig.go deleted file mode 100644 index ae00db3c45c..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_ipv6circuitconnectionconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6CircuitConnectionConfig struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index 93ee020eec6..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnection.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnection.go deleted file mode 100644 index bc9218f9280..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index 72eba9f327f..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_peerexpressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthResourceGuid *string `json:"authResourceGuid,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ConnectionName *string `json:"connectionName,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_subresource.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_subresource.go deleted file mode 100644 index 3143d87b0ee..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/predicates.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/predicates.go deleted file mode 100644 index 1e725c4e63a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressroutecircuitpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ExpressRouteCircuitPeeringOperationPredicate) Matches(input ExpressRouteCircuitPeering) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/version.go b/resource-manager/network/2022-11-01/expressroutecircuitpeerings/version.go deleted file mode 100644 index e7a825daed0..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitpeerings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitpeerings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitpeerings/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/README.md b/resource-manager/network/2022-11-01/expressroutecircuitroutestable/README.md deleted file mode 100644 index def35fe5899..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitroutestable` Documentation - -The `expressroutecircuitroutestable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitroutestable" -``` - - -### Client Initialization - -```go -client := expressroutecircuitroutestable.NewExpressRouteCircuitRoutesTableClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitRoutesTableClient.ExpressRouteCircuitsListRoutesTable` - -```go -ctx := context.TODO() -id := expressroutecircuitroutestable.NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue") - -if err := client.ExpressRouteCircuitsListRoutesTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/client.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestable/client.go deleted file mode 100644 index 4122036f496..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitroutestable - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTableClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitRoutesTableClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitRoutesTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitroutestable", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableClient: %+v", err) - } - - return &ExpressRouteCircuitRoutesTableClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/id_peeringroutetable.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestable/id_peeringroutetable.go deleted file mode 100644 index b383a1c57d2..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/id_peeringroutetable.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecircuitroutestable - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringRouteTableId{} - -// PeeringRouteTableId is a struct representing the Resource ID for a Peering Route Table -type PeeringRouteTableId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - RouteTableName string -} - -// NewPeeringRouteTableID returns a new PeeringRouteTableId struct -func NewPeeringRouteTableID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, routeTableName string) PeeringRouteTableId { - return PeeringRouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - RouteTableName: routeTableName, - } -} - -// ParsePeeringRouteTableID parses 'input' into a PeeringRouteTableId -func ParsePeeringRouteTableID(input string) (*PeeringRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringRouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParsePeeringRouteTableIDInsensitively parses 'input' case-insensitively into a PeeringRouteTableId -// note: this method should only be used for API response data and not user input -func ParsePeeringRouteTableIDInsensitively(input string) (*PeeringRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringRouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringRouteTableID checks that 'input' can be parsed as a Peering Route Table ID -func ValidatePeeringRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering Route Table ID -func (id PeeringRouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering Route Table ID -func (id PeeringRouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Peering Route Table ID -func (id PeeringRouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Peering Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/id_peeringroutetable_test.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestable/id_peeringroutetable_test.go deleted file mode 100644 index 64f99c70086..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/id_peeringroutetable_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecircuitroutestable - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringRouteTableId{} - -func TestNewPeeringRouteTableID(t *testing.T) { - id := NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatPeeringRouteTableID(t *testing.T) { - actual := NewPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue", - Expected: &PeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParsePeeringRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue", - Expected: &PeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &PeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForPeeringRouteTableId(t *testing.T) { - segments := PeeringRouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringRouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go deleted file mode 100644 index e407449341a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/method_expressroutecircuitslistroutestable.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecircuitroutestable - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsListRoutesTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCircuitsListRoutesTable ... -func (c ExpressRouteCircuitRoutesTableClient) ExpressRouteCircuitsListRoutesTable(ctx context.Context, id PeeringRouteTableId) (result ExpressRouteCircuitsListRoutesTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCircuitsListRoutesTableThenPoll performs ExpressRouteCircuitsListRoutesTable then polls until it's completed -func (c ExpressRouteCircuitRoutesTableClient) ExpressRouteCircuitsListRoutesTableThenPoll(ctx context.Context, id PeeringRouteTableId) error { - result, err := c.ExpressRouteCircuitsListRoutesTable(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCircuitsListRoutesTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCircuitsListRoutesTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/model_expressroutecircuitroutestable.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestable/model_expressroutecircuitroutestable.go deleted file mode 100644 index d70d9310d29..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/model_expressroutecircuitroutestable.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitroutestable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTable struct { - LocPrf *string `json:"locPrf,omitempty"` - Network *string `json:"network,omitempty"` - NextHop *string `json:"nextHop,omitempty"` - Path *string `json:"path,omitempty"` - Weight *int64 `json:"weight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index 7ff773de0b1..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/version.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestable/version.go deleted file mode 100644 index 9f4b0b9654f..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestable/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitroutestable - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestable/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/README.md b/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/README.md deleted file mode 100644 index a4347fb44a7..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary` Documentation - -The `expressroutecircuitroutestablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary" -``` - - -### Client Initialization - -```go -client := expressroutecircuitroutestablesummary.NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitRoutesTableSummaryClient.ExpressRouteCircuitsListRoutesTableSummary` - -```go -ctx := context.TODO() -id := expressroutecircuitroutestablesummary.NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue") - -if err := client.ExpressRouteCircuitsListRoutesTableSummaryThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/client.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/client.go deleted file mode 100644 index 93516365ad8..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitroutestablesummary - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTableSummaryClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitRoutesTableSummaryClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitRoutesTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitroutestablesummary", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitRoutesTableSummaryClient: %+v", err) - } - - return &ExpressRouteCircuitRoutesTableSummaryClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/id_routetablessummary.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/id_routetablessummary.go deleted file mode 100644 index 1cbf9698584..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/id_routetablessummary.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecircuitroutestablesummary - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTablesSummaryId{} - -// RouteTablesSummaryId is a struct representing the Resource ID for a Route Tables Summary -type RouteTablesSummaryId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - RouteTablesSummaryName string -} - -// NewRouteTablesSummaryID returns a new RouteTablesSummaryId struct -func NewRouteTablesSummaryID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, routeTablesSummaryName string) RouteTablesSummaryId { - return RouteTablesSummaryId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - RouteTablesSummaryName: routeTablesSummaryName, - } -} - -// ParseRouteTablesSummaryID parses 'input' into a RouteTablesSummaryId -func ParseRouteTablesSummaryID(input string) (*RouteTablesSummaryId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTablesSummaryId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) - } - - return &id, nil -} - -// ParseRouteTablesSummaryIDInsensitively parses 'input' case-insensitively into a RouteTablesSummaryId -// note: this method should only be used for API response data and not user input -func ParseRouteTablesSummaryIDInsensitively(input string) (*RouteTablesSummaryId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTablesSummaryId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) - } - - return &id, nil -} - -// ValidateRouteTablesSummaryID checks that 'input' can be parsed as a Route Tables Summary ID -func ValidateRouteTablesSummaryID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteTablesSummaryID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Tables Summary ID -func (id RouteTablesSummaryId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/routeTablesSummary/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.RouteTablesSummaryName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Tables Summary ID -func (id RouteTablesSummaryId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticRouteTablesSummary", "routeTablesSummary", "routeTablesSummary"), - resourceids.UserSpecifiedSegment("routeTablesSummaryName", "routeTablesSummaryValue"), - } -} - -// String returns a human-readable description of this Route Tables Summary ID -func (id RouteTablesSummaryId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Route Tables Summary Name: %q", id.RouteTablesSummaryName), - } - return fmt.Sprintf("Route Tables Summary (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/id_routetablessummary_test.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/id_routetablessummary_test.go deleted file mode 100644 index b8df970cca2..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/id_routetablessummary_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecircuitroutestablesummary - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTablesSummaryId{} - -func TestNewRouteTablesSummaryID(t *testing.T) { - id := NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.RouteTablesSummaryName != "routeTablesSummaryValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTablesSummaryName'", id.RouteTablesSummaryName, "routeTablesSummaryValue") - } -} - -func TestFormatRouteTablesSummaryID(t *testing.T) { - actual := NewRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "routeTablesSummaryValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteTablesSummaryID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTablesSummaryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue", - Expected: &RouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - RouteTablesSummaryName: "routeTablesSummaryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTablesSummaryID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTablesSummaryName != v.Expected.RouteTablesSummaryName { - t.Fatalf("Expected %q but got %q for RouteTablesSummaryName", v.Expected.RouteTablesSummaryName, actual.RouteTablesSummaryName) - } - - } -} - -func TestParseRouteTablesSummaryIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTablesSummaryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue", - Expected: &RouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - RouteTablesSummaryName: "routeTablesSummaryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY/rOuTeTaBlEsSuMmArYvAlUe", - Expected: &RouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - RouteTablesSummaryName: "rOuTeTaBlEsSuMmArYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY/rOuTeTaBlEsSuMmArYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTablesSummaryIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTablesSummaryName != v.Expected.RouteTablesSummaryName { - t.Fatalf("Expected %q but got %q for RouteTablesSummaryName", v.Expected.RouteTablesSummaryName, actual.RouteTablesSummaryName) - } - - } -} - -func TestSegmentsForRouteTablesSummaryId(t *testing.T) { - segments := RouteTablesSummaryId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteTablesSummaryId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go deleted file mode 100644 index e40aa5c5c09..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/method_expressroutecircuitslistroutestablesummary.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecircuitroutestablesummary - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsListRoutesTableSummaryOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCircuitsListRoutesTableSummary ... -func (c ExpressRouteCircuitRoutesTableSummaryClient) ExpressRouteCircuitsListRoutesTableSummary(ctx context.Context, id RouteTablesSummaryId) (result ExpressRouteCircuitsListRoutesTableSummaryOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCircuitsListRoutesTableSummaryThenPoll performs ExpressRouteCircuitsListRoutesTableSummary then polls until it's completed -func (c ExpressRouteCircuitRoutesTableSummaryClient) ExpressRouteCircuitsListRoutesTableSummaryThenPoll(ctx context.Context, id RouteTablesSummaryId) error { - result, err := c.ExpressRouteCircuitsListRoutesTableSummary(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCircuitsListRoutesTableSummary: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCircuitsListRoutesTableSummary: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/model_expressroutecircuitroutestablesummary.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/model_expressroutecircuitroutestablesummary.go deleted file mode 100644 index 926fc450623..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/model_expressroutecircuitroutestablesummary.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitroutestablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTableSummary struct { - As *int64 `json:"as,omitempty"` - Neighbor *string `json:"neighbor,omitempty"` - StatePfxRcd *string `json:"statePfxRcd,omitempty"` - UpDown *string `json:"upDown,omitempty"` - V *int64 `json:"v,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go deleted file mode 100644 index 819e27f860b..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/model_expressroutecircuitsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuitroutestablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/version.go b/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/version.go deleted file mode 100644 index ef3a7a94853..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitroutestablesummary/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitroutestablesummary - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitroutestablesummary/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/README.md b/resource-manager/network/2022-11-01/expressroutecircuits/README.md deleted file mode 100644 index 82ae463e7b0..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuits` Documentation - -The `expressroutecircuits` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuits" -``` - - -### Client Initialization - -```go -client := expressroutecircuits.NewExpressRouteCircuitsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -payload := expressroutecircuits.ExpressRouteCircuit{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.List` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.ListAll` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRouteCircuitsClient.UpdateTags` - -```go -ctx := context.TODO() -id := expressroutecircuits.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -payload := expressroutecircuits.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/client.go b/resource-manager/network/2022-11-01/expressroutecircuits/client.go deleted file mode 100644 index 380fde4f56c..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuits - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuits", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitsClient: %+v", err) - } - - return &ExpressRouteCircuitsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/constants.go b/resource-manager/network/2022-11-01/expressroutecircuits/constants.go deleted file mode 100644 index 017902fa091..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/constants.go +++ /dev/null @@ -1,450 +0,0 @@ -package expressroutecircuits - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthorizationUseStatus string - -const ( - AuthorizationUseStatusAvailable AuthorizationUseStatus = "Available" - AuthorizationUseStatusInUse AuthorizationUseStatus = "InUse" -) - -func PossibleValuesForAuthorizationUseStatus() []string { - return []string{ - string(AuthorizationUseStatusAvailable), - string(AuthorizationUseStatusInUse), - } -} - -func (s *AuthorizationUseStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthorizationUseStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthorizationUseStatus(input string) (*AuthorizationUseStatus, error) { - vals := map[string]AuthorizationUseStatus{ - "available": AuthorizationUseStatusAvailable, - "inuse": AuthorizationUseStatusInUse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthorizationUseStatus(input) - return &out, nil -} - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRouteCircuitSkuFamily string - -const ( - ExpressRouteCircuitSkuFamilyMeteredData ExpressRouteCircuitSkuFamily = "MeteredData" - ExpressRouteCircuitSkuFamilyUnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData" -) - -func PossibleValuesForExpressRouteCircuitSkuFamily() []string { - return []string{ - string(ExpressRouteCircuitSkuFamilyMeteredData), - string(ExpressRouteCircuitSkuFamilyUnlimitedData), - } -} - -func (s *ExpressRouteCircuitSkuFamily) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitSkuFamily(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitSkuFamily(input string) (*ExpressRouteCircuitSkuFamily, error) { - vals := map[string]ExpressRouteCircuitSkuFamily{ - "metereddata": ExpressRouteCircuitSkuFamilyMeteredData, - "unlimiteddata": ExpressRouteCircuitSkuFamilyUnlimitedData, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitSkuFamily(input) - return &out, nil -} - -type ExpressRouteCircuitSkuTier string - -const ( - ExpressRouteCircuitSkuTierBasic ExpressRouteCircuitSkuTier = "Basic" - ExpressRouteCircuitSkuTierLocal ExpressRouteCircuitSkuTier = "Local" - ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" - ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard" -) - -func PossibleValuesForExpressRouteCircuitSkuTier() []string { - return []string{ - string(ExpressRouteCircuitSkuTierBasic), - string(ExpressRouteCircuitSkuTierLocal), - string(ExpressRouteCircuitSkuTierPremium), - string(ExpressRouteCircuitSkuTierStandard), - } -} - -func (s *ExpressRouteCircuitSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitSkuTier(input string) (*ExpressRouteCircuitSkuTier, error) { - vals := map[string]ExpressRouteCircuitSkuTier{ - "basic": ExpressRouteCircuitSkuTierBasic, - "local": ExpressRouteCircuitSkuTierLocal, - "premium": ExpressRouteCircuitSkuTierPremium, - "standard": ExpressRouteCircuitSkuTierStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitSkuTier(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type ServiceProviderProvisioningState string - -const ( - ServiceProviderProvisioningStateDeprovisioning ServiceProviderProvisioningState = "Deprovisioning" - ServiceProviderProvisioningStateNotProvisioned ServiceProviderProvisioningState = "NotProvisioned" - ServiceProviderProvisioningStateProvisioned ServiceProviderProvisioningState = "Provisioned" - ServiceProviderProvisioningStateProvisioning ServiceProviderProvisioningState = "Provisioning" -) - -func PossibleValuesForServiceProviderProvisioningState() []string { - return []string{ - string(ServiceProviderProvisioningStateDeprovisioning), - string(ServiceProviderProvisioningStateNotProvisioned), - string(ServiceProviderProvisioningStateProvisioned), - string(ServiceProviderProvisioningStateProvisioning), - } -} - -func (s *ServiceProviderProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServiceProviderProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServiceProviderProvisioningState(input string) (*ServiceProviderProvisioningState, error) { - vals := map[string]ServiceProviderProvisioningState{ - "deprovisioning": ServiceProviderProvisioningStateDeprovisioning, - "notprovisioned": ServiceProviderProvisioningStateNotProvisioned, - "provisioned": ServiceProviderProvisioningStateProvisioned, - "provisioning": ServiceProviderProvisioningStateProvisioning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServiceProviderProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/id_expressroutecircuit.go b/resource-manager/network/2022-11-01/expressroutecircuits/id_expressroutecircuit.go deleted file mode 100644 index 76f0cad7940..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/id_expressroutecircuit.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecircuits - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -// ExpressRouteCircuitId is a struct representing the Resource ID for a Express Route Circuit -type ExpressRouteCircuitId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string -} - -// NewExpressRouteCircuitID returns a new ExpressRouteCircuitId struct -func NewExpressRouteCircuitID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string) ExpressRouteCircuitId { - return ExpressRouteCircuitId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - } -} - -// ParseExpressRouteCircuitID parses 'input' into a ExpressRouteCircuitId -func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCircuitIDInsensitively parses 'input' case-insensitively into a ExpressRouteCircuitId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID -func ValidateExpressRouteCircuitID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCircuitID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Circuit ID -func (id ExpressRouteCircuitId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Circuit ID -func (id ExpressRouteCircuitId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - } -} - -// String returns a human-readable description of this Express Route Circuit ID -func (id ExpressRouteCircuitId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - } - return fmt.Sprintf("Express Route Circuit (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/id_expressroutecircuit_test.go b/resource-manager/network/2022-11-01/expressroutecircuits/id_expressroutecircuit_test.go deleted file mode 100644 index 67044c85345..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/id_expressroutecircuit_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecircuits - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -func TestNewExpressRouteCircuitID(t *testing.T) { - id := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } -} - -func TestFormatExpressRouteCircuitID(t *testing.T) { - actual := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCircuitID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestParseExpressRouteCircuitIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestSegmentsForExpressRouteCircuitId(t *testing.T) { - segments := ExpressRouteCircuitId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCircuitId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/method_createorupdate.go b/resource-manager/network/2022-11-01/expressroutecircuits/method_createorupdate.go deleted file mode 100644 index 4463c162391..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, id ExpressRouteCircuitId, input ExpressRouteCircuit) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCircuitsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRouteCircuitId, input ExpressRouteCircuit) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/method_delete.go b/resource-manager/network/2022-11-01/expressroutecircuits/method_delete.go deleted file mode 100644 index 91f8aa53bed..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCircuitsClient) Delete(ctx context.Context, id ExpressRouteCircuitId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCircuitsClient) DeleteThenPoll(ctx context.Context, id ExpressRouteCircuitId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/method_get.go b/resource-manager/network/2022-11-01/expressroutecircuits/method_get.go deleted file mode 100644 index 2e4d336e70b..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuit -} - -// Get ... -func (c ExpressRouteCircuitsClient) Get(ctx context.Context, id ExpressRouteCircuitId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/method_list.go b/resource-manager/network/2022-11-01/expressroutecircuits/method_list.go deleted file mode 100644 index 0f3277d1d26..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuit -} - -type ListCompleteResult struct { - Items []ExpressRouteCircuit -} - -// List ... -func (c ExpressRouteCircuitsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteCircuits", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuit `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCircuitsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ExpressRouteCircuitOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCircuit, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/method_listall.go b/resource-manager/network/2022-11-01/expressroutecircuits/method_listall.go deleted file mode 100644 index 1689bd19cae..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCircuit -} - -type ListAllCompleteResult struct { - Items []ExpressRouteCircuit -} - -// ListAll ... -func (c ExpressRouteCircuitsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteCircuits", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCircuit `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c ExpressRouteCircuitsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, ExpressRouteCircuitOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCircuitsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRouteCircuitOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]ExpressRouteCircuit, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/method_updatetags.go b/resource-manager/network/2022-11-01/expressroutecircuits/method_updatetags.go deleted file mode 100644 index 6e2d55efeb4..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package expressroutecircuits - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuit -} - -// UpdateTags ... -func (c ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, id ExpressRouteCircuitId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_authorizationpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_authorizationpropertiesformat.go deleted file mode 100644 index a539b0f44a2..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_authorizationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthorizationPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - AuthorizationUseStatus *AuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuit.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuit.go deleted file mode 100644 index a74493fcec8..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuit.go +++ /dev/null @@ -1,15 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuit struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitPropertiesFormat `json:"properties,omitempty"` - Sku *ExpressRouteCircuitSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitauthorization.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitauthorization.go deleted file mode 100644 index 2942811a91c..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitauthorization.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitAuthorization struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AuthorizationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitconnection.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitconnection.go deleted file mode 100644 index 901ef503724..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index 897f772964a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeering.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeering.go deleted file mode 100644 index d7431190482..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 836b1d5e963..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeeringpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeeringpropertiesformat.go deleted file mode 100644 index 87a88e75638..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpeeringpropertiesformat.go +++ /dev/null @@ -1,27 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringPropertiesFormat struct { - AzureASN *int64 `json:"azureASN,omitempty"` - Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` - ExpressRouteConnection *ExpressRouteConnectionId `json:"expressRouteConnection,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpropertiesformat.go deleted file mode 100644 index 89faee5aa48..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitpropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPropertiesFormat struct { - AllowClassicOperations *bool `json:"allowClassicOperations,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - AuthorizationStatus *string `json:"authorizationStatus,omitempty"` - Authorizations *[]ExpressRouteCircuitAuthorization `json:"authorizations,omitempty"` - BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"` - CircuitProvisioningState *string `json:"circuitProvisioningState,omitempty"` - ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"` - Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceKey *string `json:"serviceKey,omitempty"` - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"` - ServiceProviderProvisioningState *ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` - Stag *int64 `json:"stag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitserviceproviderproperties.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitserviceproviderproperties.go deleted file mode 100644 index 432cdaf5a4a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitserviceproviderproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitServiceProviderProperties struct { - BandwidthInMbps *int64 `json:"bandwidthInMbps,omitempty"` - PeeringLocation *string `json:"peeringLocation,omitempty"` - ServiceProviderName *string `json:"serviceProviderName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitsku.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitsku.go deleted file mode 100644 index 186629b51a6..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitsku.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitSku struct { - Family *ExpressRouteCircuitSkuFamily `json:"family,omitempty"` - Name *string `json:"name,omitempty"` - Tier *ExpressRouteCircuitSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitstats.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitstats.go deleted file mode 100644 index ca8cd2c52bc..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressroutecircuitstats.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStats struct { - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressrouteconnectionid.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_expressrouteconnectionid.go deleted file mode 100644 index 70b79aa3ec7..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_expressrouteconnectionid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_ipv6circuitconnectionconfig.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_ipv6circuitconnectionconfig.go deleted file mode 100644 index 49a42177273..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_ipv6circuitconnectionconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6CircuitConnectionConfig struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index 02e4a94b316..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_peerexpressroutecircuitconnection.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_peerexpressroutecircuitconnection.go deleted file mode 100644 index e52a6b6f8c3..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_peerexpressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_peerexpressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_peerexpressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index 804baee319a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_peerexpressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthResourceGuid *string `json:"authResourceGuid,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ConnectionName *string `json:"connectionName,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_subresource.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_subresource.go deleted file mode 100644 index daf852a98a9..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/model_tagsobject.go b/resource-manager/network/2022-11-01/expressroutecircuits/model_tagsobject.go deleted file mode 100644 index 585eaaba376..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/predicates.go b/resource-manager/network/2022-11-01/expressroutecircuits/predicates.go deleted file mode 100644 index 3fdbc040dbf..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package expressroutecircuits - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRouteCircuitOperationPredicate) Matches(input ExpressRouteCircuit) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuits/version.go b/resource-manager/network/2022-11-01/expressroutecircuits/version.go deleted file mode 100644 index 8752a84a143..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuits/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuits - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuits/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitstats/README.md b/resource-manager/network/2022-11-01/expressroutecircuitstats/README.md deleted file mode 100644 index 593ca97dfb8..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitstats/README.md +++ /dev/null @@ -1,52 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitstats` Documentation - -The `expressroutecircuitstats` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecircuitstats" -``` - - -### Client Initialization - -```go -client := expressroutecircuitstats.NewExpressRouteCircuitStatsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCircuitStatsClient.ExpressRouteCircuitsGetPeeringStats` - -```go -ctx := context.TODO() -id := expressroutecircuitstats.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -read, err := client.ExpressRouteCircuitsGetPeeringStats(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCircuitStatsClient.ExpressRouteCircuitsGetStats` - -```go -ctx := context.TODO() -id := expressroutecircuitstats.NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - -read, err := client.ExpressRouteCircuitsGetStats(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecircuitstats/client.go b/resource-manager/network/2022-11-01/expressroutecircuitstats/client.go deleted file mode 100644 index 1ccb263389c..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitstats/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecircuitstats - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStatsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCircuitStatsClientWithBaseURI(api environments.Api) (*ExpressRouteCircuitStatsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecircuitstats", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCircuitStatsClient: %+v", err) - } - - return &ExpressRouteCircuitStatsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitstats/id_expressroutecircuit.go b/resource-manager/network/2022-11-01/expressroutecircuitstats/id_expressroutecircuit.go deleted file mode 100644 index 8f5bdbd93bb..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitstats/id_expressroutecircuit.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecircuitstats - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -// ExpressRouteCircuitId is a struct representing the Resource ID for a Express Route Circuit -type ExpressRouteCircuitId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string -} - -// NewExpressRouteCircuitID returns a new ExpressRouteCircuitId struct -func NewExpressRouteCircuitID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string) ExpressRouteCircuitId { - return ExpressRouteCircuitId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - } -} - -// ParseExpressRouteCircuitID parses 'input' into a ExpressRouteCircuitId -func ParseExpressRouteCircuitID(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCircuitIDInsensitively parses 'input' case-insensitively into a ExpressRouteCircuitId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCircuitIDInsensitively(input string) (*ExpressRouteCircuitId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCircuitId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCircuitId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCircuitID checks that 'input' can be parsed as a Express Route Circuit ID -func ValidateExpressRouteCircuitID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCircuitID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Circuit ID -func (id ExpressRouteCircuitId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Circuit ID -func (id ExpressRouteCircuitId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - } -} - -// String returns a human-readable description of this Express Route Circuit ID -func (id ExpressRouteCircuitId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - } - return fmt.Sprintf("Express Route Circuit (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitstats/id_expressroutecircuit_test.go b/resource-manager/network/2022-11-01/expressroutecircuitstats/id_expressroutecircuit_test.go deleted file mode 100644 index f38835e049b..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitstats/id_expressroutecircuit_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecircuitstats - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCircuitId{} - -func TestNewExpressRouteCircuitID(t *testing.T) { - id := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } -} - -func TestFormatExpressRouteCircuitID(t *testing.T) { - actual := NewExpressRouteCircuitID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCircuitID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestParseExpressRouteCircuitIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCircuitId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Expected: &ExpressRouteCircuitId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCircuitIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - } -} - -func TestSegmentsForExpressRouteCircuitId(t *testing.T) { - segments := ExpressRouteCircuitId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCircuitId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go b/resource-manager/network/2022-11-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go deleted file mode 100644 index 7ebebe12324..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitstats/method_expressroutecircuitsgetpeeringstats.go +++ /dev/null @@ -1,53 +0,0 @@ -package expressroutecircuitstats - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsGetPeeringStatsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitStats -} - -// ExpressRouteCircuitsGetPeeringStats ... -func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetPeeringStats(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result ExpressRouteCircuitsGetPeeringStatsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/stats", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go b/resource-manager/network/2022-11-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go deleted file mode 100644 index 95301a45517..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitstats/method_expressroutecircuitsgetstats.go +++ /dev/null @@ -1,52 +0,0 @@ -package expressroutecircuitstats - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsGetStatsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCircuitStats -} - -// ExpressRouteCircuitsGetStats ... -func (c ExpressRouteCircuitStatsClient) ExpressRouteCircuitsGetStats(ctx context.Context, id ExpressRouteCircuitId) (result ExpressRouteCircuitsGetStatsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/stats", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitstats/model_expressroutecircuitstats.go b/resource-manager/network/2022-11-01/expressroutecircuitstats/model_expressroutecircuitstats.go deleted file mode 100644 index f93c0daeba8..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitstats/model_expressroutecircuitstats.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecircuitstats - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStats struct { - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecircuitstats/version.go b/resource-manager/network/2022-11-01/expressroutecircuitstats/version.go deleted file mode 100644 index 61fbff3cccb..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecircuitstats/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecircuitstats - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecircuitstats/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/README.md b/resource-manager/network/2022-11-01/expressrouteconnections/README.md deleted file mode 100644 index 457e637af69..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/README.md +++ /dev/null @@ -1,81 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteconnections` Documentation - -The `expressrouteconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteconnections" -``` - - -### Client Initialization - -```go -client := expressrouteconnections.NewExpressRouteConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressrouteconnections.NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue") - -payload := expressrouteconnections.ExpressRouteConnection{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := expressrouteconnections.NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteConnectionsClient.Get` - -```go -ctx := context.TODO() -id := expressrouteconnections.NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteConnectionsClient.List` - -```go -ctx := context.TODO() -id := expressrouteconnections.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/client.go b/resource-manager/network/2022-11-01/expressrouteconnections/client.go deleted file mode 100644 index 9fb5bde933b..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteConnectionsClientWithBaseURI(api environments.Api) (*ExpressRouteConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteConnectionsClient: %+v", err) - } - - return &ExpressRouteConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/constants.go b/resource-manager/network/2022-11-01/expressrouteconnections/constants.go deleted file mode 100644 index 571bcb03c1e..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package expressrouteconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/id_expressrouteconnection.go b/resource-manager/network/2022-11-01/expressrouteconnections/id_expressrouteconnection.go deleted file mode 100644 index 9df4b46202b..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/id_expressrouteconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressrouteconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteConnectionId{} - -// ExpressRouteConnectionId is a struct representing the Resource ID for a Express Route Connection -type ExpressRouteConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteGatewayName string - ExpressRouteConnectionName string -} - -// NewExpressRouteConnectionID returns a new ExpressRouteConnectionId struct -func NewExpressRouteConnectionID(subscriptionId string, resourceGroupName string, expressRouteGatewayName string, expressRouteConnectionName string) ExpressRouteConnectionId { - return ExpressRouteConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteGatewayName: expressRouteGatewayName, - ExpressRouteConnectionName: expressRouteConnectionName, - } -} - -// ParseExpressRouteConnectionID parses 'input' into a ExpressRouteConnectionId -func ParseExpressRouteConnectionID(input string) (*ExpressRouteConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - if id.ExpressRouteConnectionName, ok = parsed.Parsed["expressRouteConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteConnectionName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteConnectionIDInsensitively parses 'input' case-insensitively into a ExpressRouteConnectionId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteConnectionIDInsensitively(input string) (*ExpressRouteConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - if id.ExpressRouteConnectionName, ok = parsed.Parsed["expressRouteConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteConnectionID checks that 'input' can be parsed as a Express Route Connection ID -func ValidateExpressRouteConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Connection ID -func (id ExpressRouteConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteGateways/%s/expressRouteConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteGatewayName, id.ExpressRouteConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Connection ID -func (id ExpressRouteConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteGateways", "expressRouteGateways", "expressRouteGateways"), - resourceids.UserSpecifiedSegment("expressRouteGatewayName", "expressRouteGatewayValue"), - resourceids.StaticSegment("staticExpressRouteConnections", "expressRouteConnections", "expressRouteConnections"), - resourceids.UserSpecifiedSegment("expressRouteConnectionName", "expressRouteConnectionValue"), - } -} - -// String returns a human-readable description of this Express Route Connection ID -func (id ExpressRouteConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Gateway Name: %q", id.ExpressRouteGatewayName), - fmt.Sprintf("Express Route Connection Name: %q", id.ExpressRouteConnectionName), - } - return fmt.Sprintf("Express Route Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/id_expressrouteconnection_test.go b/resource-manager/network/2022-11-01/expressrouteconnections/id_expressrouteconnection_test.go deleted file mode 100644 index 31d5263ea71..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/id_expressrouteconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressrouteconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteConnectionId{} - -func TestNewExpressRouteConnectionID(t *testing.T) { - id := NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteGatewayName != "expressRouteGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteGatewayName'", id.ExpressRouteGatewayName, "expressRouteGatewayValue") - } - - if id.ExpressRouteConnectionName != "expressRouteConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteConnectionName'", id.ExpressRouteConnectionName, "expressRouteConnectionValue") - } -} - -func TestFormatExpressRouteConnectionID(t *testing.T) { - actual := NewExpressRouteConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue", "expressRouteConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue", - Expected: &ExpressRouteConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - ExpressRouteConnectionName: "expressRouteConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - if actual.ExpressRouteConnectionName != v.Expected.ExpressRouteConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteConnectionName", v.Expected.ExpressRouteConnectionName, actual.ExpressRouteConnectionName) - } - - } -} - -func TestParseExpressRouteConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/eXpReSsRoUtEcOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue", - Expected: &ExpressRouteConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - ExpressRouteConnectionName: "expressRouteConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/expressRouteConnections/expressRouteConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/eXpReSsRoUtEcOnNeCtIoNs/eXpReSsRoUtEcOnNeCtIoNvAlUe", - Expected: &ExpressRouteConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteGatewayName: "eXpReSsRoUtEgAtEwAyVaLuE", - ExpressRouteConnectionName: "eXpReSsRoUtEcOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/eXpReSsRoUtEcOnNeCtIoNs/eXpReSsRoUtEcOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - if actual.ExpressRouteConnectionName != v.Expected.ExpressRouteConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteConnectionName", v.Expected.ExpressRouteConnectionName, actual.ExpressRouteConnectionName) - } - - } -} - -func TestSegmentsForExpressRouteConnectionId(t *testing.T) { - segments := ExpressRouteConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/id_expressroutegateway.go b/resource-manager/network/2022-11-01/expressrouteconnections/id_expressroutegateway.go deleted file mode 100644 index a697ea8a7e4..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/id_expressroutegateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressrouteconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteGatewayId{} - -// ExpressRouteGatewayId is a struct representing the Resource ID for a Express Route Gateway -type ExpressRouteGatewayId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteGatewayName string -} - -// NewExpressRouteGatewayID returns a new ExpressRouteGatewayId struct -func NewExpressRouteGatewayID(subscriptionId string, resourceGroupName string, expressRouteGatewayName string) ExpressRouteGatewayId { - return ExpressRouteGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteGatewayName: expressRouteGatewayName, - } -} - -// ParseExpressRouteGatewayID parses 'input' into a ExpressRouteGatewayId -func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteGatewayIDInsensitively parses 'input' case-insensitively into a ExpressRouteGatewayId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteGatewayID checks that 'input' can be parsed as a Express Route Gateway ID -func ValidateExpressRouteGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Gateway ID -func (id ExpressRouteGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Gateway ID -func (id ExpressRouteGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteGateways", "expressRouteGateways", "expressRouteGateways"), - resourceids.UserSpecifiedSegment("expressRouteGatewayName", "expressRouteGatewayValue"), - } -} - -// String returns a human-readable description of this Express Route Gateway ID -func (id ExpressRouteGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Gateway Name: %q", id.ExpressRouteGatewayName), - } - return fmt.Sprintf("Express Route Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/id_expressroutegateway_test.go b/resource-manager/network/2022-11-01/expressrouteconnections/id_expressroutegateway_test.go deleted file mode 100644 index 6d44fe191ad..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/id_expressroutegateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressrouteconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteGatewayId{} - -func TestNewExpressRouteGatewayID(t *testing.T) { - id := NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteGatewayName != "expressRouteGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteGatewayName'", id.ExpressRouteGatewayName, "expressRouteGatewayValue") - } -} - -func TestFormatExpressRouteGatewayID(t *testing.T) { - actual := NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - } -} - -func TestParseExpressRouteGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteGatewayName: "eXpReSsRoUtEgAtEwAyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - } -} - -func TestSegmentsForExpressRouteGatewayId(t *testing.T) { - segments := ExpressRouteGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/method_createorupdate.go b/resource-manager/network/2022-11-01/expressrouteconnections/method_createorupdate.go deleted file mode 100644 index 2297489ff1e..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressrouteconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context, id ExpressRouteConnectionId, input ExpressRouteConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteConnectionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRouteConnectionId, input ExpressRouteConnection) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/method_delete.go b/resource-manager/network/2022-11-01/expressrouteconnections/method_delete.go deleted file mode 100644 index 8f3816bde32..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressrouteconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteConnectionsClient) Delete(ctx context.Context, id ExpressRouteConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteConnectionsClient) DeleteThenPoll(ctx context.Context, id ExpressRouteConnectionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/method_get.go b/resource-manager/network/2022-11-01/expressrouteconnections/method_get.go deleted file mode 100644 index bfea9625ae1..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteConnection -} - -// Get ... -func (c ExpressRouteConnectionsClient) Get(ctx context.Context, id ExpressRouteConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/method_list.go b/resource-manager/network/2022-11-01/expressrouteconnections/method_list.go deleted file mode 100644 index 5ee34abaa62..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/method_list.go +++ /dev/null @@ -1,52 +0,0 @@ -package expressrouteconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteConnectionList -} - -// List ... -func (c ExpressRouteConnectionsClient) List(ctx context.Context, id ExpressRouteGatewayId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/expressRouteConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_expressroutecircuitpeeringid.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_expressroutecircuitpeeringid.go deleted file mode 100644 index 3a30ff411e8..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_expressroutecircuitpeeringid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnection.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnection.go deleted file mode 100644 index 1e31fa6c860..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnection.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnection struct { - Id *string `json:"id,omitempty"` - Name string `json:"name"` - Properties *ExpressRouteConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnectionlist.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnectionlist.go deleted file mode 100644 index a16565b3cd5..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnectionlist.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionList struct { - Value *[]ExpressRouteConnection `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnectionproperties.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnectionproperties.go deleted file mode 100644 index 2e9dddfbc1a..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_expressrouteconnectionproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionProperties struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - EnablePrivateLinkFastPath *bool `json:"enablePrivateLinkFastPath,omitempty"` - ExpressRouteCircuitPeering ExpressRouteCircuitPeeringId `json:"expressRouteCircuitPeering"` - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_propagatedroutetable.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_propagatedroutetable.go deleted file mode 100644 index 7279e13359c..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_routingconfiguration.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_routingconfiguration.go deleted file mode 100644 index 4e1904d9c6e..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_staticroute.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_staticroute.go deleted file mode 100644 index c1e414bbe16..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_staticroutesconfig.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_staticroutesconfig.go deleted file mode 100644 index 9ee286419ac..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_subresource.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_subresource.go deleted file mode 100644 index 5a5f53696f8..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/model_vnetroute.go b/resource-manager/network/2022-11-01/expressrouteconnections/model_vnetroute.go deleted file mode 100644 index 9e296eed5de..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressrouteconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteconnections/version.go b/resource-manager/network/2022-11-01/expressrouteconnections/version.go deleted file mode 100644 index b0edfd77a7c..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/README.md b/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/README.md deleted file mode 100644 index 3df3ad50115..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable` Documentation - -The `expressroutecrossconnectionarptable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnectionarptable.NewExpressRouteCrossConnectionArpTableClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionArpTableClient.ExpressRouteCrossConnectionsListArpTable` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionarptable.NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue") - -if err := client.ExpressRouteCrossConnectionsListArpTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/client.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/client.go deleted file mode 100644 index 674582d3ee4..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnectionarptable - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionArpTableClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionArpTableClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionArpTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnectionarptable", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionArpTableClient: %+v", err) - } - - return &ExpressRouteCrossConnectionArpTableClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/id_peeringarptable.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/id_peeringarptable.go deleted file mode 100644 index c7d0e4d6c08..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/id_peeringarptable.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecrossconnectionarptable - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringArpTableId{} - -// PeeringArpTableId is a struct representing the Resource ID for a Peering Arp Table -type PeeringArpTableId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string - PeeringName string - ArpTableName string -} - -// NewPeeringArpTableID returns a new PeeringArpTableId struct -func NewPeeringArpTableID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string, peeringName string, arpTableName string) PeeringArpTableId { - return PeeringArpTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - PeeringName: peeringName, - ArpTableName: arpTableName, - } -} - -// ParsePeeringArpTableID parses 'input' into a PeeringArpTableId -func ParsePeeringArpTableID(input string) (*PeeringArpTableId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringArpTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) - } - - return &id, nil -} - -// ParsePeeringArpTableIDInsensitively parses 'input' case-insensitively into a PeeringArpTableId -// note: this method should only be used for API response data and not user input -func ParsePeeringArpTableIDInsensitively(input string) (*PeeringArpTableId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringArpTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringArpTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.ArpTableName, ok = parsed.Parsed["arpTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "arpTableName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringArpTableID checks that 'input' can be parsed as a Peering Arp Table ID -func ValidatePeeringArpTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringArpTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering Arp Table ID -func (id PeeringArpTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s/peerings/%s/arpTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName, id.PeeringName, id.ArpTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering Arp Table ID -func (id PeeringArpTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticArpTables", "arpTables", "arpTables"), - resourceids.UserSpecifiedSegment("arpTableName", "arpTableValue"), - } -} - -// String returns a human-readable description of this Peering Arp Table ID -func (id PeeringArpTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Arp Table Name: %q", id.ArpTableName), - } - return fmt.Sprintf("Peering Arp Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/id_peeringarptable_test.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/id_peeringarptable_test.go deleted file mode 100644 index 289a18dd71e..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/id_peeringarptable_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecrossconnectionarptable - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringArpTableId{} - -func TestNewPeeringArpTableID(t *testing.T) { - id := NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.ArpTableName != "arpTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'ArpTableName'", id.ArpTableName, "arpTableValue") - } -} - -func TestFormatPeeringArpTableID(t *testing.T) { - actual := NewPeeringArpTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "arpTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringArpTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringArpTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue", - Expected: &PeeringArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - ArpTableName: "arpTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringArpTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ArpTableName != v.Expected.ArpTableName { - t.Fatalf("Expected %q but got %q for ArpTableName", v.Expected.ArpTableName, actual.ArpTableName) - } - - } -} - -func TestParsePeeringArpTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringArpTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue", - Expected: &PeeringArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - ArpTableName: "arpTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/arpTables/arpTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs/aRpTaBlEvAlUe", - Expected: &PeeringArpTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - PeeringName: "pEeRiNgVaLuE", - ArpTableName: "aRpTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/aRpTaBlEs/aRpTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringArpTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.ArpTableName != v.Expected.ArpTableName { - t.Fatalf("Expected %q but got %q for ArpTableName", v.Expected.ArpTableName, actual.ArpTableName) - } - - } -} - -func TestSegmentsForPeeringArpTableId(t *testing.T) { - segments := PeeringArpTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringArpTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go deleted file mode 100644 index e95485a99f9..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/method_expressroutecrossconnectionslistarptable.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecrossconnectionarptable - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsListArpTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCrossConnectionsListArpTable ... -func (c ExpressRouteCrossConnectionArpTableClient) ExpressRouteCrossConnectionsListArpTable(ctx context.Context, id PeeringArpTableId) (result ExpressRouteCrossConnectionsListArpTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCrossConnectionsListArpTableThenPoll performs ExpressRouteCrossConnectionsListArpTable then polls until it's completed -func (c ExpressRouteCrossConnectionArpTableClient) ExpressRouteCrossConnectionsListArpTableThenPoll(ctx context.Context, id PeeringArpTableId) error { - result, err := c.ExpressRouteCrossConnectionsListArpTable(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCrossConnectionsListArpTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCrossConnectionsListArpTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/model_expressroutecircuitarptable.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/model_expressroutecircuitarptable.go deleted file mode 100644 index eb25fb1e02d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/model_expressroutecircuitarptable.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecrossconnectionarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitArpTable struct { - Age *int64 `json:"age,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - Interface *string `json:"interface,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go deleted file mode 100644 index 67147d0690b..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/model_expressroutecircuitsarptablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionarptable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsArpTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/version.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/version.go deleted file mode 100644 index f6a6c632381..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionarptable/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionarptable - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionarptable/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/README.md b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/README.md deleted file mode 100644 index d59ee11d54e..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings` Documentation - -The `expressroutecrossconnectionpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnectionpeerings.NewExpressRouteCrossConnectionPeeringsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionpeerings.NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue") - -payload := expressroutecrossconnectionpeerings.ExpressRouteCrossConnectionPeering{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionPeeringsClient.Delete` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionpeerings.NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionPeeringsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionpeerings.NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionPeeringsClient.List` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionpeerings.NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/client.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/client.go deleted file mode 100644 index 320a0785b8d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeeringsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnectionpeerings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionPeeringsClient: %+v", err) - } - - return &ExpressRouteCrossConnectionPeeringsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/constants.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/constants.go deleted file mode 100644 index 96dec453442..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/constants.go +++ /dev/null @@ -1,230 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go deleted file mode 100644 index c2abc2bcb6e..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionId{} - -// ExpressRouteCrossConnectionId is a struct representing the Resource ID for a Express Route Cross Connection -type ExpressRouteCrossConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string -} - -// NewExpressRouteCrossConnectionID returns a new ExpressRouteCrossConnectionId struct -func NewExpressRouteCrossConnectionID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string) ExpressRouteCrossConnectionId { - return ExpressRouteCrossConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - } -} - -// ParseExpressRouteCrossConnectionID parses 'input' into a ExpressRouteCrossConnectionId -func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCrossConnectionIDInsensitively parses 'input' case-insensitively into a ExpressRouteCrossConnectionId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRouteCrossConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCrossConnectionID checks that 'input' can be parsed as a Express Route Cross Connection ID -func ValidateExpressRouteCrossConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCrossConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - } -} - -// String returns a human-readable description of this Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - } - return fmt.Sprintf("Express Route Cross Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection_test.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection_test.go deleted file mode 100644 index bf20788ec3f..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_expressroutecrossconnection_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionId{} - -func TestNewExpressRouteCrossConnectionID(t *testing.T) { - id := NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } -} - -func TestFormatExpressRouteCrossConnectionID(t *testing.T) { - actual := NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCrossConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - } -} - -func TestParseExpressRouteCrossConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - } -} - -func TestSegmentsForExpressRouteCrossConnectionId(t *testing.T) { - segments := ExpressRouteCrossConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCrossConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_peering.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_peering.go deleted file mode 100644 index 8ff1861f76d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_peering.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringId{} - -// PeeringId is a struct representing the Resource ID for a Peering -type PeeringId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string - PeeringName string -} - -// NewPeeringID returns a new PeeringId struct -func NewPeeringID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string, peeringName string) PeeringId { - return PeeringId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - PeeringName: peeringName, - } -} - -// ParsePeeringID parses 'input' into a PeeringId -func ParsePeeringID(input string) (*PeeringId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - return &id, nil -} - -// ParsePeeringIDInsensitively parses 'input' case-insensitively into a PeeringId -// note: this method should only be used for API response data and not user input -func ParsePeeringIDInsensitively(input string) (*PeeringId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringID checks that 'input' can be parsed as a Peering ID -func ValidatePeeringID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering ID -func (id PeeringId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s/peerings/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName, id.PeeringName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering ID -func (id PeeringId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - } -} - -// String returns a human-readable description of this Peering ID -func (id PeeringId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - } - return fmt.Sprintf("Peering (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_peering_test.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_peering_test.go deleted file mode 100644 index bf32bedd8cb..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/id_peering_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringId{} - -func TestNewPeeringID(t *testing.T) { - id := NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } -} - -func TestFormatPeeringID(t *testing.T) { - actual := NewPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Expected: &PeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - } -} - -func TestParsePeeringIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Expected: &PeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Expected: &PeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - PeeringName: "pEeRiNgVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - } -} - -func TestSegmentsForPeeringId(t *testing.T) { - segments := PeeringId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_createorupdate.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_createorupdate.go deleted file mode 100644 index c906a0ff64a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx context.Context, id PeeringId, input ExpressRouteCrossConnectionPeering) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateThenPoll(ctx context.Context, id PeeringId, input ExpressRouteCrossConnectionPeering) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_delete.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_delete.go deleted file mode 100644 index f2073ab1bd3..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Context, id PeeringId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteCrossConnectionPeeringsClient) DeleteThenPoll(ctx context.Context, id PeeringId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_get.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_get.go deleted file mode 100644 index 3f9b08ca277..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCrossConnectionPeering -} - -// Get ... -func (c ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, id PeeringId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_list.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_list.go deleted file mode 100644 index 6703864be9d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressroutecrossconnectionpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCrossConnectionPeering -} - -type ListCompleteResult struct { - Items []ExpressRouteCrossConnectionPeering -} - -// List ... -func (c ExpressRouteCrossConnectionPeeringsClient) List(ctx context.Context, id ExpressRouteCrossConnectionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/peerings", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCrossConnectionPeering `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCrossConnectionPeeringsClient) ListComplete(ctx context.Context, id ExpressRouteCrossConnectionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCrossConnectionPeeringOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCrossConnectionPeeringsClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRouteCrossConnectionId, predicate ExpressRouteCrossConnectionPeeringOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCrossConnectionPeering, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 298b61e03ee..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeering.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeering.go deleted file mode 100644 index 3244f828098..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeering.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeeringproperties.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeeringproperties.go deleted file mode 100644 index 64330e5a7ea..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_expressroutecrossconnectionpeeringproperties.go +++ /dev/null @@ -1,22 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeeringProperties struct { - AzureASN *int64 `json:"azureASN,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index ec7f2c4a72c..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_subresource.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_subresource.go deleted file mode 100644 index 919b934c547..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/predicates.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/predicates.go deleted file mode 100644 index abec5984ec1..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package expressroutecrossconnectionpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeeringOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p ExpressRouteCrossConnectionPeeringOperationPredicate) Matches(input ExpressRouteCrossConnectionPeering) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/version.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/version.go deleted file mode 100644 index dcae04718a4..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionpeerings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionpeerings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionpeerings/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/README.md b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/README.md deleted file mode 100644 index febec34bb92..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable` Documentation - -The `expressroutecrossconnectionroutetable` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionRouteTableClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionRouteTableClient.ExpressRouteCrossConnectionsListRoutesTable` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionroutetable.NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue") - -if err := client.ExpressRouteCrossConnectionsListRoutesTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/client.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/client.go deleted file mode 100644 index 4437ac75b0d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnectionroutetable - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionRouteTableClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionRouteTableClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionRouteTableClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnectionroutetable", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableClient: %+v", err) - } - - return &ExpressRouteCrossConnectionRouteTableClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go deleted file mode 100644 index 5c0a0ea5302..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecrossconnectionroutetable - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionPeeringRouteTableId{} - -// ExpressRouteCrossConnectionPeeringRouteTableId is a struct representing the Resource ID for a Express Route Cross Connection Peering Route Table -type ExpressRouteCrossConnectionPeeringRouteTableId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string - PeeringName string - RouteTableName string -} - -// NewExpressRouteCrossConnectionPeeringRouteTableID returns a new ExpressRouteCrossConnectionPeeringRouteTableId struct -func NewExpressRouteCrossConnectionPeeringRouteTableID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string, peeringName string, routeTableName string) ExpressRouteCrossConnectionPeeringRouteTableId { - return ExpressRouteCrossConnectionPeeringRouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - PeeringName: peeringName, - RouteTableName: routeTableName, - } -} - -// ParseExpressRouteCrossConnectionPeeringRouteTableID parses 'input' into a ExpressRouteCrossConnectionPeeringRouteTableId -func ParseExpressRouteCrossConnectionPeeringRouteTableID(input string) (*ExpressRouteCrossConnectionPeeringRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionPeeringRouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionPeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively parses 'input' case-insensitively into a ExpressRouteCrossConnectionPeeringRouteTableId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(input string) (*ExpressRouteCrossConnectionPeeringRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionPeeringRouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionPeeringRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCrossConnectionPeeringRouteTableID checks that 'input' can be parsed as a Express Route Cross Connection Peering Route Table ID -func ValidateExpressRouteCrossConnectionPeeringRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCrossConnectionPeeringRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Cross Connection Peering Route Table ID -func (id ExpressRouteCrossConnectionPeeringRouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s/peerings/%s/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName, id.PeeringName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Cross Connection Peering Route Table ID -func (id ExpressRouteCrossConnectionPeeringRouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Express Route Cross Connection Peering Route Table ID -func (id ExpressRouteCrossConnectionPeeringRouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Express Route Cross Connection Peering Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable_test.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable_test.go deleted file mode 100644 index 10f2f2389e8..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/id_expressroutecrossconnectionpeeringroutetable_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecrossconnectionroutetable - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionPeeringRouteTableId{} - -func TestNewExpressRouteCrossConnectionPeeringRouteTableID(t *testing.T) { - id := NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatExpressRouteCrossConnectionPeeringRouteTableID(t *testing.T) { - actual := NewExpressRouteCrossConnectionPeeringRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCrossConnectionPeeringRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionPeeringRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue", - Expected: &ExpressRouteCrossConnectionPeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionPeeringRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionPeeringRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue", - Expected: &ExpressRouteCrossConnectionPeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &ExpressRouteCrossConnectionPeeringRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - PeeringName: "pEeRiNgVaLuE", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionPeeringRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForExpressRouteCrossConnectionPeeringRouteTableId(t *testing.T) { - segments := ExpressRouteCrossConnectionPeeringRouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCrossConnectionPeeringRouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go deleted file mode 100644 index ed8ff9b8feb..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/method_expressroutecrossconnectionslistroutestable.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecrossconnectionroutetable - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsListRoutesTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCrossConnectionsListRoutesTable ... -func (c ExpressRouteCrossConnectionRouteTableClient) ExpressRouteCrossConnectionsListRoutesTable(ctx context.Context, id ExpressRouteCrossConnectionPeeringRouteTableId) (result ExpressRouteCrossConnectionsListRoutesTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCrossConnectionsListRoutesTableThenPoll performs ExpressRouteCrossConnectionsListRoutesTable then polls until it's completed -func (c ExpressRouteCrossConnectionRouteTableClient) ExpressRouteCrossConnectionsListRoutesTableThenPoll(ctx context.Context, id ExpressRouteCrossConnectionPeeringRouteTableId) error { - result, err := c.ExpressRouteCrossConnectionsListRoutesTable(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCrossConnectionsListRoutesTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCrossConnectionsListRoutesTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/model_expressroutecircuitroutestable.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/model_expressroutecircuitroutestable.go deleted file mode 100644 index 4861d1c6ca2..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/model_expressroutecircuitroutestable.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionroutetable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitRoutesTable struct { - LocPrf *string `json:"locPrf,omitempty"` - Network *string `json:"network,omitempty"` - NextHop *string `json:"nextHop,omitempty"` - Path *string `json:"path,omitempty"` - Weight *int64 `json:"weight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go deleted file mode 100644 index d42583463b3..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/model_expressroutecircuitsroutestablelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetable - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitsRoutesTableListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/version.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/version.go deleted file mode 100644 index aad67fe9673..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetable/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionroutetable - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetable/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/README.md b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/README.md deleted file mode 100644 index f54bc9edccc..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary` Documentation - -The `expressroutecrossconnectionroutetablesummary` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnectionroutetablesummary.NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionRouteTableSummaryClient.ExpressRouteCrossConnectionsListRoutesTableSummary` - -```go -ctx := context.TODO() -id := expressroutecrossconnectionroutetablesummary.NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue") - -if err := client.ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/client.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/client.go deleted file mode 100644 index d9ffe2f386e..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionRouteTableSummaryClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionRouteTableSummaryClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionRouteTableSummaryClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnectionroutetablesummary", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionRouteTableSummaryClient: %+v", err) - } - - return &ExpressRouteCrossConnectionRouteTableSummaryClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go deleted file mode 100644 index d679350bf9b..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary.go +++ /dev/null @@ -1,153 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringRouteTablesSummaryId{} - -// PeeringRouteTablesSummaryId is a struct representing the Resource ID for a Peering Route Tables Summary -type PeeringRouteTablesSummaryId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string - PeeringName string - RouteTablesSummaryName string -} - -// NewPeeringRouteTablesSummaryID returns a new PeeringRouteTablesSummaryId struct -func NewPeeringRouteTablesSummaryID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string, peeringName string, routeTablesSummaryName string) PeeringRouteTablesSummaryId { - return PeeringRouteTablesSummaryId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - PeeringName: peeringName, - RouteTablesSummaryName: routeTablesSummaryName, - } -} - -// ParsePeeringRouteTablesSummaryID parses 'input' into a PeeringRouteTablesSummaryId -func ParsePeeringRouteTablesSummaryID(input string) (*PeeringRouteTablesSummaryId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringRouteTablesSummaryId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringRouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) - } - - return &id, nil -} - -// ParsePeeringRouteTablesSummaryIDInsensitively parses 'input' case-insensitively into a PeeringRouteTablesSummaryId -// note: this method should only be used for API response data and not user input -func ParsePeeringRouteTablesSummaryIDInsensitively(input string) (*PeeringRouteTablesSummaryId, error) { - parser := resourceids.NewParserFromResourceIdType(PeeringRouteTablesSummaryId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeeringRouteTablesSummaryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.RouteTablesSummaryName, ok = parsed.Parsed["routeTablesSummaryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTablesSummaryName", *parsed) - } - - return &id, nil -} - -// ValidatePeeringRouteTablesSummaryID checks that 'input' can be parsed as a Peering Route Tables Summary ID -func ValidatePeeringRouteTablesSummaryID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeeringRouteTablesSummaryID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peering Route Tables Summary ID -func (id PeeringRouteTablesSummaryId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s/peerings/%s/routeTablesSummary/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName, id.PeeringName, id.RouteTablesSummaryName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peering Route Tables Summary ID -func (id PeeringRouteTablesSummaryId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticRouteTablesSummary", "routeTablesSummary", "routeTablesSummary"), - resourceids.UserSpecifiedSegment("routeTablesSummaryName", "routeTablesSummaryValue"), - } -} - -// String returns a human-readable description of this Peering Route Tables Summary ID -func (id PeeringRouteTablesSummaryId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Route Tables Summary Name: %q", id.RouteTablesSummaryName), - } - return fmt.Sprintf("Peering Route Tables Summary (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary_test.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary_test.go deleted file mode 100644 index 2a3ec3f77ff..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/id_peeringroutetablessummary_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeeringRouteTablesSummaryId{} - -func TestNewPeeringRouteTablesSummaryID(t *testing.T) { - id := NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.RouteTablesSummaryName != "routeTablesSummaryValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTablesSummaryName'", id.RouteTablesSummaryName, "routeTablesSummaryValue") - } -} - -func TestFormatPeeringRouteTablesSummaryID(t *testing.T) { - actual := NewPeeringRouteTablesSummaryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue", "peeringValue", "routeTablesSummaryValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeeringRouteTablesSummaryID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringRouteTablesSummaryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue", - Expected: &PeeringRouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - RouteTablesSummaryName: "routeTablesSummaryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringRouteTablesSummaryID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTablesSummaryName != v.Expected.RouteTablesSummaryName { - t.Fatalf("Expected %q but got %q for RouteTablesSummaryName", v.Expected.RouteTablesSummaryName, actual.RouteTablesSummaryName) - } - - } -} - -func TestParsePeeringRouteTablesSummaryIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeeringRouteTablesSummaryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue", - Expected: &PeeringRouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - PeeringName: "peeringValue", - RouteTablesSummaryName: "routeTablesSummaryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/peerings/peeringValue/routeTablesSummary/routeTablesSummaryValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY/rOuTeTaBlEsSuMmArYvAlUe", - Expected: &PeeringRouteTablesSummaryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - PeeringName: "pEeRiNgVaLuE", - RouteTablesSummaryName: "rOuTeTaBlEsSuMmArYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/pEeRiNgS/pEeRiNgVaLuE/rOuTeTaBlEsSuMmArY/rOuTeTaBlEsSuMmArYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeeringRouteTablesSummaryIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.RouteTablesSummaryName != v.Expected.RouteTablesSummaryName { - t.Fatalf("Expected %q but got %q for RouteTablesSummaryName", v.Expected.RouteTablesSummaryName, actual.RouteTablesSummaryName) - } - - } -} - -func TestSegmentsForPeeringRouteTablesSummaryId(t *testing.T) { - segments := PeeringRouteTablesSummaryId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeeringRouteTablesSummaryId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go deleted file mode 100644 index 383873d1554..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/method_expressroutecrossconnectionslistroutestablesummary.go +++ /dev/null @@ -1,70 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsListRoutesTableSummaryOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ExpressRouteCrossConnectionsListRoutesTableSummary ... -func (c ExpressRouteCrossConnectionRouteTableSummaryClient) ExpressRouteCrossConnectionsListRoutesTableSummary(ctx context.Context, id PeeringRouteTablesSummaryId) (result ExpressRouteCrossConnectionsListRoutesTableSummaryOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll performs ExpressRouteCrossConnectionsListRoutesTableSummary then polls until it's completed -func (c ExpressRouteCrossConnectionRouteTableSummaryClient) ExpressRouteCrossConnectionsListRoutesTableSummaryThenPoll(ctx context.Context, id PeeringRouteTablesSummaryId) error { - result, err := c.ExpressRouteCrossConnectionsListRoutesTableSummary(ctx, id) - if err != nil { - return fmt.Errorf("performing ExpressRouteCrossConnectionsListRoutesTableSummary: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ExpressRouteCrossConnectionsListRoutesTableSummary: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionroutestablesummary.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionroutestablesummary.go deleted file mode 100644 index e13df051962..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionroutestablesummary.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionRoutesTableSummary struct { - Asn *int64 `json:"asn,omitempty"` - Neighbor *string `json:"neighbor,omitempty"` - StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"` - UpDown *string `json:"upDown,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go deleted file mode 100644 index 21d57c1911b..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/model_expressroutecrossconnectionsroutestablesummarylistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteCrossConnectionRoutesTableSummary `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/version.go b/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/version.go deleted file mode 100644 index d92a654895f..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnectionroutetablesummary/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnectionroutetablesummary - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnectionroutetablesummary/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/README.md b/resource-manager/network/2022-11-01/expressroutecrossconnections/README.md deleted file mode 100644 index 0d036dd5ed6..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/README.md +++ /dev/null @@ -1,108 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnections` Documentation - -The `expressroutecrossconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutecrossconnections" -``` - - -### Client Initialization - -```go -client := expressroutecrossconnections.NewExpressRouteCrossConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - -payload := expressroutecrossconnections.ExpressRouteCrossConnection{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.Get` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.List` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRouteCrossConnectionsClient.UpdateTags` - -```go -ctx := context.TODO() -id := expressroutecrossconnections.NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - -payload := expressroutecrossconnections.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/client.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/client.go deleted file mode 100644 index 6c02cfc4b39..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutecrossconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteCrossConnectionsClientWithBaseURI(api environments.Api) (*ExpressRouteCrossConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutecrossconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteCrossConnectionsClient: %+v", err) - } - - return &ExpressRouteCrossConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/constants.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/constants.go deleted file mode 100644 index 2e9d3456d55..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/constants.go +++ /dev/null @@ -1,277 +0,0 @@ -package expressroutecrossconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type ServiceProviderProvisioningState string - -const ( - ServiceProviderProvisioningStateDeprovisioning ServiceProviderProvisioningState = "Deprovisioning" - ServiceProviderProvisioningStateNotProvisioned ServiceProviderProvisioningState = "NotProvisioned" - ServiceProviderProvisioningStateProvisioned ServiceProviderProvisioningState = "Provisioned" - ServiceProviderProvisioningStateProvisioning ServiceProviderProvisioningState = "Provisioning" -) - -func PossibleValuesForServiceProviderProvisioningState() []string { - return []string{ - string(ServiceProviderProvisioningStateDeprovisioning), - string(ServiceProviderProvisioningStateNotProvisioned), - string(ServiceProviderProvisioningStateProvisioned), - string(ServiceProviderProvisioningStateProvisioning), - } -} - -func (s *ServiceProviderProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseServiceProviderProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseServiceProviderProvisioningState(input string) (*ServiceProviderProvisioningState, error) { - vals := map[string]ServiceProviderProvisioningState{ - "deprovisioning": ServiceProviderProvisioningStateDeprovisioning, - "notprovisioned": ServiceProviderProvisioningStateNotProvisioned, - "provisioned": ServiceProviderProvisioningStateProvisioned, - "provisioning": ServiceProviderProvisioningStateProvisioning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ServiceProviderProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/id_expressroutecrossconnection.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/id_expressroutecrossconnection.go deleted file mode 100644 index a8eb6b95127..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/id_expressroutecrossconnection.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutecrossconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionId{} - -// ExpressRouteCrossConnectionId is a struct representing the Resource ID for a Express Route Cross Connection -type ExpressRouteCrossConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCrossConnectionName string -} - -// NewExpressRouteCrossConnectionID returns a new ExpressRouteCrossConnectionId struct -func NewExpressRouteCrossConnectionID(subscriptionId string, resourceGroupName string, expressRouteCrossConnectionName string) ExpressRouteCrossConnectionId { - return ExpressRouteCrossConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCrossConnectionName: expressRouteCrossConnectionName, - } -} - -// ParseExpressRouteCrossConnectionID parses 'input' into a ExpressRouteCrossConnectionId -func ParseExpressRouteCrossConnectionID(input string) (*ExpressRouteCrossConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteCrossConnectionIDInsensitively parses 'input' case-insensitively into a ExpressRouteCrossConnectionId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteCrossConnectionIDInsensitively(input string) (*ExpressRouteCrossConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteCrossConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteCrossConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCrossConnectionName, ok = parsed.Parsed["expressRouteCrossConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCrossConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteCrossConnectionID checks that 'input' can be parsed as a Express Route Cross Connection ID -func ValidateExpressRouteCrossConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteCrossConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCrossConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCrossConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCrossConnections", "expressRouteCrossConnections", "expressRouteCrossConnections"), - resourceids.UserSpecifiedSegment("expressRouteCrossConnectionName", "expressRouteCrossConnectionValue"), - } -} - -// String returns a human-readable description of this Express Route Cross Connection ID -func (id ExpressRouteCrossConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Cross Connection Name: %q", id.ExpressRouteCrossConnectionName), - } - return fmt.Sprintf("Express Route Cross Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/id_expressroutecrossconnection_test.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/id_expressroutecrossconnection_test.go deleted file mode 100644 index 610f0fd32f1..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/id_expressroutecrossconnection_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutecrossconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteCrossConnectionId{} - -func TestNewExpressRouteCrossConnectionID(t *testing.T) { - id := NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCrossConnectionName != "expressRouteCrossConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCrossConnectionName'", id.ExpressRouteCrossConnectionName, "expressRouteCrossConnectionValue") - } -} - -func TestFormatExpressRouteCrossConnectionID(t *testing.T) { - actual := NewExpressRouteCrossConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCrossConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteCrossConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - } -} - -func TestParseExpressRouteCrossConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteCrossConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCrossConnectionName: "expressRouteCrossConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCrossConnections/expressRouteCrossConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - Expected: &ExpressRouteCrossConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCrossConnectionName: "eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcRoSsCoNnEcTiOnS/eXpReSsRoUtEcRoSsCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteCrossConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCrossConnectionName != v.Expected.ExpressRouteCrossConnectionName { - t.Fatalf("Expected %q but got %q for ExpressRouteCrossConnectionName", v.Expected.ExpressRouteCrossConnectionName, actual.ExpressRouteCrossConnectionName) - } - - } -} - -func TestSegmentsForExpressRouteCrossConnectionId(t *testing.T) { - segments := ExpressRouteCrossConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteCrossConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_createorupdate.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/method_createorupdate.go deleted file mode 100644 index 098ffd595ed..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_createorupdate.go +++ /dev/null @@ -1,73 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Context, id ExpressRouteCrossConnectionId, input ExpressRouteCrossConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteCrossConnectionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRouteCrossConnectionId, input ExpressRouteCrossConnection) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_get.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/method_get.go deleted file mode 100644 index 0690a0b91f4..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCrossConnection -} - -// Get ... -func (c ExpressRouteCrossConnectionsClient) Get(ctx context.Context, id ExpressRouteCrossConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_list.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/method_list.go deleted file mode 100644 index c78b435eedc..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCrossConnection -} - -type ListCompleteResult struct { - Items []ExpressRouteCrossConnection -} - -// List ... -func (c ExpressRouteCrossConnectionsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteCrossConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCrossConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteCrossConnectionsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteCrossConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCrossConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRouteCrossConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteCrossConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/method_listbyresourcegroup.go deleted file mode 100644 index 529dd057edf..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteCrossConnection -} - -type ListByResourceGroupCompleteResult struct { - Items []ExpressRouteCrossConnection -} - -// ListByResourceGroup ... -func (c ExpressRouteCrossConnectionsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteCrossConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteCrossConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c ExpressRouteCrossConnectionsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ExpressRouteCrossConnectionOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteCrossConnectionsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ExpressRouteCrossConnectionOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]ExpressRouteCrossConnection, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_updatetags.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/method_updatetags.go deleted file mode 100644 index a7ae529a169..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package expressroutecrossconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteCrossConnection -} - -// UpdateTags ... -func (c ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, id ExpressRouteCrossConnectionId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 08d50c826a9..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecircuitreference.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecircuitreference.go deleted file mode 100644 index cbf4167bab5..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecircuitreference.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitReference struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnection.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnection.go deleted file mode 100644 index 52da62754ff..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnection.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCrossConnectionProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionpeering.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionpeering.go deleted file mode 100644 index e207a422215..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionpeering.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCrossConnectionPeeringProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionpeeringproperties.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionpeeringproperties.go deleted file mode 100644 index 0d9a1673538..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionpeeringproperties.go +++ /dev/null @@ -1,22 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionPeeringProperties struct { - AzureASN *int64 `json:"azureASN,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionproperties.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionproperties.go deleted file mode 100644 index 84515d8082c..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_expressroutecrossconnectionproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionProperties struct { - BandwidthInMbps *int64 `json:"bandwidthInMbps,omitempty"` - ExpressRouteCircuit *ExpressRouteCircuitReference `json:"expressRouteCircuit,omitempty"` - PeeringLocation *string `json:"peeringLocation,omitempty"` - Peerings *[]ExpressRouteCrossConnectionPeering `json:"peerings,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - STag *int64 `json:"sTag,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"` - ServiceProviderProvisioningState *ServiceProviderProvisioningState `json:"serviceProviderProvisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index 0101ae80d9e..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_subresource.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/model_subresource.go deleted file mode 100644 index b2922ebb4d1..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_tagsobject.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/model_tagsobject.go deleted file mode 100644 index f47ce1a3f42..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/predicates.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/predicates.go deleted file mode 100644 index f3d9b3a8dff..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package expressroutecrossconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCrossConnectionOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRouteCrossConnectionOperationPredicate) Matches(input ExpressRouteCrossConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressroutecrossconnections/version.go b/resource-manager/network/2022-11-01/expressroutecrossconnections/version.go deleted file mode 100644 index 1383b0e516d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutecrossconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutecrossconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutecrossconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/README.md b/resource-manager/network/2022-11-01/expressroutegateways/README.md deleted file mode 100644 index fbd00b19fef..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/README.md +++ /dev/null @@ -1,114 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutegateways` Documentation - -The `expressroutegateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutegateways" -``` - - -### Client Initialization - -```go -client := expressroutegateways.NewExpressRouteGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressroutegateways.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -payload := expressroutegateways.ExpressRouteGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := expressroutegateways.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.Get` - -```go -ctx := context.TODO() -id := expressroutegateways.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := expressroutegateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -read, err := client.ListByResourceGroup(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.ListBySubscription` - -```go -ctx := context.TODO() -id := expressroutegateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListBySubscription(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := expressroutegateways.NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - -payload := expressroutegateways.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutegateways/client.go b/resource-manager/network/2022-11-01/expressroutegateways/client.go deleted file mode 100644 index 474f4529b5a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutegateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteGatewaysClientWithBaseURI(api environments.Api) (*ExpressRouteGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutegateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteGatewaysClient: %+v", err) - } - - return &ExpressRouteGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/constants.go b/resource-manager/network/2022-11-01/expressroutegateways/constants.go deleted file mode 100644 index ce8f5d5f24a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package expressroutegateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/id_expressroutegateway.go b/resource-manager/network/2022-11-01/expressroutegateways/id_expressroutegateway.go deleted file mode 100644 index 4e9f6ccc25f..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/id_expressroutegateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutegateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteGatewayId{} - -// ExpressRouteGatewayId is a struct representing the Resource ID for a Express Route Gateway -type ExpressRouteGatewayId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteGatewayName string -} - -// NewExpressRouteGatewayID returns a new ExpressRouteGatewayId struct -func NewExpressRouteGatewayID(subscriptionId string, resourceGroupName string, expressRouteGatewayName string) ExpressRouteGatewayId { - return ExpressRouteGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteGatewayName: expressRouteGatewayName, - } -} - -// ParseExpressRouteGatewayID parses 'input' into a ExpressRouteGatewayId -func ParseExpressRouteGatewayID(input string) (*ExpressRouteGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteGatewayIDInsensitively parses 'input' case-insensitively into a ExpressRouteGatewayId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteGatewayIDInsensitively(input string) (*ExpressRouteGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteGatewayName, ok = parsed.Parsed["expressRouteGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteGatewayID checks that 'input' can be parsed as a Express Route Gateway ID -func ValidateExpressRouteGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Gateway ID -func (id ExpressRouteGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Gateway ID -func (id ExpressRouteGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteGateways", "expressRouteGateways", "expressRouteGateways"), - resourceids.UserSpecifiedSegment("expressRouteGatewayName", "expressRouteGatewayValue"), - } -} - -// String returns a human-readable description of this Express Route Gateway ID -func (id ExpressRouteGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Gateway Name: %q", id.ExpressRouteGatewayName), - } - return fmt.Sprintf("Express Route Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/id_expressroutegateway_test.go b/resource-manager/network/2022-11-01/expressroutegateways/id_expressroutegateway_test.go deleted file mode 100644 index 6a481aa8c6e..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/id_expressroutegateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutegateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteGatewayId{} - -func TestNewExpressRouteGatewayID(t *testing.T) { - id := NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteGatewayName != "expressRouteGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteGatewayName'", id.ExpressRouteGatewayName, "expressRouteGatewayValue") - } -} - -func TestFormatExpressRouteGatewayID(t *testing.T) { - actual := NewExpressRouteGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - } -} - -func TestParseExpressRouteGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteGatewayName: "expressRouteGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteGateways/expressRouteGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE", - Expected: &ExpressRouteGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteGatewayName: "eXpReSsRoUtEgAtEwAyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEgAtEwAyS/eXpReSsRoUtEgAtEwAyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteGatewayName != v.Expected.ExpressRouteGatewayName { - t.Fatalf("Expected %q but got %q for ExpressRouteGatewayName", v.Expected.ExpressRouteGatewayName, actual.ExpressRouteGatewayName) - } - - } -} - -func TestSegmentsForExpressRouteGatewayId(t *testing.T) { - segments := ExpressRouteGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/method_createorupdate.go b/resource-manager/network/2022-11-01/expressroutegateways/method_createorupdate.go deleted file mode 100644 index 5be37ac97d3..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, id ExpressRouteGatewayId, input ExpressRouteGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRouteGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRouteGatewayId, input ExpressRouteGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/method_delete.go b/resource-manager/network/2022-11-01/expressroutegateways/method_delete.go deleted file mode 100644 index 200f12cef03..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRouteGatewaysClient) Delete(ctx context.Context, id ExpressRouteGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRouteGatewaysClient) DeleteThenPoll(ctx context.Context, id ExpressRouteGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/method_get.go b/resource-manager/network/2022-11-01/expressroutegateways/method_get.go deleted file mode 100644 index 54c443259b1..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutegateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteGateway -} - -// Get ... -func (c ExpressRouteGatewaysClient) Get(ctx context.Context, id ExpressRouteGatewayId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/expressroutegateways/method_listbyresourcegroup.go deleted file mode 100644 index 608f1f9590d..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/method_listbyresourcegroup.go +++ /dev/null @@ -1,53 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteGatewayList -} - -// ListByResourceGroup ... -func (c ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/method_listbysubscription.go b/resource-manager/network/2022-11-01/expressroutegateways/method_listbysubscription.go deleted file mode 100644 index 10e12759fcc..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/method_listbysubscription.go +++ /dev/null @@ -1,53 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteGatewayList -} - -// ListBySubscription ... -func (c ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/method_updatetags.go b/resource-manager/network/2022-11-01/expressroutegateways/method_updatetags.go deleted file mode 100644 index 4fd81413ab8..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressroutegateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c ExpressRouteGatewaysClient) UpdateTags(ctx context.Context, id ExpressRouteGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c ExpressRouteGatewaysClient) UpdateTagsThenPoll(ctx context.Context, id ExpressRouteGatewayId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutecircuitpeeringid.go b/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutecircuitpeeringid.go deleted file mode 100644 index 832d97a1174..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutecircuitpeeringid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_expressrouteconnection.go b/resource-manager/network/2022-11-01/expressroutegateways/model_expressrouteconnection.go deleted file mode 100644 index 99219dd6cfd..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_expressrouteconnection.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnection struct { - Id *string `json:"id,omitempty"` - Name string `json:"name"` - Properties *ExpressRouteConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_expressrouteconnectionproperties.go b/resource-manager/network/2022-11-01/expressroutegateways/model_expressrouteconnectionproperties.go deleted file mode 100644 index 931b412129f..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_expressrouteconnectionproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionProperties struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - EnablePrivateLinkFastPath *bool `json:"enablePrivateLinkFastPath,omitempty"` - ExpressRouteCircuitPeering ExpressRouteCircuitPeeringId `json:"expressRouteCircuitPeering"` - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegateway.go b/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegateway.go deleted file mode 100644 index 5505ff540a8..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaylist.go b/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaylist.go deleted file mode 100644 index 51667424380..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaylist.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewayList struct { - Value *[]ExpressRouteGateway `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewayproperties.go b/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewayproperties.go deleted file mode 100644 index 4860e7d555a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewayproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewayProperties struct { - AllowNonVirtualWanTraffic *bool `json:"allowNonVirtualWanTraffic,omitempty"` - AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"` - ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub VirtualHubId `json:"virtualHub"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfiguration.go b/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfiguration.go deleted file mode 100644 index 60677f25d4c..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct { - Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfigurationbounds.go b/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfigurationbounds.go deleted file mode 100644 index 65a1ccb474b..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_expressroutegatewaypropertiesautoscaleconfigurationbounds.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { - Max *int64 `json:"max,omitempty"` - Min *int64 `json:"min,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_propagatedroutetable.go b/resource-manager/network/2022-11-01/expressroutegateways/model_propagatedroutetable.go deleted file mode 100644 index 93c6f306054..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_routingconfiguration.go b/resource-manager/network/2022-11-01/expressroutegateways/model_routingconfiguration.go deleted file mode 100644 index 670d9907881..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_staticroute.go b/resource-manager/network/2022-11-01/expressroutegateways/model_staticroute.go deleted file mode 100644 index 29422baf743..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_staticroutesconfig.go b/resource-manager/network/2022-11-01/expressroutegateways/model_staticroutesconfig.go deleted file mode 100644 index d570d0ec17a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_subresource.go b/resource-manager/network/2022-11-01/expressroutegateways/model_subresource.go deleted file mode 100644 index f86e3493340..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_tagsobject.go b/resource-manager/network/2022-11-01/expressroutegateways/model_tagsobject.go deleted file mode 100644 index 706aff41cd4..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_virtualhubid.go b/resource-manager/network/2022-11-01/expressroutegateways/model_virtualhubid.go deleted file mode 100644 index 41cb5ff6fd1..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_virtualhubid.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/model_vnetroute.go b/resource-manager/network/2022-11-01/expressroutegateways/model_vnetroute.go deleted file mode 100644 index c9586e946c6..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressroutegateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutegateways/version.go b/resource-manager/network/2022-11-01/expressroutegateways/version.go deleted file mode 100644 index de53c2ff461..00000000000 --- a/resource-manager/network/2022-11-01/expressroutegateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutegateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutegateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/README.md b/resource-manager/network/2022-11-01/expressroutelinks/README.md deleted file mode 100644 index 35184df7cc8..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutelinks` Documentation - -The `expressroutelinks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressroutelinks" -``` - - -### Client Initialization - -```go -client := expressroutelinks.NewExpressRouteLinksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteLinksClient.Get` - -```go -ctx := context.TODO() -id := expressroutelinks.NewLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "linkValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteLinksClient.List` - -```go -ctx := context.TODO() -id := expressroutelinks.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/expressroutelinks/client.go b/resource-manager/network/2022-11-01/expressroutelinks/client.go deleted file mode 100644 index 316b515aeba..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressroutelinks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinksClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteLinksClientWithBaseURI(api environments.Api) (*ExpressRouteLinksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressroutelinks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteLinksClient: %+v", err) - } - - return &ExpressRouteLinksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/constants.go b/resource-manager/network/2022-11-01/expressroutelinks/constants.go deleted file mode 100644 index bc075bf128a..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/constants.go +++ /dev/null @@ -1,227 +0,0 @@ -package expressroutelinks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkAdminState string - -const ( - ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled" - ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled" -) - -func PossibleValuesForExpressRouteLinkAdminState() []string { - return []string{ - string(ExpressRouteLinkAdminStateDisabled), - string(ExpressRouteLinkAdminStateEnabled), - } -} - -func (s *ExpressRouteLinkAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkAdminState(input string) (*ExpressRouteLinkAdminState, error) { - vals := map[string]ExpressRouteLinkAdminState{ - "disabled": ExpressRouteLinkAdminStateDisabled, - "enabled": ExpressRouteLinkAdminStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkAdminState(input) - return &out, nil -} - -type ExpressRouteLinkConnectorType string - -const ( - ExpressRouteLinkConnectorTypeLC ExpressRouteLinkConnectorType = "LC" - ExpressRouteLinkConnectorTypeSC ExpressRouteLinkConnectorType = "SC" -) - -func PossibleValuesForExpressRouteLinkConnectorType() []string { - return []string{ - string(ExpressRouteLinkConnectorTypeLC), - string(ExpressRouteLinkConnectorTypeSC), - } -} - -func (s *ExpressRouteLinkConnectorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkConnectorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkConnectorType(input string) (*ExpressRouteLinkConnectorType, error) { - vals := map[string]ExpressRouteLinkConnectorType{ - "lc": ExpressRouteLinkConnectorTypeLC, - "sc": ExpressRouteLinkConnectorTypeSC, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkConnectorType(input) - return &out, nil -} - -type ExpressRouteLinkMacSecCipher string - -const ( - ExpressRouteLinkMacSecCipherGcmAesOneTwoEight ExpressRouteLinkMacSecCipher = "GcmAes128" - ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix ExpressRouteLinkMacSecCipher = "GcmAes256" - ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight ExpressRouteLinkMacSecCipher = "GcmAesXpn128" - ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix ExpressRouteLinkMacSecCipher = "GcmAesXpn256" -) - -func PossibleValuesForExpressRouteLinkMacSecCipher() []string { - return []string{ - string(ExpressRouteLinkMacSecCipherGcmAesOneTwoEight), - string(ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix), - string(ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight), - string(ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix), - } -} - -func (s *ExpressRouteLinkMacSecCipher) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkMacSecCipher(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkMacSecCipher(input string) (*ExpressRouteLinkMacSecCipher, error) { - vals := map[string]ExpressRouteLinkMacSecCipher{ - "gcmaes128": ExpressRouteLinkMacSecCipherGcmAesOneTwoEight, - "gcmaes256": ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix, - "gcmaesxpn128": ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight, - "gcmaesxpn256": ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkMacSecCipher(input) - return &out, nil -} - -type ExpressRouteLinkMacSecSciState string - -const ( - ExpressRouteLinkMacSecSciStateDisabled ExpressRouteLinkMacSecSciState = "Disabled" - ExpressRouteLinkMacSecSciStateEnabled ExpressRouteLinkMacSecSciState = "Enabled" -) - -func PossibleValuesForExpressRouteLinkMacSecSciState() []string { - return []string{ - string(ExpressRouteLinkMacSecSciStateDisabled), - string(ExpressRouteLinkMacSecSciStateEnabled), - } -} - -func (s *ExpressRouteLinkMacSecSciState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkMacSecSciState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkMacSecSciState(input string) (*ExpressRouteLinkMacSecSciState, error) { - vals := map[string]ExpressRouteLinkMacSecSciState{ - "disabled": ExpressRouteLinkMacSecSciStateDisabled, - "enabled": ExpressRouteLinkMacSecSciStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkMacSecSciState(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/id_expressrouteport.go b/resource-manager/network/2022-11-01/expressroutelinks/id_expressrouteport.go deleted file mode 100644 index 4c0b60ea457..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/id_expressrouteport.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressroutelinks - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -// ExpressRoutePortId is a struct representing the Resource ID for a Express Route Port -type ExpressRoutePortId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string -} - -// NewExpressRoutePortID returns a new ExpressRoutePortId struct -func NewExpressRoutePortID(subscriptionId string, resourceGroupName string, expressRoutePortName string) ExpressRoutePortId { - return ExpressRoutePortId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - } -} - -// ParseExpressRoutePortID parses 'input' into a ExpressRoutePortId -func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortID checks that 'input' can be parsed as a Express Route Port ID -func ValidateExpressRoutePortID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Port ID -func (id ExpressRoutePortId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Port ID -func (id ExpressRoutePortId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - } -} - -// String returns a human-readable description of this Express Route Port ID -func (id ExpressRoutePortId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - } - return fmt.Sprintf("Express Route Port (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/id_expressrouteport_test.go b/resource-manager/network/2022-11-01/expressroutelinks/id_expressrouteport_test.go deleted file mode 100644 index 65f7d26a08b..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/id_expressrouteport_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressroutelinks - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -func TestNewExpressRoutePortID(t *testing.T) { - id := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } -} - -func TestFormatExpressRoutePortID(t *testing.T) { - actual := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestParseExpressRoutePortIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestSegmentsForExpressRoutePortId(t *testing.T) { - segments := ExpressRoutePortId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/id_link.go b/resource-manager/network/2022-11-01/expressroutelinks/id_link.go deleted file mode 100644 index 39a80538a62..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/id_link.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressroutelinks - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LinkId{} - -// LinkId is a struct representing the Resource ID for a Link -type LinkId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string - LinkName string -} - -// NewLinkID returns a new LinkId struct -func NewLinkID(subscriptionId string, resourceGroupName string, expressRoutePortName string, linkName string) LinkId { - return LinkId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - LinkName: linkName, - } -} - -// ParseLinkID parses 'input' into a LinkId -func ParseLinkID(input string) (*LinkId, error) { - parser := resourceids.NewParserFromResourceIdType(LinkId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.LinkName, ok = parsed.Parsed["linkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkName", *parsed) - } - - return &id, nil -} - -// ParseLinkIDInsensitively parses 'input' case-insensitively into a LinkId -// note: this method should only be used for API response data and not user input -func ParseLinkIDInsensitively(input string) (*LinkId, error) { - parser := resourceids.NewParserFromResourceIdType(LinkId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.LinkName, ok = parsed.Parsed["linkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "linkName", *parsed) - } - - return &id, nil -} - -// ValidateLinkID checks that 'input' can be parsed as a Link ID -func ValidateLinkID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLinkID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Link ID -func (id LinkId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s/links/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName, id.LinkName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Link ID -func (id LinkId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - resourceids.StaticSegment("staticLinks", "links", "links"), - resourceids.UserSpecifiedSegment("linkName", "linkValue"), - } -} - -// String returns a human-readable description of this Link ID -func (id LinkId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - fmt.Sprintf("Link Name: %q", id.LinkName), - } - return fmt.Sprintf("Link (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/id_link_test.go b/resource-manager/network/2022-11-01/expressroutelinks/id_link_test.go deleted file mode 100644 index 67420e5a0eb..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/id_link_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressroutelinks - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LinkId{} - -func TestNewLinkID(t *testing.T) { - id := NewLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "linkValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } - - if id.LinkName != "linkValue" { - t.Fatalf("Expected %q but got %q for Segment 'LinkName'", id.LinkName, "linkValue") - } -} - -func TestFormatLinkID(t *testing.T) { - actual := NewLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "linkValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLinkID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LinkId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue", - Expected: &LinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - LinkName: "linkValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLinkID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - if actual.LinkName != v.Expected.LinkName { - t.Fatalf("Expected %q but got %q for LinkName", v.Expected.LinkName, actual.LinkName) - } - - } -} - -func TestParseLinkIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LinkId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/lInKs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue", - Expected: &LinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - LinkName: "linkValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/links/linkValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/lInKs/lInKvAlUe", - Expected: &LinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - LinkName: "lInKvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/lInKs/lInKvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLinkIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - if actual.LinkName != v.Expected.LinkName { - t.Fatalf("Expected %q but got %q for LinkName", v.Expected.LinkName, actual.LinkName) - } - - } -} - -func TestSegmentsForLinkId(t *testing.T) { - segments := LinkId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LinkId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/method_get.go b/resource-manager/network/2022-11-01/expressroutelinks/method_get.go deleted file mode 100644 index 1b2aa890c99..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressroutelinks - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteLink -} - -// Get ... -func (c ExpressRouteLinksClient) Get(ctx context.Context, id LinkId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/method_list.go b/resource-manager/network/2022-11-01/expressroutelinks/method_list.go deleted file mode 100644 index 1c924747e76..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressroutelinks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteLink -} - -type ListCompleteResult struct { - Items []ExpressRouteLink -} - -// List ... -func (c ExpressRouteLinksClient) List(ctx context.Context, id ExpressRoutePortId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/links", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteLinksClient) ListComplete(ctx context.Context, id ExpressRoutePortId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteLinkOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteLinksClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRoutePortId, predicate ExpressRouteLinkOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteLink, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelink.go b/resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelink.go deleted file mode 100644 index d8919f16d71..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelink.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutelinks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelinkmacsecconfig.go b/resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelinkmacsecconfig.go deleted file mode 100644 index 91551b3b16f..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelinkmacsecconfig.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressroutelinks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkMacSecConfig struct { - CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"` - Cipher *ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"` - CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"` - SciState *ExpressRouteLinkMacSecSciState `json:"sciState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelinkpropertiesformat.go b/resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelinkpropertiesformat.go deleted file mode 100644 index 6d9466ff4ff..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/model_expressroutelinkpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package expressroutelinks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkPropertiesFormat struct { - AdminState *ExpressRouteLinkAdminState `json:"adminState,omitempty"` - ColoLocation *string `json:"coloLocation,omitempty"` - ConnectorType *ExpressRouteLinkConnectorType `json:"connectorType,omitempty"` - InterfaceName *string `json:"interfaceName,omitempty"` - MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"` - PatchPanelId *string `json:"patchPanelId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RackId *string `json:"rackId,omitempty"` - RouterName *string `json:"routerName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/predicates.go b/resource-manager/network/2022-11-01/expressroutelinks/predicates.go deleted file mode 100644 index bd6127afc55..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package expressroutelinks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p ExpressRouteLinkOperationPredicate) Matches(input ExpressRouteLink) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressroutelinks/version.go b/resource-manager/network/2022-11-01/expressroutelinks/version.go deleted file mode 100644 index 431162cd4e2..00000000000 --- a/resource-manager/network/2022-11-01/expressroutelinks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressroutelinks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressroutelinks/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/README.md b/resource-manager/network/2022-11-01/expressrouteportauthorizations/README.md deleted file mode 100644 index da19b5e884b..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteportauthorizations` Documentation - -The `expressrouteportauthorizations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteportauthorizations" -``` - - -### Client Initialization - -```go -client := expressrouteportauthorizations.NewExpressRoutePortAuthorizationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRoutePortAuthorizationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressrouteportauthorizations.NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue") - -payload := expressrouteportauthorizations.ExpressRoutePortAuthorization{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRoutePortAuthorizationsClient.Delete` - -```go -ctx := context.TODO() -id := expressrouteportauthorizations.NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRoutePortAuthorizationsClient.Get` - -```go -ctx := context.TODO() -id := expressrouteportauthorizations.NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRoutePortAuthorizationsClient.List` - -```go -ctx := context.TODO() -id := expressrouteportauthorizations.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/client.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/client.go deleted file mode 100644 index 532d877b9fe..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteportauthorizations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorizationsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRoutePortAuthorizationsClientWithBaseURI(api environments.Api) (*ExpressRoutePortAuthorizationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteportauthorizations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRoutePortAuthorizationsClient: %+v", err) - } - - return &ExpressRoutePortAuthorizationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/constants.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/constants.go deleted file mode 100644 index 3fbd20f1075..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package expressrouteportauthorizations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorizationUseStatus string - -const ( - ExpressRoutePortAuthorizationUseStatusAvailable ExpressRoutePortAuthorizationUseStatus = "Available" - ExpressRoutePortAuthorizationUseStatusInUse ExpressRoutePortAuthorizationUseStatus = "InUse" -) - -func PossibleValuesForExpressRoutePortAuthorizationUseStatus() []string { - return []string{ - string(ExpressRoutePortAuthorizationUseStatusAvailable), - string(ExpressRoutePortAuthorizationUseStatusInUse), - } -} - -func (s *ExpressRoutePortAuthorizationUseStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePortAuthorizationUseStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePortAuthorizationUseStatus(input string) (*ExpressRoutePortAuthorizationUseStatus, error) { - vals := map[string]ExpressRoutePortAuthorizationUseStatus{ - "available": ExpressRoutePortAuthorizationUseStatusAvailable, - "inuse": ExpressRoutePortAuthorizationUseStatusInUse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePortAuthorizationUseStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteport.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteport.go deleted file mode 100644 index be98e366b7f..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteport.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressrouteportauthorizations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -// ExpressRoutePortId is a struct representing the Resource ID for a Express Route Port -type ExpressRoutePortId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string -} - -// NewExpressRoutePortID returns a new ExpressRoutePortId struct -func NewExpressRoutePortID(subscriptionId string, resourceGroupName string, expressRoutePortName string) ExpressRoutePortId { - return ExpressRoutePortId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - } -} - -// ParseExpressRoutePortID parses 'input' into a ExpressRoutePortId -func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortID checks that 'input' can be parsed as a Express Route Port ID -func ValidateExpressRoutePortID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Port ID -func (id ExpressRoutePortId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Port ID -func (id ExpressRoutePortId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - } -} - -// String returns a human-readable description of this Express Route Port ID -func (id ExpressRoutePortId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - } - return fmt.Sprintf("Express Route Port (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteport_test.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteport_test.go deleted file mode 100644 index ebb9d47ae1c..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteport_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressrouteportauthorizations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -func TestNewExpressRoutePortID(t *testing.T) { - id := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } -} - -func TestFormatExpressRoutePortID(t *testing.T) { - actual := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestParseExpressRoutePortIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestSegmentsForExpressRoutePortId(t *testing.T) { - segments := ExpressRoutePortId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteportauthorization.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteportauthorization.go deleted file mode 100644 index 5b7042091d0..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteportauthorization.go +++ /dev/null @@ -1,140 +0,0 @@ -package expressrouteportauthorizations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortAuthorizationId{} - -// ExpressRoutePortAuthorizationId is a struct representing the Resource ID for a Express Route Port Authorization -type ExpressRoutePortAuthorizationId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string - AuthorizationName string -} - -// NewExpressRoutePortAuthorizationID returns a new ExpressRoutePortAuthorizationId struct -func NewExpressRoutePortAuthorizationID(subscriptionId string, resourceGroupName string, expressRoutePortName string, authorizationName string) ExpressRoutePortAuthorizationId { - return ExpressRoutePortAuthorizationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - AuthorizationName: authorizationName, - } -} - -// ParseExpressRoutePortAuthorizationID parses 'input' into a ExpressRoutePortAuthorizationId -func ParseExpressRoutePortAuthorizationID(input string) (*ExpressRoutePortAuthorizationId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortAuthorizationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortAuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortAuthorizationIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortAuthorizationId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortAuthorizationIDInsensitively(input string) (*ExpressRoutePortAuthorizationId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortAuthorizationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortAuthorizationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - if id.AuthorizationName, ok = parsed.Parsed["authorizationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "authorizationName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortAuthorizationID checks that 'input' can be parsed as a Express Route Port Authorization ID -func ValidateExpressRoutePortAuthorizationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortAuthorizationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Port Authorization ID -func (id ExpressRoutePortAuthorizationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s/authorizations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName, id.AuthorizationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Port Authorization ID -func (id ExpressRoutePortAuthorizationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - resourceids.StaticSegment("staticAuthorizations", "authorizations", "authorizations"), - resourceids.UserSpecifiedSegment("authorizationName", "authorizationValue"), - } -} - -// String returns a human-readable description of this Express Route Port Authorization ID -func (id ExpressRoutePortAuthorizationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - fmt.Sprintf("Authorization Name: %q", id.AuthorizationName), - } - return fmt.Sprintf("Express Route Port Authorization (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteportauthorization_test.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteportauthorization_test.go deleted file mode 100644 index b1cbdc14bbb..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/id_expressrouteportauthorization_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package expressrouteportauthorizations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortAuthorizationId{} - -func TestNewExpressRoutePortAuthorizationID(t *testing.T) { - id := NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } - - if id.AuthorizationName != "authorizationValue" { - t.Fatalf("Expected %q but got %q for Segment 'AuthorizationName'", id.AuthorizationName, "authorizationValue") - } -} - -func TestFormatExpressRoutePortAuthorizationID(t *testing.T) { - actual := NewExpressRoutePortAuthorizationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue", "authorizationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortAuthorizationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortAuthorizationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue", - Expected: &ExpressRoutePortAuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - AuthorizationName: "authorizationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortAuthorizationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - if actual.AuthorizationName != v.Expected.AuthorizationName { - t.Fatalf("Expected %q but got %q for AuthorizationName", v.Expected.AuthorizationName, actual.AuthorizationName) - } - - } -} - -func TestParseExpressRoutePortAuthorizationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortAuthorizationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/aUtHoRiZaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue", - Expected: &ExpressRoutePortAuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - AuthorizationName: "authorizationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/authorizations/authorizationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/aUtHoRiZaTiOnS/aUtHoRiZaTiOnVaLuE", - Expected: &ExpressRoutePortAuthorizationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - AuthorizationName: "aUtHoRiZaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/aUtHoRiZaTiOnS/aUtHoRiZaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortAuthorizationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - if actual.AuthorizationName != v.Expected.AuthorizationName { - t.Fatalf("Expected %q but got %q for AuthorizationName", v.Expected.AuthorizationName, actual.AuthorizationName) - } - - } -} - -func TestSegmentsForExpressRoutePortAuthorizationId(t *testing.T) { - segments := ExpressRoutePortAuthorizationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortAuthorizationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_createorupdate.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_createorupdate.go deleted file mode 100644 index 9310042b48b..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressrouteportauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRoutePortAuthorizationsClient) CreateOrUpdate(ctx context.Context, id ExpressRoutePortAuthorizationId, input ExpressRoutePortAuthorization) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRoutePortAuthorizationsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRoutePortAuthorizationId, input ExpressRoutePortAuthorization) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_delete.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_delete.go deleted file mode 100644 index 8940670b615..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressrouteportauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRoutePortAuthorizationsClient) Delete(ctx context.Context, id ExpressRoutePortAuthorizationId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRoutePortAuthorizationsClient) DeleteThenPoll(ctx context.Context, id ExpressRoutePortAuthorizationId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_get.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_get.go deleted file mode 100644 index e47761c3ca7..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteportauthorizations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRoutePortAuthorization -} - -// Get ... -func (c ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, id ExpressRoutePortAuthorizationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_list.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_list.go deleted file mode 100644 index 4cb6fc73a07..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package expressrouteportauthorizations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRoutePortAuthorization -} - -type ListCompleteResult struct { - Items []ExpressRoutePortAuthorization -} - -// List ... -func (c ExpressRoutePortAuthorizationsClient) List(ctx context.Context, id ExpressRoutePortId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/authorizations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRoutePortAuthorization `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRoutePortAuthorizationsClient) ListComplete(ctx context.Context, id ExpressRoutePortId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRoutePortAuthorizationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRoutePortAuthorizationsClient) ListCompleteMatchingPredicate(ctx context.Context, id ExpressRoutePortId, predicate ExpressRoutePortAuthorizationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRoutePortAuthorization, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/model_expressrouteportauthorization.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/model_expressrouteportauthorization.go deleted file mode 100644 index aee29af0a99..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/model_expressrouteportauthorization.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteportauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorization struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRoutePortAuthorizationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/model_expressrouteportauthorizationpropertiesformat.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/model_expressrouteportauthorizationpropertiesformat.go deleted file mode 100644 index 9370c4f6323..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/model_expressrouteportauthorizationpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressrouteportauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorizationPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - AuthorizationUseStatus *ExpressRoutePortAuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` - CircuitResourceUri *string `json:"circuitResourceUri,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/predicates.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/predicates.go deleted file mode 100644 index d12fc29e52a..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressrouteportauthorizations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortAuthorizationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ExpressRoutePortAuthorizationOperationPredicate) Matches(input ExpressRoutePortAuthorization) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressrouteportauthorizations/version.go b/resource-manager/network/2022-11-01/expressrouteportauthorizations/version.go deleted file mode 100644 index e3638c0a5ae..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportauthorizations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteportauthorizations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportauthorizations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/README.md b/resource-manager/network/2022-11-01/expressrouteports/README.md deleted file mode 100644 index d4c9ef953e8..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/README.md +++ /dev/null @@ -1,141 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteports` Documentation - -The `expressrouteports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteports" -``` - - -### Client Initialization - -```go -client := expressrouteports.NewExpressRoutePortsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRoutePortsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -payload := expressrouteports.ExpressRoutePort{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRoutePortsClient.Delete` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ExpressRoutePortsClient.GenerateLOA` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -payload := expressrouteports.GenerateExpressRoutePortsLOARequest{ - // ... -} - - -read, err := client.GenerateLOA(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRoutePortsClient.Get` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRoutePortsClient.List` - -```go -ctx := context.TODO() -id := expressrouteports.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRoutePortsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := expressrouteports.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ExpressRoutePortsClient.UpdateTags` - -```go -ctx := context.TODO() -id := expressrouteports.NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - -payload := expressrouteports.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/expressrouteports/client.go b/resource-manager/network/2022-11-01/expressrouteports/client.go deleted file mode 100644 index e0be48aade5..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteports - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRoutePortsClientWithBaseURI(api environments.Api) (*ExpressRoutePortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteports", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRoutePortsClient: %+v", err) - } - - return &ExpressRoutePortsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/constants.go b/resource-manager/network/2022-11-01/expressrouteports/constants.go deleted file mode 100644 index 0c08bc2c72f..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/constants.go +++ /dev/null @@ -1,309 +0,0 @@ -package expressrouteports - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkAdminState string - -const ( - ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled" - ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled" -) - -func PossibleValuesForExpressRouteLinkAdminState() []string { - return []string{ - string(ExpressRouteLinkAdminStateDisabled), - string(ExpressRouteLinkAdminStateEnabled), - } -} - -func (s *ExpressRouteLinkAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkAdminState(input string) (*ExpressRouteLinkAdminState, error) { - vals := map[string]ExpressRouteLinkAdminState{ - "disabled": ExpressRouteLinkAdminStateDisabled, - "enabled": ExpressRouteLinkAdminStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkAdminState(input) - return &out, nil -} - -type ExpressRouteLinkConnectorType string - -const ( - ExpressRouteLinkConnectorTypeLC ExpressRouteLinkConnectorType = "LC" - ExpressRouteLinkConnectorTypeSC ExpressRouteLinkConnectorType = "SC" -) - -func PossibleValuesForExpressRouteLinkConnectorType() []string { - return []string{ - string(ExpressRouteLinkConnectorTypeLC), - string(ExpressRouteLinkConnectorTypeSC), - } -} - -func (s *ExpressRouteLinkConnectorType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkConnectorType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkConnectorType(input string) (*ExpressRouteLinkConnectorType, error) { - vals := map[string]ExpressRouteLinkConnectorType{ - "lc": ExpressRouteLinkConnectorTypeLC, - "sc": ExpressRouteLinkConnectorTypeSC, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkConnectorType(input) - return &out, nil -} - -type ExpressRouteLinkMacSecCipher string - -const ( - ExpressRouteLinkMacSecCipherGcmAesOneTwoEight ExpressRouteLinkMacSecCipher = "GcmAes128" - ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix ExpressRouteLinkMacSecCipher = "GcmAes256" - ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight ExpressRouteLinkMacSecCipher = "GcmAesXpn128" - ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix ExpressRouteLinkMacSecCipher = "GcmAesXpn256" -) - -func PossibleValuesForExpressRouteLinkMacSecCipher() []string { - return []string{ - string(ExpressRouteLinkMacSecCipherGcmAesOneTwoEight), - string(ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix), - string(ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight), - string(ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix), - } -} - -func (s *ExpressRouteLinkMacSecCipher) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkMacSecCipher(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkMacSecCipher(input string) (*ExpressRouteLinkMacSecCipher, error) { - vals := map[string]ExpressRouteLinkMacSecCipher{ - "gcmaes128": ExpressRouteLinkMacSecCipherGcmAesOneTwoEight, - "gcmaes256": ExpressRouteLinkMacSecCipherGcmAesTwoFiveSix, - "gcmaesxpn128": ExpressRouteLinkMacSecCipherGcmAesXpnOneTwoEight, - "gcmaesxpn256": ExpressRouteLinkMacSecCipherGcmAesXpnTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkMacSecCipher(input) - return &out, nil -} - -type ExpressRouteLinkMacSecSciState string - -const ( - ExpressRouteLinkMacSecSciStateDisabled ExpressRouteLinkMacSecSciState = "Disabled" - ExpressRouteLinkMacSecSciStateEnabled ExpressRouteLinkMacSecSciState = "Enabled" -) - -func PossibleValuesForExpressRouteLinkMacSecSciState() []string { - return []string{ - string(ExpressRouteLinkMacSecSciStateDisabled), - string(ExpressRouteLinkMacSecSciStateEnabled), - } -} - -func (s *ExpressRouteLinkMacSecSciState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteLinkMacSecSciState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteLinkMacSecSciState(input string) (*ExpressRouteLinkMacSecSciState, error) { - vals := map[string]ExpressRouteLinkMacSecSciState{ - "disabled": ExpressRouteLinkMacSecSciStateDisabled, - "enabled": ExpressRouteLinkMacSecSciStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteLinkMacSecSciState(input) - return &out, nil -} - -type ExpressRoutePortsBillingType string - -const ( - ExpressRoutePortsBillingTypeMeteredData ExpressRoutePortsBillingType = "MeteredData" - ExpressRoutePortsBillingTypeUnlimitedData ExpressRoutePortsBillingType = "UnlimitedData" -) - -func PossibleValuesForExpressRoutePortsBillingType() []string { - return []string{ - string(ExpressRoutePortsBillingTypeMeteredData), - string(ExpressRoutePortsBillingTypeUnlimitedData), - } -} - -func (s *ExpressRoutePortsBillingType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePortsBillingType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePortsBillingType(input string) (*ExpressRoutePortsBillingType, error) { - vals := map[string]ExpressRoutePortsBillingType{ - "metereddata": ExpressRoutePortsBillingTypeMeteredData, - "unlimiteddata": ExpressRoutePortsBillingTypeUnlimitedData, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePortsBillingType(input) - return &out, nil -} - -type ExpressRoutePortsEncapsulation string - -const ( - ExpressRoutePortsEncapsulationDotOneQ ExpressRoutePortsEncapsulation = "Dot1Q" - ExpressRoutePortsEncapsulationQinQ ExpressRoutePortsEncapsulation = "QinQ" -) - -func PossibleValuesForExpressRoutePortsEncapsulation() []string { - return []string{ - string(ExpressRoutePortsEncapsulationDotOneQ), - string(ExpressRoutePortsEncapsulationQinQ), - } -} - -func (s *ExpressRoutePortsEncapsulation) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePortsEncapsulation(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePortsEncapsulation(input string) (*ExpressRoutePortsEncapsulation, error) { - vals := map[string]ExpressRoutePortsEncapsulation{ - "dot1q": ExpressRoutePortsEncapsulationDotOneQ, - "qinq": ExpressRoutePortsEncapsulationQinQ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePortsEncapsulation(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/id_expressrouteport.go b/resource-manager/network/2022-11-01/expressrouteports/id_expressrouteport.go deleted file mode 100644 index 2d3ef3fed81..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/id_expressrouteport.go +++ /dev/null @@ -1,127 +0,0 @@ -package expressrouteports - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -// ExpressRoutePortId is a struct representing the Resource ID for a Express Route Port -type ExpressRoutePortId struct { - SubscriptionId string - ResourceGroupName string - ExpressRoutePortName string -} - -// NewExpressRoutePortID returns a new ExpressRoutePortId struct -func NewExpressRoutePortID(subscriptionId string, resourceGroupName string, expressRoutePortName string) ExpressRoutePortId { - return ExpressRoutePortId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRoutePortName: expressRoutePortName, - } -} - -// ParseExpressRoutePortID parses 'input' into a ExpressRoutePortId -func ParseExpressRoutePortID(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortIDInsensitively(input string) (*ExpressRoutePortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRoutePortName, ok = parsed.Parsed["expressRoutePortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortID checks that 'input' can be parsed as a Express Route Port ID -func ValidateExpressRoutePortID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Port ID -func (id ExpressRoutePortId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRoutePorts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRoutePortName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Port ID -func (id ExpressRoutePortId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePorts", "expressRoutePorts", "expressRoutePorts"), - resourceids.UserSpecifiedSegment("expressRoutePortName", "expressRoutePortValue"), - } -} - -// String returns a human-readable description of this Express Route Port ID -func (id ExpressRoutePortId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Port Name: %q", id.ExpressRoutePortName), - } - return fmt.Sprintf("Express Route Port (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/id_expressrouteport_test.go b/resource-manager/network/2022-11-01/expressrouteports/id_expressrouteport_test.go deleted file mode 100644 index 1dee47df2b1..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/id_expressrouteport_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package expressrouteports - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortId{} - -func TestNewExpressRoutePortID(t *testing.T) { - id := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRoutePortName != "expressRoutePortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortName'", id.ExpressRoutePortName, "expressRoutePortValue") - } -} - -func TestFormatExpressRoutePortID(t *testing.T) { - actual := NewExpressRoutePortID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRoutePortValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestParseExpressRoutePortIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRoutePortName: "expressRoutePortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRoutePorts/expressRoutePortValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe", - Expected: &ExpressRoutePortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRoutePortName: "eXpReSsRoUtEpOrTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTs/eXpReSsRoUtEpOrTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRoutePortName != v.Expected.ExpressRoutePortName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortName", v.Expected.ExpressRoutePortName, actual.ExpressRoutePortName) - } - - } -} - -func TestSegmentsForExpressRoutePortId(t *testing.T) { - segments := ExpressRoutePortId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/method_createorupdate.go b/resource-manager/network/2022-11-01/expressrouteports/method_createorupdate.go deleted file mode 100644 index e9deaae8003..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, id ExpressRoutePortId, input ExpressRoutePort) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ExpressRoutePortsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExpressRoutePortId, input ExpressRoutePort) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/method_delete.go b/resource-manager/network/2022-11-01/expressrouteports/method_delete.go deleted file mode 100644 index 899e7de35bd..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ExpressRoutePortsClient) Delete(ctx context.Context, id ExpressRoutePortId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ExpressRoutePortsClient) DeleteThenPoll(ctx context.Context, id ExpressRoutePortId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/method_generateloa.go b/resource-manager/network/2022-11-01/expressrouteports/method_generateloa.go deleted file mode 100644 index 987f0d2b6df..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/method_generateloa.go +++ /dev/null @@ -1,56 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateLOAOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *GenerateExpressRoutePortsLOAResult -} - -// GenerateLOA ... -func (c ExpressRoutePortsClient) GenerateLOA(ctx context.Context, id ExpressRoutePortId, input GenerateExpressRoutePortsLOARequest) (result GenerateLOAOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generateLoa", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/method_get.go b/resource-manager/network/2022-11-01/expressrouteports/method_get.go deleted file mode 100644 index 91eabb6a2e5..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteports - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRoutePort -} - -// Get ... -func (c ExpressRoutePortsClient) Get(ctx context.Context, id ExpressRoutePortId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/method_list.go b/resource-manager/network/2022-11-01/expressrouteports/method_list.go deleted file mode 100644 index 60aa2b7a2d0..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRoutePort -} - -type ListCompleteResult struct { - Items []ExpressRoutePort -} - -// List ... -func (c ExpressRoutePortsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRoutePorts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRoutePort `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRoutePortsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRoutePortOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRoutePortsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRoutePortOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRoutePort, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/expressrouteports/method_listbyresourcegroup.go deleted file mode 100644 index 41d1b61d286..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressrouteports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRoutePort -} - -type ListByResourceGroupCompleteResult struct { - Items []ExpressRoutePort -} - -// ListByResourceGroup ... -func (c ExpressRoutePortsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRoutePorts", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRoutePort `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c ExpressRoutePortsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ExpressRoutePortOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRoutePortsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ExpressRoutePortOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]ExpressRoutePort, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/method_updatetags.go b/resource-manager/network/2022-11-01/expressrouteports/method_updatetags.go deleted file mode 100644 index 42bc8dc875e..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package expressrouteports - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRoutePort -} - -// UpdateTags ... -func (c ExpressRoutePortsClient) UpdateTags(ctx context.Context, id ExpressRoutePortId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/model_expressroutelink.go b/resource-manager/network/2022-11-01/expressrouteports/model_expressroutelink.go deleted file mode 100644 index 60ed59156ad..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/model_expressroutelink.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/model_expressroutelinkmacsecconfig.go b/resource-manager/network/2022-11-01/expressrouteports/model_expressroutelinkmacsecconfig.go deleted file mode 100644 index f41c94b3401..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/model_expressroutelinkmacsecconfig.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkMacSecConfig struct { - CakSecretIdentifier *string `json:"cakSecretIdentifier,omitempty"` - Cipher *ExpressRouteLinkMacSecCipher `json:"cipher,omitempty"` - CknSecretIdentifier *string `json:"cknSecretIdentifier,omitempty"` - SciState *ExpressRouteLinkMacSecSciState `json:"sciState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/model_expressroutelinkpropertiesformat.go b/resource-manager/network/2022-11-01/expressrouteports/model_expressroutelinkpropertiesformat.go deleted file mode 100644 index a9fd2f6e03d..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/model_expressroutelinkpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteLinkPropertiesFormat struct { - AdminState *ExpressRouteLinkAdminState `json:"adminState,omitempty"` - ColoLocation *string `json:"coloLocation,omitempty"` - ConnectorType *ExpressRouteLinkConnectorType `json:"connectorType,omitempty"` - InterfaceName *string `json:"interfaceName,omitempty"` - MacSecConfig *ExpressRouteLinkMacSecConfig `json:"macSecConfig,omitempty"` - PatchPanelId *string `json:"patchPanelId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RackId *string `json:"rackId,omitempty"` - RouterName *string `json:"routerName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/model_expressrouteport.go b/resource-manager/network/2022-11-01/expressrouteports/model_expressrouteport.go deleted file mode 100644 index 4e2aa94784f..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/model_expressrouteport.go +++ /dev/null @@ -1,19 +0,0 @@ -package expressrouteports - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePort struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRoutePortPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/model_expressrouteportpropertiesformat.go b/resource-manager/network/2022-11-01/expressrouteports/model_expressrouteportpropertiesformat.go deleted file mode 100644 index 897d5ea08de..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/model_expressrouteportpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortPropertiesFormat struct { - AllocationDate *string `json:"allocationDate,omitempty"` - BandwidthInGbps *int64 `json:"bandwidthInGbps,omitempty"` - BillingType *ExpressRoutePortsBillingType `json:"billingType,omitempty"` - Circuits *[]SubResource `json:"circuits,omitempty"` - Encapsulation *ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"` - EtherType *string `json:"etherType,omitempty"` - Links *[]ExpressRouteLink `json:"links,omitempty"` - Mtu *string `json:"mtu,omitempty"` - PeeringLocation *string `json:"peeringLocation,omitempty"` - ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/model_generateexpressrouteportsloarequest.go b/resource-manager/network/2022-11-01/expressrouteports/model_generateexpressrouteportsloarequest.go deleted file mode 100644 index d588660f834..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/model_generateexpressrouteportsloarequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateExpressRoutePortsLOARequest struct { - CustomerName string `json:"customerName"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/model_generateexpressrouteportsloaresult.go b/resource-manager/network/2022-11-01/expressrouteports/model_generateexpressrouteportsloaresult.go deleted file mode 100644 index 54defeace0f..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/model_generateexpressrouteportsloaresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateExpressRoutePortsLOAResult struct { - EncodedContent *string `json:"encodedContent,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/model_subresource.go b/resource-manager/network/2022-11-01/expressrouteports/model_subresource.go deleted file mode 100644 index ef7329a3163..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/model_tagsobject.go b/resource-manager/network/2022-11-01/expressrouteports/model_tagsobject.go deleted file mode 100644 index d0cb6f9d317..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/predicates.go b/resource-manager/network/2022-11-01/expressrouteports/predicates.go deleted file mode 100644 index 7339fac991b..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package expressrouteports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRoutePortOperationPredicate) Matches(input ExpressRoutePort) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressrouteports/version.go b/resource-manager/network/2022-11-01/expressrouteports/version.go deleted file mode 100644 index 58d3cc82cf5..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteports/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteports - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteports/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/README.md b/resource-manager/network/2022-11-01/expressrouteportslocations/README.md deleted file mode 100644 index 452d85a2c56..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteportslocations` Documentation - -The `expressrouteportslocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteportslocations" -``` - - -### Client Initialization - -```go -client := expressrouteportslocations.NewExpressRoutePortsLocationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRoutePortsLocationsClient.Get` - -```go -ctx := context.TODO() -id := expressrouteportslocations.NewExpressRoutePortsLocationID("12345678-1234-9876-4563-123456789012", "expressRoutePortsLocationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRoutePortsLocationsClient.List` - -```go -ctx := context.TODO() -id := expressrouteportslocations.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/client.go b/resource-manager/network/2022-11-01/expressrouteportslocations/client.go deleted file mode 100644 index e57bad8052e..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteportslocations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocationsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRoutePortsLocationsClientWithBaseURI(api environments.Api) (*ExpressRoutePortsLocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteportslocations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRoutePortsLocationsClient: %+v", err) - } - - return &ExpressRoutePortsLocationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/constants.go b/resource-manager/network/2022-11-01/expressrouteportslocations/constants.go deleted file mode 100644 index 79d7bad3ae5..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package expressrouteportslocations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/id_expressrouteportslocation.go b/resource-manager/network/2022-11-01/expressrouteportslocations/id_expressrouteportslocation.go deleted file mode 100644 index 096c43de667..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/id_expressrouteportslocation.go +++ /dev/null @@ -1,114 +0,0 @@ -package expressrouteportslocations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortsLocationId{} - -// ExpressRoutePortsLocationId is a struct representing the Resource ID for a Express Route Ports Location -type ExpressRoutePortsLocationId struct { - SubscriptionId string - ExpressRoutePortsLocationName string -} - -// NewExpressRoutePortsLocationID returns a new ExpressRoutePortsLocationId struct -func NewExpressRoutePortsLocationID(subscriptionId string, expressRoutePortsLocationName string) ExpressRoutePortsLocationId { - return ExpressRoutePortsLocationId{ - SubscriptionId: subscriptionId, - ExpressRoutePortsLocationName: expressRoutePortsLocationName, - } -} - -// ParseExpressRoutePortsLocationID parses 'input' into a ExpressRoutePortsLocationId -func ParseExpressRoutePortsLocationID(input string) (*ExpressRoutePortsLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortsLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortsLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRoutePortsLocationName, ok = parsed.Parsed["expressRoutePortsLocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortsLocationName", *parsed) - } - - return &id, nil -} - -// ParseExpressRoutePortsLocationIDInsensitively parses 'input' case-insensitively into a ExpressRoutePortsLocationId -// note: this method should only be used for API response data and not user input -func ParseExpressRoutePortsLocationIDInsensitively(input string) (*ExpressRoutePortsLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRoutePortsLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRoutePortsLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRoutePortsLocationName, ok = parsed.Parsed["expressRoutePortsLocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRoutePortsLocationName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRoutePortsLocationID checks that 'input' can be parsed as a Express Route Ports Location ID -func ValidateExpressRoutePortsLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRoutePortsLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Ports Location ID -func (id ExpressRoutePortsLocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/expressRoutePortsLocations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ExpressRoutePortsLocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Ports Location ID -func (id ExpressRoutePortsLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRoutePortsLocations", "expressRoutePortsLocations", "expressRoutePortsLocations"), - resourceids.UserSpecifiedSegment("expressRoutePortsLocationName", "expressRoutePortsLocationValue"), - } -} - -// String returns a human-readable description of this Express Route Ports Location ID -func (id ExpressRoutePortsLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Express Route Ports Location Name: %q", id.ExpressRoutePortsLocationName), - } - return fmt.Sprintf("Express Route Ports Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/id_expressrouteportslocation_test.go b/resource-manager/network/2022-11-01/expressrouteportslocations/id_expressrouteportslocation_test.go deleted file mode 100644 index b1811870728..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/id_expressrouteportslocation_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package expressrouteportslocations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRoutePortsLocationId{} - -func TestNewExpressRoutePortsLocationID(t *testing.T) { - id := NewExpressRoutePortsLocationID("12345678-1234-9876-4563-123456789012", "expressRoutePortsLocationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ExpressRoutePortsLocationName != "expressRoutePortsLocationValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRoutePortsLocationName'", id.ExpressRoutePortsLocationName, "expressRoutePortsLocationValue") - } -} - -func TestFormatExpressRoutePortsLocationID(t *testing.T) { - actual := NewExpressRoutePortsLocationID("12345678-1234-9876-4563-123456789012", "expressRoutePortsLocationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRoutePortsLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortsLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue", - Expected: &ExpressRoutePortsLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRoutePortsLocationName: "expressRoutePortsLocationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortsLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ExpressRoutePortsLocationName != v.Expected.ExpressRoutePortsLocationName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortsLocationName", v.Expected.ExpressRoutePortsLocationName, actual.ExpressRoutePortsLocationName) - } - - } -} - -func TestParseExpressRoutePortsLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRoutePortsLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTsLoCaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue", - Expected: &ExpressRoutePortsLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRoutePortsLocationName: "expressRoutePortsLocationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRoutePortsLocations/expressRoutePortsLocationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTsLoCaTiOnS/eXpReSsRoUtEpOrTsLoCaTiOnVaLuE", - Expected: &ExpressRoutePortsLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRoutePortsLocationName: "eXpReSsRoUtEpOrTsLoCaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpOrTsLoCaTiOnS/eXpReSsRoUtEpOrTsLoCaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRoutePortsLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ExpressRoutePortsLocationName != v.Expected.ExpressRoutePortsLocationName { - t.Fatalf("Expected %q but got %q for ExpressRoutePortsLocationName", v.Expected.ExpressRoutePortsLocationName, actual.ExpressRoutePortsLocationName) - } - - } -} - -func TestSegmentsForExpressRoutePortsLocationId(t *testing.T) { - segments := ExpressRoutePortsLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRoutePortsLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/method_get.go b/resource-manager/network/2022-11-01/expressrouteportslocations/method_get.go deleted file mode 100644 index 1b9b58d6939..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteportslocations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRoutePortsLocation -} - -// Get ... -func (c ExpressRoutePortsLocationsClient) Get(ctx context.Context, id ExpressRoutePortsLocationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/method_list.go b/resource-manager/network/2022-11-01/expressrouteportslocations/method_list.go deleted file mode 100644 index 380c2745ac1..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressrouteportslocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRoutePortsLocation -} - -type ListCompleteResult struct { - Items []ExpressRoutePortsLocation -} - -// List ... -func (c ExpressRoutePortsLocationsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRoutePortsLocations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRoutePortsLocation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRoutePortsLocationsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRoutePortsLocationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRoutePortsLocationsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRoutePortsLocationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRoutePortsLocation, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocation.go b/resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocation.go deleted file mode 100644 index 86d94dc7922..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocation.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressrouteportslocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocation struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocationbandwidths.go b/resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocationbandwidths.go deleted file mode 100644 index 018cb977672..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocationbandwidths.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteportslocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocationBandwidths struct { - OfferName *string `json:"offerName,omitempty"` - ValueInGbps *int64 `json:"valueInGbps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocationpropertiesformat.go b/resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocationpropertiesformat.go deleted file mode 100644 index fa52c31306b..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/model_expressrouteportslocationpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package expressrouteportslocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocationPropertiesFormat struct { - Address *string `json:"address,omitempty"` - AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"` - Contact *string `json:"contact,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/predicates.go b/resource-manager/network/2022-11-01/expressrouteportslocations/predicates.go deleted file mode 100644 index 3b345c2e1f5..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressrouteportslocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRoutePortsLocationOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRoutePortsLocationOperationPredicate) Matches(input ExpressRoutePortsLocation) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressrouteportslocations/version.go b/resource-manager/network/2022-11-01/expressrouteportslocations/version.go deleted file mode 100644 index 2de3002885c..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteportslocations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteportslocations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteportslocations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/README.md b/resource-manager/network/2022-11-01/expressrouteproviderports/README.md deleted file mode 100644 index 33b9fabd747..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/README.md +++ /dev/null @@ -1,52 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteproviderports` Documentation - -The `expressrouteproviderports` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteproviderports" -``` - - -### Client Initialization - -```go -client := expressrouteproviderports.NewExpressRouteProviderPortsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteProviderPortsClient.ExpressRouteProviderPort` - -```go -ctx := context.TODO() -id := expressrouteproviderports.NewExpressRouteProviderPortID("12345678-1234-9876-4563-123456789012", "expressRouteProviderPortValue") - -read, err := client.ExpressRouteProviderPort(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ExpressRouteProviderPortsClient.LocationList` - -```go -ctx := context.TODO() -id := expressrouteproviderports.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.LocationList(ctx, id, expressrouteproviderports.DefaultLocationListOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/client.go b/resource-manager/network/2022-11-01/expressrouteproviderports/client.go deleted file mode 100644 index 276d5877f63..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteproviderports - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPortsClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteProviderPortsClientWithBaseURI(api environments.Api) (*ExpressRouteProviderPortsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteproviderports", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteProviderPortsClient: %+v", err) - } - - return &ExpressRouteProviderPortsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/id_expressrouteproviderport.go b/resource-manager/network/2022-11-01/expressrouteproviderports/id_expressrouteproviderport.go deleted file mode 100644 index e7df5d969e9..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/id_expressrouteproviderport.go +++ /dev/null @@ -1,114 +0,0 @@ -package expressrouteproviderports - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteProviderPortId{} - -// ExpressRouteProviderPortId is a struct representing the Resource ID for a Express Route Provider Port -type ExpressRouteProviderPortId struct { - SubscriptionId string - ExpressRouteProviderPortName string -} - -// NewExpressRouteProviderPortID returns a new ExpressRouteProviderPortId struct -func NewExpressRouteProviderPortID(subscriptionId string, expressRouteProviderPortName string) ExpressRouteProviderPortId { - return ExpressRouteProviderPortId{ - SubscriptionId: subscriptionId, - ExpressRouteProviderPortName: expressRouteProviderPortName, - } -} - -// ParseExpressRouteProviderPortID parses 'input' into a ExpressRouteProviderPortId -func ParseExpressRouteProviderPortID(input string) (*ExpressRouteProviderPortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteProviderPortId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteProviderPortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRouteProviderPortName, ok = parsed.Parsed["expressRouteProviderPortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteProviderPortName", *parsed) - } - - return &id, nil -} - -// ParseExpressRouteProviderPortIDInsensitively parses 'input' case-insensitively into a ExpressRouteProviderPortId -// note: this method should only be used for API response data and not user input -func ParseExpressRouteProviderPortIDInsensitively(input string) (*ExpressRouteProviderPortId, error) { - parser := resourceids.NewParserFromResourceIdType(ExpressRouteProviderPortId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ExpressRouteProviderPortId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ExpressRouteProviderPortName, ok = parsed.Parsed["expressRouteProviderPortName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteProviderPortName", *parsed) - } - - return &id, nil -} - -// ValidateExpressRouteProviderPortID checks that 'input' can be parsed as a Express Route Provider Port ID -func ValidateExpressRouteProviderPortID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseExpressRouteProviderPortID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Express Route Provider Port ID -func (id ExpressRouteProviderPortId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/expressRouteProviderPorts/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ExpressRouteProviderPortName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Express Route Provider Port ID -func (id ExpressRouteProviderPortId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteProviderPorts", "expressRouteProviderPorts", "expressRouteProviderPorts"), - resourceids.UserSpecifiedSegment("expressRouteProviderPortName", "expressRouteProviderPortValue"), - } -} - -// String returns a human-readable description of this Express Route Provider Port ID -func (id ExpressRouteProviderPortId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Express Route Provider Port Name: %q", id.ExpressRouteProviderPortName), - } - return fmt.Sprintf("Express Route Provider Port (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/id_expressrouteproviderport_test.go b/resource-manager/network/2022-11-01/expressrouteproviderports/id_expressrouteproviderport_test.go deleted file mode 100644 index 3ec793bc6e3..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/id_expressrouteproviderport_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package expressrouteproviderports - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ExpressRouteProviderPortId{} - -func TestNewExpressRouteProviderPortID(t *testing.T) { - id := NewExpressRouteProviderPortID("12345678-1234-9876-4563-123456789012", "expressRouteProviderPortValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ExpressRouteProviderPortName != "expressRouteProviderPortValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteProviderPortName'", id.ExpressRouteProviderPortName, "expressRouteProviderPortValue") - } -} - -func TestFormatExpressRouteProviderPortID(t *testing.T) { - actual := NewExpressRouteProviderPortID("12345678-1234-9876-4563-123456789012", "expressRouteProviderPortValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseExpressRouteProviderPortID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteProviderPortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue", - Expected: &ExpressRouteProviderPortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRouteProviderPortName: "expressRouteProviderPortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteProviderPortID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ExpressRouteProviderPortName != v.Expected.ExpressRouteProviderPortName { - t.Fatalf("Expected %q but got %q for ExpressRouteProviderPortName", v.Expected.ExpressRouteProviderPortName, actual.ExpressRouteProviderPortName) - } - - } -} - -func TestParseExpressRouteProviderPortIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ExpressRouteProviderPortId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpRoViDeRpOrTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue", - Expected: &ExpressRouteProviderPortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRouteProviderPortName: "expressRouteProviderPortValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/expressRouteProviderPorts/expressRouteProviderPortValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpRoViDeRpOrTs/eXpReSsRoUtEpRoViDeRpOrTvAlUe", - Expected: &ExpressRouteProviderPortId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ExpressRouteProviderPortName: "eXpReSsRoUtEpRoViDeRpOrTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEpRoViDeRpOrTs/eXpReSsRoUtEpRoViDeRpOrTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseExpressRouteProviderPortIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ExpressRouteProviderPortName != v.Expected.ExpressRouteProviderPortName { - t.Fatalf("Expected %q but got %q for ExpressRouteProviderPortName", v.Expected.ExpressRouteProviderPortName, actual.ExpressRouteProviderPortName) - } - - } -} - -func TestSegmentsForExpressRouteProviderPortId(t *testing.T) { - segments := ExpressRouteProviderPortId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ExpressRouteProviderPortId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/method_expressrouteproviderport.go b/resource-manager/network/2022-11-01/expressrouteproviderports/method_expressrouteproviderport.go deleted file mode 100644 index 8972c25c114..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/method_expressrouteproviderport.go +++ /dev/null @@ -1,51 +0,0 @@ -package expressrouteproviderports - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPortOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteProviderPort -} - -// ExpressRouteProviderPort ... -func (c ExpressRouteProviderPortsClient) ExpressRouteProviderPort(ctx context.Context, id ExpressRouteProviderPortId) (result ExpressRouteProviderPortOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/method_locationlist.go b/resource-manager/network/2022-11-01/expressrouteproviderports/method_locationlist.go deleted file mode 100644 index 786df1827f9..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/method_locationlist.go +++ /dev/null @@ -1,81 +0,0 @@ -package expressrouteproviderports - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocationListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ExpressRouteProviderPortListResult -} - -type LocationListOperationOptions struct { - Filter *string -} - -func DefaultLocationListOperationOptions() LocationListOperationOptions { - return LocationListOperationOptions{} -} - -func (o LocationListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o LocationListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o LocationListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Filter != nil { - out.Append("$filter", fmt.Sprintf("%v", *o.Filter)) - } - return &out -} - -// LocationList ... -func (c ExpressRouteProviderPortsClient) LocationList(ctx context.Context, id commonids.SubscriptionId, options LocationListOperationOptions) (result LocationListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteProviderPorts", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderport.go b/resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderport.go deleted file mode 100644 index 9bb3723c40e..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderport.go +++ /dev/null @@ -1,14 +0,0 @@ -package expressrouteproviderports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPort struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteProviderPortProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderportlistresult.go b/resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderportlistresult.go deleted file mode 100644 index 3648c0c7147..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderportlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteproviderports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPortListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ExpressRouteProviderPort `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderportproperties.go b/resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderportproperties.go deleted file mode 100644 index d0a93ccf046..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/model_expressrouteproviderportproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package expressrouteproviderports - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteProviderPortProperties struct { - OverprovisionFactor *int64 `json:"overprovisionFactor,omitempty"` - PeeringLocation *string `json:"peeringLocation,omitempty"` - PortBandwidthInMbps *int64 `json:"portBandwidthInMbps,omitempty"` - PortPairDescriptor *string `json:"portPairDescriptor,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - RemainingBandwidthInMbps *int64 `json:"remainingBandwidthInMbps,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - UsedBandwidthInMbps *int64 `json:"usedBandwidthInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteproviderports/version.go b/resource-manager/network/2022-11-01/expressrouteproviderports/version.go deleted file mode 100644 index 9faf54ac368..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteproviderports/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteproviderports - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteproviderports/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/expressrouteserviceproviders/README.md b/resource-manager/network/2022-11-01/expressrouteserviceproviders/README.md deleted file mode 100644 index 8b0f83131b8..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteserviceproviders/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteserviceproviders` Documentation - -The `expressrouteserviceproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/expressrouteserviceproviders" -``` - - -### Client Initialization - -```go -client := expressrouteserviceproviders.NewExpressRouteServiceProvidersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ExpressRouteServiceProvidersClient.List` - -```go -ctx := context.TODO() -id := expressrouteserviceproviders.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/expressrouteserviceproviders/client.go b/resource-manager/network/2022-11-01/expressrouteserviceproviders/client.go deleted file mode 100644 index 68ed2324e0d..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteserviceproviders/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package expressrouteserviceproviders - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProvidersClient struct { - Client *resourcemanager.Client -} - -func NewExpressRouteServiceProvidersClientWithBaseURI(api environments.Api) (*ExpressRouteServiceProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "expressrouteserviceproviders", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ExpressRouteServiceProvidersClient: %+v", err) - } - - return &ExpressRouteServiceProvidersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteserviceproviders/constants.go b/resource-manager/network/2022-11-01/expressrouteserviceproviders/constants.go deleted file mode 100644 index 7e0b7b9a059..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteserviceproviders/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package expressrouteserviceproviders - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/expressrouteserviceproviders/method_list.go b/resource-manager/network/2022-11-01/expressrouteserviceproviders/method_list.go deleted file mode 100644 index 1d07ccf05b5..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteserviceproviders/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package expressrouteserviceproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ExpressRouteServiceProvider -} - -type ListCompleteResult struct { - Items []ExpressRouteServiceProvider -} - -// List ... -func (c ExpressRouteServiceProvidersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/expressRouteServiceProviders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ExpressRouteServiceProvider `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ExpressRouteServiceProvidersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ExpressRouteServiceProviderOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ExpressRouteServiceProvidersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ExpressRouteServiceProviderOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ExpressRouteServiceProvider, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceprovider.go b/resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceprovider.go deleted file mode 100644 index 156136ef150..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceprovider.go +++ /dev/null @@ -1,13 +0,0 @@ -package expressrouteserviceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProvider struct { - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceproviderbandwidthsoffered.go b/resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceproviderbandwidthsoffered.go deleted file mode 100644 index 72758b5e1d5..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceproviderbandwidthsoffered.go +++ /dev/null @@ -1,9 +0,0 @@ -package expressrouteserviceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProviderBandwidthsOffered struct { - OfferName *string `json:"offerName,omitempty"` - ValueInMbps *int64 `json:"valueInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceproviderpropertiesformat.go b/resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceproviderpropertiesformat.go deleted file mode 100644 index e3c3cc178f9..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteserviceproviders/model_expressrouteserviceproviderpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package expressrouteserviceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProviderPropertiesFormat struct { - BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` - PeeringLocations *[]string `json:"peeringLocations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/expressrouteserviceproviders/predicates.go b/resource-manager/network/2022-11-01/expressrouteserviceproviders/predicates.go deleted file mode 100644 index d2c605983d7..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteserviceproviders/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package expressrouteserviceproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteServiceProviderOperationPredicate struct { - Id *string - Location *string - Name *string - Type *string -} - -func (p ExpressRouteServiceProviderOperationPredicate) Matches(input ExpressRouteServiceProvider) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/expressrouteserviceproviders/version.go b/resource-manager/network/2022-11-01/expressrouteserviceproviders/version.go deleted file mode 100644 index 738208237ec..00000000000 --- a/resource-manager/network/2022-11-01/expressrouteserviceproviders/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package expressrouteserviceproviders - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/expressrouteserviceproviders/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/README.md b/resource-manager/network/2022-11-01/firewallpolicies/README.md deleted file mode 100644 index 33ad5a616ff..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/README.md +++ /dev/null @@ -1,236 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/firewallpolicies` Documentation - -The `firewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/firewallpolicies" -``` - - -### Client Initialization - -```go -client := firewallpolicies.NewFirewallPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `FirewallPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.FirewallPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesFilterValuesList` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.SignatureOverridesFilterValuesQuery{ - // ... -} - - -read, err := client.FirewallPolicyIdpsSignaturesFilterValuesList(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesList` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.IDPSQueryObject{ - // ... -} - - -read, err := client.FirewallPolicyIdpsSignaturesList(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesOverridesGet` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -read, err := client.FirewallPolicyIdpsSignaturesOverridesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesOverridesList` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -read, err := client.FirewallPolicyIdpsSignaturesOverridesList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesOverridesPatch` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.SignaturesOverrides{ - // ... -} - - -read, err := client.FirewallPolicyIdpsSignaturesOverridesPatch(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.FirewallPolicyIdpsSignaturesOverridesPut` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.SignaturesOverrides{ - // ... -} - - -read, err := client.FirewallPolicyIdpsSignaturesOverridesPut(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.Get` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -read, err := client.Get(ctx, id, firewallpolicies.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPoliciesClient.List` - -```go -ctx := context.TODO() -id := firewallpolicies.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `FirewallPoliciesClient.ListAll` - -```go -ctx := context.TODO() -id := firewallpolicies.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `FirewallPoliciesClient.UpdateTags` - -```go -ctx := context.TODO() -id := firewallpolicies.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -payload := firewallpolicies.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/firewallpolicies/client.go b/resource-manager/network/2022-11-01/firewallpolicies/client.go deleted file mode 100644 index 791b0949b8c..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package firewallpolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewFirewallPoliciesClientWithBaseURI(api environments.Api) (*FirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "firewallpolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating FirewallPoliciesClient: %+v", err) - } - - return &FirewallPoliciesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/constants.go b/resource-manager/network/2022-11-01/firewallpolicies/constants.go deleted file mode 100644 index 6a392fdaa9f..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/constants.go +++ /dev/null @@ -1,366 +0,0 @@ -package firewallpolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoLearnPrivateRangesMode string - -const ( - AutoLearnPrivateRangesModeDisabled AutoLearnPrivateRangesMode = "Disabled" - AutoLearnPrivateRangesModeEnabled AutoLearnPrivateRangesMode = "Enabled" -) - -func PossibleValuesForAutoLearnPrivateRangesMode() []string { - return []string{ - string(AutoLearnPrivateRangesModeDisabled), - string(AutoLearnPrivateRangesModeEnabled), - } -} - -func (s *AutoLearnPrivateRangesMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAutoLearnPrivateRangesMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAutoLearnPrivateRangesMode(input string) (*AutoLearnPrivateRangesMode, error) { - vals := map[string]AutoLearnPrivateRangesMode{ - "disabled": AutoLearnPrivateRangesModeDisabled, - "enabled": AutoLearnPrivateRangesModeEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AutoLearnPrivateRangesMode(input) - return &out, nil -} - -type AzureFirewallThreatIntelMode string - -const ( - AzureFirewallThreatIntelModeAlert AzureFirewallThreatIntelMode = "Alert" - AzureFirewallThreatIntelModeDeny AzureFirewallThreatIntelMode = "Deny" - AzureFirewallThreatIntelModeOff AzureFirewallThreatIntelMode = "Off" -) - -func PossibleValuesForAzureFirewallThreatIntelMode() []string { - return []string{ - string(AzureFirewallThreatIntelModeAlert), - string(AzureFirewallThreatIntelModeDeny), - string(AzureFirewallThreatIntelModeOff), - } -} - -func (s *AzureFirewallThreatIntelMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAzureFirewallThreatIntelMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAzureFirewallThreatIntelMode(input string) (*AzureFirewallThreatIntelMode, error) { - vals := map[string]AzureFirewallThreatIntelMode{ - "alert": AzureFirewallThreatIntelModeAlert, - "deny": AzureFirewallThreatIntelModeDeny, - "off": AzureFirewallThreatIntelModeOff, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AzureFirewallThreatIntelMode(input) - return &out, nil -} - -type FirewallPolicyIDPSQuerySortOrder string - -const ( - FirewallPolicyIDPSQuerySortOrderAscending FirewallPolicyIDPSQuerySortOrder = "Ascending" - FirewallPolicyIDPSQuerySortOrderDescending FirewallPolicyIDPSQuerySortOrder = "Descending" -) - -func PossibleValuesForFirewallPolicyIDPSQuerySortOrder() []string { - return []string{ - string(FirewallPolicyIDPSQuerySortOrderAscending), - string(FirewallPolicyIDPSQuerySortOrderDescending), - } -} - -func (s *FirewallPolicyIDPSQuerySortOrder) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyIDPSQuerySortOrder(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyIDPSQuerySortOrder(input string) (*FirewallPolicyIDPSQuerySortOrder, error) { - vals := map[string]FirewallPolicyIDPSQuerySortOrder{ - "ascending": FirewallPolicyIDPSQuerySortOrderAscending, - "descending": FirewallPolicyIDPSQuerySortOrderDescending, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyIDPSQuerySortOrder(input) - return &out, nil -} - -type FirewallPolicyIDPSSignatureDirection int64 - -const ( - FirewallPolicyIDPSSignatureDirectionOne FirewallPolicyIDPSSignatureDirection = 1 - FirewallPolicyIDPSSignatureDirectionTwo FirewallPolicyIDPSSignatureDirection = 2 - FirewallPolicyIDPSSignatureDirectionZero FirewallPolicyIDPSSignatureDirection = 0 -) - -func PossibleValuesForFirewallPolicyIDPSSignatureDirection() []int64 { - return []int64{ - int64(FirewallPolicyIDPSSignatureDirectionOne), - int64(FirewallPolicyIDPSSignatureDirectionTwo), - int64(FirewallPolicyIDPSSignatureDirectionZero), - } -} - -type FirewallPolicyIDPSSignatureMode int64 - -const ( - FirewallPolicyIDPSSignatureModeOne FirewallPolicyIDPSSignatureMode = 1 - FirewallPolicyIDPSSignatureModeTwo FirewallPolicyIDPSSignatureMode = 2 - FirewallPolicyIDPSSignatureModeZero FirewallPolicyIDPSSignatureMode = 0 -) - -func PossibleValuesForFirewallPolicyIDPSSignatureMode() []int64 { - return []int64{ - int64(FirewallPolicyIDPSSignatureModeOne), - int64(FirewallPolicyIDPSSignatureModeTwo), - int64(FirewallPolicyIDPSSignatureModeZero), - } -} - -type FirewallPolicyIDPSSignatureSeverity int64 - -const ( - FirewallPolicyIDPSSignatureSeverityOne FirewallPolicyIDPSSignatureSeverity = 1 - FirewallPolicyIDPSSignatureSeverityThree FirewallPolicyIDPSSignatureSeverity = 3 - FirewallPolicyIDPSSignatureSeverityTwo FirewallPolicyIDPSSignatureSeverity = 2 -) - -func PossibleValuesForFirewallPolicyIDPSSignatureSeverity() []int64 { - return []int64{ - int64(FirewallPolicyIDPSSignatureSeverityOne), - int64(FirewallPolicyIDPSSignatureSeverityThree), - int64(FirewallPolicyIDPSSignatureSeverityTwo), - } -} - -type FirewallPolicyIntrusionDetectionProtocol string - -const ( - FirewallPolicyIntrusionDetectionProtocolANY FirewallPolicyIntrusionDetectionProtocol = "ANY" - FirewallPolicyIntrusionDetectionProtocolICMP FirewallPolicyIntrusionDetectionProtocol = "ICMP" - FirewallPolicyIntrusionDetectionProtocolTCP FirewallPolicyIntrusionDetectionProtocol = "TCP" - FirewallPolicyIntrusionDetectionProtocolUDP FirewallPolicyIntrusionDetectionProtocol = "UDP" -) - -func PossibleValuesForFirewallPolicyIntrusionDetectionProtocol() []string { - return []string{ - string(FirewallPolicyIntrusionDetectionProtocolANY), - string(FirewallPolicyIntrusionDetectionProtocolICMP), - string(FirewallPolicyIntrusionDetectionProtocolTCP), - string(FirewallPolicyIntrusionDetectionProtocolUDP), - } -} - -func (s *FirewallPolicyIntrusionDetectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyIntrusionDetectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyIntrusionDetectionProtocol(input string) (*FirewallPolicyIntrusionDetectionProtocol, error) { - vals := map[string]FirewallPolicyIntrusionDetectionProtocol{ - "any": FirewallPolicyIntrusionDetectionProtocolANY, - "icmp": FirewallPolicyIntrusionDetectionProtocolICMP, - "tcp": FirewallPolicyIntrusionDetectionProtocolTCP, - "udp": FirewallPolicyIntrusionDetectionProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyIntrusionDetectionProtocol(input) - return &out, nil -} - -type FirewallPolicyIntrusionDetectionStateType string - -const ( - FirewallPolicyIntrusionDetectionStateTypeAlert FirewallPolicyIntrusionDetectionStateType = "Alert" - FirewallPolicyIntrusionDetectionStateTypeDeny FirewallPolicyIntrusionDetectionStateType = "Deny" - FirewallPolicyIntrusionDetectionStateTypeOff FirewallPolicyIntrusionDetectionStateType = "Off" -) - -func PossibleValuesForFirewallPolicyIntrusionDetectionStateType() []string { - return []string{ - string(FirewallPolicyIntrusionDetectionStateTypeAlert), - string(FirewallPolicyIntrusionDetectionStateTypeDeny), - string(FirewallPolicyIntrusionDetectionStateTypeOff), - } -} - -func (s *FirewallPolicyIntrusionDetectionStateType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyIntrusionDetectionStateType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyIntrusionDetectionStateType(input string) (*FirewallPolicyIntrusionDetectionStateType, error) { - vals := map[string]FirewallPolicyIntrusionDetectionStateType{ - "alert": FirewallPolicyIntrusionDetectionStateTypeAlert, - "deny": FirewallPolicyIntrusionDetectionStateTypeDeny, - "off": FirewallPolicyIntrusionDetectionStateTypeOff, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyIntrusionDetectionStateType(input) - return &out, nil -} - -type FirewallPolicySkuTier string - -const ( - FirewallPolicySkuTierBasic FirewallPolicySkuTier = "Basic" - FirewallPolicySkuTierPremium FirewallPolicySkuTier = "Premium" - FirewallPolicySkuTierStandard FirewallPolicySkuTier = "Standard" -) - -func PossibleValuesForFirewallPolicySkuTier() []string { - return []string{ - string(FirewallPolicySkuTierBasic), - string(FirewallPolicySkuTierPremium), - string(FirewallPolicySkuTierStandard), - } -} - -func (s *FirewallPolicySkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicySkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicySkuTier(input string) (*FirewallPolicySkuTier, error) { - vals := map[string]FirewallPolicySkuTier{ - "basic": FirewallPolicySkuTierBasic, - "premium": FirewallPolicySkuTierPremium, - "standard": FirewallPolicySkuTierStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicySkuTier(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/id_firewallpolicy.go b/resource-manager/network/2022-11-01/firewallpolicies/id_firewallpolicy.go deleted file mode 100644 index 7b760ef341f..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/id_firewallpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package firewallpolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FirewallPolicyId{} - -// FirewallPolicyId is a struct representing the Resource ID for a Firewall Policy -type FirewallPolicyId struct { - SubscriptionId string - ResourceGroupName string - FirewallPolicyName string -} - -// NewFirewallPolicyID returns a new FirewallPolicyId struct -func NewFirewallPolicyID(subscriptionId string, resourceGroupName string, firewallPolicyName string) FirewallPolicyId { - return FirewallPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FirewallPolicyName: firewallPolicyName, - } -} - -// ParseFirewallPolicyID parses 'input' into a FirewallPolicyId -func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(FirewallPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - return &id, nil -} - -// ParseFirewallPolicyIDInsensitively parses 'input' case-insensitively into a FirewallPolicyId -// note: this method should only be used for API response data and not user input -func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(FirewallPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateFirewallPolicyID checks that 'input' can be parsed as a Firewall Policy ID -func ValidateFirewallPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFirewallPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Firewall Policy ID -func (id FirewallPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/firewallPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FirewallPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Firewall Policy ID -func (id FirewallPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticFirewallPolicies", "firewallPolicies", "firewallPolicies"), - resourceids.UserSpecifiedSegment("firewallPolicyName", "firewallPolicyValue"), - } -} - -// String returns a human-readable description of this Firewall Policy ID -func (id FirewallPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Firewall Policy Name: %q", id.FirewallPolicyName), - } - return fmt.Sprintf("Firewall Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/id_firewallpolicy_test.go b/resource-manager/network/2022-11-01/firewallpolicies/id_firewallpolicy_test.go deleted file mode 100644 index 6480bf04ca7..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/id_firewallpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package firewallpolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FirewallPolicyId{} - -func TestNewFirewallPolicyID(t *testing.T) { - id := NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FirewallPolicyName != "firewallPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'FirewallPolicyName'", id.FirewallPolicyName, "firewallPolicyValue") - } -} - -func TestFormatFirewallPolicyID(t *testing.T) { - actual := NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFirewallPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFirewallPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - } -} - -func TestParseFirewallPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FirewallPolicyName: "fIrEwAlLpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFirewallPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - } -} - -func TestSegmentsForFirewallPolicyId(t *testing.T) { - segments := FirewallPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FirewallPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_createorupdate.go b/resource-manager/network/2022-11-01/firewallpolicies/method_createorupdate.go deleted file mode 100644 index 2bc3de97416..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, id FirewallPolicyId, input FirewallPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c FirewallPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id FirewallPolicyId, input FirewallPolicy) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_delete.go b/resource-manager/network/2022-11-01/firewallpolicies/method_delete.go deleted file mode 100644 index 432932fda66..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c FirewallPoliciesClient) Delete(ctx context.Context, id FirewallPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c FirewallPoliciesClient) DeleteThenPoll(ctx context.Context, id FirewallPolicyId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go b/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go deleted file mode 100644 index 10e70f20fb4..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesfiltervalueslist.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesFilterValuesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignatureOverridesFilterValuesResponse -} - -// FirewallPolicyIdpsSignaturesFilterValuesList ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesFilterValuesList(ctx context.Context, id FirewallPolicyId, input SignatureOverridesFilterValuesQuery) (result FirewallPolicyIdpsSignaturesFilterValuesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listIdpsFilterOptions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go b/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go deleted file mode 100644 index 07fdedd6aea..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignatureslist.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *QueryResults -} - -// FirewallPolicyIdpsSignaturesList ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesList(ctx context.Context, id FirewallPolicyId, input IDPSQueryObject) (result FirewallPolicyIdpsSignaturesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listIdpsSignatures", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go b/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go deleted file mode 100644 index c283ea59e73..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesget.go +++ /dev/null @@ -1,52 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesOverridesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignaturesOverrides -} - -// FirewallPolicyIdpsSignaturesOverridesGet ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesGet(ctx context.Context, id FirewallPolicyId) (result FirewallPolicyIdpsSignaturesOverridesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/signatureOverrides/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go b/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go deleted file mode 100644 index d5fece73566..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverrideslist.go +++ /dev/null @@ -1,52 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesOverridesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignaturesOverridesList -} - -// FirewallPolicyIdpsSignaturesOverridesList ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesList(ctx context.Context, id FirewallPolicyId) (result FirewallPolicyIdpsSignaturesOverridesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/signatureOverrides", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go b/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go deleted file mode 100644 index 3cc4e3cb860..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridespatch.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesOverridesPatchOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignaturesOverrides -} - -// FirewallPolicyIdpsSignaturesOverridesPatch ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPatch(ctx context.Context, id FirewallPolicyId, input SignaturesOverrides) (result FirewallPolicyIdpsSignaturesOverridesPatchOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: fmt.Sprintf("%s/signatureOverrides/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go b/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go deleted file mode 100644 index ccd306f8ec4..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_firewallpolicyidpssignaturesoverridesput.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIdpsSignaturesOverridesPutOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SignaturesOverrides -} - -// FirewallPolicyIdpsSignaturesOverridesPut ... -func (c FirewallPoliciesClient) FirewallPolicyIdpsSignaturesOverridesPut(ctx context.Context, id FirewallPolicyId, input SignaturesOverrides) (result FirewallPolicyIdpsSignaturesOverridesPutOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: fmt.Sprintf("%s/signatureOverrides/default", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_get.go b/resource-manager/network/2022-11-01/firewallpolicies/method_get.go deleted file mode 100644 index 691c02b6911..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FirewallPolicy -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c FirewallPoliciesClient) Get(ctx context.Context, id FirewallPolicyId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_list.go b/resource-manager/network/2022-11-01/firewallpolicies/method_list.go deleted file mode 100644 index fe34e8db345..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FirewallPolicy -} - -type ListCompleteResult struct { - Items []FirewallPolicy -} - -// List ... -func (c FirewallPoliciesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/firewallPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FirewallPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c FirewallPoliciesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, FirewallPolicyOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FirewallPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate FirewallPolicyOperationPredicate) (result ListCompleteResult, err error) { - items := make([]FirewallPolicy, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_listall.go b/resource-manager/network/2022-11-01/firewallpolicies/method_listall.go deleted file mode 100644 index ac53257bbf8..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package firewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FirewallPolicy -} - -type ListAllCompleteResult struct { - Items []FirewallPolicy -} - -// ListAll ... -func (c FirewallPoliciesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/firewallPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FirewallPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c FirewallPoliciesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, FirewallPolicyOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FirewallPoliciesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate FirewallPolicyOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]FirewallPolicy, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/method_updatetags.go b/resource-manager/network/2022-11-01/firewallpolicies/method_updatetags.go deleted file mode 100644 index 40cd013ce58..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package firewallpolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FirewallPolicy -} - -// UpdateTags ... -func (c FirewallPoliciesClient) UpdateTags(ctx context.Context, id FirewallPolicyId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_dnssettings.go b/resource-manager/network/2022-11-01/firewallpolicies/model_dnssettings.go deleted file mode 100644 index 6983f66f9dd..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_dnssettings.go +++ /dev/null @@ -1,10 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DnsSettings struct { - EnableProxy *bool `json:"enableProxy,omitempty"` - RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"` - Servers *[]string `json:"servers,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_explicitproxy.go b/resource-manager/network/2022-11-01/firewallpolicies/model_explicitproxy.go deleted file mode 100644 index d8af7221ddf..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_explicitproxy.go +++ /dev/null @@ -1,13 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExplicitProxy struct { - EnableExplicitProxy *bool `json:"enableExplicitProxy,omitempty"` - EnablePacFile *bool `json:"enablePacFile,omitempty"` - HTTPPort *int64 `json:"httpPort,omitempty"` - HTTPSPort *int64 `json:"httpsPort,omitempty"` - PacFile *string `json:"pacFile,omitempty"` - PacFilePort *int64 `json:"pacFilePort,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_filteritems.go b/resource-manager/network/2022-11-01/firewallpolicies/model_filteritems.go deleted file mode 100644 index 943657d23f0..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_filteritems.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FilterItems struct { - Field *string `json:"field,omitempty"` - Values *[]string `json:"values,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicy.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicy.go deleted file mode 100644 index fb85165c9d9..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicy.go +++ /dev/null @@ -1,19 +0,0 @@ -package firewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FirewallPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicycertificateauthority.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicycertificateauthority.go deleted file mode 100644 index b1d1e5fcdd8..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicycertificateauthority.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyCertificateAuthority struct { - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyinsights.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyinsights.go deleted file mode 100644 index 5af7b2e446d..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyinsights.go +++ /dev/null @@ -1,10 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyInsights struct { - IsEnabled *bool `json:"isEnabled,omitempty"` - LogAnalyticsResources *FirewallPolicyLogAnalyticsResources `json:"logAnalyticsResources,omitempty"` - RetentionDays *int64 `json:"retentionDays,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetection.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetection.go deleted file mode 100644 index eac1fe0da0f..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetection.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIntrusionDetection struct { - Configuration *FirewallPolicyIntrusionDetectionConfiguration `json:"configuration,omitempty"` - Mode *FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionbypasstrafficspecifications.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionbypasstrafficspecifications.go deleted file mode 100644 index 088a6c5515f..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionbypasstrafficspecifications.go +++ /dev/null @@ -1,15 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct { - Description *string `json:"description,omitempty"` - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - Name *string `json:"name,omitempty"` - Protocol *FirewallPolicyIntrusionDetectionProtocol `json:"protocol,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionconfiguration.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionconfiguration.go deleted file mode 100644 index dce919867c0..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIntrusionDetectionConfiguration struct { - BypassTrafficSettings *[]FirewallPolicyIntrusionDetectionBypassTrafficSpecifications `json:"bypassTrafficSettings,omitempty"` - PrivateRanges *[]string `json:"privateRanges,omitempty"` - SignatureOverrides *[]FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionsignaturespecification.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionsignaturespecification.go deleted file mode 100644 index 2bae7fe0f04..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyintrusiondetectionsignaturespecification.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyIntrusionDetectionSignatureSpecification struct { - Id *string `json:"id,omitempty"` - Mode *FirewallPolicyIntrusionDetectionStateType `json:"mode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyloganalyticsresources.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyloganalyticsresources.go deleted file mode 100644 index 4f1280d942b..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyloganalyticsresources.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyLogAnalyticsResources struct { - DefaultWorkspaceId *SubResource `json:"defaultWorkspaceId,omitempty"` - Workspaces *[]FirewallPolicyLogAnalyticsWorkspace `json:"workspaces,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyloganalyticsworkspace.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyloganalyticsworkspace.go deleted file mode 100644 index 4cc72aa7cbb..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicyloganalyticsworkspace.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyLogAnalyticsWorkspace struct { - Region *string `json:"region,omitempty"` - WorkspaceId *SubResource `json:"workspaceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicypropertiesformat.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicypropertiesformat.go deleted file mode 100644 index 4aa274dbf0a..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicypropertiesformat.go +++ /dev/null @@ -1,22 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyPropertiesFormat struct { - BasePolicy *SubResource `json:"basePolicy,omitempty"` - ChildPolicies *[]SubResource `json:"childPolicies,omitempty"` - DnsSettings *DnsSettings `json:"dnsSettings,omitempty"` - ExplicitProxy *ExplicitProxy `json:"explicitProxy,omitempty"` - Firewalls *[]SubResource `json:"firewalls,omitempty"` - Insights *FirewallPolicyInsights `json:"insights,omitempty"` - IntrusionDetection *FirewallPolicyIntrusionDetection `json:"intrusionDetection,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleCollectionGroups *[]SubResource `json:"ruleCollectionGroups,omitempty"` - Sku *FirewallPolicySku `json:"sku,omitempty"` - Snat *FirewallPolicySNAT `json:"snat,omitempty"` - Sql *FirewallPolicySQL `json:"sql,omitempty"` - ThreatIntelMode *AzureFirewallThreatIntelMode `json:"threatIntelMode,omitempty"` - ThreatIntelWhitelist *FirewallPolicyThreatIntelWhitelist `json:"threatIntelWhitelist,omitempty"` - TransportSecurity *FirewallPolicyTransportSecurity `json:"transportSecurity,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysku.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysku.go deleted file mode 100644 index 6c0cef08260..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicySku struct { - Tier *FirewallPolicySkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysnat.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysnat.go deleted file mode 100644 index 33dcf12744e..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysnat.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicySNAT struct { - AutoLearnPrivateRanges *AutoLearnPrivateRangesMode `json:"autoLearnPrivateRanges,omitempty"` - PrivateRanges *[]string `json:"privateRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysql.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysql.go deleted file mode 100644 index 32e50565577..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicysql.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicySQL struct { - AllowSqlRedirect *bool `json:"allowSqlRedirect,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicythreatintelwhitelist.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicythreatintelwhitelist.go deleted file mode 100644 index 376fba1c268..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicythreatintelwhitelist.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyThreatIntelWhitelist struct { - Fqdns *[]string `json:"fqdns,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicytransportsecurity.go b/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicytransportsecurity.go deleted file mode 100644 index 9fdbf9b4877..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_firewallpolicytransportsecurity.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyTransportSecurity struct { - CertificateAuthority *FirewallPolicyCertificateAuthority `json:"certificateAuthority,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_idpsqueryobject.go b/resource-manager/network/2022-11-01/firewallpolicies/model_idpsqueryobject.go deleted file mode 100644 index 3a1aca509b6..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_idpsqueryobject.go +++ /dev/null @@ -1,12 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IDPSQueryObject struct { - Filters *[]FilterItems `json:"filters,omitempty"` - OrderBy *OrderBy `json:"orderBy,omitempty"` - ResultsPerPage *int64 `json:"resultsPerPage,omitempty"` - Search *string `json:"search,omitempty"` - Skip *int64 `json:"skip,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_orderby.go b/resource-manager/network/2022-11-01/firewallpolicies/model_orderby.go deleted file mode 100644 index db1d05e4478..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_orderby.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OrderBy struct { - Field *string `json:"field,omitempty"` - Order *FirewallPolicyIDPSQuerySortOrder `json:"order,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_queryresults.go b/resource-manager/network/2022-11-01/firewallpolicies/model_queryresults.go deleted file mode 100644 index 4c0591a2f83..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_queryresults.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryResults struct { - MatchingRecordsCount *int64 `json:"matchingRecordsCount,omitempty"` - Signatures *[]SingleQueryResult `json:"signatures,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_signatureoverridesfiltervaluesquery.go b/resource-manager/network/2022-11-01/firewallpolicies/model_signatureoverridesfiltervaluesquery.go deleted file mode 100644 index 718d141e3c0..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_signatureoverridesfiltervaluesquery.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignatureOverridesFilterValuesQuery struct { - FilterName *string `json:"filterName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_signatureoverridesfiltervaluesresponse.go b/resource-manager/network/2022-11-01/firewallpolicies/model_signatureoverridesfiltervaluesresponse.go deleted file mode 100644 index 4b135d882ba..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_signatureoverridesfiltervaluesresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignatureOverridesFilterValuesResponse struct { - FilterValues *[]string `json:"filterValues,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverrides.go b/resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverrides.go deleted file mode 100644 index 2f1b84510c9..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverrides.go +++ /dev/null @@ -1,11 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignaturesOverrides struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SignaturesOverridesProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverrideslist.go b/resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverrideslist.go deleted file mode 100644 index d403a4eb590..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverrideslist.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignaturesOverridesList struct { - Value *[]SignaturesOverrides `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverridesproperties.go b/resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverridesproperties.go deleted file mode 100644 index a93d8699c02..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_signaturesoverridesproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SignaturesOverridesProperties struct { - Signatures *map[string]string `json:"signatures,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_singlequeryresult.go b/resource-manager/network/2022-11-01/firewallpolicies/model_singlequeryresult.go deleted file mode 100644 index cbf78585e56..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_singlequeryresult.go +++ /dev/null @@ -1,18 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SingleQueryResult struct { - Description *string `json:"description,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - Direction *FirewallPolicyIDPSSignatureDirection `json:"direction,omitempty"` - Group *string `json:"group,omitempty"` - InheritedFromParentPolicy *bool `json:"inheritedFromParentPolicy,omitempty"` - LastUpdated *string `json:"lastUpdated,omitempty"` - Mode *FirewallPolicyIDPSSignatureMode `json:"mode,omitempty"` - Protocol *string `json:"protocol,omitempty"` - Severity *FirewallPolicyIDPSSignatureSeverity `json:"severity,omitempty"` - SignatureId *int64 `json:"signatureId,omitempty"` - SourcePorts *[]string `json:"sourcePorts,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_subresource.go b/resource-manager/network/2022-11-01/firewallpolicies/model_subresource.go deleted file mode 100644 index abee9f81d03..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/model_tagsobject.go b/resource-manager/network/2022-11-01/firewallpolicies/model_tagsobject.go deleted file mode 100644 index 22cc23110be..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/predicates.go b/resource-manager/network/2022-11-01/firewallpolicies/predicates.go deleted file mode 100644 index 2640042ba7a..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package firewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p FirewallPolicyOperationPredicate) Matches(input FirewallPolicy) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/firewallpolicies/version.go b/resource-manager/network/2022-11-01/firewallpolicies/version.go deleted file mode 100644 index 3e09b730fdb..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package firewallpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicies/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/README.md b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/README.md deleted file mode 100644 index 08bb92e7412..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups` Documentation - -The `firewallpolicyrulecollectiongroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups" -``` - - -### Client Initialization - -```go -client := firewallpolicyrulecollectiongroups.NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := firewallpolicyrulecollectiongroups.NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue") - -payload := firewallpolicyrulecollectiongroups.FirewallPolicyRuleCollectionGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallPolicyRuleCollectionGroupsClient.Delete` - -```go -ctx := context.TODO() -id := firewallpolicyrulecollectiongroups.NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `FirewallPolicyRuleCollectionGroupsClient.Get` - -```go -ctx := context.TODO() -id := firewallpolicyrulecollectiongroups.NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FirewallPolicyRuleCollectionGroupsClient.List` - -```go -ctx := context.TODO() -id := firewallpolicyrulecollectiongroups.NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/client.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/client.go deleted file mode 100644 index 1066038440b..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollectionGroupsClient struct { - Client *resourcemanager.Client -} - -func NewFirewallPolicyRuleCollectionGroupsClientWithBaseURI(api environments.Api) (*FirewallPolicyRuleCollectionGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "firewallpolicyrulecollectiongroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating FirewallPolicyRuleCollectionGroupsClient: %+v", err) - } - - return &FirewallPolicyRuleCollectionGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/constants.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/constants.go deleted file mode 100644 index 73fd6902a8b..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/constants.go +++ /dev/null @@ -1,309 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyFilterRuleCollectionActionType string - -const ( - FirewallPolicyFilterRuleCollectionActionTypeAllow FirewallPolicyFilterRuleCollectionActionType = "Allow" - FirewallPolicyFilterRuleCollectionActionTypeDeny FirewallPolicyFilterRuleCollectionActionType = "Deny" -) - -func PossibleValuesForFirewallPolicyFilterRuleCollectionActionType() []string { - return []string{ - string(FirewallPolicyFilterRuleCollectionActionTypeAllow), - string(FirewallPolicyFilterRuleCollectionActionTypeDeny), - } -} - -func (s *FirewallPolicyFilterRuleCollectionActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyFilterRuleCollectionActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyFilterRuleCollectionActionType(input string) (*FirewallPolicyFilterRuleCollectionActionType, error) { - vals := map[string]FirewallPolicyFilterRuleCollectionActionType{ - "allow": FirewallPolicyFilterRuleCollectionActionTypeAllow, - "deny": FirewallPolicyFilterRuleCollectionActionTypeDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyFilterRuleCollectionActionType(input) - return &out, nil -} - -type FirewallPolicyNatRuleCollectionActionType string - -const ( - FirewallPolicyNatRuleCollectionActionTypeDNAT FirewallPolicyNatRuleCollectionActionType = "DNAT" -) - -func PossibleValuesForFirewallPolicyNatRuleCollectionActionType() []string { - return []string{ - string(FirewallPolicyNatRuleCollectionActionTypeDNAT), - } -} - -func (s *FirewallPolicyNatRuleCollectionActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyNatRuleCollectionActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyNatRuleCollectionActionType(input string) (*FirewallPolicyNatRuleCollectionActionType, error) { - vals := map[string]FirewallPolicyNatRuleCollectionActionType{ - "dnat": FirewallPolicyNatRuleCollectionActionTypeDNAT, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyNatRuleCollectionActionType(input) - return &out, nil -} - -type FirewallPolicyRuleApplicationProtocolType string - -const ( - FirewallPolicyRuleApplicationProtocolTypeHTTP FirewallPolicyRuleApplicationProtocolType = "Http" - FirewallPolicyRuleApplicationProtocolTypeHTTPS FirewallPolicyRuleApplicationProtocolType = "Https" -) - -func PossibleValuesForFirewallPolicyRuleApplicationProtocolType() []string { - return []string{ - string(FirewallPolicyRuleApplicationProtocolTypeHTTP), - string(FirewallPolicyRuleApplicationProtocolTypeHTTPS), - } -} - -func (s *FirewallPolicyRuleApplicationProtocolType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyRuleApplicationProtocolType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyRuleApplicationProtocolType(input string) (*FirewallPolicyRuleApplicationProtocolType, error) { - vals := map[string]FirewallPolicyRuleApplicationProtocolType{ - "http": FirewallPolicyRuleApplicationProtocolTypeHTTP, - "https": FirewallPolicyRuleApplicationProtocolTypeHTTPS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyRuleApplicationProtocolType(input) - return &out, nil -} - -type FirewallPolicyRuleCollectionType string - -const ( - FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection FirewallPolicyRuleCollectionType = "FirewallPolicyFilterRuleCollection" - FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection FirewallPolicyRuleCollectionType = "FirewallPolicyNatRuleCollection" -) - -func PossibleValuesForFirewallPolicyRuleCollectionType() []string { - return []string{ - string(FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection), - string(FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection), - } -} - -func (s *FirewallPolicyRuleCollectionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyRuleCollectionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyRuleCollectionType(input string) (*FirewallPolicyRuleCollectionType, error) { - vals := map[string]FirewallPolicyRuleCollectionType{ - "firewallpolicyfilterrulecollection": FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection, - "firewallpolicynatrulecollection": FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyRuleCollectionType(input) - return &out, nil -} - -type FirewallPolicyRuleNetworkProtocol string - -const ( - FirewallPolicyRuleNetworkProtocolAny FirewallPolicyRuleNetworkProtocol = "Any" - FirewallPolicyRuleNetworkProtocolICMP FirewallPolicyRuleNetworkProtocol = "ICMP" - FirewallPolicyRuleNetworkProtocolTCP FirewallPolicyRuleNetworkProtocol = "TCP" - FirewallPolicyRuleNetworkProtocolUDP FirewallPolicyRuleNetworkProtocol = "UDP" -) - -func PossibleValuesForFirewallPolicyRuleNetworkProtocol() []string { - return []string{ - string(FirewallPolicyRuleNetworkProtocolAny), - string(FirewallPolicyRuleNetworkProtocolICMP), - string(FirewallPolicyRuleNetworkProtocolTCP), - string(FirewallPolicyRuleNetworkProtocolUDP), - } -} - -func (s *FirewallPolicyRuleNetworkProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyRuleNetworkProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyRuleNetworkProtocol(input string) (*FirewallPolicyRuleNetworkProtocol, error) { - vals := map[string]FirewallPolicyRuleNetworkProtocol{ - "any": FirewallPolicyRuleNetworkProtocolAny, - "icmp": FirewallPolicyRuleNetworkProtocolICMP, - "tcp": FirewallPolicyRuleNetworkProtocolTCP, - "udp": FirewallPolicyRuleNetworkProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyRuleNetworkProtocol(input) - return &out, nil -} - -type FirewallPolicyRuleType string - -const ( - FirewallPolicyRuleTypeApplicationRule FirewallPolicyRuleType = "ApplicationRule" - FirewallPolicyRuleTypeNatRule FirewallPolicyRuleType = "NatRule" - FirewallPolicyRuleTypeNetworkRule FirewallPolicyRuleType = "NetworkRule" -) - -func PossibleValuesForFirewallPolicyRuleType() []string { - return []string{ - string(FirewallPolicyRuleTypeApplicationRule), - string(FirewallPolicyRuleTypeNatRule), - string(FirewallPolicyRuleTypeNetworkRule), - } -} - -func (s *FirewallPolicyRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFirewallPolicyRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFirewallPolicyRuleType(input string) (*FirewallPolicyRuleType, error) { - vals := map[string]FirewallPolicyRuleType{ - "applicationrule": FirewallPolicyRuleTypeApplicationRule, - "natrule": FirewallPolicyRuleTypeNatRule, - "networkrule": FirewallPolicyRuleTypeNetworkRule, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FirewallPolicyRuleType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go deleted file mode 100644 index 0ab64308936..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FirewallPolicyId{} - -// FirewallPolicyId is a struct representing the Resource ID for a Firewall Policy -type FirewallPolicyId struct { - SubscriptionId string - ResourceGroupName string - FirewallPolicyName string -} - -// NewFirewallPolicyID returns a new FirewallPolicyId struct -func NewFirewallPolicyID(subscriptionId string, resourceGroupName string, firewallPolicyName string) FirewallPolicyId { - return FirewallPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FirewallPolicyName: firewallPolicyName, - } -} - -// ParseFirewallPolicyID parses 'input' into a FirewallPolicyId -func ParseFirewallPolicyID(input string) (*FirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(FirewallPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - return &id, nil -} - -// ParseFirewallPolicyIDInsensitively parses 'input' case-insensitively into a FirewallPolicyId -// note: this method should only be used for API response data and not user input -func ParseFirewallPolicyIDInsensitively(input string) (*FirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(FirewallPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateFirewallPolicyID checks that 'input' can be parsed as a Firewall Policy ID -func ValidateFirewallPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFirewallPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Firewall Policy ID -func (id FirewallPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/firewallPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FirewallPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Firewall Policy ID -func (id FirewallPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticFirewallPolicies", "firewallPolicies", "firewallPolicies"), - resourceids.UserSpecifiedSegment("firewallPolicyName", "firewallPolicyValue"), - } -} - -// String returns a human-readable description of this Firewall Policy ID -func (id FirewallPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Firewall Policy Name: %q", id.FirewallPolicyName), - } - return fmt.Sprintf("Firewall Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy_test.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy_test.go deleted file mode 100644 index 6ccc88e0431..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_firewallpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FirewallPolicyId{} - -func TestNewFirewallPolicyID(t *testing.T) { - id := NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FirewallPolicyName != "firewallPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'FirewallPolicyName'", id.FirewallPolicyName, "firewallPolicyValue") - } -} - -func TestFormatFirewallPolicyID(t *testing.T) { - actual := NewFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFirewallPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFirewallPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - } -} - -func TestParseFirewallPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe", - Expected: &FirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FirewallPolicyName: "fIrEwAlLpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFirewallPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - } -} - -func TestSegmentsForFirewallPolicyId(t *testing.T) { - segments := FirewallPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FirewallPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go deleted file mode 100644 index 8ab322f77ac..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionGroupId{} - -// RuleCollectionGroupId is a struct representing the Resource ID for a Rule Collection Group -type RuleCollectionGroupId struct { - SubscriptionId string - ResourceGroupName string - FirewallPolicyName string - RuleCollectionGroupName string -} - -// NewRuleCollectionGroupID returns a new RuleCollectionGroupId struct -func NewRuleCollectionGroupID(subscriptionId string, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string) RuleCollectionGroupId { - return RuleCollectionGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - FirewallPolicyName: firewallPolicyName, - RuleCollectionGroupName: ruleCollectionGroupName, - } -} - -// ParseRuleCollectionGroupID parses 'input' into a RuleCollectionGroupId -func ParseRuleCollectionGroupID(input string) (*RuleCollectionGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - if id.RuleCollectionGroupName, ok = parsed.Parsed["ruleCollectionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionGroupName", *parsed) - } - - return &id, nil -} - -// ParseRuleCollectionGroupIDInsensitively parses 'input' case-insensitively into a RuleCollectionGroupId -// note: this method should only be used for API response data and not user input -func ParseRuleCollectionGroupIDInsensitively(input string) (*RuleCollectionGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(RuleCollectionGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RuleCollectionGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.FirewallPolicyName, ok = parsed.Parsed["firewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "firewallPolicyName", *parsed) - } - - if id.RuleCollectionGroupName, ok = parsed.Parsed["ruleCollectionGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ruleCollectionGroupName", *parsed) - } - - return &id, nil -} - -// ValidateRuleCollectionGroupID checks that 'input' can be parsed as a Rule Collection Group ID -func ValidateRuleCollectionGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRuleCollectionGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Rule Collection Group ID -func (id RuleCollectionGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/firewallPolicies/%s/ruleCollectionGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.FirewallPolicyName, id.RuleCollectionGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Rule Collection Group ID -func (id RuleCollectionGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticFirewallPolicies", "firewallPolicies", "firewallPolicies"), - resourceids.UserSpecifiedSegment("firewallPolicyName", "firewallPolicyValue"), - resourceids.StaticSegment("staticRuleCollectionGroups", "ruleCollectionGroups", "ruleCollectionGroups"), - resourceids.UserSpecifiedSegment("ruleCollectionGroupName", "ruleCollectionGroupValue"), - } -} - -// String returns a human-readable description of this Rule Collection Group ID -func (id RuleCollectionGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Firewall Policy Name: %q", id.FirewallPolicyName), - fmt.Sprintf("Rule Collection Group Name: %q", id.RuleCollectionGroupName), - } - return fmt.Sprintf("Rule Collection Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup_test.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup_test.go deleted file mode 100644 index 360291df9bc..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/id_rulecollectiongroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RuleCollectionGroupId{} - -func TestNewRuleCollectionGroupID(t *testing.T) { - id := NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.FirewallPolicyName != "firewallPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'FirewallPolicyName'", id.FirewallPolicyName, "firewallPolicyValue") - } - - if id.RuleCollectionGroupName != "ruleCollectionGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'RuleCollectionGroupName'", id.RuleCollectionGroupName, "ruleCollectionGroupValue") - } -} - -func TestFormatRuleCollectionGroupID(t *testing.T) { - actual := NewRuleCollectionGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "firewallPolicyValue", "ruleCollectionGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRuleCollectionGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue", - Expected: &RuleCollectionGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - RuleCollectionGroupName: "ruleCollectionGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - if actual.RuleCollectionGroupName != v.Expected.RuleCollectionGroupName { - t.Fatalf("Expected %q but got %q for RuleCollectionGroupName", v.Expected.RuleCollectionGroupName, actual.RuleCollectionGroupName) - } - - } -} - -func TestParseRuleCollectionGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RuleCollectionGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/rUlEcOlLeCtIoNgRoUpS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue", - Expected: &RuleCollectionGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - FirewallPolicyName: "firewallPolicyValue", - RuleCollectionGroupName: "ruleCollectionGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/firewallPolicies/firewallPolicyValue/ruleCollectionGroups/ruleCollectionGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/rUlEcOlLeCtIoNgRoUpS/rUlEcOlLeCtIoNgRoUpVaLuE", - Expected: &RuleCollectionGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - FirewallPolicyName: "fIrEwAlLpOlIcYvAlUe", - RuleCollectionGroupName: "rUlEcOlLeCtIoNgRoUpVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/fIrEwAlLpOlIcIeS/fIrEwAlLpOlIcYvAlUe/rUlEcOlLeCtIoNgRoUpS/rUlEcOlLeCtIoNgRoUpVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRuleCollectionGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.FirewallPolicyName != v.Expected.FirewallPolicyName { - t.Fatalf("Expected %q but got %q for FirewallPolicyName", v.Expected.FirewallPolicyName, actual.FirewallPolicyName) - } - - if actual.RuleCollectionGroupName != v.Expected.RuleCollectionGroupName { - t.Fatalf("Expected %q but got %q for RuleCollectionGroupName", v.Expected.RuleCollectionGroupName, actual.RuleCollectionGroupName) - } - - } -} - -func TestSegmentsForRuleCollectionGroupId(t *testing.T) { - segments := RuleCollectionGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RuleCollectionGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_createorupdate.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_createorupdate.go deleted file mode 100644 index ced43f54187..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdate(ctx context.Context, id RuleCollectionGroupId, input FirewallPolicyRuleCollectionGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id RuleCollectionGroupId, input FirewallPolicyRuleCollectionGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_delete.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_delete.go deleted file mode 100644 index 159bb061b84..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c FirewallPolicyRuleCollectionGroupsClient) Delete(ctx context.Context, id RuleCollectionGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c FirewallPolicyRuleCollectionGroupsClient) DeleteThenPoll(ctx context.Context, id RuleCollectionGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_get.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_get.go deleted file mode 100644 index 9cc5777d9ad..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FirewallPolicyRuleCollectionGroup -} - -// Get ... -func (c FirewallPolicyRuleCollectionGroupsClient) Get(ctx context.Context, id RuleCollectionGroupId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_list.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_list.go deleted file mode 100644 index 5dec7573066..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FirewallPolicyRuleCollectionGroup -} - -type ListCompleteResult struct { - Items []FirewallPolicyRuleCollectionGroup -} - -// List ... -func (c FirewallPolicyRuleCollectionGroupsClient) List(ctx context.Context, id FirewallPolicyId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ruleCollectionGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FirewallPolicyRuleCollectionGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c FirewallPolicyRuleCollectionGroupsClient) ListComplete(ctx context.Context, id FirewallPolicyId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, FirewallPolicyRuleCollectionGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FirewallPolicyRuleCollectionGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id FirewallPolicyId, predicate FirewallPolicyRuleCollectionGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]FirewallPolicyRuleCollectionGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_applicationrule.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_applicationrule.go deleted file mode 100644 index 3e2815413ed..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_applicationrule.go +++ /dev/null @@ -1,52 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRule = ApplicationRule{} - -type ApplicationRule struct { - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - FqdnTags *[]string `json:"fqdnTags,omitempty"` - HTTPHeadersToInsert *[]FirewallPolicyHTTPHeaderToInsert `json:"httpHeadersToInsert,omitempty"` - Protocols *[]FirewallPolicyRuleApplicationProtocol `json:"protocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - TargetFqdns *[]string `json:"targetFqdns,omitempty"` - TargetUrls *[]string `json:"targetUrls,omitempty"` - TerminateTLS *bool `json:"terminateTLS,omitempty"` - WebCategories *[]string `json:"webCategories,omitempty"` - - // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` -} - -var _ json.Marshaler = ApplicationRule{} - -func (s ApplicationRule) MarshalJSON() ([]byte, error) { - type wrapper ApplicationRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ApplicationRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ApplicationRule: %+v", err) - } - decoded["ruleType"] = "ApplicationRule" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ApplicationRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go deleted file mode 100644 index 6e9762da492..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollection.go +++ /dev/null @@ -1,81 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRuleCollection = FirewallPolicyFilterRuleCollection{} - -type FirewallPolicyFilterRuleCollection struct { - Action *FirewallPolicyFilterRuleCollectionAction `json:"action,omitempty"` - Rules *[]FirewallPolicyRule `json:"rules,omitempty"` - - // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` -} - -var _ json.Marshaler = FirewallPolicyFilterRuleCollection{} - -func (s FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { - type wrapper FirewallPolicyFilterRuleCollection - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FirewallPolicyFilterRuleCollection: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection: %+v", err) - } - decoded["ruleCollectionType"] = "FirewallPolicyFilterRuleCollection" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FirewallPolicyFilterRuleCollection: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FirewallPolicyFilterRuleCollection{} - -func (s *FirewallPolicyFilterRuleCollection) UnmarshalJSON(bytes []byte) error { - type alias FirewallPolicyFilterRuleCollection - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into FirewallPolicyFilterRuleCollection: %+v", err) - } - - s.Action = decoded.Action - s.Name = decoded.Name - s.Priority = decoded.Priority - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FirewallPolicyFilterRuleCollection into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["rules"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Rules into list []json.RawMessage: %+v", err) - } - - output := make([]FirewallPolicyRule, 0) - for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyFilterRuleCollection': %+v", i, err) - } - output = append(output, impl) - } - s.Rules = &output - } - return nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollectionaction.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollectionaction.go deleted file mode 100644 index 42d0cb7d127..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyfilterrulecollectionaction.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyFilterRuleCollectionAction struct { - Type *FirewallPolicyFilterRuleCollectionActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyhttpheadertoinsert.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyhttpheadertoinsert.go deleted file mode 100644 index f7dd43c6089..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyhttpheadertoinsert.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyHTTPHeaderToInsert struct { - HeaderName *string `json:"headerName,omitempty"` - HeaderValue *string `json:"headerValue,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go deleted file mode 100644 index 114889c0540..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollection.go +++ /dev/null @@ -1,81 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRuleCollection = FirewallPolicyNatRuleCollection{} - -type FirewallPolicyNatRuleCollection struct { - Action *FirewallPolicyNatRuleCollectionAction `json:"action,omitempty"` - Rules *[]FirewallPolicyRule `json:"rules,omitempty"` - - // Fields inherited from FirewallPolicyRuleCollection - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` -} - -var _ json.Marshaler = FirewallPolicyNatRuleCollection{} - -func (s FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { - type wrapper FirewallPolicyNatRuleCollection - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling FirewallPolicyNatRuleCollection: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection: %+v", err) - } - decoded["ruleCollectionType"] = "FirewallPolicyNatRuleCollection" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling FirewallPolicyNatRuleCollection: %+v", err) - } - - return encoded, nil -} - -var _ json.Unmarshaler = &FirewallPolicyNatRuleCollection{} - -func (s *FirewallPolicyNatRuleCollection) UnmarshalJSON(bytes []byte) error { - type alias FirewallPolicyNatRuleCollection - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into FirewallPolicyNatRuleCollection: %+v", err) - } - - s.Action = decoded.Action - s.Name = decoded.Name - s.Priority = decoded.Priority - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FirewallPolicyNatRuleCollection into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["rules"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Rules into list []json.RawMessage: %+v", err) - } - - output := make([]FirewallPolicyRule, 0) - for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Rules' for 'FirewallPolicyNatRuleCollection': %+v", i, err) - } - output = append(output, impl) - } - s.Rules = &output - } - return nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollectionaction.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollectionaction.go deleted file mode 100644 index 0b31f5d8ffa..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicynatrulecollectionaction.go +++ /dev/null @@ -1,8 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyNatRuleCollectionAction struct { - Type *FirewallPolicyNatRuleCollectionActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go deleted file mode 100644 index 9976226339b..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrule.go +++ /dev/null @@ -1,64 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRule interface { -} - -func unmarshalFirewallPolicyRuleImplementation(input []byte) (FirewallPolicyRule, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling FirewallPolicyRule into map[string]interface: %+v", err) - } - - value, ok := temp["ruleType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "ApplicationRule") { - var out ApplicationRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ApplicationRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "NatRule") { - var out NatRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into NatRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "NetworkRule") { - var out NetworkRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into NetworkRule: %+v", err) - } - return out, nil - } - - type RawFirewallPolicyRuleImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawFirewallPolicyRuleImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyruleapplicationprotocol.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyruleapplicationprotocol.go deleted file mode 100644 index cc2db178d08..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyruleapplicationprotocol.go +++ /dev/null @@ -1,9 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleApplicationProtocol struct { - Port *int64 `json:"port,omitempty"` - ProtocolType *FirewallPolicyRuleApplicationProtocolType `json:"protocolType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go deleted file mode 100644 index 0e9829a4048..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollection.go +++ /dev/null @@ -1,56 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollection interface { -} - -func unmarshalFirewallPolicyRuleCollectionImplementation(input []byte) (FirewallPolicyRuleCollection, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling FirewallPolicyRuleCollection into map[string]interface: %+v", err) - } - - value, ok := temp["ruleCollectionType"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "FirewallPolicyFilterRuleCollection") { - var out FirewallPolicyFilterRuleCollection - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FirewallPolicyFilterRuleCollection: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "FirewallPolicyNatRuleCollection") { - var out FirewallPolicyNatRuleCollection - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into FirewallPolicyNatRuleCollection: %+v", err) - } - return out, nil - } - - type RawFirewallPolicyRuleCollectionImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawFirewallPolicyRuleCollectionImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroup.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroup.go deleted file mode 100644 index 3cd2b948905..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollectionGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FirewallPolicyRuleCollectionGroupProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go deleted file mode 100644 index e137579ac44..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_firewallpolicyrulecollectiongroupproperties.go +++ /dev/null @@ -1,51 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollectionGroupProperties struct { - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleCollections *[]FirewallPolicyRuleCollection `json:"ruleCollections,omitempty"` -} - -var _ json.Unmarshaler = &FirewallPolicyRuleCollectionGroupProperties{} - -func (s *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(bytes []byte) error { - type alias FirewallPolicyRuleCollectionGroupProperties - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into FirewallPolicyRuleCollectionGroupProperties: %+v", err) - } - - s.Priority = decoded.Priority - s.ProvisioningState = decoded.ProvisioningState - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling FirewallPolicyRuleCollectionGroupProperties into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["ruleCollections"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling RuleCollections into list []json.RawMessage: %+v", err) - } - - output := make([]FirewallPolicyRuleCollection, 0) - for i, val := range listTemp { - impl, err := unmarshalFirewallPolicyRuleCollectionImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'RuleCollections' for 'FirewallPolicyRuleCollectionGroupProperties': %+v", i, err) - } - output = append(output, impl) - } - s.RuleCollections = &output - } - return nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_natrule.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_natrule.go deleted file mode 100644 index 5354374d68c..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_natrule.go +++ /dev/null @@ -1,50 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRule = NatRule{} - -type NatRule struct { - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - TranslatedAddress *string `json:"translatedAddress,omitempty"` - TranslatedFqdn *string `json:"translatedFqdn,omitempty"` - TranslatedPort *string `json:"translatedPort,omitempty"` - - // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` -} - -var _ json.Marshaler = NatRule{} - -func (s NatRule) MarshalJSON() ([]byte, error) { - type wrapper NatRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling NatRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling NatRule: %+v", err) - } - decoded["ruleType"] = "NatRule" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling NatRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_networkrule.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_networkrule.go deleted file mode 100644 index 7548f48a194..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/model_networkrule.go +++ /dev/null @@ -1,49 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ FirewallPolicyRule = NetworkRule{} - -type NetworkRule struct { - DestinationAddresses *[]string `json:"destinationAddresses,omitempty"` - DestinationFqdns *[]string `json:"destinationFqdns,omitempty"` - DestinationIPGroups *[]string `json:"destinationIpGroups,omitempty"` - DestinationPorts *[]string `json:"destinationPorts,omitempty"` - IPProtocols *[]FirewallPolicyRuleNetworkProtocol `json:"ipProtocols,omitempty"` - SourceAddresses *[]string `json:"sourceAddresses,omitempty"` - SourceIPGroups *[]string `json:"sourceIpGroups,omitempty"` - - // Fields inherited from FirewallPolicyRule - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` -} - -var _ json.Marshaler = NetworkRule{} - -func (s NetworkRule) MarshalJSON() ([]byte, error) { - type wrapper NetworkRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling NetworkRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling NetworkRule: %+v", err) - } - decoded["ruleType"] = "NetworkRule" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling NetworkRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/predicates.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/predicates.go deleted file mode 100644 index 9762acada56..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package firewallpolicyrulecollectiongroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FirewallPolicyRuleCollectionGroupOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p FirewallPolicyRuleCollectionGroupOperationPredicate) Matches(input FirewallPolicyRuleCollectionGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/version.go b/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/version.go deleted file mode 100644 index 632785ba5f8..00000000000 --- a/resource-manager/network/2022-11-01/firewallpolicyrulecollectiongroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package firewallpolicyrulecollectiongroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/firewallpolicyrulecollectiongroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/flowlogs/README.md b/resource-manager/network/2022-11-01/flowlogs/README.md deleted file mode 100644 index 85e76d8991a..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/README.md +++ /dev/null @@ -1,103 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/flowlogs` Documentation - -The `flowlogs` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/flowlogs" -``` - - -### Client Initialization - -```go -client := flowlogs.NewFlowLogsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `FlowLogsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - -payload := flowlogs.FlowLog{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `FlowLogsClient.Delete` - -```go -ctx := context.TODO() -id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `FlowLogsClient.Get` - -```go -ctx := context.TODO() -id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `FlowLogsClient.List` - -```go -ctx := context.TODO() -id := flowlogs.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `FlowLogsClient.UpdateTags` - -```go -ctx := context.TODO() -id := flowlogs.NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - -payload := flowlogs.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/flowlogs/client.go b/resource-manager/network/2022-11-01/flowlogs/client.go deleted file mode 100644 index 51ae4558663..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package flowlogs - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogsClient struct { - Client *resourcemanager.Client -} - -func NewFlowLogsClientWithBaseURI(api environments.Api) (*FlowLogsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "flowlogs", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating FlowLogsClient: %+v", err) - } - - return &FlowLogsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/flowlogs/constants.go b/resource-manager/network/2022-11-01/flowlogs/constants.go deleted file mode 100644 index e5e97eea109..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/constants.go +++ /dev/null @@ -1,95 +0,0 @@ -package flowlogs - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/flowlogs/id_flowlog.go b/resource-manager/network/2022-11-01/flowlogs/id_flowlog.go deleted file mode 100644 index 531b76451d0..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/id_flowlog.go +++ /dev/null @@ -1,140 +0,0 @@ -package flowlogs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FlowLogId{} - -// FlowLogId is a struct representing the Resource ID for a Flow Log -type FlowLogId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string - FlowLogName string -} - -// NewFlowLogID returns a new FlowLogId struct -func NewFlowLogID(subscriptionId string, resourceGroupName string, networkWatcherName string, flowLogName string) FlowLogId { - return FlowLogId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - FlowLogName: flowLogName, - } -} - -// ParseFlowLogID parses 'input' into a FlowLogId -func ParseFlowLogID(input string) (*FlowLogId, error) { - parser := resourceids.NewParserFromResourceIdType(FlowLogId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FlowLogId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.FlowLogName, ok = parsed.Parsed["flowLogName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flowLogName", *parsed) - } - - return &id, nil -} - -// ParseFlowLogIDInsensitively parses 'input' case-insensitively into a FlowLogId -// note: this method should only be used for API response data and not user input -func ParseFlowLogIDInsensitively(input string) (*FlowLogId, error) { - parser := resourceids.NewParserFromResourceIdType(FlowLogId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FlowLogId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.FlowLogName, ok = parsed.Parsed["flowLogName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "flowLogName", *parsed) - } - - return &id, nil -} - -// ValidateFlowLogID checks that 'input' can be parsed as a Flow Log ID -func ValidateFlowLogID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFlowLogID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Flow Log ID -func (id FlowLogId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s/flowLogs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName, id.FlowLogName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Flow Log ID -func (id FlowLogId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - resourceids.StaticSegment("staticFlowLogs", "flowLogs", "flowLogs"), - resourceids.UserSpecifiedSegment("flowLogName", "flowLogValue"), - } -} - -// String returns a human-readable description of this Flow Log ID -func (id FlowLogId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - fmt.Sprintf("Flow Log Name: %q", id.FlowLogName), - } - return fmt.Sprintf("Flow Log (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/flowlogs/id_flowlog_test.go b/resource-manager/network/2022-11-01/flowlogs/id_flowlog_test.go deleted file mode 100644 index 787c0c562d6..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/id_flowlog_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package flowlogs - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FlowLogId{} - -func TestNewFlowLogID(t *testing.T) { - id := NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } - - if id.FlowLogName != "flowLogValue" { - t.Fatalf("Expected %q but got %q for Segment 'FlowLogName'", id.FlowLogName, "flowLogValue") - } -} - -func TestFormatFlowLogID(t *testing.T) { - actual := NewFlowLogID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "flowLogValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFlowLogID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlowLogId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue", - Expected: &FlowLogId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - FlowLogName: "flowLogValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlowLogID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.FlowLogName != v.Expected.FlowLogName { - t.Fatalf("Expected %q but got %q for FlowLogName", v.Expected.FlowLogName, actual.FlowLogName) - } - - } -} - -func TestParseFlowLogIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FlowLogId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/fLoWlOgS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue", - Expected: &FlowLogId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - FlowLogName: "flowLogValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/flowLogs/flowLogValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/fLoWlOgS/fLoWlOgVaLuE", - Expected: &FlowLogId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - FlowLogName: "fLoWlOgVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/fLoWlOgS/fLoWlOgVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFlowLogIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.FlowLogName != v.Expected.FlowLogName { - t.Fatalf("Expected %q but got %q for FlowLogName", v.Expected.FlowLogName, actual.FlowLogName) - } - - } -} - -func TestSegmentsForFlowLogId(t *testing.T) { - segments := FlowLogId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FlowLogId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/flowlogs/id_networkwatcher.go b/resource-manager/network/2022-11-01/flowlogs/id_networkwatcher.go deleted file mode 100644 index 5fc6d966ffe..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package flowlogs - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/flowlogs/id_networkwatcher_test.go b/resource-manager/network/2022-11-01/flowlogs/id_networkwatcher_test.go deleted file mode 100644 index 0d9277cf4bf..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package flowlogs - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/flowlogs/method_createorupdate.go b/resource-manager/network/2022-11-01/flowlogs/method_createorupdate.go deleted file mode 100644 index e4e731f0bbe..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package flowlogs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c FlowLogsClient) CreateOrUpdate(ctx context.Context, id FlowLogId, input FlowLog) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c FlowLogsClient) CreateOrUpdateThenPoll(ctx context.Context, id FlowLogId, input FlowLog) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/flowlogs/method_delete.go b/resource-manager/network/2022-11-01/flowlogs/method_delete.go deleted file mode 100644 index 1ff7776fa73..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/method_delete.go +++ /dev/null @@ -1,70 +0,0 @@ -package flowlogs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c FlowLogsClient) Delete(ctx context.Context, id FlowLogId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c FlowLogsClient) DeleteThenPoll(ctx context.Context, id FlowLogId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/flowlogs/method_get.go b/resource-manager/network/2022-11-01/flowlogs/method_get.go deleted file mode 100644 index 6bbe4c8574a..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package flowlogs - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FlowLog -} - -// Get ... -func (c FlowLogsClient) Get(ctx context.Context, id FlowLogId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/flowlogs/method_list.go b/resource-manager/network/2022-11-01/flowlogs/method_list.go deleted file mode 100644 index 3d8951e0659..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package flowlogs - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FlowLog -} - -type ListCompleteResult struct { - Items []FlowLog -} - -// List ... -func (c FlowLogsClient) List(ctx context.Context, id NetworkWatcherId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/flowLogs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FlowLog `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c FlowLogsClient) ListComplete(ctx context.Context, id NetworkWatcherId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, FlowLogOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c FlowLogsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkWatcherId, predicate FlowLogOperationPredicate) (result ListCompleteResult, err error) { - items := make([]FlowLog, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/flowlogs/method_updatetags.go b/resource-manager/network/2022-11-01/flowlogs/method_updatetags.go deleted file mode 100644 index bb55968efe9..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package flowlogs - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FlowLog -} - -// UpdateTags ... -func (c FlowLogsClient) UpdateTags(ctx context.Context, id FlowLogId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/flowlogs/model_flowlog.go b/resource-manager/network/2022-11-01/flowlogs/model_flowlog.go deleted file mode 100644 index 6cb0c1a33b5..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/flowlogs/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/flowlogs/model_flowlogformatparameters.go deleted file mode 100644 index 16ca58e95a3..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/flowlogs/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/flowlogs/model_flowlogpropertiesformat.go deleted file mode 100644 index e08f8fc6124..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/flowlogs/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/flowlogs/model_retentionpolicyparameters.go deleted file mode 100644 index 37f07668bea..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/flowlogs/model_tagsobject.go b/resource-manager/network/2022-11-01/flowlogs/model_tagsobject.go deleted file mode 100644 index c5cd354ef29..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/flowlogs/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/flowlogs/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 5b935e5f27b..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/flowlogs/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/flowlogs/model_trafficanalyticsproperties.go deleted file mode 100644 index d6d9faede4b..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/flowlogs/predicates.go b/resource-manager/network/2022-11-01/flowlogs/predicates.go deleted file mode 100644 index 746df2611cc..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package flowlogs - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p FlowLogOperationPredicate) Matches(input FlowLog) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/flowlogs/version.go b/resource-manager/network/2022-11-01/flowlogs/version.go deleted file mode 100644 index 50379040033..00000000000 --- a/resource-manager/network/2022-11-01/flowlogs/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package flowlogs - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/flowlogs/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/ipallocations/README.md b/resource-manager/network/2022-11-01/ipallocations/README.md deleted file mode 100644 index f00f5a2d819..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ipallocations` Documentation - -The `ipallocations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ipallocations" -``` - - -### Client Initialization - -```go -client := ipallocations.NewIPAllocationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `IPAllocationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := ipallocations.NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - -payload := ipallocations.IPAllocation{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `IPAllocationsClient.Delete` - -```go -ctx := context.TODO() -id := ipallocations.NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `IPAllocationsClient.Get` - -```go -ctx := context.TODO() -id := ipallocations.NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - -read, err := client.Get(ctx, id, ipallocations.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `IPAllocationsClient.List` - -```go -ctx := context.TODO() -id := ipallocations.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `IPAllocationsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := ipallocations.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `IPAllocationsClient.UpdateTags` - -```go -ctx := context.TODO() -id := ipallocations.NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - -payload := ipallocations.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/ipallocations/client.go b/resource-manager/network/2022-11-01/ipallocations/client.go deleted file mode 100644 index a9a2ce87420..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package ipallocations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocationsClient struct { - Client *resourcemanager.Client -} - -func NewIPAllocationsClientWithBaseURI(api environments.Api) (*IPAllocationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "ipallocations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating IPAllocationsClient: %+v", err) - } - - return &IPAllocationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/ipallocations/constants.go b/resource-manager/network/2022-11-01/ipallocations/constants.go deleted file mode 100644 index da0323d2ad0..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/constants.go +++ /dev/null @@ -1,92 +0,0 @@ -package ipallocations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocationType string - -const ( - IPAllocationTypeHypernet IPAllocationType = "Hypernet" - IPAllocationTypeUndefined IPAllocationType = "Undefined" -) - -func PossibleValuesForIPAllocationType() []string { - return []string{ - string(IPAllocationTypeHypernet), - string(IPAllocationTypeUndefined), - } -} - -func (s *IPAllocationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationType(input string) (*IPAllocationType, error) { - vals := map[string]IPAllocationType{ - "hypernet": IPAllocationTypeHypernet, - "undefined": IPAllocationTypeUndefined, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationType(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/ipallocations/id_ipallocation.go b/resource-manager/network/2022-11-01/ipallocations/id_ipallocation.go deleted file mode 100644 index 6e8aa2517f8..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/id_ipallocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package ipallocations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = IPAllocationId{} - -// IPAllocationId is a struct representing the Resource ID for a I P Allocation -type IPAllocationId struct { - SubscriptionId string - ResourceGroupName string - IpAllocationName string -} - -// NewIPAllocationID returns a new IPAllocationId struct -func NewIPAllocationID(subscriptionId string, resourceGroupName string, ipAllocationName string) IPAllocationId { - return IPAllocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - IpAllocationName: ipAllocationName, - } -} - -// ParseIPAllocationID parses 'input' into a IPAllocationId -func ParseIPAllocationID(input string) (*IPAllocationId, error) { - parser := resourceids.NewParserFromResourceIdType(IPAllocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := IPAllocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpAllocationName, ok = parsed.Parsed["ipAllocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipAllocationName", *parsed) - } - - return &id, nil -} - -// ParseIPAllocationIDInsensitively parses 'input' case-insensitively into a IPAllocationId -// note: this method should only be used for API response data and not user input -func ParseIPAllocationIDInsensitively(input string) (*IPAllocationId, error) { - parser := resourceids.NewParserFromResourceIdType(IPAllocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := IPAllocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpAllocationName, ok = parsed.Parsed["ipAllocationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipAllocationName", *parsed) - } - - return &id, nil -} - -// ValidateIPAllocationID checks that 'input' can be parsed as a I P Allocation ID -func ValidateIPAllocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseIPAllocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted I P Allocation ID -func (id IPAllocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/ipAllocations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IpAllocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this I P Allocation ID -func (id IPAllocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticIpAllocations", "ipAllocations", "ipAllocations"), - resourceids.UserSpecifiedSegment("ipAllocationName", "ipAllocationValue"), - } -} - -// String returns a human-readable description of this I P Allocation ID -func (id IPAllocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Ip Allocation Name: %q", id.IpAllocationName), - } - return fmt.Sprintf("I P Allocation (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/ipallocations/id_ipallocation_test.go b/resource-manager/network/2022-11-01/ipallocations/id_ipallocation_test.go deleted file mode 100644 index b739b9dd6b1..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/id_ipallocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package ipallocations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = IPAllocationId{} - -func TestNewIPAllocationID(t *testing.T) { - id := NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.IpAllocationName != "ipAllocationValue" { - t.Fatalf("Expected %q but got %q for Segment 'IpAllocationName'", id.IpAllocationName, "ipAllocationValue") - } -} - -func TestFormatIPAllocationID(t *testing.T) { - actual := NewIPAllocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipAllocationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseIPAllocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IPAllocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue", - Expected: &IPAllocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - IpAllocationName: "ipAllocationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseIPAllocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.IpAllocationName != v.Expected.IpAllocationName { - t.Fatalf("Expected %q but got %q for IpAllocationName", v.Expected.IpAllocationName, actual.IpAllocationName) - } - - } -} - -func TestParseIPAllocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IPAllocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPaLlOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue", - Expected: &IPAllocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - IpAllocationName: "ipAllocationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipAllocations/ipAllocationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPaLlOcAtIoNs/iPaLlOcAtIoNvAlUe", - Expected: &IPAllocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - IpAllocationName: "iPaLlOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPaLlOcAtIoNs/iPaLlOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseIPAllocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.IpAllocationName != v.Expected.IpAllocationName { - t.Fatalf("Expected %q but got %q for IpAllocationName", v.Expected.IpAllocationName, actual.IpAllocationName) - } - - } -} - -func TestSegmentsForIPAllocationId(t *testing.T) { - segments := IPAllocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("IPAllocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/ipallocations/method_createorupdate.go b/resource-manager/network/2022-11-01/ipallocations/method_createorupdate.go deleted file mode 100644 index 12fbb4a8080..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c IPAllocationsClient) CreateOrUpdate(ctx context.Context, id IPAllocationId, input IPAllocation) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c IPAllocationsClient) CreateOrUpdateThenPoll(ctx context.Context, id IPAllocationId, input IPAllocation) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/ipallocations/method_delete.go b/resource-manager/network/2022-11-01/ipallocations/method_delete.go deleted file mode 100644 index 2e272e0b823..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c IPAllocationsClient) Delete(ctx context.Context, id IPAllocationId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c IPAllocationsClient) DeleteThenPoll(ctx context.Context, id IPAllocationId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/ipallocations/method_get.go b/resource-manager/network/2022-11-01/ipallocations/method_get.go deleted file mode 100644 index 89218415c21..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPAllocation -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c IPAllocationsClient) Get(ctx context.Context, id IPAllocationId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/ipallocations/method_list.go b/resource-manager/network/2022-11-01/ipallocations/method_list.go deleted file mode 100644 index e8d1620c52f..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]IPAllocation -} - -type ListCompleteResult struct { - Items []IPAllocation -} - -// List ... -func (c IPAllocationsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ipAllocations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]IPAllocation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c IPAllocationsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, IPAllocationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IPAllocationsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate IPAllocationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]IPAllocation, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/ipallocations/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/ipallocations/method_listbyresourcegroup.go deleted file mode 100644 index 05ae05abc4d..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package ipallocations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]IPAllocation -} - -type ListByResourceGroupCompleteResult struct { - Items []IPAllocation -} - -// ListByResourceGroup ... -func (c IPAllocationsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ipAllocations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]IPAllocation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c IPAllocationsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, IPAllocationOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IPAllocationsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate IPAllocationOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]IPAllocation, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/ipallocations/method_updatetags.go b/resource-manager/network/2022-11-01/ipallocations/method_updatetags.go deleted file mode 100644 index 7d95fb25e97..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package ipallocations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPAllocation -} - -// UpdateTags ... -func (c IPAllocationsClient) UpdateTags(ctx context.Context, id IPAllocationId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/ipallocations/model_ipallocation.go b/resource-manager/network/2022-11-01/ipallocations/model_ipallocation.go deleted file mode 100644 index d59b8140ce3..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/model_ipallocation.go +++ /dev/null @@ -1,14 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPAllocationPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ipallocations/model_ipallocationpropertiesformat.go b/resource-manager/network/2022-11-01/ipallocations/model_ipallocationpropertiesformat.go deleted file mode 100644 index ee1eec041ee..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/model_ipallocationpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocationPropertiesFormat struct { - AllocationTags *map[string]string `json:"allocationTags,omitempty"` - IPamAllocationId *string `json:"ipamAllocationId,omitempty"` - Prefix *string `json:"prefix,omitempty"` - PrefixLength *int64 `json:"prefixLength,omitempty"` - PrefixType *IPVersion `json:"prefixType,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - Type *IPAllocationType `json:"type,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ipallocations/model_subresource.go b/resource-manager/network/2022-11-01/ipallocations/model_subresource.go deleted file mode 100644 index 3d4e1d6d386..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ipallocations/model_tagsobject.go b/resource-manager/network/2022-11-01/ipallocations/model_tagsobject.go deleted file mode 100644 index e07b18f03bb..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ipallocations/predicates.go b/resource-manager/network/2022-11-01/ipallocations/predicates.go deleted file mode 100644 index 5f4e136ae66..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package ipallocations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAllocationOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p IPAllocationOperationPredicate) Matches(input IPAllocation) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/ipallocations/version.go b/resource-manager/network/2022-11-01/ipallocations/version.go deleted file mode 100644 index 4bcc887c069..00000000000 --- a/resource-manager/network/2022-11-01/ipallocations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package ipallocations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipallocations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/ipgroups/README.md b/resource-manager/network/2022-11-01/ipgroups/README.md deleted file mode 100644 index 48ace0509f1..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ipgroups` Documentation - -The `ipgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/ipgroups" -``` - - -### Client Initialization - -```go -client := ipgroups.NewIPGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `IPGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - -payload := ipgroups.IPGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `IPGroupsClient.Delete` - -```go -ctx := context.TODO() -id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `IPGroupsClient.Get` - -```go -ctx := context.TODO() -id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - -read, err := client.Get(ctx, id, ipgroups.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `IPGroupsClient.List` - -```go -ctx := context.TODO() -id := ipgroups.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `IPGroupsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := ipgroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `IPGroupsClient.UpdateGroups` - -```go -ctx := context.TODO() -id := ipgroups.NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - -payload := ipgroups.TagsObject{ - // ... -} - - -read, err := client.UpdateGroups(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/ipgroups/client.go b/resource-manager/network/2022-11-01/ipgroups/client.go deleted file mode 100644 index 74e63c13a67..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package ipgroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPGroupsClient struct { - Client *resourcemanager.Client -} - -func NewIPGroupsClientWithBaseURI(api environments.Api) (*IPGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "ipgroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating IPGroupsClient: %+v", err) - } - - return &IPGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/ipgroups/constants.go b/resource-manager/network/2022-11-01/ipgroups/constants.go deleted file mode 100644 index a50092f263a..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package ipgroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/ipgroups/id_ipgroup.go b/resource-manager/network/2022-11-01/ipgroups/id_ipgroup.go deleted file mode 100644 index 8ca4249bbd4..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/id_ipgroup.go +++ /dev/null @@ -1,127 +0,0 @@ -package ipgroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = IPGroupId{} - -// IPGroupId is a struct representing the Resource ID for a I P Group -type IPGroupId struct { - SubscriptionId string - ResourceGroupName string - IpGroupName string -} - -// NewIPGroupID returns a new IPGroupId struct -func NewIPGroupID(subscriptionId string, resourceGroupName string, ipGroupName string) IPGroupId { - return IPGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - IpGroupName: ipGroupName, - } -} - -// ParseIPGroupID parses 'input' into a IPGroupId -func ParseIPGroupID(input string) (*IPGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(IPGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := IPGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpGroupName, ok = parsed.Parsed["ipGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipGroupName", *parsed) - } - - return &id, nil -} - -// ParseIPGroupIDInsensitively parses 'input' case-insensitively into a IPGroupId -// note: this method should only be used for API response data and not user input -func ParseIPGroupIDInsensitively(input string) (*IPGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(IPGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := IPGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.IpGroupName, ok = parsed.Parsed["ipGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "ipGroupName", *parsed) - } - - return &id, nil -} - -// ValidateIPGroupID checks that 'input' can be parsed as a I P Group ID -func ValidateIPGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseIPGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted I P Group ID -func (id IPGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/ipGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.IpGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this I P Group ID -func (id IPGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticIpGroups", "ipGroups", "ipGroups"), - resourceids.UserSpecifiedSegment("ipGroupName", "ipGroupValue"), - } -} - -// String returns a human-readable description of this I P Group ID -func (id IPGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Ip Group Name: %q", id.IpGroupName), - } - return fmt.Sprintf("I P Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/ipgroups/id_ipgroup_test.go b/resource-manager/network/2022-11-01/ipgroups/id_ipgroup_test.go deleted file mode 100644 index cfd4c2e130b..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/id_ipgroup_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package ipgroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = IPGroupId{} - -func TestNewIPGroupID(t *testing.T) { - id := NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.IpGroupName != "ipGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'IpGroupName'", id.IpGroupName, "ipGroupValue") - } -} - -func TestFormatIPGroupID(t *testing.T) { - actual := NewIPGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "ipGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseIPGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IPGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue", - Expected: &IPGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - IpGroupName: "ipGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseIPGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.IpGroupName != v.Expected.IpGroupName { - t.Fatalf("Expected %q but got %q for IpGroupName", v.Expected.IpGroupName, actual.IpGroupName) - } - - } -} - -func TestParseIPGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *IPGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPgRoUpS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue", - Expected: &IPGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - IpGroupName: "ipGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/ipGroups/ipGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPgRoUpS/iPgRoUpVaLuE", - Expected: &IPGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - IpGroupName: "iPgRoUpVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/iPgRoUpS/iPgRoUpVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseIPGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.IpGroupName != v.Expected.IpGroupName { - t.Fatalf("Expected %q but got %q for IpGroupName", v.Expected.IpGroupName, actual.IpGroupName) - } - - } -} - -func TestSegmentsForIPGroupId(t *testing.T) { - segments := IPGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("IPGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/ipgroups/method_createorupdate.go b/resource-manager/network/2022-11-01/ipgroups/method_createorupdate.go deleted file mode 100644 index cdcf7f488f9..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c IPGroupsClient) CreateOrUpdate(ctx context.Context, id IPGroupId, input IPGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c IPGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id IPGroupId, input IPGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/ipgroups/method_delete.go b/resource-manager/network/2022-11-01/ipgroups/method_delete.go deleted file mode 100644 index 1e1797dd8d3..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c IPGroupsClient) Delete(ctx context.Context, id IPGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c IPGroupsClient) DeleteThenPoll(ctx context.Context, id IPGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/ipgroups/method_get.go b/resource-manager/network/2022-11-01/ipgroups/method_get.go deleted file mode 100644 index 7fc933f3b60..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPGroup -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c IPGroupsClient) Get(ctx context.Context, id IPGroupId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/ipgroups/method_list.go b/resource-manager/network/2022-11-01/ipgroups/method_list.go deleted file mode 100644 index e0ce95d2c78..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]IPGroup -} - -type ListCompleteResult struct { - Items []IPGroup -} - -// List ... -func (c IPGroupsClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ipGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]IPGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c IPGroupsClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, IPGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IPGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate IPGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]IPGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/ipgroups/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/ipgroups/method_listbyresourcegroup.go deleted file mode 100644 index b4a110d752c..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package ipgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]IPGroup -} - -type ListByResourceGroupCompleteResult struct { - Items []IPGroup -} - -// ListByResourceGroup ... -func (c IPGroupsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/ipGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]IPGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c IPGroupsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, IPGroupOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c IPGroupsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate IPGroupOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]IPGroup, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/ipgroups/method_updategroups.go b/resource-manager/network/2022-11-01/ipgroups/method_updategroups.go deleted file mode 100644 index f3300f8d8fc..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/method_updategroups.go +++ /dev/null @@ -1,55 +0,0 @@ -package ipgroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateGroupsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPGroup -} - -// UpdateGroups ... -func (c IPGroupsClient) UpdateGroups(ctx context.Context, id IPGroupId, input TagsObject) (result UpdateGroupsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/ipgroups/model_ipgroup.go b/resource-manager/network/2022-11-01/ipgroups/model_ipgroup.go deleted file mode 100644 index 7f586ce2b06..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/model_ipgroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ipgroups/model_ipgrouppropertiesformat.go b/resource-manager/network/2022-11-01/ipgroups/model_ipgrouppropertiesformat.go deleted file mode 100644 index 866075a1038..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/model_ipgrouppropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPGroupPropertiesFormat struct { - FirewallPolicies *[]SubResource `json:"firewallPolicies,omitempty"` - Firewalls *[]SubResource `json:"firewalls,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ipgroups/model_subresource.go b/resource-manager/network/2022-11-01/ipgroups/model_subresource.go deleted file mode 100644 index 5e6c0552f0c..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ipgroups/model_tagsobject.go b/resource-manager/network/2022-11-01/ipgroups/model_tagsobject.go deleted file mode 100644 index df59e42aff4..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/ipgroups/predicates.go b/resource-manager/network/2022-11-01/ipgroups/predicates.go deleted file mode 100644 index a64e98c2290..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package ipgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPGroupOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p IPGroupOperationPredicate) Matches(input IPGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/ipgroups/version.go b/resource-manager/network/2022-11-01/ipgroups/version.go deleted file mode 100644 index e7b7afd7559..00000000000 --- a/resource-manager/network/2022-11-01/ipgroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package ipgroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/ipgroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/README.md b/resource-manager/network/2022-11-01/loadbalancers/README.md deleted file mode 100644 index 504af0e735c..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/README.md +++ /dev/null @@ -1,427 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/loadbalancers` Documentation - -The `loadbalancers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/loadbalancers" -``` - - -### Client Initialization - -```go -client := loadbalancers.NewLoadBalancersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LoadBalancersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -payload := loadbalancers.LoadBalancer{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.Delete` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.Get` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -read, err := client.Get(ctx, id, loadbalancers.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.InboundNatRulesCreateOrUpdate` - -```go -ctx := context.TODO() -id := loadbalancers.NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue") - -payload := loadbalancers.InboundNatRule{ - // ... -} - - -if err := client.InboundNatRulesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.InboundNatRulesDelete` - -```go -ctx := context.TODO() -id := loadbalancers.NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue") - -if err := client.InboundNatRulesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.InboundNatRulesGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue") - -read, err := client.InboundNatRulesGet(ctx, id, loadbalancers.DefaultInboundNatRulesGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.InboundNatRulesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.InboundNatRulesList(ctx, id)` can be used to do batched pagination -items, err := client.InboundNatRulesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.List` - -```go -ctx := context.TODO() -id := loadbalancers.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.ListAll` - -```go -ctx := context.TODO() -id := loadbalancers.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.ListInboundNatRulePortMappings` - -```go -ctx := context.TODO() -id := loadbalancers.NewBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "loadBalancerValue", "backendAddressPoolValue") - -payload := loadbalancers.QueryInboundNatRulePortMappingRequest{ - // ... -} - - -if err := client.ListInboundNatRulePortMappingsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerBackendAddressPoolsCreateOrUpdate` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue") - -payload := loadbalancers.BackendAddressPool{ - // ... -} - - -if err := client.LoadBalancerBackendAddressPoolsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerBackendAddressPoolsDelete` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue") - -if err := client.LoadBalancerBackendAddressPoolsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerBackendAddressPoolsGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue") - -read, err := client.LoadBalancerBackendAddressPoolsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerBackendAddressPoolsList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerBackendAddressPoolsList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerBackendAddressPoolsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerFrontendIPConfigurationsGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewFrontendIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "frontendIPConfigurationValue") - -read, err := client.LoadBalancerFrontendIPConfigurationsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerFrontendIPConfigurationsList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerFrontendIPConfigurationsList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerFrontendIPConfigurationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerLoadBalancingRulesGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "loadBalancingRuleValue") - -read, err := client.LoadBalancerLoadBalancingRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerLoadBalancingRulesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerLoadBalancingRulesList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerLoadBalancingRulesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerNetworkInterfacesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerNetworkInterfacesList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerNetworkInterfacesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerOutboundRulesGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewOutboundRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "outboundRuleValue") - -read, err := client.LoadBalancerOutboundRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerOutboundRulesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerOutboundRulesList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerOutboundRulesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerProbesGet` - -```go -ctx := context.TODO() -id := loadbalancers.NewProbeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "probeValue") - -read, err := client.LoadBalancerProbesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LoadBalancersClient.LoadBalancerProbesList` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -// alternatively `client.LoadBalancerProbesList(ctx, id)` can be used to do batched pagination -items, err := client.LoadBalancerProbesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LoadBalancersClient.SwapPublicIPAddresses` - -```go -ctx := context.TODO() -id := loadbalancers.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -payload := loadbalancers.LoadBalancerVipSwapRequest{ - // ... -} - - -if err := client.SwapPublicIPAddressesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LoadBalancersClient.UpdateTags` - -```go -ctx := context.TODO() -id := loadbalancers.NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - -payload := loadbalancers.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/loadbalancers/client.go b/resource-manager/network/2022-11-01/loadbalancers/client.go deleted file mode 100644 index c61a342321c..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package loadbalancers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancersClient struct { - Client *resourcemanager.Client -} - -func NewLoadBalancersClientWithBaseURI(api environments.Api) (*LoadBalancersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "loadbalancers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LoadBalancersClient: %+v", err) - } - - return &LoadBalancersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/constants.go b/resource-manager/network/2022-11-01/loadbalancers/constants.go deleted file mode 100644 index 41305aabd6c..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/constants.go +++ /dev/null @@ -1,1327 +0,0 @@ -package loadbalancers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type LoadBalancerOutboundRuleProtocol string - -const ( - LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" - LoadBalancerOutboundRuleProtocolTcp LoadBalancerOutboundRuleProtocol = "Tcp" - LoadBalancerOutboundRuleProtocolUdp LoadBalancerOutboundRuleProtocol = "Udp" -) - -func PossibleValuesForLoadBalancerOutboundRuleProtocol() []string { - return []string{ - string(LoadBalancerOutboundRuleProtocolAll), - string(LoadBalancerOutboundRuleProtocolTcp), - string(LoadBalancerOutboundRuleProtocolUdp), - } -} - -func (s *LoadBalancerOutboundRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerOutboundRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerOutboundRuleProtocol(input string) (*LoadBalancerOutboundRuleProtocol, error) { - vals := map[string]LoadBalancerOutboundRuleProtocol{ - "all": LoadBalancerOutboundRuleProtocolAll, - "tcp": LoadBalancerOutboundRuleProtocolTcp, - "udp": LoadBalancerOutboundRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerOutboundRuleProtocol(input) - return &out, nil -} - -type LoadBalancerSkuName string - -const ( - LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" - LoadBalancerSkuNameGateway LoadBalancerSkuName = "Gateway" - LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" -) - -func PossibleValuesForLoadBalancerSkuName() []string { - return []string{ - string(LoadBalancerSkuNameBasic), - string(LoadBalancerSkuNameGateway), - string(LoadBalancerSkuNameStandard), - } -} - -func (s *LoadBalancerSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerSkuName(input string) (*LoadBalancerSkuName, error) { - vals := map[string]LoadBalancerSkuName{ - "basic": LoadBalancerSkuNameBasic, - "gateway": LoadBalancerSkuNameGateway, - "standard": LoadBalancerSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerSkuName(input) - return &out, nil -} - -type LoadBalancerSkuTier string - -const ( - LoadBalancerSkuTierGlobal LoadBalancerSkuTier = "Global" - LoadBalancerSkuTierRegional LoadBalancerSkuTier = "Regional" -) - -func PossibleValuesForLoadBalancerSkuTier() []string { - return []string{ - string(LoadBalancerSkuTierGlobal), - string(LoadBalancerSkuTierRegional), - } -} - -func (s *LoadBalancerSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerSkuTier(input string) (*LoadBalancerSkuTier, error) { - vals := map[string]LoadBalancerSkuTier{ - "global": LoadBalancerSkuTierGlobal, - "regional": LoadBalancerSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerSkuTier(input) - return &out, nil -} - -type LoadDistribution string - -const ( - LoadDistributionDefault LoadDistribution = "Default" - LoadDistributionSourceIP LoadDistribution = "SourceIP" - LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" -) - -func PossibleValuesForLoadDistribution() []string { - return []string{ - string(LoadDistributionDefault), - string(LoadDistributionSourceIP), - string(LoadDistributionSourceIPProtocol), - } -} - -func (s *LoadDistribution) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadDistribution(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadDistribution(input string) (*LoadDistribution, error) { - vals := map[string]LoadDistribution{ - "default": LoadDistributionDefault, - "sourceip": LoadDistributionSourceIP, - "sourceipprotocol": LoadDistributionSourceIPProtocol, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadDistribution(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProbeProtocol string - -const ( - ProbeProtocolHTTP ProbeProtocol = "Http" - ProbeProtocolHTTPS ProbeProtocol = "Https" - ProbeProtocolTcp ProbeProtocol = "Tcp" -) - -func PossibleValuesForProbeProtocol() []string { - return []string{ - string(ProbeProtocolHTTP), - string(ProbeProtocolHTTPS), - string(ProbeProtocolTcp), - } -} - -func (s *ProbeProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProbeProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProbeProtocol(input string) (*ProbeProtocol, error) { - vals := map[string]ProbeProtocol{ - "http": ProbeProtocolHTTP, - "https": ProbeProtocolHTTPS, - "tcp": ProbeProtocolTcp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProbeProtocol(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_backendaddresspool.go b/resource-manager/network/2022-11-01/loadbalancers/id_backendaddresspool.go deleted file mode 100644 index 39e1f9356f9..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_backendaddresspool.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BackendAddressPoolId{} - -// BackendAddressPoolId is a struct representing the Resource ID for a Backend Address Pool -type BackendAddressPoolId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - BackendAddressPoolName string -} - -// NewBackendAddressPoolID returns a new BackendAddressPoolId struct -func NewBackendAddressPoolID(subscriptionId string, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) BackendAddressPoolId { - return BackendAddressPoolId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - BackendAddressPoolName: backendAddressPoolName, - } -} - -// ParseBackendAddressPoolID parses 'input' into a BackendAddressPoolId -func ParseBackendAddressPoolID(input string) (*BackendAddressPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(BackendAddressPoolId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) - } - - return &id, nil -} - -// ParseBackendAddressPoolIDInsensitively parses 'input' case-insensitively into a BackendAddressPoolId -// note: this method should only be used for API response data and not user input -func ParseBackendAddressPoolIDInsensitively(input string) (*BackendAddressPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(BackendAddressPoolId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := BackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) - } - - return &id, nil -} - -// ValidateBackendAddressPoolID checks that 'input' can be parsed as a Backend Address Pool ID -func ValidateBackendAddressPoolID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseBackendAddressPoolID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Backend Address Pool ID -func (id BackendAddressPoolId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/backendAddressPools/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.BackendAddressPoolName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Backend Address Pool ID -func (id BackendAddressPoolId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.UserSpecifiedSegment("resourceGroupName", "resourceGroupValue"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticBackendAddressPools", "backendAddressPools", "backendAddressPools"), - resourceids.UserSpecifiedSegment("backendAddressPoolName", "backendAddressPoolValue"), - } -} - -// String returns a human-readable description of this Backend Address Pool ID -func (id BackendAddressPoolId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Backend Address Pool Name: %q", id.BackendAddressPoolName), - } - return fmt.Sprintf("Backend Address Pool (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_backendaddresspool_test.go b/resource-manager/network/2022-11-01/loadbalancers/id_backendaddresspool_test.go deleted file mode 100644 index 130e347cf17..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_backendaddresspool_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = BackendAddressPoolId{} - -func TestNewBackendAddressPoolID(t *testing.T) { - id := NewBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "loadBalancerValue", "backendAddressPoolValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "resourceGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "resourceGroupValue") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.BackendAddressPoolName != "backendAddressPoolValue" { - t.Fatalf("Expected %q but got %q for Segment 'BackendAddressPoolName'", id.BackendAddressPoolName, "backendAddressPoolValue") - } -} - -func TestFormatBackendAddressPoolID(t *testing.T) { - actual := NewBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "loadBalancerValue", "backendAddressPoolValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseBackendAddressPoolID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BackendAddressPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue", - Expected: &BackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "resourceGroupValue", - LoadBalancerName: "loadBalancerValue", - BackendAddressPoolName: "backendAddressPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBackendAddressPoolID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.BackendAddressPoolName != v.Expected.BackendAddressPoolName { - t.Fatalf("Expected %q but got %q for BackendAddressPoolName", v.Expected.BackendAddressPoolName, actual.BackendAddressPoolName) - } - - } -} - -func TestParseBackendAddressPoolIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *BackendAddressPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue", - Expected: &BackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "resourceGroupValue", - LoadBalancerName: "loadBalancerValue", - BackendAddressPoolName: "backendAddressPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs/bAcKeNdAdDrEsSpOoLvAlUe", - Expected: &BackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "rEsOuRcEgRoUpVaLuE", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - BackendAddressPoolName: "bAcKeNdAdDrEsSpOoLvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs/bAcKeNdAdDrEsSpOoLvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseBackendAddressPoolIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.BackendAddressPoolName != v.Expected.BackendAddressPoolName { - t.Fatalf("Expected %q but got %q for BackendAddressPoolName", v.Expected.BackendAddressPoolName, actual.BackendAddressPoolName) - } - - } -} - -func TestSegmentsForBackendAddressPoolId(t *testing.T) { - segments := BackendAddressPoolId{}.Segments() - if len(segments) == 0 { - t.Fatalf("BackendAddressPoolId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_frontendipconfiguration.go b/resource-manager/network/2022-11-01/loadbalancers/id_frontendipconfiguration.go deleted file mode 100644 index 9f6c3f96a03..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_frontendipconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FrontendIPConfigurationId{} - -// FrontendIPConfigurationId is a struct representing the Resource ID for a Frontend I P Configuration -type FrontendIPConfigurationId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - FrontendIPConfigurationName string -} - -// NewFrontendIPConfigurationID returns a new FrontendIPConfigurationId struct -func NewFrontendIPConfigurationID(subscriptionId string, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) FrontendIPConfigurationId { - return FrontendIPConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - FrontendIPConfigurationName: frontendIPConfigurationName, - } -} - -// ParseFrontendIPConfigurationID parses 'input' into a FrontendIPConfigurationId -func ParseFrontendIPConfigurationID(input string) (*FrontendIPConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(FrontendIPConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FrontendIPConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.FrontendIPConfigurationName, ok = parsed.Parsed["frontendIPConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendIPConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseFrontendIPConfigurationIDInsensitively parses 'input' case-insensitively into a FrontendIPConfigurationId -// note: this method should only be used for API response data and not user input -func ParseFrontendIPConfigurationIDInsensitively(input string) (*FrontendIPConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(FrontendIPConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := FrontendIPConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.FrontendIPConfigurationName, ok = parsed.Parsed["frontendIPConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "frontendIPConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateFrontendIPConfigurationID checks that 'input' can be parsed as a Frontend I P Configuration ID -func ValidateFrontendIPConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseFrontendIPConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Frontend I P Configuration ID -func (id FrontendIPConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/frontendIPConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.FrontendIPConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Frontend I P Configuration ID -func (id FrontendIPConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticFrontendIPConfigurations", "frontendIPConfigurations", "frontendIPConfigurations"), - resourceids.UserSpecifiedSegment("frontendIPConfigurationName", "frontendIPConfigurationValue"), - } -} - -// String returns a human-readable description of this Frontend I P Configuration ID -func (id FrontendIPConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Frontend I P Configuration Name: %q", id.FrontendIPConfigurationName), - } - return fmt.Sprintf("Frontend I P Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_frontendipconfiguration_test.go b/resource-manager/network/2022-11-01/loadbalancers/id_frontendipconfiguration_test.go deleted file mode 100644 index cfdf6c24505..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_frontendipconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = FrontendIPConfigurationId{} - -func TestNewFrontendIPConfigurationID(t *testing.T) { - id := NewFrontendIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "frontendIPConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.FrontendIPConfigurationName != "frontendIPConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'FrontendIPConfigurationName'", id.FrontendIPConfigurationName, "frontendIPConfigurationValue") - } -} - -func TestFormatFrontendIPConfigurationID(t *testing.T) { - actual := NewFrontendIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "frontendIPConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseFrontendIPConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FrontendIPConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue", - Expected: &FrontendIPConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - FrontendIPConfigurationName: "frontendIPConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFrontendIPConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.FrontendIPConfigurationName != v.Expected.FrontendIPConfigurationName { - t.Fatalf("Expected %q but got %q for FrontendIPConfigurationName", v.Expected.FrontendIPConfigurationName, actual.FrontendIPConfigurationName) - } - - } -} - -func TestParseFrontendIPConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *FrontendIPConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/fRoNtEnDiPcOnFiGuRaTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue", - Expected: &FrontendIPConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - FrontendIPConfigurationName: "frontendIPConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/frontendIPConfigurations/frontendIPConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/fRoNtEnDiPcOnFiGuRaTiOnS/fRoNtEnDiPcOnFiGuRaTiOnVaLuE", - Expected: &FrontendIPConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - FrontendIPConfigurationName: "fRoNtEnDiPcOnFiGuRaTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/fRoNtEnDiPcOnFiGuRaTiOnS/fRoNtEnDiPcOnFiGuRaTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseFrontendIPConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.FrontendIPConfigurationName != v.Expected.FrontendIPConfigurationName { - t.Fatalf("Expected %q but got %q for FrontendIPConfigurationName", v.Expected.FrontendIPConfigurationName, actual.FrontendIPConfigurationName) - } - - } -} - -func TestSegmentsForFrontendIPConfigurationId(t *testing.T) { - segments := FrontendIPConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("FrontendIPConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_inboundnatrule.go b/resource-manager/network/2022-11-01/loadbalancers/id_inboundnatrule.go deleted file mode 100644 index 8a803ad6788..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_inboundnatrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = InboundNatRuleId{} - -// InboundNatRuleId is a struct representing the Resource ID for a Inbound Nat Rule -type InboundNatRuleId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - InboundNatRuleName string -} - -// NewInboundNatRuleID returns a new InboundNatRuleId struct -func NewInboundNatRuleID(subscriptionId string, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) InboundNatRuleId { - return InboundNatRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - InboundNatRuleName: inboundNatRuleName, - } -} - -// ParseInboundNatRuleID parses 'input' into a InboundNatRuleId -func ParseInboundNatRuleID(input string) (*InboundNatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(InboundNatRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := InboundNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.InboundNatRuleName, ok = parsed.Parsed["inboundNatRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundNatRuleName", *parsed) - } - - return &id, nil -} - -// ParseInboundNatRuleIDInsensitively parses 'input' case-insensitively into a InboundNatRuleId -// note: this method should only be used for API response data and not user input -func ParseInboundNatRuleIDInsensitively(input string) (*InboundNatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(InboundNatRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := InboundNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.InboundNatRuleName, ok = parsed.Parsed["inboundNatRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundNatRuleName", *parsed) - } - - return &id, nil -} - -// ValidateInboundNatRuleID checks that 'input' can be parsed as a Inbound Nat Rule ID -func ValidateInboundNatRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseInboundNatRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Inbound Nat Rule ID -func (id InboundNatRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/inboundNatRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.InboundNatRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Inbound Nat Rule ID -func (id InboundNatRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticInboundNatRules", "inboundNatRules", "inboundNatRules"), - resourceids.UserSpecifiedSegment("inboundNatRuleName", "inboundNatRuleValue"), - } -} - -// String returns a human-readable description of this Inbound Nat Rule ID -func (id InboundNatRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Inbound Nat Rule Name: %q", id.InboundNatRuleName), - } - return fmt.Sprintf("Inbound Nat Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_inboundnatrule_test.go b/resource-manager/network/2022-11-01/loadbalancers/id_inboundnatrule_test.go deleted file mode 100644 index fe827b355be..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_inboundnatrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = InboundNatRuleId{} - -func TestNewInboundNatRuleID(t *testing.T) { - id := NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.InboundNatRuleName != "inboundNatRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'InboundNatRuleName'", id.InboundNatRuleName, "inboundNatRuleValue") - } -} - -func TestFormatInboundNatRuleID(t *testing.T) { - actual := NewInboundNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "inboundNatRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseInboundNatRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *InboundNatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue", - Expected: &InboundNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - InboundNatRuleName: "inboundNatRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseInboundNatRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.InboundNatRuleName != v.Expected.InboundNatRuleName { - t.Fatalf("Expected %q but got %q for InboundNatRuleName", v.Expected.InboundNatRuleName, actual.InboundNatRuleName) - } - - } -} - -func TestParseInboundNatRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *InboundNatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/iNbOuNdNaTrUlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue", - Expected: &InboundNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - InboundNatRuleName: "inboundNatRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/inboundNatRules/inboundNatRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/iNbOuNdNaTrUlEs/iNbOuNdNaTrUlEvAlUe", - Expected: &InboundNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - InboundNatRuleName: "iNbOuNdNaTrUlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/iNbOuNdNaTrUlEs/iNbOuNdNaTrUlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseInboundNatRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.InboundNatRuleName != v.Expected.InboundNatRuleName { - t.Fatalf("Expected %q but got %q for InboundNatRuleName", v.Expected.InboundNatRuleName, actual.InboundNatRuleName) - } - - } -} - -func TestSegmentsForInboundNatRuleId(t *testing.T) { - segments := InboundNatRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("InboundNatRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancer.go b/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancer.go deleted file mode 100644 index b0a9491d230..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancer.go +++ /dev/null @@ -1,127 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancerId{} - -// LoadBalancerId is a struct representing the Resource ID for a Load Balancer -type LoadBalancerId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string -} - -// NewLoadBalancerID returns a new LoadBalancerId struct -func NewLoadBalancerID(subscriptionId string, resourceGroupName string, loadBalancerName string) LoadBalancerId { - return LoadBalancerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - } -} - -// ParseLoadBalancerID parses 'input' into a LoadBalancerId -func ParseLoadBalancerID(input string) (*LoadBalancerId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - return &id, nil -} - -// ParseLoadBalancerIDInsensitively parses 'input' case-insensitively into a LoadBalancerId -// note: this method should only be used for API response data and not user input -func ParseLoadBalancerIDInsensitively(input string) (*LoadBalancerId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - return &id, nil -} - -// ValidateLoadBalancerID checks that 'input' can be parsed as a Load Balancer ID -func ValidateLoadBalancerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLoadBalancerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Load Balancer ID -func (id LoadBalancerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Load Balancer ID -func (id LoadBalancerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - } -} - -// String returns a human-readable description of this Load Balancer ID -func (id LoadBalancerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - } - return fmt.Sprintf("Load Balancer (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancer_test.go b/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancer_test.go deleted file mode 100644 index 0d17ff3a1cd..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancer_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancerId{} - -func TestNewLoadBalancerID(t *testing.T) { - id := NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } -} - -func TestFormatLoadBalancerID(t *testing.T) { - actual := NewLoadBalancerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLoadBalancerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Expected: &LoadBalancerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - } -} - -func TestParseLoadBalancerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Expected: &LoadBalancerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Expected: &LoadBalancerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - } -} - -func TestSegmentsForLoadBalancerId(t *testing.T) { - segments := LoadBalancerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LoadBalancerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancerbackendaddresspool.go b/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancerbackendaddresspool.go deleted file mode 100644 index 98ac08abc20..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancerbackendaddresspool.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancerBackendAddressPoolId{} - -// LoadBalancerBackendAddressPoolId is a struct representing the Resource ID for a Load Balancer Backend Address Pool -type LoadBalancerBackendAddressPoolId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - BackendAddressPoolName string -} - -// NewLoadBalancerBackendAddressPoolID returns a new LoadBalancerBackendAddressPoolId struct -func NewLoadBalancerBackendAddressPoolID(subscriptionId string, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) LoadBalancerBackendAddressPoolId { - return LoadBalancerBackendAddressPoolId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - BackendAddressPoolName: backendAddressPoolName, - } -} - -// ParseLoadBalancerBackendAddressPoolID parses 'input' into a LoadBalancerBackendAddressPoolId -func ParseLoadBalancerBackendAddressPoolID(input string) (*LoadBalancerBackendAddressPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancerBackendAddressPoolId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancerBackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) - } - - return &id, nil -} - -// ParseLoadBalancerBackendAddressPoolIDInsensitively parses 'input' case-insensitively into a LoadBalancerBackendAddressPoolId -// note: this method should only be used for API response data and not user input -func ParseLoadBalancerBackendAddressPoolIDInsensitively(input string) (*LoadBalancerBackendAddressPoolId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancerBackendAddressPoolId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancerBackendAddressPoolId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.BackendAddressPoolName, ok = parsed.Parsed["backendAddressPoolName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "backendAddressPoolName", *parsed) - } - - return &id, nil -} - -// ValidateLoadBalancerBackendAddressPoolID checks that 'input' can be parsed as a Load Balancer Backend Address Pool ID -func ValidateLoadBalancerBackendAddressPoolID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLoadBalancerBackendAddressPoolID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Load Balancer Backend Address Pool ID -func (id LoadBalancerBackendAddressPoolId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/backendAddressPools/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.BackendAddressPoolName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Load Balancer Backend Address Pool ID -func (id LoadBalancerBackendAddressPoolId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticBackendAddressPools", "backendAddressPools", "backendAddressPools"), - resourceids.UserSpecifiedSegment("backendAddressPoolName", "backendAddressPoolValue"), - } -} - -// String returns a human-readable description of this Load Balancer Backend Address Pool ID -func (id LoadBalancerBackendAddressPoolId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Backend Address Pool Name: %q", id.BackendAddressPoolName), - } - return fmt.Sprintf("Load Balancer Backend Address Pool (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancerbackendaddresspool_test.go b/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancerbackendaddresspool_test.go deleted file mode 100644 index 028fa96ce23..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancerbackendaddresspool_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancerBackendAddressPoolId{} - -func TestNewLoadBalancerBackendAddressPoolID(t *testing.T) { - id := NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.BackendAddressPoolName != "backendAddressPoolValue" { - t.Fatalf("Expected %q but got %q for Segment 'BackendAddressPoolName'", id.BackendAddressPoolName, "backendAddressPoolValue") - } -} - -func TestFormatLoadBalancerBackendAddressPoolID(t *testing.T) { - actual := NewLoadBalancerBackendAddressPoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "backendAddressPoolValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLoadBalancerBackendAddressPoolID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancerBackendAddressPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue", - Expected: &LoadBalancerBackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - BackendAddressPoolName: "backendAddressPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancerBackendAddressPoolID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.BackendAddressPoolName != v.Expected.BackendAddressPoolName { - t.Fatalf("Expected %q but got %q for BackendAddressPoolName", v.Expected.BackendAddressPoolName, actual.BackendAddressPoolName) - } - - } -} - -func TestParseLoadBalancerBackendAddressPoolIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancerBackendAddressPoolId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue", - Expected: &LoadBalancerBackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - BackendAddressPoolName: "backendAddressPoolValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/backendAddressPools/backendAddressPoolValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs/bAcKeNdAdDrEsSpOoLvAlUe", - Expected: &LoadBalancerBackendAddressPoolId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - BackendAddressPoolName: "bAcKeNdAdDrEsSpOoLvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/bAcKeNdAdDrEsSpOoLs/bAcKeNdAdDrEsSpOoLvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancerBackendAddressPoolIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.BackendAddressPoolName != v.Expected.BackendAddressPoolName { - t.Fatalf("Expected %q but got %q for BackendAddressPoolName", v.Expected.BackendAddressPoolName, actual.BackendAddressPoolName) - } - - } -} - -func TestSegmentsForLoadBalancerBackendAddressPoolId(t *testing.T) { - segments := LoadBalancerBackendAddressPoolId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LoadBalancerBackendAddressPoolId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancingrule.go b/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancingrule.go deleted file mode 100644 index 4b3bb48b397..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancingrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancingRuleId{} - -// LoadBalancingRuleId is a struct representing the Resource ID for a Load Balancing Rule -type LoadBalancingRuleId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - LoadBalancingRuleName string -} - -// NewLoadBalancingRuleID returns a new LoadBalancingRuleId struct -func NewLoadBalancingRuleID(subscriptionId string, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) LoadBalancingRuleId { - return LoadBalancingRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - LoadBalancingRuleName: loadBalancingRuleName, - } -} - -// ParseLoadBalancingRuleID parses 'input' into a LoadBalancingRuleId -func ParseLoadBalancingRuleID(input string) (*LoadBalancingRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancingRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancingRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.LoadBalancingRuleName, ok = parsed.Parsed["loadBalancingRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancingRuleName", *parsed) - } - - return &id, nil -} - -// ParseLoadBalancingRuleIDInsensitively parses 'input' case-insensitively into a LoadBalancingRuleId -// note: this method should only be used for API response data and not user input -func ParseLoadBalancingRuleIDInsensitively(input string) (*LoadBalancingRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(LoadBalancingRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LoadBalancingRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.LoadBalancingRuleName, ok = parsed.Parsed["loadBalancingRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancingRuleName", *parsed) - } - - return &id, nil -} - -// ValidateLoadBalancingRuleID checks that 'input' can be parsed as a Load Balancing Rule ID -func ValidateLoadBalancingRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLoadBalancingRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Load Balancing Rule ID -func (id LoadBalancingRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/loadBalancingRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.LoadBalancingRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Load Balancing Rule ID -func (id LoadBalancingRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticLoadBalancingRules", "loadBalancingRules", "loadBalancingRules"), - resourceids.UserSpecifiedSegment("loadBalancingRuleName", "loadBalancingRuleValue"), - } -} - -// String returns a human-readable description of this Load Balancing Rule ID -func (id LoadBalancingRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Load Balancing Rule Name: %q", id.LoadBalancingRuleName), - } - return fmt.Sprintf("Load Balancing Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancingrule_test.go b/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancingrule_test.go deleted file mode 100644 index 99df294466c..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_loadbalancingrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LoadBalancingRuleId{} - -func TestNewLoadBalancingRuleID(t *testing.T) { - id := NewLoadBalancingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "loadBalancingRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.LoadBalancingRuleName != "loadBalancingRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancingRuleName'", id.LoadBalancingRuleName, "loadBalancingRuleValue") - } -} - -func TestFormatLoadBalancingRuleID(t *testing.T) { - actual := NewLoadBalancingRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "loadBalancingRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLoadBalancingRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancingRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue", - Expected: &LoadBalancingRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - LoadBalancingRuleName: "loadBalancingRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancingRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.LoadBalancingRuleName != v.Expected.LoadBalancingRuleName { - t.Fatalf("Expected %q but got %q for LoadBalancingRuleName", v.Expected.LoadBalancingRuleName, actual.LoadBalancingRuleName) - } - - } -} - -func TestParseLoadBalancingRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LoadBalancingRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/lOaDbAlAnCiNgRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue", - Expected: &LoadBalancingRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - LoadBalancingRuleName: "loadBalancingRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/loadBalancingRules/loadBalancingRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/lOaDbAlAnCiNgRuLeS/lOaDbAlAnCiNgRuLeVaLuE", - Expected: &LoadBalancingRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - LoadBalancingRuleName: "lOaDbAlAnCiNgRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/lOaDbAlAnCiNgRuLeS/lOaDbAlAnCiNgRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLoadBalancingRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.LoadBalancingRuleName != v.Expected.LoadBalancingRuleName { - t.Fatalf("Expected %q but got %q for LoadBalancingRuleName", v.Expected.LoadBalancingRuleName, actual.LoadBalancingRuleName) - } - - } -} - -func TestSegmentsForLoadBalancingRuleId(t *testing.T) { - segments := LoadBalancingRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LoadBalancingRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_location.go b/resource-manager/network/2022-11-01/loadbalancers/id_location.go deleted file mode 100644 index 3a2efc6db17..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_location_test.go b/resource-manager/network/2022-11-01/loadbalancers/id_location_test.go deleted file mode 100644 index 382c290ede8..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_outboundrule.go b/resource-manager/network/2022-11-01/loadbalancers/id_outboundrule.go deleted file mode 100644 index b2c3cafa61b..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_outboundrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = OutboundRuleId{} - -// OutboundRuleId is a struct representing the Resource ID for a Outbound Rule -type OutboundRuleId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - OutboundRuleName string -} - -// NewOutboundRuleID returns a new OutboundRuleId struct -func NewOutboundRuleID(subscriptionId string, resourceGroupName string, loadBalancerName string, outboundRuleName string) OutboundRuleId { - return OutboundRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - OutboundRuleName: outboundRuleName, - } -} - -// ParseOutboundRuleID parses 'input' into a OutboundRuleId -func ParseOutboundRuleID(input string) (*OutboundRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(OutboundRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := OutboundRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.OutboundRuleName, ok = parsed.Parsed["outboundRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outboundRuleName", *parsed) - } - - return &id, nil -} - -// ParseOutboundRuleIDInsensitively parses 'input' case-insensitively into a OutboundRuleId -// note: this method should only be used for API response data and not user input -func ParseOutboundRuleIDInsensitively(input string) (*OutboundRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(OutboundRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := OutboundRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.OutboundRuleName, ok = parsed.Parsed["outboundRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "outboundRuleName", *parsed) - } - - return &id, nil -} - -// ValidateOutboundRuleID checks that 'input' can be parsed as a Outbound Rule ID -func ValidateOutboundRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseOutboundRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Outbound Rule ID -func (id OutboundRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/outboundRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.OutboundRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Outbound Rule ID -func (id OutboundRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticOutboundRules", "outboundRules", "outboundRules"), - resourceids.UserSpecifiedSegment("outboundRuleName", "outboundRuleValue"), - } -} - -// String returns a human-readable description of this Outbound Rule ID -func (id OutboundRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Outbound Rule Name: %q", id.OutboundRuleName), - } - return fmt.Sprintf("Outbound Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_outboundrule_test.go b/resource-manager/network/2022-11-01/loadbalancers/id_outboundrule_test.go deleted file mode 100644 index 7b462f2ed6a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_outboundrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = OutboundRuleId{} - -func TestNewOutboundRuleID(t *testing.T) { - id := NewOutboundRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "outboundRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.OutboundRuleName != "outboundRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'OutboundRuleName'", id.OutboundRuleName, "outboundRuleValue") - } -} - -func TestFormatOutboundRuleID(t *testing.T) { - actual := NewOutboundRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "outboundRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseOutboundRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *OutboundRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue", - Expected: &OutboundRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - OutboundRuleName: "outboundRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseOutboundRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.OutboundRuleName != v.Expected.OutboundRuleName { - t.Fatalf("Expected %q but got %q for OutboundRuleName", v.Expected.OutboundRuleName, actual.OutboundRuleName) - } - - } -} - -func TestParseOutboundRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *OutboundRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/oUtBoUnDrUlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue", - Expected: &OutboundRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - OutboundRuleName: "outboundRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/outboundRules/outboundRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/oUtBoUnDrUlEs/oUtBoUnDrUlEvAlUe", - Expected: &OutboundRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - OutboundRuleName: "oUtBoUnDrUlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/oUtBoUnDrUlEs/oUtBoUnDrUlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseOutboundRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.OutboundRuleName != v.Expected.OutboundRuleName { - t.Fatalf("Expected %q but got %q for OutboundRuleName", v.Expected.OutboundRuleName, actual.OutboundRuleName) - } - - } -} - -func TestSegmentsForOutboundRuleId(t *testing.T) { - segments := OutboundRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("OutboundRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_probe.go b/resource-manager/network/2022-11-01/loadbalancers/id_probe.go deleted file mode 100644 index 6307740b0b8..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_probe.go +++ /dev/null @@ -1,140 +0,0 @@ -package loadbalancers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProbeId{} - -// ProbeId is a struct representing the Resource ID for a Probe -type ProbeId struct { - SubscriptionId string - ResourceGroupName string - LoadBalancerName string - ProbeName string -} - -// NewProbeID returns a new ProbeId struct -func NewProbeID(subscriptionId string, resourceGroupName string, loadBalancerName string, probeName string) ProbeId { - return ProbeId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LoadBalancerName: loadBalancerName, - ProbeName: probeName, - } -} - -// ParseProbeID parses 'input' into a ProbeId -func ParseProbeID(input string) (*ProbeId, error) { - parser := resourceids.NewParserFromResourceIdType(ProbeId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProbeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.ProbeName, ok = parsed.Parsed["probeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "probeName", *parsed) - } - - return &id, nil -} - -// ParseProbeIDInsensitively parses 'input' case-insensitively into a ProbeId -// note: this method should only be used for API response data and not user input -func ParseProbeIDInsensitively(input string) (*ProbeId, error) { - parser := resourceids.NewParserFromResourceIdType(ProbeId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProbeId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LoadBalancerName, ok = parsed.Parsed["loadBalancerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "loadBalancerName", *parsed) - } - - if id.ProbeName, ok = parsed.Parsed["probeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "probeName", *parsed) - } - - return &id, nil -} - -// ValidateProbeID checks that 'input' can be parsed as a Probe ID -func ValidateProbeID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProbeID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Probe ID -func (id ProbeId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/loadBalancers/%s/probes/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LoadBalancerName, id.ProbeName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Probe ID -func (id ProbeId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLoadBalancers", "loadBalancers", "loadBalancers"), - resourceids.UserSpecifiedSegment("loadBalancerName", "loadBalancerValue"), - resourceids.StaticSegment("staticProbes", "probes", "probes"), - resourceids.UserSpecifiedSegment("probeName", "probeValue"), - } -} - -// String returns a human-readable description of this Probe ID -func (id ProbeId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Load Balancer Name: %q", id.LoadBalancerName), - fmt.Sprintf("Probe Name: %q", id.ProbeName), - } - return fmt.Sprintf("Probe (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/id_probe_test.go b/resource-manager/network/2022-11-01/loadbalancers/id_probe_test.go deleted file mode 100644 index 7ad75b16134..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/id_probe_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package loadbalancers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProbeId{} - -func TestNewProbeID(t *testing.T) { - id := NewProbeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "probeValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LoadBalancerName != "loadBalancerValue" { - t.Fatalf("Expected %q but got %q for Segment 'LoadBalancerName'", id.LoadBalancerName, "loadBalancerValue") - } - - if id.ProbeName != "probeValue" { - t.Fatalf("Expected %q but got %q for Segment 'ProbeName'", id.ProbeName, "probeValue") - } -} - -func TestFormatProbeID(t *testing.T) { - actual := NewProbeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "loadBalancerValue", "probeValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProbeID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProbeId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue", - Expected: &ProbeId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - ProbeName: "probeValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProbeID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.ProbeName != v.Expected.ProbeName { - t.Fatalf("Expected %q but got %q for ProbeName", v.Expected.ProbeName, actual.ProbeName) - } - - } -} - -func TestParseProbeIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProbeId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/pRoBeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue", - Expected: &ProbeId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LoadBalancerName: "loadBalancerValue", - ProbeName: "probeValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/loadBalancers/loadBalancerValue/probes/probeValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/pRoBeS/pRoBeVaLuE", - Expected: &ProbeId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LoadBalancerName: "lOaDbAlAnCeRvAlUe", - ProbeName: "pRoBeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOaDbAlAnCeRs/lOaDbAlAnCeRvAlUe/pRoBeS/pRoBeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProbeIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LoadBalancerName != v.Expected.LoadBalancerName { - t.Fatalf("Expected %q but got %q for LoadBalancerName", v.Expected.LoadBalancerName, actual.LoadBalancerName) - } - - if actual.ProbeName != v.Expected.ProbeName { - t.Fatalf("Expected %q but got %q for ProbeName", v.Expected.ProbeName, actual.ProbeName) - } - - } -} - -func TestSegmentsForProbeId(t *testing.T) { - segments := ProbeId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProbeId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_createorupdate.go b/resource-manager/network/2022-11-01/loadbalancers/method_createorupdate.go deleted file mode 100644 index 11aa72d7b79..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c LoadBalancersClient) CreateOrUpdate(ctx context.Context, id LoadBalancerId, input LoadBalancer) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c LoadBalancersClient) CreateOrUpdateThenPoll(ctx context.Context, id LoadBalancerId, input LoadBalancer) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_delete.go b/resource-manager/network/2022-11-01/loadbalancers/method_delete.go deleted file mode 100644 index 54ff21552df..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LoadBalancersClient) Delete(ctx context.Context, id LoadBalancerId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LoadBalancersClient) DeleteThenPoll(ctx context.Context, id LoadBalancerId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_get.go b/resource-manager/network/2022-11-01/loadbalancers/method_get.go deleted file mode 100644 index dc43d33378a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LoadBalancer -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c LoadBalancersClient) Get(ctx context.Context, id LoadBalancerId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulescreateorupdate.go b/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulescreateorupdate.go deleted file mode 100644 index 7af0442381b..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// InboundNatRulesCreateOrUpdate ... -func (c LoadBalancersClient) InboundNatRulesCreateOrUpdate(ctx context.Context, id InboundNatRuleId, input InboundNatRule) (result InboundNatRulesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// InboundNatRulesCreateOrUpdateThenPoll performs InboundNatRulesCreateOrUpdate then polls until it's completed -func (c LoadBalancersClient) InboundNatRulesCreateOrUpdateThenPoll(ctx context.Context, id InboundNatRuleId, input InboundNatRule) error { - result, err := c.InboundNatRulesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing InboundNatRulesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after InboundNatRulesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulesdelete.go b/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulesdelete.go deleted file mode 100644 index 2d19b62f757..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// InboundNatRulesDelete ... -func (c LoadBalancersClient) InboundNatRulesDelete(ctx context.Context, id InboundNatRuleId) (result InboundNatRulesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// InboundNatRulesDeleteThenPoll performs InboundNatRulesDelete then polls until it's completed -func (c LoadBalancersClient) InboundNatRulesDeleteThenPoll(ctx context.Context, id InboundNatRuleId) error { - result, err := c.InboundNatRulesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing InboundNatRulesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after InboundNatRulesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulesget.go b/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulesget.go deleted file mode 100644 index d26617f69c0..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatrulesget.go +++ /dev/null @@ -1,80 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *InboundNatRule -} - -type InboundNatRulesGetOperationOptions struct { - Expand *string -} - -func DefaultInboundNatRulesGetOperationOptions() InboundNatRulesGetOperationOptions { - return InboundNatRulesGetOperationOptions{} -} - -func (o InboundNatRulesGetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o InboundNatRulesGetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o InboundNatRulesGetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// InboundNatRulesGet ... -func (c LoadBalancersClient) InboundNatRulesGet(ctx context.Context, id InboundNatRuleId, options InboundNatRulesGetOperationOptions) (result InboundNatRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatruleslist.go b/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatruleslist.go deleted file mode 100644 index 5705e65a2a6..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_inboundnatruleslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]InboundNatRule -} - -type InboundNatRulesListCompleteResult struct { - Items []InboundNatRule -} - -// InboundNatRulesList ... -func (c LoadBalancersClient) InboundNatRulesList(ctx context.Context, id LoadBalancerId) (result InboundNatRulesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/inboundNatRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]InboundNatRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// InboundNatRulesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) InboundNatRulesListComplete(ctx context.Context, id LoadBalancerId) (InboundNatRulesListCompleteResult, error) { - return c.InboundNatRulesListCompleteMatchingPredicate(ctx, id, InboundNatRuleOperationPredicate{}) -} - -// InboundNatRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) InboundNatRulesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate InboundNatRuleOperationPredicate) (result InboundNatRulesListCompleteResult, err error) { - items := make([]InboundNatRule, 0) - - resp, err := c.InboundNatRulesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = InboundNatRulesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_list.go b/resource-manager/network/2022-11-01/loadbalancers/method_list.go deleted file mode 100644 index 854252c93ea..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LoadBalancer -} - -type ListCompleteResult struct { - Items []LoadBalancer -} - -// List ... -func (c LoadBalancersClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/loadBalancers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LoadBalancer `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c LoadBalancersClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LoadBalancerOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LoadBalancerOperationPredicate) (result ListCompleteResult, err error) { - items := make([]LoadBalancer, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_listall.go b/resource-manager/network/2022-11-01/loadbalancers/method_listall.go deleted file mode 100644 index 097745137c5..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LoadBalancer -} - -type ListAllCompleteResult struct { - Items []LoadBalancer -} - -// ListAll ... -func (c LoadBalancersClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/loadBalancers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LoadBalancer `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c LoadBalancersClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, LoadBalancerOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LoadBalancerOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]LoadBalancer, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_listinboundnatruleportmappings.go b/resource-manager/network/2022-11-01/loadbalancers/method_listinboundnatruleportmappings.go deleted file mode 100644 index 7cf0c7ed2ae..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_listinboundnatruleportmappings.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListInboundNatRulePortMappingsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ListInboundNatRulePortMappings ... -func (c LoadBalancersClient) ListInboundNatRulePortMappings(ctx context.Context, id BackendAddressPoolId, input QueryInboundNatRulePortMappingRequest) (result ListInboundNatRulePortMappingsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryInboundNatRulePortMapping", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ListInboundNatRulePortMappingsThenPoll performs ListInboundNatRulePortMappings then polls until it's completed -func (c LoadBalancersClient) ListInboundNatRulePortMappingsThenPoll(ctx context.Context, id BackendAddressPoolId, input QueryInboundNatRulePortMappingRequest) error { - result, err := c.ListInboundNatRulePortMappings(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ListInboundNatRulePortMappings: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ListInboundNatRulePortMappings: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolscreateorupdate.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolscreateorupdate.go deleted file mode 100644 index 3015d6037c7..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPoolsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// LoadBalancerBackendAddressPoolsCreateOrUpdate ... -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsCreateOrUpdate(ctx context.Context, id LoadBalancerBackendAddressPoolId, input BackendAddressPool) (result LoadBalancerBackendAddressPoolsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// LoadBalancerBackendAddressPoolsCreateOrUpdateThenPoll performs LoadBalancerBackendAddressPoolsCreateOrUpdate then polls until it's completed -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsCreateOrUpdateThenPoll(ctx context.Context, id LoadBalancerBackendAddressPoolId, input BackendAddressPool) error { - result, err := c.LoadBalancerBackendAddressPoolsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing LoadBalancerBackendAddressPoolsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after LoadBalancerBackendAddressPoolsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsdelete.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsdelete.go deleted file mode 100644 index 748b8b97657..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPoolsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// LoadBalancerBackendAddressPoolsDelete ... -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsDelete(ctx context.Context, id LoadBalancerBackendAddressPoolId) (result LoadBalancerBackendAddressPoolsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// LoadBalancerBackendAddressPoolsDeleteThenPoll performs LoadBalancerBackendAddressPoolsDelete then polls until it's completed -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsDeleteThenPoll(ctx context.Context, id LoadBalancerBackendAddressPoolId) error { - result, err := c.LoadBalancerBackendAddressPoolsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing LoadBalancerBackendAddressPoolsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after LoadBalancerBackendAddressPoolsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go deleted file mode 100644 index e2a1e679dfa..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPoolsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BackendAddressPool -} - -// LoadBalancerBackendAddressPoolsGet ... -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsGet(ctx context.Context, id LoadBalancerBackendAddressPoolId) (result LoadBalancerBackendAddressPoolsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolslist.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolslist.go deleted file mode 100644 index 25489397193..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerbackendaddresspoolslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPoolsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BackendAddressPool -} - -type LoadBalancerBackendAddressPoolsListCompleteResult struct { - Items []BackendAddressPool -} - -// LoadBalancerBackendAddressPoolsList ... -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsList(ctx context.Context, id LoadBalancerId) (result LoadBalancerBackendAddressPoolsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/backendAddressPools", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BackendAddressPool `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerBackendAddressPoolsListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerBackendAddressPoolsListCompleteResult, error) { - return c.LoadBalancerBackendAddressPoolsListCompleteMatchingPredicate(ctx, id, BackendAddressPoolOperationPredicate{}) -} - -// LoadBalancerBackendAddressPoolsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerBackendAddressPoolsListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate BackendAddressPoolOperationPredicate) (result LoadBalancerBackendAddressPoolsListCompleteResult, err error) { - items := make([]BackendAddressPool, 0) - - resp, err := c.LoadBalancerBackendAddressPoolsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerBackendAddressPoolsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go deleted file mode 100644 index e1f00d52c9d..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerFrontendIPConfigurationsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *FrontendIPConfiguration -} - -// LoadBalancerFrontendIPConfigurationsGet ... -func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsGet(ctx context.Context, id FrontendIPConfigurationId) (result LoadBalancerFrontendIPConfigurationsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationslist.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationslist.go deleted file mode 100644 index 94a00f15c62..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerfrontendipconfigurationslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerFrontendIPConfigurationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]FrontendIPConfiguration -} - -type LoadBalancerFrontendIPConfigurationsListCompleteResult struct { - Items []FrontendIPConfiguration -} - -// LoadBalancerFrontendIPConfigurationsList ... -func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsList(ctx context.Context, id LoadBalancerId) (result LoadBalancerFrontendIPConfigurationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/frontendIPConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]FrontendIPConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerFrontendIPConfigurationsListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerFrontendIPConfigurationsListCompleteResult, error) { - return c.LoadBalancerFrontendIPConfigurationsListCompleteMatchingPredicate(ctx, id, FrontendIPConfigurationOperationPredicate{}) -} - -// LoadBalancerFrontendIPConfigurationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerFrontendIPConfigurationsListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate FrontendIPConfigurationOperationPredicate) (result LoadBalancerFrontendIPConfigurationsListCompleteResult, err error) { - items := make([]FrontendIPConfiguration, 0) - - resp, err := c.LoadBalancerFrontendIPConfigurationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerFrontendIPConfigurationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go deleted file mode 100644 index dbeda3c41ce..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerloadbalancingrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerLoadBalancingRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LoadBalancingRule -} - -// LoadBalancerLoadBalancingRulesGet ... -func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesGet(ctx context.Context, id LoadBalancingRuleId) (result LoadBalancerLoadBalancingRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerloadbalancingruleslist.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerloadbalancingruleslist.go deleted file mode 100644 index e9cb03cd2b0..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerloadbalancingruleslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerLoadBalancingRulesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LoadBalancingRule -} - -type LoadBalancerLoadBalancingRulesListCompleteResult struct { - Items []LoadBalancingRule -} - -// LoadBalancerLoadBalancingRulesList ... -func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesList(ctx context.Context, id LoadBalancerId) (result LoadBalancerLoadBalancingRulesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/loadBalancingRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LoadBalancingRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerLoadBalancingRulesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerLoadBalancingRulesListCompleteResult, error) { - return c.LoadBalancerLoadBalancingRulesListCompleteMatchingPredicate(ctx, id, LoadBalancingRuleOperationPredicate{}) -} - -// LoadBalancerLoadBalancingRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerLoadBalancingRulesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate LoadBalancingRuleOperationPredicate) (result LoadBalancerLoadBalancingRulesListCompleteResult, err error) { - items := make([]LoadBalancingRule, 0) - - resp, err := c.LoadBalancerLoadBalancingRulesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerLoadBalancingRulesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancernetworkinterfaceslist.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancernetworkinterfaceslist.go deleted file mode 100644 index 5d2067f531e..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancernetworkinterfaceslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerNetworkInterfacesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type LoadBalancerNetworkInterfacesListCompleteResult struct { - Items []NetworkInterface -} - -// LoadBalancerNetworkInterfacesList ... -func (c LoadBalancersClient) LoadBalancerNetworkInterfacesList(ctx context.Context, id LoadBalancerId) (result LoadBalancerNetworkInterfacesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerNetworkInterfacesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerNetworkInterfacesListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerNetworkInterfacesListCompleteResult, error) { - return c.LoadBalancerNetworkInterfacesListCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// LoadBalancerNetworkInterfacesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerNetworkInterfacesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate NetworkInterfaceOperationPredicate) (result LoadBalancerNetworkInterfacesListCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.LoadBalancerNetworkInterfacesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerNetworkInterfacesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalanceroutboundrulesget.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalanceroutboundrulesget.go deleted file mode 100644 index dd66ec86570..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalanceroutboundrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerOutboundRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *OutboundRule -} - -// LoadBalancerOutboundRulesGet ... -func (c LoadBalancersClient) LoadBalancerOutboundRulesGet(ctx context.Context, id OutboundRuleId) (result LoadBalancerOutboundRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalanceroutboundruleslist.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalanceroutboundruleslist.go deleted file mode 100644 index e561dfc5dca..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalanceroutboundruleslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerOutboundRulesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]OutboundRule -} - -type LoadBalancerOutboundRulesListCompleteResult struct { - Items []OutboundRule -} - -// LoadBalancerOutboundRulesList ... -func (c LoadBalancersClient) LoadBalancerOutboundRulesList(ctx context.Context, id LoadBalancerId) (result LoadBalancerOutboundRulesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/outboundRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]OutboundRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerOutboundRulesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerOutboundRulesListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerOutboundRulesListCompleteResult, error) { - return c.LoadBalancerOutboundRulesListCompleteMatchingPredicate(ctx, id, OutboundRuleOperationPredicate{}) -} - -// LoadBalancerOutboundRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerOutboundRulesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate OutboundRuleOperationPredicate) (result LoadBalancerOutboundRulesListCompleteResult, err error) { - items := make([]OutboundRule, 0) - - resp, err := c.LoadBalancerOutboundRulesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerOutboundRulesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerprobesget.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerprobesget.go deleted file mode 100644 index b825861d655..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerprobesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerProbesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Probe -} - -// LoadBalancerProbesGet ... -func (c LoadBalancersClient) LoadBalancerProbesGet(ctx context.Context, id ProbeId) (result LoadBalancerProbesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerprobeslist.go b/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerprobeslist.go deleted file mode 100644 index 109d820c0c0..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_loadbalancerprobeslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerProbesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Probe -} - -type LoadBalancerProbesListCompleteResult struct { - Items []Probe -} - -// LoadBalancerProbesList ... -func (c LoadBalancersClient) LoadBalancerProbesList(ctx context.Context, id LoadBalancerId) (result LoadBalancerProbesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/probes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Probe `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// LoadBalancerProbesListComplete retrieves all the results into a single object -func (c LoadBalancersClient) LoadBalancerProbesListComplete(ctx context.Context, id LoadBalancerId) (LoadBalancerProbesListCompleteResult, error) { - return c.LoadBalancerProbesListCompleteMatchingPredicate(ctx, id, ProbeOperationPredicate{}) -} - -// LoadBalancerProbesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LoadBalancersClient) LoadBalancerProbesListCompleteMatchingPredicate(ctx context.Context, id LoadBalancerId, predicate ProbeOperationPredicate) (result LoadBalancerProbesListCompleteResult, err error) { - items := make([]Probe, 0) - - resp, err := c.LoadBalancerProbesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = LoadBalancerProbesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_swappublicipaddresses.go b/resource-manager/network/2022-11-01/loadbalancers/method_swappublicipaddresses.go deleted file mode 100644 index ea34d09163d..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_swappublicipaddresses.go +++ /dev/null @@ -1,74 +0,0 @@ -package loadbalancers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SwapPublicIPAddressesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SwapPublicIPAddresses ... -func (c LoadBalancersClient) SwapPublicIPAddresses(ctx context.Context, id LocationId, input LoadBalancerVipSwapRequest) (result SwapPublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/setLoadBalancerFrontendPublicIpAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SwapPublicIPAddressesThenPoll performs SwapPublicIPAddresses then polls until it's completed -func (c LoadBalancersClient) SwapPublicIPAddressesThenPoll(ctx context.Context, id LocationId, input LoadBalancerVipSwapRequest) error { - result, err := c.SwapPublicIPAddresses(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SwapPublicIPAddresses: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SwapPublicIPAddresses: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/method_updatetags.go b/resource-manager/network/2022-11-01/loadbalancers/method_updatetags.go deleted file mode 100644 index ca3be786b0a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package loadbalancers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LoadBalancer -} - -// UpdateTags ... -func (c LoadBalancersClient) UpdateTags(ctx context.Context, id LoadBalancerId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddress.go deleted file mode 100644 index ba8ecb73101..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index ae525920084..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 339eab474ad..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 85af1e99371..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index ba22dcca046..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/loadbalancers/model_applicationsecuritygroup.go deleted file mode 100644 index a39478d2c00..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 6ab25279d91..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_backendaddressinboundnatruleportmappings.go b/resource-manager/network/2022-11-01/loadbalancers/model_backendaddressinboundnatruleportmappings.go deleted file mode 100644 index 4e124f8b471..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_backendaddressinboundnatruleportmappings.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressInboundNatRulePortMappings struct { - InboundNatRulePortMappings *[]InboundNatRulePortMapping `json:"inboundNatRulePortMappings,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_backendaddresspool.go b/resource-manager/network/2022-11-01/loadbalancers/model_backendaddresspool.go deleted file mode 100644 index f21aa313263..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 37a78041bf9..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index bdb38484c9a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_ddossettings.go b/resource-manager/network/2022-11-01/loadbalancers/model_ddossettings.go deleted file mode 100644 index 49f08256215..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_delegation.go b/resource-manager/network/2022-11-01/loadbalancers/model_delegation.go deleted file mode 100644 index ca1a156ae30..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_flowlog.go b/resource-manager/network/2022-11-01/loadbalancers/model_flowlog.go deleted file mode 100644 index 90210c29260..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/loadbalancers/model_flowlogformatparameters.go deleted file mode 100644 index fa0c6c067e8..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_flowlogpropertiesformat.go deleted file mode 100644 index 4c800ad5f68..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/loadbalancers/model_frontendipconfiguration.go deleted file mode 100644 index aee3ea162e5..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 3ec56d01ffe..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/loadbalancers/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 0b58f57fe92..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatpool.go b/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatpool.go deleted file mode 100644 index d89dc6f5777..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatpool.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatpoolpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatpoolpropertiesformat.go deleted file mode 100644 index df78a1ed77a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatpoolpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatPoolPropertiesFormat struct { - BackendPort int64 `json:"backendPort"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPortRangeEnd int64 `json:"frontendPortRangeEnd"` - FrontendPortRangeStart int64 `json:"frontendPortRangeStart"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol TransportProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatrule.go b/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatrule.go deleted file mode 100644 index adb4dbeea97..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatruleportmapping.go b/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatruleportmapping.go deleted file mode 100644 index f2e3789517f..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatruleportmapping.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 3e2eb61ad03..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_ipconfiguration.go b/resource-manager/network/2022-11-01/loadbalancers/model_ipconfiguration.go deleted file mode 100644 index 8d6200049ae..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationprofile.go deleted file mode 100644 index 96c0f6e1f83..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 42790e1043c..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 4d288c5dd29..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_iptag.go b/resource-manager/network/2022-11-01/loadbalancers/model_iptag.go deleted file mode 100644 index bf32e63b59f..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancer.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancer.go deleted file mode 100644 index 76572914bb6..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancer.go +++ /dev/null @@ -1,20 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancer struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LoadBalancerPropertiesFormat `json:"properties,omitempty"` - Sku *LoadBalancerSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerbackendaddress.go deleted file mode 100644 index c85572e3101..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 92e1899840b..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerpropertiesformat.go deleted file mode 100644 index 7ffa00517b8..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancerpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerPropertiesFormat struct { - BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` - FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` - InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` - OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` - Probes *[]Probe `json:"probes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancersku.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancersku.go deleted file mode 100644 index 1575eae78c5..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancersku.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerSku struct { - Name *LoadBalancerSkuName `json:"name,omitempty"` - Tier *LoadBalancerSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequest.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequest.go deleted file mode 100644 index 8bea43b7a0d..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerVipSwapRequest struct { - FrontendIPConfigurations *[]LoadBalancerVipSwapRequestFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfiguration.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfiguration.go deleted file mode 100644 index fd4e68458a9..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerVipSwapRequestFrontendIPConfiguration struct { - Id *string `json:"id,omitempty"` - Properties *LoadBalancerVipSwapRequestFrontendIPConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfigurationproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfigurationproperties.go deleted file mode 100644 index 56e8c5d7e4e..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancervipswaprequestfrontendipconfigurationproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties struct { - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancingrule.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancingrule.go deleted file mode 100644 index ff651417937..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancingrulepropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancingrulepropertiesformat.go deleted file mode 100644 index 4b1908352dd..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_loadbalancingrulepropertiesformat.go +++ /dev/null @@ -1,20 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendAddressPools *[]SubResource `json:"backendAddressPools,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort int64 `json:"frontendPort"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LoadDistribution *LoadDistribution `json:"loadDistribution,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - Protocol TransportProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_natgateway.go b/resource-manager/network/2022-11-01/loadbalancers/model_natgateway.go deleted file mode 100644 index 0eb10d867d8..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_natgatewaypropertiesformat.go deleted file mode 100644 index 4903d67cdc0..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_natgatewaysku.go b/resource-manager/network/2022-11-01/loadbalancers/model_natgatewaysku.go deleted file mode 100644 index d503f4fbbfb..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_natruleportmapping.go b/resource-manager/network/2022-11-01/loadbalancers/model_natruleportmapping.go deleted file mode 100644 index d0afcac5584..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterface.go b/resource-manager/network/2022-11-01/loadbalancers/model_networkinterface.go deleted file mode 100644 index 3a7fc490368..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacednssettings.go deleted file mode 100644 index 91dbc787d0a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 60978bfaf56..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 6dcb491a3d7..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index d0e35f43bfb..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 2923295fe73..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 86c1f45766f..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 60f5f46a243..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/loadbalancers/model_networksecuritygroup.go deleted file mode 100644 index e4baa9839d3..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index a3c43420ed8..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_outboundrule.go b/resource-manager/network/2022-11-01/loadbalancers/model_outboundrule.go deleted file mode 100644 index 1dfd6977a6a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_outboundrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutboundRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *OutboundRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_outboundrulepropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_outboundrulepropertiesformat.go deleted file mode 100644 index 3c7b13886c0..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_outboundrulepropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutboundRulePropertiesFormat struct { - AllocatedOutboundPorts *int64 `json:"allocatedOutboundPorts,omitempty"` - BackendAddressPool SubResource `json:"backendAddressPool"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfigurations []SubResource `json:"frontendIPConfigurations"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol LoadBalancerOutboundRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpoint.go b/resource-manager/network/2022-11-01/loadbalancers/model_privateendpoint.go deleted file mode 100644 index 1b7d03d287c..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointconnection.go deleted file mode 100644 index 4324f758e00..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointconnectionproperties.go deleted file mode 100644 index 0db98da1f3a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointipconfiguration.go deleted file mode 100644 index 5bae49165b4..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 7b4d544edd6..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointproperties.go deleted file mode 100644 index b949c31f69e..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkservice.go b/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkservice.go deleted file mode 100644 index 90ac8b3e5ca..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnection.go deleted file mode 100644 index 7657685128f..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 047e30a886a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index a4eb6e38f9b..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index fef899c9ed5..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 0209c2ffc37..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceproperties.go deleted file mode 100644 index f3e3d05de18..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_probe.go b/resource-manager/network/2022-11-01/loadbalancers/model_probe.go deleted file mode 100644 index 07c805bf4b6..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_probe.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Probe struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ProbePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_probepropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_probepropertiesformat.go deleted file mode 100644 index ddc84044699..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_probepropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProbePropertiesFormat struct { - IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - NumberOfProbes *int64 `json:"numberOfProbes,omitempty"` - Port int64 `json:"port"` - ProbeThreshold *int64 `json:"probeThreshold,omitempty"` - Protocol ProbeProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestPath *string `json:"requestPath,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddress.go b/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddress.go deleted file mode 100644 index bdc0de0a218..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package loadbalancers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddressdnssettings.go deleted file mode 100644 index 270d14db8a5..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 5a73a6d016d..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddresssku.go deleted file mode 100644 index b15c3f179cf..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_queryinboundnatruleportmappingrequest.go b/resource-manager/network/2022-11-01/loadbalancers/model_queryinboundnatruleportmappingrequest.go deleted file mode 100644 index 537750e7e89..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_queryinboundnatruleportmappingrequest.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryInboundNatRulePortMappingRequest struct { - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *SubResource `json:"ipConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/loadbalancers/model_resourcenavigationlink.go deleted file mode 100644 index 264f22dde08..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_resourcenavigationlinkformat.go deleted file mode 100644 index 4b34d1eca84..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_resourceset.go b/resource-manager/network/2022-11-01/loadbalancers/model_resourceset.go deleted file mode 100644 index 6d37b1b6861..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/loadbalancers/model_retentionpolicyparameters.go deleted file mode 100644 index 36d6b05e540..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_route.go b/resource-manager/network/2022-11-01/loadbalancers/model_route.go deleted file mode 100644 index 60ee56ca15b..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_routepropertiesformat.go deleted file mode 100644 index dad41f27203..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_routetable.go b/resource-manager/network/2022-11-01/loadbalancers/model_routetable.go deleted file mode 100644 index e6d4f4faa3d..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_routetablepropertiesformat.go deleted file mode 100644 index 1169823e36a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_securityrule.go b/resource-manager/network/2022-11-01/loadbalancers/model_securityrule.go deleted file mode 100644 index 1bd37068862..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_securityrulepropertiesformat.go deleted file mode 100644 index 000a9d8a16f..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/loadbalancers/model_serviceassociationlink.go deleted file mode 100644 index 880f8a061c0..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 5984df7dfe6..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 18a1fb457e6..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicy.go deleted file mode 100644 index 00941b4063a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicydefinition.go deleted file mode 100644 index b1f2f8e3300..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 0f54d85448c..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 74afcc602fc..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5610d7f722b..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_subnet.go b/resource-manager/network/2022-11-01/loadbalancers/model_subnet.go deleted file mode 100644 index 802fd17a35b..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_subnetpropertiesformat.go deleted file mode 100644 index 03b4dde75aa..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_subresource.go b/resource-manager/network/2022-11-01/loadbalancers/model_subresource.go deleted file mode 100644 index e288e1dcb19..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_tagsobject.go b/resource-manager/network/2022-11-01/loadbalancers/model_tagsobject.go deleted file mode 100644 index 6b83deef865..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index ecbf7509a1e..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/loadbalancers/model_trafficanalyticsproperties.go deleted file mode 100644 index 2503ab90312..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/loadbalancers/model_virtualnetworktap.go deleted file mode 100644 index ca9e2389b65..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/loadbalancers/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 5cac0b1e63a..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/predicates.go b/resource-manager/network/2022-11-01/loadbalancers/predicates.go deleted file mode 100644 index 82f247704c6..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/predicates.go +++ /dev/null @@ -1,238 +0,0 @@ -package loadbalancers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p BackendAddressPoolOperationPredicate) Matches(input BackendAddressPool) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type FrontendIPConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p FrontendIPConfigurationOperationPredicate) Matches(input FrontendIPConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type InboundNatRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p InboundNatRuleOperationPredicate) Matches(input InboundNatRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type LoadBalancerOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p LoadBalancerOperationPredicate) Matches(input LoadBalancer) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type LoadBalancingRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p LoadBalancingRuleOperationPredicate) Matches(input LoadBalancingRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type NetworkInterfaceOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkInterfaceOperationPredicate) Matches(input NetworkInterface) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type OutboundRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p OutboundRuleOperationPredicate) Matches(input OutboundRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type ProbeOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ProbeOperationPredicate) Matches(input Probe) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/loadbalancers/version.go b/resource-manager/network/2022-11-01/loadbalancers/version.go deleted file mode 100644 index 0babeb51b87..00000000000 --- a/resource-manager/network/2022-11-01/loadbalancers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package loadbalancers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/loadbalancers/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/README.md b/resource-manager/network/2022-11-01/localnetworkgateways/README.md deleted file mode 100644 index 02f28ea186b..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/README.md +++ /dev/null @@ -1,103 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/localnetworkgateways` Documentation - -The `localnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/localnetworkgateways" -``` - - -### Client Initialization - -```go -client := localnetworkgateways.NewLocalNetworkGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `LocalNetworkGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - -payload := localnetworkgateways.LocalNetworkGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `LocalNetworkGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `LocalNetworkGatewaysClient.Get` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `LocalNetworkGatewaysClient.List` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `LocalNetworkGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - -payload := localnetworkgateways.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/client.go b/resource-manager/network/2022-11-01/localnetworkgateways/client.go deleted file mode 100644 index b52d286c069..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package localnetworkgateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewLocalNetworkGatewaysClientWithBaseURI(api environments.Api) (*LocalNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "localnetworkgateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating LocalNetworkGatewaysClient: %+v", err) - } - - return &LocalNetworkGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/constants.go b/resource-manager/network/2022-11-01/localnetworkgateways/constants.go deleted file mode 100644 index f82efef3b1f..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package localnetworkgateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/id_localnetworkgateway.go b/resource-manager/network/2022-11-01/localnetworkgateways/id_localnetworkgateway.go deleted file mode 100644 index 9e5a1b39e8c..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/id_localnetworkgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package localnetworkgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocalNetworkGatewayId{} - -// LocalNetworkGatewayId is a struct representing the Resource ID for a Local Network Gateway -type LocalNetworkGatewayId struct { - SubscriptionId string - ResourceGroupName string - LocalNetworkGatewayName string -} - -// NewLocalNetworkGatewayID returns a new LocalNetworkGatewayId struct -func NewLocalNetworkGatewayID(subscriptionId string, resourceGroupName string, localNetworkGatewayName string) LocalNetworkGatewayId { - return LocalNetworkGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocalNetworkGatewayName: localNetworkGatewayName, - } -} - -// ParseLocalNetworkGatewayID parses 'input' into a LocalNetworkGatewayId -func ParseLocalNetworkGatewayID(input string) (*LocalNetworkGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(LocalNetworkGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocalNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalNetworkGatewayName, ok = parsed.Parsed["localNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localNetworkGatewayName", *parsed) - } - - return &id, nil -} - -// ParseLocalNetworkGatewayIDInsensitively parses 'input' case-insensitively into a LocalNetworkGatewayId -// note: this method should only be used for API response data and not user input -func ParseLocalNetworkGatewayIDInsensitively(input string) (*LocalNetworkGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(LocalNetworkGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocalNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocalNetworkGatewayName, ok = parsed.Parsed["localNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "localNetworkGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateLocalNetworkGatewayID checks that 'input' can be parsed as a Local Network Gateway ID -func ValidateLocalNetworkGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocalNetworkGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Local Network Gateway ID -func (id LocalNetworkGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/localNetworkGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocalNetworkGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Local Network Gateway ID -func (id LocalNetworkGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocalNetworkGateways", "localNetworkGateways", "localNetworkGateways"), - resourceids.UserSpecifiedSegment("localNetworkGatewayName", "localNetworkGatewayValue"), - } -} - -// String returns a human-readable description of this Local Network Gateway ID -func (id LocalNetworkGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Local Network Gateway Name: %q", id.LocalNetworkGatewayName), - } - return fmt.Sprintf("Local Network Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/id_localnetworkgateway_test.go b/resource-manager/network/2022-11-01/localnetworkgateways/id_localnetworkgateway_test.go deleted file mode 100644 index 9210636fe64..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/id_localnetworkgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package localnetworkgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocalNetworkGatewayId{} - -func TestNewLocalNetworkGatewayID(t *testing.T) { - id := NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocalNetworkGatewayName != "localNetworkGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocalNetworkGatewayName'", id.LocalNetworkGatewayName, "localNetworkGatewayValue") - } -} - -func TestFormatLocalNetworkGatewayID(t *testing.T) { - actual := NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocalNetworkGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocalNetworkGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue", - Expected: &LocalNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocalNetworkGatewayName: "localNetworkGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocalNetworkGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocalNetworkGatewayName != v.Expected.LocalNetworkGatewayName { - t.Fatalf("Expected %q but got %q for LocalNetworkGatewayName", v.Expected.LocalNetworkGatewayName, actual.LocalNetworkGatewayName) - } - - } -} - -func TestParseLocalNetworkGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocalNetworkGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAlNeTwOrKgAtEwAyS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue", - Expected: &LocalNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocalNetworkGatewayName: "localNetworkGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/localNetworkGateways/localNetworkGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAlNeTwOrKgAtEwAyS/lOcAlNeTwOrKgAtEwAyVaLuE", - Expected: &LocalNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocalNetworkGatewayName: "lOcAlNeTwOrKgAtEwAyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAlNeTwOrKgAtEwAyS/lOcAlNeTwOrKgAtEwAyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocalNetworkGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocalNetworkGatewayName != v.Expected.LocalNetworkGatewayName { - t.Fatalf("Expected %q but got %q for LocalNetworkGatewayName", v.Expected.LocalNetworkGatewayName, actual.LocalNetworkGatewayName) - } - - } -} - -func TestSegmentsForLocalNetworkGatewayId(t *testing.T) { - segments := LocalNetworkGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocalNetworkGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/method_createorupdate.go b/resource-manager/network/2022-11-01/localnetworkgateways/method_createorupdate.go deleted file mode 100644 index 13eb3ce284b..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, id LocalNetworkGatewayId, input LocalNetworkGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c LocalNetworkGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id LocalNetworkGatewayId, input LocalNetworkGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/method_delete.go b/resource-manager/network/2022-11-01/localnetworkgateways/method_delete.go deleted file mode 100644 index 2b155d2b9e7..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c LocalNetworkGatewaysClient) Delete(ctx context.Context, id LocalNetworkGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c LocalNetworkGatewaysClient) DeleteThenPoll(ctx context.Context, id LocalNetworkGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/method_get.go b/resource-manager/network/2022-11-01/localnetworkgateways/method_get.go deleted file mode 100644 index 46dda6cab71..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LocalNetworkGateway -} - -// Get ... -func (c LocalNetworkGatewaysClient) Get(ctx context.Context, id LocalNetworkGatewayId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/method_list.go b/resource-manager/network/2022-11-01/localnetworkgateways/method_list.go deleted file mode 100644 index d67b5e8316c..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LocalNetworkGateway -} - -type ListCompleteResult struct { - Items []LocalNetworkGateway -} - -// List ... -func (c LocalNetworkGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/localNetworkGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LocalNetworkGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c LocalNetworkGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, LocalNetworkGatewayOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c LocalNetworkGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LocalNetworkGatewayOperationPredicate) (result ListCompleteResult, err error) { - items := make([]LocalNetworkGateway, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/method_updatetags.go b/resource-manager/network/2022-11-01/localnetworkgateways/method_updatetags.go deleted file mode 100644 index 4409aee2361..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package localnetworkgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *LocalNetworkGateway -} - -// UpdateTags ... -func (c LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, id LocalNetworkGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/model_addressspace.go b/resource-manager/network/2022-11-01/localnetworkgateways/model_addressspace.go deleted file mode 100644 index 232140416bf..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/model_bgpsettings.go b/resource-manager/network/2022-11-01/localnetworkgateways/model_bgpsettings.go deleted file mode 100644 index 9d3dfccb4b1..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-11-01/localnetworkgateways/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index 4778a80b432..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/model_localnetworkgateway.go b/resource-manager/network/2022-11-01/localnetworkgateways/model_localnetworkgateway.go deleted file mode 100644 index 684fe705afc..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/model_localnetworkgateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties LocalNetworkGatewayPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/model_localnetworkgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/localnetworkgateways/model_localnetworkgatewaypropertiesformat.go deleted file mode 100644 index fb7a91a8c71..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/model_localnetworkgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGatewayPropertiesFormat struct { - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` - LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/model_tagsobject.go b/resource-manager/network/2022-11-01/localnetworkgateways/model_tagsobject.go deleted file mode 100644 index 214a0886d9b..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/predicates.go b/resource-manager/network/2022-11-01/localnetworkgateways/predicates.go deleted file mode 100644 index d4e529f8a9c..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package localnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p LocalNetworkGatewayOperationPredicate) Matches(input LocalNetworkGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/localnetworkgateways/version.go b/resource-manager/network/2022-11-01/localnetworkgateways/version.go deleted file mode 100644 index 462827c1e6d..00000000000 --- a/resource-manager/network/2022-11-01/localnetworkgateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package localnetworkgateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/localnetworkgateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/natgateways/README.md b/resource-manager/network/2022-11-01/natgateways/README.md deleted file mode 100644 index 505cff89d12..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/natgateways` Documentation - -The `natgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/natgateways" -``` - - -### Client Initialization - -```go -client := natgateways.NewNatGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NatGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := natgateways.NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - -payload := natgateways.NatGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NatGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := natgateways.NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NatGatewaysClient.Get` - -```go -ctx := context.TODO() -id := natgateways.NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - -read, err := client.Get(ctx, id, natgateways.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NatGatewaysClient.List` - -```go -ctx := context.TODO() -id := natgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NatGatewaysClient.ListAll` - -```go -ctx := context.TODO() -id := natgateways.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NatGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := natgateways.NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - -payload := natgateways.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/natgateways/client.go b/resource-manager/network/2022-11-01/natgateways/client.go deleted file mode 100644 index 043b69b83b7..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package natgateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewNatGatewaysClientWithBaseURI(api environments.Api) (*NatGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "natgateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NatGatewaysClient: %+v", err) - } - - return &NatGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/natgateways/constants.go b/resource-manager/network/2022-11-01/natgateways/constants.go deleted file mode 100644 index db752936aa3..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/constants.go +++ /dev/null @@ -1,95 +0,0 @@ -package natgateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/natgateways/id_natgateway.go b/resource-manager/network/2022-11-01/natgateways/id_natgateway.go deleted file mode 100644 index 2ce4673298f..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/id_natgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package natgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NatGatewayId{} - -// NatGatewayId is a struct representing the Resource ID for a Nat Gateway -type NatGatewayId struct { - SubscriptionId string - ResourceGroupName string - NatGatewayName string -} - -// NewNatGatewayID returns a new NatGatewayId struct -func NewNatGatewayID(subscriptionId string, resourceGroupName string, natGatewayName string) NatGatewayId { - return NatGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NatGatewayName: natGatewayName, - } -} - -// ParseNatGatewayID parses 'input' into a NatGatewayId -func ParseNatGatewayID(input string) (*NatGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(NatGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NatGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NatGatewayName, ok = parsed.Parsed["natGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natGatewayName", *parsed) - } - - return &id, nil -} - -// ParseNatGatewayIDInsensitively parses 'input' case-insensitively into a NatGatewayId -// note: this method should only be used for API response data and not user input -func ParseNatGatewayIDInsensitively(input string) (*NatGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(NatGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NatGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NatGatewayName, ok = parsed.Parsed["natGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateNatGatewayID checks that 'input' can be parsed as a Nat Gateway ID -func ValidateNatGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNatGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Nat Gateway ID -func (id NatGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/natGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NatGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Nat Gateway ID -func (id NatGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNatGateways", "natGateways", "natGateways"), - resourceids.UserSpecifiedSegment("natGatewayName", "natGatewayValue"), - } -} - -// String returns a human-readable description of this Nat Gateway ID -func (id NatGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Nat Gateway Name: %q", id.NatGatewayName), - } - return fmt.Sprintf("Nat Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/natgateways/id_natgateway_test.go b/resource-manager/network/2022-11-01/natgateways/id_natgateway_test.go deleted file mode 100644 index 6ace84f9518..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/id_natgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package natgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NatGatewayId{} - -func TestNewNatGatewayID(t *testing.T) { - id := NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NatGatewayName != "natGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'NatGatewayName'", id.NatGatewayName, "natGatewayValue") - } -} - -func TestFormatNatGatewayID(t *testing.T) { - actual := NewNatGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "natGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNatGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NatGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue", - Expected: &NatGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NatGatewayName: "natGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNatGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NatGatewayName != v.Expected.NatGatewayName { - t.Fatalf("Expected %q but got %q for NatGatewayName", v.Expected.NatGatewayName, actual.NatGatewayName) - } - - } -} - -func TestParseNatGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NatGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nAtGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue", - Expected: &NatGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NatGatewayName: "natGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/natGateways/natGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nAtGaTeWaYs/nAtGaTeWaYvAlUe", - Expected: &NatGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NatGatewayName: "nAtGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nAtGaTeWaYs/nAtGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNatGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NatGatewayName != v.Expected.NatGatewayName { - t.Fatalf("Expected %q but got %q for NatGatewayName", v.Expected.NatGatewayName, actual.NatGatewayName) - } - - } -} - -func TestSegmentsForNatGatewayId(t *testing.T) { - segments := NatGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NatGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/natgateways/method_createorupdate.go b/resource-manager/network/2022-11-01/natgateways/method_createorupdate.go deleted file mode 100644 index 8897051aceb..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c NatGatewaysClient) CreateOrUpdate(ctx context.Context, id NatGatewayId, input NatGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c NatGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id NatGatewayId, input NatGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/natgateways/method_delete.go b/resource-manager/network/2022-11-01/natgateways/method_delete.go deleted file mode 100644 index d03d142add6..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NatGatewaysClient) Delete(ctx context.Context, id NatGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NatGatewaysClient) DeleteThenPoll(ctx context.Context, id NatGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/natgateways/method_get.go b/resource-manager/network/2022-11-01/natgateways/method_get.go deleted file mode 100644 index 35387ffdde9..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NatGateway -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NatGatewaysClient) Get(ctx context.Context, id NatGatewayId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/natgateways/method_list.go b/resource-manager/network/2022-11-01/natgateways/method_list.go deleted file mode 100644 index 9cb80b2394b..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NatGateway -} - -type ListCompleteResult struct { - Items []NatGateway -} - -// List ... -func (c NatGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/natGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NatGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NatGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NatGatewayOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NatGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NatGatewayOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NatGateway, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/natgateways/method_listall.go b/resource-manager/network/2022-11-01/natgateways/method_listall.go deleted file mode 100644 index 664969ae4f8..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package natgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NatGateway -} - -type ListAllCompleteResult struct { - Items []NatGateway -} - -// ListAll ... -func (c NatGatewaysClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/natGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NatGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c NatGatewaysClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, NatGatewayOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NatGatewaysClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NatGatewayOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]NatGateway, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/natgateways/method_updatetags.go b/resource-manager/network/2022-11-01/natgateways/method_updatetags.go deleted file mode 100644 index 0ec2a4910cd..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package natgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NatGateway -} - -// UpdateTags ... -func (c NatGatewaysClient) UpdateTags(ctx context.Context, id NatGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/natgateways/model_natgateway.go b/resource-manager/network/2022-11-01/natgateways/model_natgateway.go deleted file mode 100644 index 0aabf1ead87..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package natgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/natgateways/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/natgateways/model_natgatewaypropertiesformat.go deleted file mode 100644 index 7bfde80e4d9..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/natgateways/model_natgatewaysku.go b/resource-manager/network/2022-11-01/natgateways/model_natgatewaysku.go deleted file mode 100644 index 962d747cc17..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/natgateways/model_subresource.go b/resource-manager/network/2022-11-01/natgateways/model_subresource.go deleted file mode 100644 index ea00694667d..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/natgateways/model_tagsobject.go b/resource-manager/network/2022-11-01/natgateways/model_tagsobject.go deleted file mode 100644 index c5e055c3a58..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/natgateways/predicates.go b/resource-manager/network/2022-11-01/natgateways/predicates.go deleted file mode 100644 index c0e09cf2f07..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package natgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NatGatewayOperationPredicate) Matches(input NatGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/natgateways/version.go b/resource-manager/network/2022-11-01/natgateways/version.go deleted file mode 100644 index 4a7bb0787e5..00000000000 --- a/resource-manager/network/2022-11-01/natgateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package natgateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/natgateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkgroups/README.md b/resource-manager/network/2022-11-01/networkgroups/README.md deleted file mode 100644 index 27366d94996..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkgroups` Documentation - -The `networkgroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkgroups" -``` - - -### Client Initialization - -```go -client := networkgroups.NewNetworkGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkgroups.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - -payload := networkgroups.NetworkGroup{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload, networkgroups.DefaultCreateOrUpdateOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkGroupsClient.Delete` - -```go -ctx := context.TODO() -id := networkgroups.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - -if err := client.DeleteThenPoll(ctx, id, networkgroups.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkGroupsClient.Get` - -```go -ctx := context.TODO() -id := networkgroups.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkGroupsClient.List` - -```go -ctx := context.TODO() -id := networkgroups.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -// alternatively `client.List(ctx, id, networkgroups.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, networkgroups.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/networkgroups/client.go b/resource-manager/network/2022-11-01/networkgroups/client.go deleted file mode 100644 index 7c9fe140203..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkgroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkGroupsClientWithBaseURI(api environments.Api) (*NetworkGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkgroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkGroupsClient: %+v", err) - } - - return &NetworkGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkgroups/constants.go b/resource-manager/network/2022-11-01/networkgroups/constants.go deleted file mode 100644 index 3bc1d35bd51..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package networkgroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkgroups/id_networkgroup.go b/resource-manager/network/2022-11-01/networkgroups/id_networkgroup.go deleted file mode 100644 index e96f87ea6b4..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/id_networkgroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkgroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkGroupId{} - -// NetworkGroupId is a struct representing the Resource ID for a Network Group -type NetworkGroupId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - NetworkGroupName string -} - -// NewNetworkGroupID returns a new NetworkGroupId struct -func NewNetworkGroupID(subscriptionId string, resourceGroupName string, networkManagerName string, networkGroupName string) NetworkGroupId { - return NetworkGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - NetworkGroupName: networkGroupName, - } -} - -// ParseNetworkGroupID parses 'input' into a NetworkGroupId -func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - return &id, nil -} - -// ParseNetworkGroupIDInsensitively parses 'input' case-insensitively into a NetworkGroupId -// note: this method should only be used for API response data and not user input -func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkGroupID checks that 'input' can be parsed as a Network Group ID -func ValidateNetworkGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Group ID -func (id NetworkGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/networkGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.NetworkGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Group ID -func (id NetworkGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticNetworkGroups", "networkGroups", "networkGroups"), - resourceids.UserSpecifiedSegment("networkGroupName", "networkGroupValue"), - } -} - -// String returns a human-readable description of this Network Group ID -func (id NetworkGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Network Group Name: %q", id.NetworkGroupName), - } - return fmt.Sprintf("Network Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkgroups/id_networkgroup_test.go b/resource-manager/network/2022-11-01/networkgroups/id_networkgroup_test.go deleted file mode 100644 index 5da8e8419e8..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/id_networkgroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkgroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkGroupId{} - -func TestNewNetworkGroupID(t *testing.T) { - id := NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.NetworkGroupName != "networkGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkGroupName'", id.NetworkGroupName, "networkGroupValue") - } -} - -func TestFormatNetworkGroupID(t *testing.T) { - actual := NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - } -} - -func TestParseNetworkGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - NetworkGroupName: "nEtWoRkGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - } -} - -func TestSegmentsForNetworkGroupId(t *testing.T) { - segments := NetworkGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkgroups/id_networkmanager.go b/resource-manager/network/2022-11-01/networkgroups/id_networkmanager.go deleted file mode 100644 index 0524156947b..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkgroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkgroups/id_networkmanager_test.go b/resource-manager/network/2022-11-01/networkgroups/id_networkmanager_test.go deleted file mode 100644 index f7476410445..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkgroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkgroups/method_createorupdate.go b/resource-manager/network/2022-11-01/networkgroups/method_createorupdate.go deleted file mode 100644 index 4c296dffad4..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/method_createorupdate.go +++ /dev/null @@ -1,85 +0,0 @@ -package networkgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkGroup -} - -type CreateOrUpdateOperationOptions struct { - IfMatch *string -} - -func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions { - return CreateOrUpdateOperationOptions{} -} - -func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - if o.IfMatch != nil { - out.Append("If-Match", fmt.Sprintf("%v", *o.IfMatch)) - } - return &out -} - -func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - - return &out -} - -// CreateOrUpdate ... -func (c NetworkGroupsClient) CreateOrUpdate(ctx context.Context, id NetworkGroupId, input NetworkGroup, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkgroups/method_delete.go b/resource-manager/network/2022-11-01/networkgroups/method_delete.go deleted file mode 100644 index 567e0fb203a..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package networkgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c NetworkGroupsClient) Delete(ctx context.Context, id NetworkGroupId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkGroupsClient) DeleteThenPoll(ctx context.Context, id NetworkGroupId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkgroups/method_get.go b/resource-manager/network/2022-11-01/networkgroups/method_get.go deleted file mode 100644 index ef4a3273539..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkgroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkGroup -} - -// Get ... -func (c NetworkGroupsClient) Get(ctx context.Context, id NetworkGroupId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkgroups/method_list.go b/resource-manager/network/2022-11-01/networkgroups/method_list.go deleted file mode 100644 index cfd88cc17a7..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package networkgroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkGroup -} - -type ListCompleteResult struct { - Items []NetworkGroup -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c NetworkGroupsClient) List(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkGroups", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkGroupsClient) ListComplete(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, NetworkGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate NetworkGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkGroup, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkgroups/model_networkgroup.go b/resource-manager/network/2022-11-01/networkgroups/model_networkgroup.go deleted file mode 100644 index c35ded0ac80..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/model_networkgroup.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkgroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkgroups/model_networkgroupproperties.go b/resource-manager/network/2022-11-01/networkgroups/model_networkgroupproperties.go deleted file mode 100644 index 4b35dcc425e..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkgroups/predicates.go b/resource-manager/network/2022-11-01/networkgroups/predicates.go deleted file mode 100644 index 621d0d7b40a..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package networkgroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p NetworkGroupOperationPredicate) Matches(input NetworkGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/networkgroups/version.go b/resource-manager/network/2022-11-01/networkgroups/version.go deleted file mode 100644 index e527782ab32..00000000000 --- a/resource-manager/network/2022-11-01/networkgroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkgroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkgroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/README.md b/resource-manager/network/2022-11-01/networkinterfaces/README.md deleted file mode 100644 index 03983ca3416..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/README.md +++ /dev/null @@ -1,360 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkinterfaces` Documentation - -The `networkinterfaces` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkinterfaces" -``` - - -### Client Initialization - -```go -client := networkinterfaces.NewNetworkInterfacesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkInterfacesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -payload := networkinterfaces.NetworkInterface{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkInterfacesClient.Delete` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkInterfacesClient.Get` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -read, err := client.Get(ctx, id, networkinterfaces.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.GetCloudServiceNetworkInterface` - -```go -ctx := context.TODO() -id := networkinterfaces.NewRoleInstanceNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue") - -read, err := client.GetCloudServiceNetworkInterface(ctx, id, networkinterfaces.DefaultGetCloudServiceNetworkInterfaceOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.GetEffectiveRouteTable` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -if err := client.GetEffectiveRouteTableThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkInterfacesClient.GetVirtualMachineScaleSetIPConfiguration` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineScaleSetIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue", "ipConfigurationValue") - -read, err := client.GetVirtualMachineScaleSetIPConfiguration(ctx, id, networkinterfaces.DefaultGetVirtualMachineScaleSetIPConfigurationOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.GetVirtualMachineScaleSetNetworkInterface` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineScaleSetNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue") - -read, err := client.GetVirtualMachineScaleSetNetworkInterface(ctx, id, networkinterfaces.DefaultGetVirtualMachineScaleSetNetworkInterfaceOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.List` - -```go -ctx := context.TODO() -id := networkinterfaces.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListAll` - -```go -ctx := context.TODO() -id := networkinterfaces.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListCloudServiceNetworkInterfaces` - -```go -ctx := context.TODO() -id := networkinterfaces.NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue") - -// alternatively `client.ListCloudServiceNetworkInterfaces(ctx, id)` can be used to do batched pagination -items, err := client.ListCloudServiceNetworkInterfacesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces` - -```go -ctx := context.TODO() -id := networkinterfaces.NewRoleInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue") - -// alternatively `client.ListCloudServiceRoleInstanceNetworkInterfaces(ctx, id)` can be used to do batched pagination -items, err := client.ListCloudServiceRoleInstanceNetworkInterfacesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListEffectiveNetworkSecurityGroups` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -if err := client.ListEffectiveNetworkSecurityGroupsThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListVirtualMachineScaleSetIPConfigurations` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineScaleSetNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue") - -// alternatively `client.ListVirtualMachineScaleSetIPConfigurations(ctx, id, networkinterfaces.DefaultListVirtualMachineScaleSetIPConfigurationsOperationOptions())` can be used to do batched pagination -items, err := client.ListVirtualMachineScaleSetIPConfigurationsComplete(ctx, id, networkinterfaces.DefaultListVirtualMachineScaleSetIPConfigurationsOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -// alternatively `client.ListVirtualMachineScaleSetNetworkInterfaces(ctx, id)` can be used to do batched pagination -items, err := client.ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces` - -```go -ctx := context.TODO() -id := networkinterfaces.NewVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue") - -// alternatively `client.ListVirtualMachineScaleSetVMNetworkInterfaces(ctx, id)` can be used to do batched pagination -items, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceIPConfigurationsGet` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue", "ipConfigurationValue") - -read, err := client.NetworkInterfaceIPConfigurationsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceIPConfigurationsList` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -// alternatively `client.NetworkInterfaceIPConfigurationsList(ctx, id)` can be used to do batched pagination -items, err := client.NetworkInterfaceIPConfigurationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceLoadBalancersList` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -// alternatively `client.NetworkInterfaceLoadBalancersList(ctx, id)` can be used to do batched pagination -items, err := client.NetworkInterfaceLoadBalancersListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceTapConfigurationsGet` - -```go -ctx := context.TODO() -id := networkinterfaces.NewTapConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue", "tapConfigurationValue") - -read, err := client.NetworkInterfaceTapConfigurationsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkInterfacesClient.NetworkInterfaceTapConfigurationsList` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -// alternatively `client.NetworkInterfaceTapConfigurationsList(ctx, id)` can be used to do batched pagination -items, err := client.NetworkInterfaceTapConfigurationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkInterfacesClient.UpdateTags` - -```go -ctx := context.TODO() -id := networkinterfaces.NewNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue") - -payload := networkinterfaces.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/networkinterfaces/client.go b/resource-manager/network/2022-11-01/networkinterfaces/client.go deleted file mode 100644 index c0faee67c81..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacesClient struct { - Client *resourcemanager.Client -} - -func NewNetworkInterfacesClientWithBaseURI(api environments.Api) (*NetworkInterfacesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkinterfaces", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkInterfacesClient: %+v", err) - } - - return &NetworkInterfacesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/constants.go b/resource-manager/network/2022-11-01/networkinterfaces/constants.go deleted file mode 100644 index bfdaad4aeed..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/constants.go +++ /dev/null @@ -1,1459 +0,0 @@ -package networkinterfaces - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type EffectiveRouteSource string - -const ( - EffectiveRouteSourceDefault EffectiveRouteSource = "Default" - EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" - EffectiveRouteSourceUser EffectiveRouteSource = "User" - EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" -) - -func PossibleValuesForEffectiveRouteSource() []string { - return []string{ - string(EffectiveRouteSourceDefault), - string(EffectiveRouteSourceUnknown), - string(EffectiveRouteSourceUser), - string(EffectiveRouteSourceVirtualNetworkGateway), - } -} - -func (s *EffectiveRouteSource) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveRouteSource(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveRouteSource(input string) (*EffectiveRouteSource, error) { - vals := map[string]EffectiveRouteSource{ - "default": EffectiveRouteSourceDefault, - "unknown": EffectiveRouteSourceUnknown, - "user": EffectiveRouteSourceUser, - "virtualnetworkgateway": EffectiveRouteSourceVirtualNetworkGateway, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveRouteSource(input) - return &out, nil -} - -type EffectiveRouteState string - -const ( - EffectiveRouteStateActive EffectiveRouteState = "Active" - EffectiveRouteStateInvalid EffectiveRouteState = "Invalid" -) - -func PossibleValuesForEffectiveRouteState() []string { - return []string{ - string(EffectiveRouteStateActive), - string(EffectiveRouteStateInvalid), - } -} - -func (s *EffectiveRouteState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveRouteState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveRouteState(input string) (*EffectiveRouteState, error) { - vals := map[string]EffectiveRouteState{ - "active": EffectiveRouteStateActive, - "invalid": EffectiveRouteStateInvalid, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveRouteState(input) - return &out, nil -} - -type EffectiveSecurityRuleProtocol string - -const ( - EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" - EffectiveSecurityRuleProtocolTcp EffectiveSecurityRuleProtocol = "Tcp" - EffectiveSecurityRuleProtocolUdp EffectiveSecurityRuleProtocol = "Udp" -) - -func PossibleValuesForEffectiveSecurityRuleProtocol() []string { - return []string{ - string(EffectiveSecurityRuleProtocolAll), - string(EffectiveSecurityRuleProtocolTcp), - string(EffectiveSecurityRuleProtocolUdp), - } -} - -func (s *EffectiveSecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveSecurityRuleProtocol(input string) (*EffectiveSecurityRuleProtocol, error) { - vals := map[string]EffectiveSecurityRuleProtocol{ - "all": EffectiveSecurityRuleProtocolAll, - "tcp": EffectiveSecurityRuleProtocolTcp, - "udp": EffectiveSecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveSecurityRuleProtocol(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type LoadBalancerOutboundRuleProtocol string - -const ( - LoadBalancerOutboundRuleProtocolAll LoadBalancerOutboundRuleProtocol = "All" - LoadBalancerOutboundRuleProtocolTcp LoadBalancerOutboundRuleProtocol = "Tcp" - LoadBalancerOutboundRuleProtocolUdp LoadBalancerOutboundRuleProtocol = "Udp" -) - -func PossibleValuesForLoadBalancerOutboundRuleProtocol() []string { - return []string{ - string(LoadBalancerOutboundRuleProtocolAll), - string(LoadBalancerOutboundRuleProtocolTcp), - string(LoadBalancerOutboundRuleProtocolUdp), - } -} - -func (s *LoadBalancerOutboundRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerOutboundRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerOutboundRuleProtocol(input string) (*LoadBalancerOutboundRuleProtocol, error) { - vals := map[string]LoadBalancerOutboundRuleProtocol{ - "all": LoadBalancerOutboundRuleProtocolAll, - "tcp": LoadBalancerOutboundRuleProtocolTcp, - "udp": LoadBalancerOutboundRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerOutboundRuleProtocol(input) - return &out, nil -} - -type LoadBalancerSkuName string - -const ( - LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" - LoadBalancerSkuNameGateway LoadBalancerSkuName = "Gateway" - LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" -) - -func PossibleValuesForLoadBalancerSkuName() []string { - return []string{ - string(LoadBalancerSkuNameBasic), - string(LoadBalancerSkuNameGateway), - string(LoadBalancerSkuNameStandard), - } -} - -func (s *LoadBalancerSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerSkuName(input string) (*LoadBalancerSkuName, error) { - vals := map[string]LoadBalancerSkuName{ - "basic": LoadBalancerSkuNameBasic, - "gateway": LoadBalancerSkuNameGateway, - "standard": LoadBalancerSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerSkuName(input) - return &out, nil -} - -type LoadBalancerSkuTier string - -const ( - LoadBalancerSkuTierGlobal LoadBalancerSkuTier = "Global" - LoadBalancerSkuTierRegional LoadBalancerSkuTier = "Regional" -) - -func PossibleValuesForLoadBalancerSkuTier() []string { - return []string{ - string(LoadBalancerSkuTierGlobal), - string(LoadBalancerSkuTierRegional), - } -} - -func (s *LoadBalancerSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerSkuTier(input string) (*LoadBalancerSkuTier, error) { - vals := map[string]LoadBalancerSkuTier{ - "global": LoadBalancerSkuTierGlobal, - "regional": LoadBalancerSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerSkuTier(input) - return &out, nil -} - -type LoadDistribution string - -const ( - LoadDistributionDefault LoadDistribution = "Default" - LoadDistributionSourceIP LoadDistribution = "SourceIP" - LoadDistributionSourceIPProtocol LoadDistribution = "SourceIPProtocol" -) - -func PossibleValuesForLoadDistribution() []string { - return []string{ - string(LoadDistributionDefault), - string(LoadDistributionSourceIP), - string(LoadDistributionSourceIPProtocol), - } -} - -func (s *LoadDistribution) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadDistribution(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadDistribution(input string) (*LoadDistribution, error) { - vals := map[string]LoadDistribution{ - "default": LoadDistributionDefault, - "sourceip": LoadDistributionSourceIP, - "sourceipprotocol": LoadDistributionSourceIPProtocol, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadDistribution(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProbeProtocol string - -const ( - ProbeProtocolHTTP ProbeProtocol = "Http" - ProbeProtocolHTTPS ProbeProtocol = "Https" - ProbeProtocolTcp ProbeProtocol = "Tcp" -) - -func PossibleValuesForProbeProtocol() []string { - return []string{ - string(ProbeProtocolHTTP), - string(ProbeProtocolHTTPS), - string(ProbeProtocolTcp), - } -} - -func (s *ProbeProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProbeProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProbeProtocol(input string) (*ProbeProtocol, error) { - vals := map[string]ProbeProtocol{ - "http": ProbeProtocolHTTP, - "https": ProbeProtocolHTTPS, - "tcp": ProbeProtocolTcp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProbeProtocol(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_providercloudservice.go b/resource-manager/network/2022-11-01/networkinterfaces/id_providercloudservice.go deleted file mode 100644 index 3fcfcb53fc7..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_providercloudservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderCloudServiceId{} - -// ProviderCloudServiceId is a struct representing the Resource ID for a Provider Cloud Service -type ProviderCloudServiceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string -} - -// NewProviderCloudServiceID returns a new ProviderCloudServiceId struct -func NewProviderCloudServiceID(subscriptionId string, resourceGroupName string, cloudServiceName string) ProviderCloudServiceId { - return ProviderCloudServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - } -} - -// ParseProviderCloudServiceID parses 'input' into a ProviderCloudServiceId -func ParseProviderCloudServiceID(input string) (*ProviderCloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderCloudServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ParseProviderCloudServiceIDInsensitively parses 'input' case-insensitively into a ProviderCloudServiceId -// note: this method should only be used for API response data and not user input -func ParseProviderCloudServiceIDInsensitively(input string) (*ProviderCloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderCloudServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderCloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ValidateProviderCloudServiceID checks that 'input' can be parsed as a Provider Cloud Service ID -func ValidateProviderCloudServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderCloudServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Cloud Service ID -func (id ProviderCloudServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Cloud Service ID -func (id ProviderCloudServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - } -} - -// String returns a human-readable description of this Provider Cloud Service ID -func (id ProviderCloudServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - } - return fmt.Sprintf("Provider Cloud Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_providercloudservice_test.go b/resource-manager/network/2022-11-01/networkinterfaces/id_providercloudservice_test.go deleted file mode 100644 index b938b9fbdd5..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_providercloudservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderCloudServiceId{} - -func TestNewProviderCloudServiceID(t *testing.T) { - id := NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } -} - -func TestFormatProviderCloudServiceID(t *testing.T) { - actual := NewProviderCloudServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderCloudServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderCloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderCloudServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestParseProviderCloudServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderCloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Expected: &ProviderCloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderCloudServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestSegmentsForProviderCloudServiceId(t *testing.T) { - segments := ProviderCloudServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderCloudServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstance.go b/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstance.go deleted file mode 100644 index 5c916d65fd8..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstance.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoleInstanceId{} - -// RoleInstanceId is a struct representing the Resource ID for a Role Instance -type RoleInstanceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string - RoleInstanceName string -} - -// NewRoleInstanceID returns a new RoleInstanceId struct -func NewRoleInstanceID(subscriptionId string, resourceGroupName string, cloudServiceName string, roleInstanceName string) RoleInstanceId { - return RoleInstanceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - RoleInstanceName: roleInstanceName, - } -} - -// ParseRoleInstanceID parses 'input' into a RoleInstanceId -func ParseRoleInstanceID(input string) (*RoleInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(RoleInstanceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoleInstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) - } - - return &id, nil -} - -// ParseRoleInstanceIDInsensitively parses 'input' case-insensitively into a RoleInstanceId -// note: this method should only be used for API response data and not user input -func ParseRoleInstanceIDInsensitively(input string) (*RoleInstanceId, error) { - parser := resourceids.NewParserFromResourceIdType(RoleInstanceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoleInstanceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) - } - - return &id, nil -} - -// ValidateRoleInstanceID checks that 'input' can be parsed as a Role Instance ID -func ValidateRoleInstanceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRoleInstanceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Role Instance ID -func (id RoleInstanceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s/roleInstances/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName, id.RoleInstanceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Role Instance ID -func (id RoleInstanceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - resourceids.StaticSegment("staticRoleInstances", "roleInstances", "roleInstances"), - resourceids.UserSpecifiedSegment("roleInstanceName", "roleInstanceValue"), - } -} - -// String returns a human-readable description of this Role Instance ID -func (id RoleInstanceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - fmt.Sprintf("Role Instance Name: %q", id.RoleInstanceName), - } - return fmt.Sprintf("Role Instance (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstance_test.go b/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstance_test.go deleted file mode 100644 index d6851ea82b0..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstance_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoleInstanceId{} - -func TestNewRoleInstanceID(t *testing.T) { - id := NewRoleInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } - - if id.RoleInstanceName != "roleInstanceValue" { - t.Fatalf("Expected %q but got %q for Segment 'RoleInstanceName'", id.RoleInstanceName, "roleInstanceValue") - } -} - -func TestFormatRoleInstanceID(t *testing.T) { - actual := NewRoleInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRoleInstanceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoleInstanceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue", - Expected: &RoleInstanceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - RoleInstanceName: "roleInstanceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoleInstanceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - if actual.RoleInstanceName != v.Expected.RoleInstanceName { - t.Fatalf("Expected %q but got %q for RoleInstanceName", v.Expected.RoleInstanceName, actual.RoleInstanceName) - } - - } -} - -func TestParseRoleInstanceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoleInstanceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue", - Expected: &RoleInstanceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - RoleInstanceName: "roleInstanceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe", - Expected: &RoleInstanceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - RoleInstanceName: "rOlEiNsTaNcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoleInstanceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - if actual.RoleInstanceName != v.Expected.RoleInstanceName { - t.Fatalf("Expected %q but got %q for RoleInstanceName", v.Expected.RoleInstanceName, actual.RoleInstanceName) - } - - } -} - -func TestSegmentsForRoleInstanceId(t *testing.T) { - segments := RoleInstanceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RoleInstanceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstancenetworkinterface.go b/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstancenetworkinterface.go deleted file mode 100644 index b0f618d319e..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstancenetworkinterface.go +++ /dev/null @@ -1,153 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoleInstanceNetworkInterfaceId{} - -// RoleInstanceNetworkInterfaceId is a struct representing the Resource ID for a Role Instance Network Interface -type RoleInstanceNetworkInterfaceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string - RoleInstanceName string - NetworkInterfaceName string -} - -// NewRoleInstanceNetworkInterfaceID returns a new RoleInstanceNetworkInterfaceId struct -func NewRoleInstanceNetworkInterfaceID(subscriptionId string, resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string) RoleInstanceNetworkInterfaceId { - return RoleInstanceNetworkInterfaceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - RoleInstanceName: roleInstanceName, - NetworkInterfaceName: networkInterfaceName, - } -} - -// ParseRoleInstanceNetworkInterfaceID parses 'input' into a RoleInstanceNetworkInterfaceId -func ParseRoleInstanceNetworkInterfaceID(input string) (*RoleInstanceNetworkInterfaceId, error) { - parser := resourceids.NewParserFromResourceIdType(RoleInstanceNetworkInterfaceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoleInstanceNetworkInterfaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) - } - - return &id, nil -} - -// ParseRoleInstanceNetworkInterfaceIDInsensitively parses 'input' case-insensitively into a RoleInstanceNetworkInterfaceId -// note: this method should only be used for API response data and not user input -func ParseRoleInstanceNetworkInterfaceIDInsensitively(input string) (*RoleInstanceNetworkInterfaceId, error) { - parser := resourceids.NewParserFromResourceIdType(RoleInstanceNetworkInterfaceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoleInstanceNetworkInterfaceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - if id.RoleInstanceName, ok = parsed.Parsed["roleInstanceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "roleInstanceName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) - } - - return &id, nil -} - -// ValidateRoleInstanceNetworkInterfaceID checks that 'input' can be parsed as a Role Instance Network Interface ID -func ValidateRoleInstanceNetworkInterfaceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRoleInstanceNetworkInterfaceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Role Instance Network Interface ID -func (id RoleInstanceNetworkInterfaceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s/roleInstances/%s/networkInterfaces/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName, id.RoleInstanceName, id.NetworkInterfaceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Role Instance Network Interface ID -func (id RoleInstanceNetworkInterfaceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - resourceids.StaticSegment("staticRoleInstances", "roleInstances", "roleInstances"), - resourceids.UserSpecifiedSegment("roleInstanceName", "roleInstanceValue"), - resourceids.StaticSegment("staticNetworkInterfaces", "networkInterfaces", "networkInterfaces"), - resourceids.UserSpecifiedSegment("networkInterfaceName", "networkInterfaceValue"), - } -} - -// String returns a human-readable description of this Role Instance Network Interface ID -func (id RoleInstanceNetworkInterfaceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - fmt.Sprintf("Role Instance Name: %q", id.RoleInstanceName), - fmt.Sprintf("Network Interface Name: %q", id.NetworkInterfaceName), - } - return fmt.Sprintf("Role Instance Network Interface (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstancenetworkinterface_test.go b/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstancenetworkinterface_test.go deleted file mode 100644 index cc9bd6e2f79..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_roleinstancenetworkinterface_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoleInstanceNetworkInterfaceId{} - -func TestNewRoleInstanceNetworkInterfaceID(t *testing.T) { - id := NewRoleInstanceNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } - - if id.RoleInstanceName != "roleInstanceValue" { - t.Fatalf("Expected %q but got %q for Segment 'RoleInstanceName'", id.RoleInstanceName, "roleInstanceValue") - } - - if id.NetworkInterfaceName != "networkInterfaceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkInterfaceName'", id.NetworkInterfaceName, "networkInterfaceValue") - } -} - -func TestFormatRoleInstanceNetworkInterfaceID(t *testing.T) { - actual := NewRoleInstanceNetworkInterfaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "cloudServiceValue", "roleInstanceValue", "networkInterfaceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRoleInstanceNetworkInterfaceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoleInstanceNetworkInterfaceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue", - Expected: &RoleInstanceNetworkInterfaceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - RoleInstanceName: "roleInstanceValue", - NetworkInterfaceName: "networkInterfaceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoleInstanceNetworkInterfaceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - if actual.RoleInstanceName != v.Expected.RoleInstanceName { - t.Fatalf("Expected %q but got %q for RoleInstanceName", v.Expected.RoleInstanceName, actual.RoleInstanceName) - } - - if actual.NetworkInterfaceName != v.Expected.NetworkInterfaceName { - t.Fatalf("Expected %q but got %q for NetworkInterfaceName", v.Expected.NetworkInterfaceName, actual.NetworkInterfaceName) - } - - } -} - -func TestParseRoleInstanceNetworkInterfaceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoleInstanceNetworkInterfaceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe/nEtWoRkInTeRfAcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue", - Expected: &RoleInstanceNetworkInterfaceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - CloudServiceName: "cloudServiceValue", - RoleInstanceName: "roleInstanceValue", - NetworkInterfaceName: "networkInterfaceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/cloudServices/cloudServiceValue/roleInstances/roleInstanceValue/networkInterfaces/networkInterfaceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe", - Expected: &RoleInstanceNetworkInterfaceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - RoleInstanceName: "rOlEiNsTaNcEvAlUe", - NetworkInterfaceName: "nEtWoRkInTeRfAcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/rOlEiNsTaNcEs/rOlEiNsTaNcEvAlUe/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoleInstanceNetworkInterfaceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - if actual.RoleInstanceName != v.Expected.RoleInstanceName { - t.Fatalf("Expected %q but got %q for RoleInstanceName", v.Expected.RoleInstanceName, actual.RoleInstanceName) - } - - if actual.NetworkInterfaceName != v.Expected.NetworkInterfaceName { - t.Fatalf("Expected %q but got %q for NetworkInterfaceName", v.Expected.NetworkInterfaceName, actual.NetworkInterfaceName) - } - - } -} - -func TestSegmentsForRoleInstanceNetworkInterfaceId(t *testing.T) { - segments := RoleInstanceNetworkInterfaceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RoleInstanceNetworkInterfaceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_tapconfiguration.go b/resource-manager/network/2022-11-01/networkinterfaces/id_tapconfiguration.go deleted file mode 100644 index c7879c40c1f..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_tapconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = TapConfigurationId{} - -// TapConfigurationId is a struct representing the Resource ID for a Tap Configuration -type TapConfigurationId struct { - SubscriptionId string - ResourceGroupName string - NetworkInterfaceName string - TapConfigurationName string -} - -// NewTapConfigurationID returns a new TapConfigurationId struct -func NewTapConfigurationID(subscriptionId string, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) TapConfigurationId { - return TapConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkInterfaceName: networkInterfaceName, - TapConfigurationName: tapConfigurationName, - } -} - -// ParseTapConfigurationID parses 'input' into a TapConfigurationId -func ParseTapConfigurationID(input string) (*TapConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(TapConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := TapConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) - } - - if id.TapConfigurationName, ok = parsed.Parsed["tapConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tapConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseTapConfigurationIDInsensitively parses 'input' case-insensitively into a TapConfigurationId -// note: this method should only be used for API response data and not user input -func ParseTapConfigurationIDInsensitively(input string) (*TapConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(TapConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := TapConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkInterfaceName, ok = parsed.Parsed["networkInterfaceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkInterfaceName", *parsed) - } - - if id.TapConfigurationName, ok = parsed.Parsed["tapConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "tapConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateTapConfigurationID checks that 'input' can be parsed as a Tap Configuration ID -func ValidateTapConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseTapConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Tap Configuration ID -func (id TapConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkInterfaces/%s/tapConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkInterfaceName, id.TapConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Tap Configuration ID -func (id TapConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkInterfaces", "networkInterfaces", "networkInterfaces"), - resourceids.UserSpecifiedSegment("networkInterfaceName", "networkInterfaceValue"), - resourceids.StaticSegment("staticTapConfigurations", "tapConfigurations", "tapConfigurations"), - resourceids.UserSpecifiedSegment("tapConfigurationName", "tapConfigurationValue"), - } -} - -// String returns a human-readable description of this Tap Configuration ID -func (id TapConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Interface Name: %q", id.NetworkInterfaceName), - fmt.Sprintf("Tap Configuration Name: %q", id.TapConfigurationName), - } - return fmt.Sprintf("Tap Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_tapconfiguration_test.go b/resource-manager/network/2022-11-01/networkinterfaces/id_tapconfiguration_test.go deleted file mode 100644 index b4b2c101ba1..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_tapconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = TapConfigurationId{} - -func TestNewTapConfigurationID(t *testing.T) { - id := NewTapConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue", "tapConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkInterfaceName != "networkInterfaceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkInterfaceName'", id.NetworkInterfaceName, "networkInterfaceValue") - } - - if id.TapConfigurationName != "tapConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'TapConfigurationName'", id.TapConfigurationName, "tapConfigurationValue") - } -} - -func TestFormatTapConfigurationID(t *testing.T) { - actual := NewTapConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkInterfaceValue", "tapConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseTapConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *TapConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue", - Expected: &TapConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkInterfaceName: "networkInterfaceValue", - TapConfigurationName: "tapConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseTapConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkInterfaceName != v.Expected.NetworkInterfaceName { - t.Fatalf("Expected %q but got %q for NetworkInterfaceName", v.Expected.NetworkInterfaceName, actual.NetworkInterfaceName) - } - - if actual.TapConfigurationName != v.Expected.TapConfigurationName { - t.Fatalf("Expected %q but got %q for TapConfigurationName", v.Expected.TapConfigurationName, actual.TapConfigurationName) - } - - } -} - -func TestParseTapConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *TapConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe/tApCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue", - Expected: &TapConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkInterfaceName: "networkInterfaceValue", - TapConfigurationName: "tapConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkInterfaces/networkInterfaceValue/tapConfigurations/tapConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe/tApCoNfIgUrAtIoNs/tApCoNfIgUrAtIoNvAlUe", - Expected: &TapConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkInterfaceName: "nEtWoRkInTeRfAcEvAlUe", - TapConfigurationName: "tApCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkInTeRfAcEs/nEtWoRkInTeRfAcEvAlUe/tApCoNfIgUrAtIoNs/tApCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseTapConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkInterfaceName != v.Expected.NetworkInterfaceName { - t.Fatalf("Expected %q but got %q for NetworkInterfaceName", v.Expected.NetworkInterfaceName, actual.NetworkInterfaceName) - } - - if actual.TapConfigurationName != v.Expected.TapConfigurationName { - t.Fatalf("Expected %q but got %q for TapConfigurationName", v.Expected.TapConfigurationName, actual.TapConfigurationName) - } - - } -} - -func TestSegmentsForTapConfigurationId(t *testing.T) { - segments := TapConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("TapConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachine.go b/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachine.go deleted file mode 100644 index c0c1dd29a1b..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachine.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineId{} - -// VirtualMachineId is a struct representing the Resource ID for a Virtual Machine -type VirtualMachineId struct { - SubscriptionId string - ResourceGroupName string - VirtualMachineScaleSetName string - VirtualMachineName string -} - -// NewVirtualMachineID returns a new VirtualMachineId struct -func NewVirtualMachineID(subscriptionId string, resourceGroupName string, virtualMachineScaleSetName string, virtualMachineName string) VirtualMachineId { - return VirtualMachineId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualMachineScaleSetName: virtualMachineScaleSetName, - VirtualMachineName: virtualMachineName, - } -} - -// ParseVirtualMachineID parses 'input' into a VirtualMachineId -func ParseVirtualMachineID(input string) (*VirtualMachineId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) - } - - return &id, nil -} - -// ParseVirtualMachineIDInsensitively parses 'input' case-insensitively into a VirtualMachineId -// note: this method should only be used for API response data and not user input -func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - if id.VirtualMachineName, ok = parsed.Parsed["virtualMachineName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID -func ValidateVirtualMachineID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualMachineID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Machine ID -func (id VirtualMachineId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s/virtualMachines/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualMachineScaleSetName, id.VirtualMachineName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Machine ID -func (id VirtualMachineId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticVirtualMachineScaleSets", "virtualMachineScaleSets", "virtualMachineScaleSets"), - resourceids.UserSpecifiedSegment("virtualMachineScaleSetName", "virtualMachineScaleSetValue"), - resourceids.StaticSegment("staticVirtualMachines", "virtualMachines", "virtualMachines"), - resourceids.UserSpecifiedSegment("virtualMachineName", "virtualMachineValue"), - } -} - -// String returns a human-readable description of this Virtual Machine ID -func (id VirtualMachineId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Machine Scale Set Name: %q", id.VirtualMachineScaleSetName), - fmt.Sprintf("Virtual Machine Name: %q", id.VirtualMachineName), - } - return fmt.Sprintf("Virtual Machine (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachine_test.go b/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachine_test.go deleted file mode 100644 index 03ce3542b5e..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachine_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineId{} - -func TestNewVirtualMachineID(t *testing.T) { - id := NewVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualMachineScaleSetName != "virtualMachineScaleSetValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualMachineScaleSetName'", id.VirtualMachineScaleSetName, "virtualMachineScaleSetValue") - } - - if id.VirtualMachineName != "virtualMachineValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualMachineName'", id.VirtualMachineName, "virtualMachineValue") - } -} - -func TestFormatVirtualMachineID(t *testing.T) { - actual := NewVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualMachineID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue", - Expected: &VirtualMachineId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - VirtualMachineName: "virtualMachineValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - if actual.VirtualMachineName != v.Expected.VirtualMachineName { - t.Fatalf("Expected %q but got %q for VirtualMachineName", v.Expected.VirtualMachineName, actual.VirtualMachineName) - } - - } -} - -func TestParseVirtualMachineIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/vIrTuAlMaChInEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue", - Expected: &VirtualMachineId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - VirtualMachineName: "virtualMachineValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/virtualMachines/virtualMachineValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/vIrTuAlMaChInEs/vIrTuAlMaChInEvAlUe", - Expected: &VirtualMachineId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualMachineScaleSetName: "vIrTuAlMaChInEsCaLeSeTvAlUe", - VirtualMachineName: "vIrTuAlMaChInEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/vIrTuAlMaChInEs/vIrTuAlMaChInEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - if actual.VirtualMachineName != v.Expected.VirtualMachineName { - t.Fatalf("Expected %q but got %q for VirtualMachineName", v.Expected.VirtualMachineName, actual.VirtualMachineName) - } - - } -} - -func TestSegmentsForVirtualMachineId(t *testing.T) { - segments := VirtualMachineId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualMachineId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachinescaleset.go b/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachinescaleset.go deleted file mode 100644 index 8435bb247a2..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachinescaleset.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkinterfaces - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineScaleSetId{} - -// VirtualMachineScaleSetId is a struct representing the Resource ID for a Virtual Machine Scale Set -type VirtualMachineScaleSetId struct { - SubscriptionId string - ResourceGroupName string - VirtualMachineScaleSetName string -} - -// NewVirtualMachineScaleSetID returns a new VirtualMachineScaleSetId struct -func NewVirtualMachineScaleSetID(subscriptionId string, resourceGroupName string, virtualMachineScaleSetName string) VirtualMachineScaleSetId { - return VirtualMachineScaleSetId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualMachineScaleSetName: virtualMachineScaleSetName, - } -} - -// ParseVirtualMachineScaleSetID parses 'input' into a VirtualMachineScaleSetId -func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineScaleSetId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - return &id, nil -} - -// ParseVirtualMachineScaleSetIDInsensitively parses 'input' case-insensitively into a VirtualMachineScaleSetId -// note: this method should only be used for API response data and not user input -func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineScaleSetId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineScaleSetId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualMachineScaleSetID checks that 'input' can be parsed as a Virtual Machine Scale Set ID -func ValidateVirtualMachineScaleSetID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualMachineScaleSetID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualMachineScaleSetName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticVirtualMachineScaleSets", "virtualMachineScaleSets", "virtualMachineScaleSets"), - resourceids.UserSpecifiedSegment("virtualMachineScaleSetName", "virtualMachineScaleSetValue"), - } -} - -// String returns a human-readable description of this Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Machine Scale Set Name: %q", id.VirtualMachineScaleSetName), - } - return fmt.Sprintf("Virtual Machine Scale Set (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachinescaleset_test.go b/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachinescaleset_test.go deleted file mode 100644 index 4532954cb50..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/id_virtualmachinescaleset_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkinterfaces - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineScaleSetId{} - -func TestNewVirtualMachineScaleSetID(t *testing.T) { - id := NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualMachineScaleSetName != "virtualMachineScaleSetValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualMachineScaleSetName'", id.VirtualMachineScaleSetName, "virtualMachineScaleSetValue") - } -} - -func TestFormatVirtualMachineScaleSetID(t *testing.T) { - actual := NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualMachineScaleSetID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineScaleSetId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineScaleSetID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - } -} - -func TestParseVirtualMachineScaleSetIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineScaleSetId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualMachineScaleSetName: "vIrTuAlMaChInEsCaLeSeTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineScaleSetIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - } -} - -func TestSegmentsForVirtualMachineScaleSetId(t *testing.T) { - segments := VirtualMachineScaleSetId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualMachineScaleSetId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_createorupdate.go b/resource-manager/network/2022-11-01/networkinterfaces/method_createorupdate.go deleted file mode 100644 index fa6a1a6e7c7..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c NetworkInterfacesClient) CreateOrUpdate(ctx context.Context, id commonids.NetworkInterfaceId, input NetworkInterface) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c NetworkInterfacesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.NetworkInterfaceId, input NetworkInterface) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_delete.go b/resource-manager/network/2022-11-01/networkinterfaces/method_delete.go deleted file mode 100644 index 99f476e3fa9..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkInterfacesClient) Delete(ctx context.Context, id commonids.NetworkInterfaceId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkInterfacesClient) DeleteThenPoll(ctx context.Context, id commonids.NetworkInterfaceId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_get.go b/resource-manager/network/2022-11-01/networkinterfaces/method_get.go deleted file mode 100644 index 6404bcc65e3..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_get.go +++ /dev/null @@ -1,81 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterface -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NetworkInterfacesClient) Get(ctx context.Context, id commonids.NetworkInterfaceId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_getcloudservicenetworkinterface.go b/resource-manager/network/2022-11-01/networkinterfaces/method_getcloudservicenetworkinterface.go deleted file mode 100644 index 4c523d42933..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_getcloudservicenetworkinterface.go +++ /dev/null @@ -1,80 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetCloudServiceNetworkInterfaceOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterface -} - -type GetCloudServiceNetworkInterfaceOperationOptions struct { - Expand *string -} - -func DefaultGetCloudServiceNetworkInterfaceOperationOptions() GetCloudServiceNetworkInterfaceOperationOptions { - return GetCloudServiceNetworkInterfaceOperationOptions{} -} - -func (o GetCloudServiceNetworkInterfaceOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetCloudServiceNetworkInterfaceOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetCloudServiceNetworkInterfaceOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// GetCloudServiceNetworkInterface ... -func (c NetworkInterfacesClient) GetCloudServiceNetworkInterface(ctx context.Context, id RoleInstanceNetworkInterfaceId, options GetCloudServiceNetworkInterfaceOperationOptions) (result GetCloudServiceNetworkInterfaceOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_geteffectiveroutetable.go b/resource-manager/network/2022-11-01/networkinterfaces/method_geteffectiveroutetable.go deleted file mode 100644 index e2f12a04cd3..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_geteffectiveroutetable.go +++ /dev/null @@ -1,71 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetEffectiveRouteTableOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetEffectiveRouteTable ... -func (c NetworkInterfacesClient) GetEffectiveRouteTable(ctx context.Context, id commonids.NetworkInterfaceId) (result GetEffectiveRouteTableOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/effectiveRouteTable", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetEffectiveRouteTableThenPoll performs GetEffectiveRouteTable then polls until it's completed -func (c NetworkInterfacesClient) GetEffectiveRouteTableThenPoll(ctx context.Context, id commonids.NetworkInterfaceId) error { - result, err := c.GetEffectiveRouteTable(ctx, id) - if err != nil { - return fmt.Errorf("performing GetEffectiveRouteTable: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetEffectiveRouteTable: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go b/resource-manager/network/2022-11-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go deleted file mode 100644 index 80ffb98cd15..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_getvirtualmachinescalesetipconfiguration.go +++ /dev/null @@ -1,81 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVirtualMachineScaleSetIPConfigurationOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterfaceIPConfiguration -} - -type GetVirtualMachineScaleSetIPConfigurationOperationOptions struct { - Expand *string -} - -func DefaultGetVirtualMachineScaleSetIPConfigurationOperationOptions() GetVirtualMachineScaleSetIPConfigurationOperationOptions { - return GetVirtualMachineScaleSetIPConfigurationOperationOptions{} -} - -func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetVirtualMachineScaleSetIPConfigurationOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// GetVirtualMachineScaleSetIPConfiguration ... -func (c NetworkInterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, id commonids.VirtualMachineScaleSetIPConfigurationId, options GetVirtualMachineScaleSetIPConfigurationOperationOptions) (result GetVirtualMachineScaleSetIPConfigurationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go b/resource-manager/network/2022-11-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go deleted file mode 100644 index 0204c4303f2..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_getvirtualmachinescalesetnetworkinterface.go +++ /dev/null @@ -1,81 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVirtualMachineScaleSetNetworkInterfaceOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterface -} - -type GetVirtualMachineScaleSetNetworkInterfaceOperationOptions struct { - Expand *string -} - -func DefaultGetVirtualMachineScaleSetNetworkInterfaceOperationOptions() GetVirtualMachineScaleSetNetworkInterfaceOperationOptions { - return GetVirtualMachineScaleSetNetworkInterfaceOperationOptions{} -} - -func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// GetVirtualMachineScaleSetNetworkInterface ... -func (c NetworkInterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, id commonids.VirtualMachineScaleSetNetworkInterfaceId, options GetVirtualMachineScaleSetNetworkInterfaceOperationOptions) (result GetVirtualMachineScaleSetNetworkInterfaceOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_list.go b/resource-manager/network/2022-11-01/networkinterfaces/method_list.go deleted file mode 100644 index f875487accf..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListCompleteResult struct { - Items []NetworkInterface -} - -// List ... -func (c NetworkInterfacesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkInterfaceOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_listall.go b/resource-manager/network/2022-11-01/networkinterfaces/method_listall.go deleted file mode 100644 index 5f1086b5dbf..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListAllCompleteResult struct { - Items []NetworkInterface -} - -// ListAll ... -func (c NetworkInterfacesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkInterfaceOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_listcloudservicenetworkinterfaces.go b/resource-manager/network/2022-11-01/networkinterfaces/method_listcloudservicenetworkinterfaces.go deleted file mode 100644 index de1b7b7eda0..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_listcloudservicenetworkinterfaces.go +++ /dev/null @@ -1,89 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListCloudServiceNetworkInterfacesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListCloudServiceNetworkInterfacesCompleteResult struct { - Items []NetworkInterface -} - -// ListCloudServiceNetworkInterfaces ... -func (c NetworkInterfacesClient) ListCloudServiceNetworkInterfaces(ctx context.Context, id ProviderCloudServiceId) (result ListCloudServiceNetworkInterfacesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListCloudServiceNetworkInterfacesComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListCloudServiceNetworkInterfacesComplete(ctx context.Context, id ProviderCloudServiceId) (ListCloudServiceNetworkInterfacesCompleteResult, error) { - return c.ListCloudServiceNetworkInterfacesCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListCloudServiceNetworkInterfacesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListCloudServiceNetworkInterfacesCompleteMatchingPredicate(ctx context.Context, id ProviderCloudServiceId, predicate NetworkInterfaceOperationPredicate) (result ListCloudServiceNetworkInterfacesCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListCloudServiceNetworkInterfaces(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCloudServiceNetworkInterfacesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_listcloudserviceroleinstancenetworkinterfaces.go b/resource-manager/network/2022-11-01/networkinterfaces/method_listcloudserviceroleinstancenetworkinterfaces.go deleted file mode 100644 index 32a0b13450b..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_listcloudserviceroleinstancenetworkinterfaces.go +++ /dev/null @@ -1,89 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListCloudServiceRoleInstanceNetworkInterfacesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListCloudServiceRoleInstanceNetworkInterfacesCompleteResult struct { - Items []NetworkInterface -} - -// ListCloudServiceRoleInstanceNetworkInterfaces ... -func (c NetworkInterfacesClient) ListCloudServiceRoleInstanceNetworkInterfaces(ctx context.Context, id RoleInstanceId) (result ListCloudServiceRoleInstanceNetworkInterfacesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListCloudServiceRoleInstanceNetworkInterfacesComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListCloudServiceRoleInstanceNetworkInterfacesComplete(ctx context.Context, id RoleInstanceId) (ListCloudServiceRoleInstanceNetworkInterfacesCompleteResult, error) { - return c.ListCloudServiceRoleInstanceNetworkInterfacesCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListCloudServiceRoleInstanceNetworkInterfacesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListCloudServiceRoleInstanceNetworkInterfacesCompleteMatchingPredicate(ctx context.Context, id RoleInstanceId, predicate NetworkInterfaceOperationPredicate) (result ListCloudServiceRoleInstanceNetworkInterfacesCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListCloudServiceRoleInstanceNetworkInterfaces(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCloudServiceRoleInstanceNetworkInterfacesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go b/resource-manager/network/2022-11-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go deleted file mode 100644 index 2178f6e9709..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_listeffectivenetworksecuritygroups.go +++ /dev/null @@ -1,71 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListEffectiveNetworkSecurityGroupsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ListEffectiveNetworkSecurityGroups ... -func (c NetworkInterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Context, id commonids.NetworkInterfaceId) (result ListEffectiveNetworkSecurityGroupsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/effectiveNetworkSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ListEffectiveNetworkSecurityGroupsThenPoll performs ListEffectiveNetworkSecurityGroups then polls until it's completed -func (c NetworkInterfacesClient) ListEffectiveNetworkSecurityGroupsThenPoll(ctx context.Context, id commonids.NetworkInterfaceId) error { - result, err := c.ListEffectiveNetworkSecurityGroups(ctx, id) - if err != nil { - return fmt.Errorf("performing ListEffectiveNetworkSecurityGroups: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ListEffectiveNetworkSecurityGroups: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go b/resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go deleted file mode 100644 index 8013b478315..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetipconfigurations.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListVirtualMachineScaleSetIPConfigurationsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterfaceIPConfiguration -} - -type ListVirtualMachineScaleSetIPConfigurationsCompleteResult struct { - Items []NetworkInterfaceIPConfiguration -} - -type ListVirtualMachineScaleSetIPConfigurationsOperationOptions struct { - Expand *string -} - -func DefaultListVirtualMachineScaleSetIPConfigurationsOperationOptions() ListVirtualMachineScaleSetIPConfigurationsOperationOptions { - return ListVirtualMachineScaleSetIPConfigurationsOperationOptions{} -} - -func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListVirtualMachineScaleSetIPConfigurationsOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// ListVirtualMachineScaleSetIPConfigurations ... -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetIPConfigurations(ctx context.Context, id commonids.VirtualMachineScaleSetNetworkInterfaceId, options ListVirtualMachineScaleSetIPConfigurationsOperationOptions) (result ListVirtualMachineScaleSetIPConfigurationsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ipConfigurations", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterfaceIPConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListVirtualMachineScaleSetIPConfigurationsComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetIPConfigurationsComplete(ctx context.Context, id commonids.VirtualMachineScaleSetNetworkInterfaceId, options ListVirtualMachineScaleSetIPConfigurationsOperationOptions) (ListVirtualMachineScaleSetIPConfigurationsCompleteResult, error) { - return c.ListVirtualMachineScaleSetIPConfigurationsCompleteMatchingPredicate(ctx, id, options, NetworkInterfaceIPConfigurationOperationPredicate{}) -} - -// ListVirtualMachineScaleSetIPConfigurationsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetIPConfigurationsCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualMachineScaleSetNetworkInterfaceId, options ListVirtualMachineScaleSetIPConfigurationsOperationOptions, predicate NetworkInterfaceIPConfigurationOperationPredicate) (result ListVirtualMachineScaleSetIPConfigurationsCompleteResult, err error) { - items := make([]NetworkInterfaceIPConfiguration, 0) - - resp, err := c.ListVirtualMachineScaleSetIPConfigurations(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListVirtualMachineScaleSetIPConfigurationsCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetnetworkinterfaces.go b/resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetnetworkinterfaces.go deleted file mode 100644 index de68773ded1..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetnetworkinterfaces.go +++ /dev/null @@ -1,89 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListVirtualMachineScaleSetNetworkInterfacesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListVirtualMachineScaleSetNetworkInterfacesCompleteResult struct { - Items []NetworkInterface -} - -// ListVirtualMachineScaleSetNetworkInterfaces ... -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(ctx context.Context, id VirtualMachineScaleSetId) (result ListVirtualMachineScaleSetNetworkInterfacesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListVirtualMachineScaleSetNetworkInterfacesComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx context.Context, id VirtualMachineScaleSetId) (ListVirtualMachineScaleSetNetworkInterfacesCompleteResult, error) { - return c.ListVirtualMachineScaleSetNetworkInterfacesCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListVirtualMachineScaleSetNetworkInterfacesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesCompleteMatchingPredicate(ctx context.Context, id VirtualMachineScaleSetId, predicate NetworkInterfaceOperationPredicate) (result ListVirtualMachineScaleSetNetworkInterfacesCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListVirtualMachineScaleSetNetworkInterfaces(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListVirtualMachineScaleSetNetworkInterfacesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetvmnetworkinterfaces.go b/resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetvmnetworkinterfaces.go deleted file mode 100644 index d7c29b4a676..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_listvirtualmachinescalesetvmnetworkinterfaces.go +++ /dev/null @@ -1,89 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListVirtualMachineScaleSetVMNetworkInterfacesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterface -} - -type ListVirtualMachineScaleSetVMNetworkInterfacesCompleteResult struct { - Items []NetworkInterface -} - -// ListVirtualMachineScaleSetVMNetworkInterfaces ... -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(ctx context.Context, id VirtualMachineId) (result ListVirtualMachineScaleSetVMNetworkInterfacesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkInterfaces", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterface `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListVirtualMachineScaleSetVMNetworkInterfacesComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx context.Context, id VirtualMachineId) (ListVirtualMachineScaleSetVMNetworkInterfacesCompleteResult, error) { - return c.ListVirtualMachineScaleSetVMNetworkInterfacesCompleteMatchingPredicate(ctx, id, NetworkInterfaceOperationPredicate{}) -} - -// ListVirtualMachineScaleSetVMNetworkInterfacesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesCompleteMatchingPredicate(ctx context.Context, id VirtualMachineId, predicate NetworkInterfaceOperationPredicate) (result ListVirtualMachineScaleSetVMNetworkInterfacesCompleteResult, err error) { - items := make([]NetworkInterface, 0) - - resp, err := c.ListVirtualMachineScaleSetVMNetworkInterfaces(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListVirtualMachineScaleSetVMNetworkInterfacesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go b/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go deleted file mode 100644 index a8b8ccfc034..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceipconfigurationsget.go +++ /dev/null @@ -1,52 +0,0 @@ -package networkinterfaces - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterfaceIPConfiguration -} - -// NetworkInterfaceIPConfigurationsGet ... -func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsGet(ctx context.Context, id commonids.NetworkInterfaceIPConfigurationId) (result NetworkInterfaceIPConfigurationsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceipconfigurationslist.go b/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceipconfigurationslist.go deleted file mode 100644 index c1c3de1c8c4..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceipconfigurationslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterfaceIPConfiguration -} - -type NetworkInterfaceIPConfigurationsListCompleteResult struct { - Items []NetworkInterfaceIPConfiguration -} - -// NetworkInterfaceIPConfigurationsList ... -func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsList(ctx context.Context, id commonids.NetworkInterfaceId) (result NetworkInterfaceIPConfigurationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ipConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterfaceIPConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// NetworkInterfaceIPConfigurationsListComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsListComplete(ctx context.Context, id commonids.NetworkInterfaceId) (NetworkInterfaceIPConfigurationsListCompleteResult, error) { - return c.NetworkInterfaceIPConfigurationsListCompleteMatchingPredicate(ctx, id, NetworkInterfaceIPConfigurationOperationPredicate{}) -} - -// NetworkInterfaceIPConfigurationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) NetworkInterfaceIPConfigurationsListCompleteMatchingPredicate(ctx context.Context, id commonids.NetworkInterfaceId, predicate NetworkInterfaceIPConfigurationOperationPredicate) (result NetworkInterfaceIPConfigurationsListCompleteResult, err error) { - items := make([]NetworkInterfaceIPConfiguration, 0) - - resp, err := c.NetworkInterfaceIPConfigurationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = NetworkInterfaceIPConfigurationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceloadbalancerslist.go b/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceloadbalancerslist.go deleted file mode 100644 index e53da2c4768..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfaceloadbalancerslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceLoadBalancersListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]LoadBalancer -} - -type NetworkInterfaceLoadBalancersListCompleteResult struct { - Items []LoadBalancer -} - -// NetworkInterfaceLoadBalancersList ... -func (c NetworkInterfacesClient) NetworkInterfaceLoadBalancersList(ctx context.Context, id commonids.NetworkInterfaceId) (result NetworkInterfaceLoadBalancersListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/loadBalancers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]LoadBalancer `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// NetworkInterfaceLoadBalancersListComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) NetworkInterfaceLoadBalancersListComplete(ctx context.Context, id commonids.NetworkInterfaceId) (NetworkInterfaceLoadBalancersListCompleteResult, error) { - return c.NetworkInterfaceLoadBalancersListCompleteMatchingPredicate(ctx, id, LoadBalancerOperationPredicate{}) -} - -// NetworkInterfaceLoadBalancersListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) NetworkInterfaceLoadBalancersListCompleteMatchingPredicate(ctx context.Context, id commonids.NetworkInterfaceId, predicate LoadBalancerOperationPredicate) (result NetworkInterfaceLoadBalancersListCompleteResult, err error) { - items := make([]LoadBalancer, 0) - - resp, err := c.NetworkInterfaceLoadBalancersList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = NetworkInterfaceLoadBalancersListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go b/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go deleted file mode 100644 index 6b948ca6d6f..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfacetapconfigurationsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkinterfaces - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterfaceTapConfiguration -} - -// NetworkInterfaceTapConfigurationsGet ... -func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsGet(ctx context.Context, id TapConfigurationId) (result NetworkInterfaceTapConfigurationsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfacetapconfigurationslist.go b/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfacetapconfigurationslist.go deleted file mode 100644 index 1ca0c78d291..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_networkinterfacetapconfigurationslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkinterfaces - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkInterfaceTapConfiguration -} - -type NetworkInterfaceTapConfigurationsListCompleteResult struct { - Items []NetworkInterfaceTapConfiguration -} - -// NetworkInterfaceTapConfigurationsList ... -func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsList(ctx context.Context, id commonids.NetworkInterfaceId) (result NetworkInterfaceTapConfigurationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/tapConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkInterfaceTapConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// NetworkInterfaceTapConfigurationsListComplete retrieves all the results into a single object -func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsListComplete(ctx context.Context, id commonids.NetworkInterfaceId) (NetworkInterfaceTapConfigurationsListCompleteResult, error) { - return c.NetworkInterfaceTapConfigurationsListCompleteMatchingPredicate(ctx, id, NetworkInterfaceTapConfigurationOperationPredicate{}) -} - -// NetworkInterfaceTapConfigurationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkInterfacesClient) NetworkInterfaceTapConfigurationsListCompleteMatchingPredicate(ctx context.Context, id commonids.NetworkInterfaceId, predicate NetworkInterfaceTapConfigurationOperationPredicate) (result NetworkInterfaceTapConfigurationsListCompleteResult, err error) { - items := make([]NetworkInterfaceTapConfiguration, 0) - - resp, err := c.NetworkInterfaceTapConfigurationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = NetworkInterfaceTapConfigurationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/method_updatetags.go b/resource-manager/network/2022-11-01/networkinterfaces/method_updatetags.go deleted file mode 100644 index 2f45d915605..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/method_updatetags.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkinterfaces - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkInterface -} - -// UpdateTags ... -func (c NetworkInterfacesClient) UpdateTags(ctx context.Context, id commonids.NetworkInterfaceId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 126f8350b09..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 15c656ad057..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 34912a8fcbd..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 3b83d83c7c9..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index dd810dfed2c..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/networkinterfaces/model_applicationsecuritygroup.go deleted file mode 100644 index 2948e0c794a..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index aa06b33fbe1..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_backendaddresspool.go b/resource-manager/network/2022-11-01/networkinterfaces/model_backendaddresspool.go deleted file mode 100644 index bd329cce127..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 72034a1a0c3..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index e0be4a6b6f6..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_ddossettings.go b/resource-manager/network/2022-11-01/networkinterfaces/model_ddossettings.go deleted file mode 100644 index 4902360d689..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_delegation.go b/resource-manager/network/2022-11-01/networkinterfaces/model_delegation.go deleted file mode 100644 index 5fb9effbb1b..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygroup.go b/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygroup.go deleted file mode 100644 index 5c66ee3a9b5..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroup struct { - Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` - EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` - NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` - TagMap *map[string][]string `json:"tagMap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygroupassociation.go b/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygroupassociation.go deleted file mode 100644 index 3c6248c32c9..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygroupassociation.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroupAssociation struct { - NetworkInterface *SubResource `json:"networkInterface,omitempty"` - NetworkManager *SubResource `json:"networkManager,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go b/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go deleted file mode 100644 index b8111a10fff..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecuritygrouplistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityGroupListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecurityrule.go b/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecurityrule.go deleted file mode 100644 index 9c9dd92e515..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_effectivenetworksecurityrule.go +++ /dev/null @@ -1,22 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityRule struct { - Access *SecurityRuleAccess `json:"access,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction *SecurityRuleDirection `json:"direction,omitempty"` - ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` - ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_effectiveroute.go b/resource-manager/network/2022-11-01/networkinterfaces/model_effectiveroute.go deleted file mode 100644 index aa9dac67810..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_effectiveroute.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRoute struct { - AddressPrefix *[]string `json:"addressPrefix,omitempty"` - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *[]string `json:"nextHopIpAddress,omitempty"` - NextHopType *RouteNextHopType `json:"nextHopType,omitempty"` - Source *EffectiveRouteSource `json:"source,omitempty"` - State *EffectiveRouteState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_effectiveroutelistresult.go b/resource-manager/network/2022-11-01/networkinterfaces/model_effectiveroutelistresult.go deleted file mode 100644 index a3a975a8636..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_effectiveroutelistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRouteListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]EffectiveRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_flowlog.go b/resource-manager/network/2022-11-01/networkinterfaces/model_flowlog.go deleted file mode 100644 index c2f71983a36..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/networkinterfaces/model_flowlogformatparameters.go deleted file mode 100644 index 43abd6c1532..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_flowlogpropertiesformat.go deleted file mode 100644 index e594a5d3819..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/networkinterfaces/model_frontendipconfiguration.go deleted file mode 100644 index 35c07477d52..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 174b1d44662..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/networkinterfaces/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 8562c4824fb..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatpool.go b/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatpool.go deleted file mode 100644 index a16659ffff0..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatpool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatpoolpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatpoolpropertiesformat.go deleted file mode 100644 index 4586e6ec1dc..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatpoolpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatPoolPropertiesFormat struct { - BackendPort int64 `json:"backendPort"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPortRangeEnd int64 `json:"frontendPortRangeEnd"` - FrontendPortRangeStart int64 `json:"frontendPortRangeStart"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol TransportProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatrule.go b/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatrule.go deleted file mode 100644 index a41993b3c8d..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 9a882cfef22..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfiguration.go b/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfiguration.go deleted file mode 100644 index c1294125f57..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationprofile.go deleted file mode 100644 index b5f591fbc35..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 0027cc6adbe..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 1338f55c4e1..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_iptag.go b/resource-manager/network/2022-11-01/networkinterfaces/model_iptag.go deleted file mode 100644 index c2dc282ad0e..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancer.go b/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancer.go deleted file mode 100644 index aaa7bd9d086..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancer.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancer struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LoadBalancerPropertiesFormat `json:"properties,omitempty"` - Sku *LoadBalancerSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerbackendaddress.go deleted file mode 100644 index 58da623122f..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 192b497dd13..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerpropertiesformat.go deleted file mode 100644 index b0c27be8bab..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancerpropertiesformat.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerPropertiesFormat struct { - BackendAddressPools *[]BackendAddressPool `json:"backendAddressPools,omitempty"` - FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` - InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]LoadBalancingRule `json:"loadBalancingRules,omitempty"` - OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` - Probes *[]Probe `json:"probes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancersku.go b/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancersku.go deleted file mode 100644 index e10cf68701b..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancersku.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerSku struct { - Name *LoadBalancerSkuName `json:"name,omitempty"` - Tier *LoadBalancerSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancingrule.go b/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancingrule.go deleted file mode 100644 index 5ca9aca81f1..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancingrulepropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancingrulepropertiesformat.go deleted file mode 100644 index 79fe798b88d..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_loadbalancingrulepropertiesformat.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendAddressPools *[]SubResource `json:"backendAddressPools,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort int64 `json:"frontendPort"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LoadDistribution *LoadDistribution `json:"loadDistribution,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - Protocol TransportProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_natgateway.go b/resource-manager/network/2022-11-01/networkinterfaces/model_natgateway.go deleted file mode 100644 index 7fe571d7a74..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_natgatewaypropertiesformat.go deleted file mode 100644 index 9da53fae58a..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_natgatewaysku.go b/resource-manager/network/2022-11-01/networkinterfaces/model_natgatewaysku.go deleted file mode 100644 index aff4514b5e7..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_natruleportmapping.go b/resource-manager/network/2022-11-01/networkinterfaces/model_natruleportmapping.go deleted file mode 100644 index 05068ac7e2f..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterface.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterface.go deleted file mode 100644 index 286c9562aaf..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacednssettings.go deleted file mode 100644 index af3e4e75519..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfiguration.go deleted file mode 100644 index ca861570a5d..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index abcc6fdfc5b..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 1baf3488ee0..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 3fd3da2e6e6..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacetapconfiguration.go deleted file mode 100644 index e67a81616a9..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 72010ae8dac..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networksecuritygroup.go deleted file mode 100644 index 05ed91fcd1a..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index ce8a013b83a..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_outboundrule.go b/resource-manager/network/2022-11-01/networkinterfaces/model_outboundrule.go deleted file mode 100644 index 2afc56da4cc..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_outboundrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutboundRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *OutboundRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_outboundrulepropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_outboundrulepropertiesformat.go deleted file mode 100644 index 4cc4e2f5087..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_outboundrulepropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OutboundRulePropertiesFormat struct { - AllocatedOutboundPorts *int64 `json:"allocatedOutboundPorts,omitempty"` - BackendAddressPool SubResource `json:"backendAddressPool"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfigurations []SubResource `json:"frontendIPConfigurations"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol LoadBalancerOutboundRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpoint.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpoint.go deleted file mode 100644 index da5835bccba..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointconnection.go deleted file mode 100644 index 81a07962195..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointconnectionproperties.go deleted file mode 100644 index eb2204732ec..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointipconfiguration.go deleted file mode 100644 index 085039e25e2..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 802747eb32e..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointproperties.go deleted file mode 100644 index ea496b7d032..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkservice.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkservice.go deleted file mode 100644 index 7dcd5f985b9..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnection.go deleted file mode 100644 index 5e32cbfab8a..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 355c3d254f2..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 367b48d2fd6..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 3893fd72b02..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index e1c0b0da64c..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceproperties.go deleted file mode 100644 index 2356695f6d1..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_probe.go b/resource-manager/network/2022-11-01/networkinterfaces/model_probe.go deleted file mode 100644 index d935d63eee6..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_probe.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Probe struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ProbePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_probepropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_probepropertiesformat.go deleted file mode 100644 index 343b46540f7..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_probepropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProbePropertiesFormat struct { - IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - NumberOfProbes *int64 `json:"numberOfProbes,omitempty"` - Port int64 `json:"port"` - ProbeThreshold *int64 `json:"probeThreshold,omitempty"` - Protocol ProbeProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestPath *string `json:"requestPath,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddress.go b/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddress.go deleted file mode 100644 index e89fe49804b..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package networkinterfaces - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddressdnssettings.go deleted file mode 100644 index 9a6ffc1106a..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddresspropertiesformat.go deleted file mode 100644 index b13efec6d42..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddresssku.go deleted file mode 100644 index 4f6513789bc..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/networkinterfaces/model_resourcenavigationlink.go deleted file mode 100644 index 4a3f135d98d..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_resourcenavigationlinkformat.go deleted file mode 100644 index aa59d57de52..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_resourceset.go b/resource-manager/network/2022-11-01/networkinterfaces/model_resourceset.go deleted file mode 100644 index 48356d239d8..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/networkinterfaces/model_retentionpolicyparameters.go deleted file mode 100644 index fe69c5c3389..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_route.go b/resource-manager/network/2022-11-01/networkinterfaces/model_route.go deleted file mode 100644 index 8dd1c1c5cbe..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_routepropertiesformat.go deleted file mode 100644 index b031c9a871e..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_routetable.go b/resource-manager/network/2022-11-01/networkinterfaces/model_routetable.go deleted file mode 100644 index 31df96e7b73..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_routetablepropertiesformat.go deleted file mode 100644 index 3c524eb8fe1..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_securityrule.go b/resource-manager/network/2022-11-01/networkinterfaces/model_securityrule.go deleted file mode 100644 index af9210ebc2f..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_securityrulepropertiesformat.go deleted file mode 100644 index 0ff4ba975dc..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/networkinterfaces/model_serviceassociationlink.go deleted file mode 100644 index 88ebd302e70..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 538945df5d3..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 8444d0d495d..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicy.go deleted file mode 100644 index c77c2e3460a..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 6f523978f5b..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index ddd9db6fe47..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 2692b80393d..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 041498d2501..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_subnet.go b/resource-manager/network/2022-11-01/networkinterfaces/model_subnet.go deleted file mode 100644 index 47a0e306b4a..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_subnetpropertiesformat.go deleted file mode 100644 index c8311698c1c..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_subresource.go b/resource-manager/network/2022-11-01/networkinterfaces/model_subresource.go deleted file mode 100644 index 28fa931dbee..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_tagsobject.go b/resource-manager/network/2022-11-01/networkinterfaces/model_tagsobject.go deleted file mode 100644 index 32bf2f0b066..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/networkinterfaces/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index bd0b0fa5fe0..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/networkinterfaces/model_trafficanalyticsproperties.go deleted file mode 100644 index 302f5bfcc4d..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/networkinterfaces/model_virtualnetworktap.go deleted file mode 100644 index 315bcaef069..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/networkinterfaces/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 90ce2721f15..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/predicates.go b/resource-manager/network/2022-11-01/networkinterfaces/predicates.go deleted file mode 100644 index 1bdf1a16800..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/predicates.go +++ /dev/null @@ -1,126 +0,0 @@ -package networkinterfaces - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p LoadBalancerOperationPredicate) Matches(input LoadBalancer) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type NetworkInterfaceOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkInterfaceOperationPredicate) Matches(input NetworkInterface) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type NetworkInterfaceIPConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p NetworkInterfaceIPConfigurationOperationPredicate) Matches(input NetworkInterfaceIPConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type NetworkInterfaceTapConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p NetworkInterfaceTapConfigurationOperationPredicate) Matches(input NetworkInterfaceTapConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/networkinterfaces/version.go b/resource-manager/network/2022-11-01/networkinterfaces/version.go deleted file mode 100644 index 7b756771d94..00000000000 --- a/resource-manager/network/2022-11-01/networkinterfaces/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkinterfaces - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkinterfaces/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/README.md b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/README.md deleted file mode 100644 index 2636e919bd4..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanageractiveconfigurations` Documentation - -The `networkmanageractiveconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanageractiveconfigurations" -``` - - -### Client Initialization - -```go -client := networkmanageractiveconfigurations.NewNetworkManagerActiveConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerActiveConfigurationsClient.ListActiveSecurityAdminRules` - -```go -ctx := context.TODO() -id := networkmanageractiveconfigurations.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanageractiveconfigurations.ActiveConfigurationParameter{ - // ... -} - - -read, err := client.ListActiveSecurityAdminRules(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/client.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/client.go deleted file mode 100644 index 221c88c6510..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerActiveConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerActiveConfigurationsClientWithBaseURI(api environments.Api) (*NetworkManagerActiveConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanageractiveconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerActiveConfigurationsClient: %+v", err) - } - - return &NetworkManagerActiveConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/constants.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/constants.go deleted file mode 100644 index e4a2b230b6e..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/constants.go +++ /dev/null @@ -1,277 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixType string - -const ( - AddressPrefixTypeIPPrefix AddressPrefixType = "IPPrefix" - AddressPrefixTypeServiceTag AddressPrefixType = "ServiceTag" -) - -func PossibleValuesForAddressPrefixType() []string { - return []string{ - string(AddressPrefixTypeIPPrefix), - string(AddressPrefixTypeServiceTag), - } -} - -func (s *AddressPrefixType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAddressPrefixType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAddressPrefixType(input string) (*AddressPrefixType, error) { - vals := map[string]AddressPrefixType{ - "ipprefix": AddressPrefixTypeIPPrefix, - "servicetag": AddressPrefixTypeServiceTag, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AddressPrefixType(input) - return &out, nil -} - -type EffectiveAdminRuleKind string - -const ( - EffectiveAdminRuleKindCustom EffectiveAdminRuleKind = "Custom" - EffectiveAdminRuleKindDefault EffectiveAdminRuleKind = "Default" -) - -func PossibleValuesForEffectiveAdminRuleKind() []string { - return []string{ - string(EffectiveAdminRuleKindCustom), - string(EffectiveAdminRuleKindDefault), - } -} - -func (s *EffectiveAdminRuleKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveAdminRuleKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveAdminRuleKind(input string) (*EffectiveAdminRuleKind, error) { - vals := map[string]EffectiveAdminRuleKind{ - "custom": EffectiveAdminRuleKindCustom, - "default": EffectiveAdminRuleKindDefault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveAdminRuleKind(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityConfigurationRuleAccess string - -const ( - SecurityConfigurationRuleAccessAllow SecurityConfigurationRuleAccess = "Allow" - SecurityConfigurationRuleAccessAlwaysAllow SecurityConfigurationRuleAccess = "AlwaysAllow" - SecurityConfigurationRuleAccessDeny SecurityConfigurationRuleAccess = "Deny" -) - -func PossibleValuesForSecurityConfigurationRuleAccess() []string { - return []string{ - string(SecurityConfigurationRuleAccessAllow), - string(SecurityConfigurationRuleAccessAlwaysAllow), - string(SecurityConfigurationRuleAccessDeny), - } -} - -func (s *SecurityConfigurationRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleAccess(input string) (*SecurityConfigurationRuleAccess, error) { - vals := map[string]SecurityConfigurationRuleAccess{ - "allow": SecurityConfigurationRuleAccessAllow, - "alwaysallow": SecurityConfigurationRuleAccessAlwaysAllow, - "deny": SecurityConfigurationRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleAccess(input) - return &out, nil -} - -type SecurityConfigurationRuleDirection string - -const ( - SecurityConfigurationRuleDirectionInbound SecurityConfigurationRuleDirection = "Inbound" - SecurityConfigurationRuleDirectionOutbound SecurityConfigurationRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityConfigurationRuleDirection() []string { - return []string{ - string(SecurityConfigurationRuleDirectionInbound), - string(SecurityConfigurationRuleDirectionOutbound), - } -} - -func (s *SecurityConfigurationRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleDirection(input string) (*SecurityConfigurationRuleDirection, error) { - vals := map[string]SecurityConfigurationRuleDirection{ - "inbound": SecurityConfigurationRuleDirectionInbound, - "outbound": SecurityConfigurationRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleDirection(input) - return &out, nil -} - -type SecurityConfigurationRuleProtocol string - -const ( - SecurityConfigurationRuleProtocolAh SecurityConfigurationRuleProtocol = "Ah" - SecurityConfigurationRuleProtocolAny SecurityConfigurationRuleProtocol = "Any" - SecurityConfigurationRuleProtocolEsp SecurityConfigurationRuleProtocol = "Esp" - SecurityConfigurationRuleProtocolIcmp SecurityConfigurationRuleProtocol = "Icmp" - SecurityConfigurationRuleProtocolTcp SecurityConfigurationRuleProtocol = "Tcp" - SecurityConfigurationRuleProtocolUdp SecurityConfigurationRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityConfigurationRuleProtocol() []string { - return []string{ - string(SecurityConfigurationRuleProtocolAh), - string(SecurityConfigurationRuleProtocolAny), - string(SecurityConfigurationRuleProtocolEsp), - string(SecurityConfigurationRuleProtocolIcmp), - string(SecurityConfigurationRuleProtocolTcp), - string(SecurityConfigurationRuleProtocolUdp), - } -} - -func (s *SecurityConfigurationRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleProtocol(input string) (*SecurityConfigurationRuleProtocol, error) { - vals := map[string]SecurityConfigurationRuleProtocol{ - "ah": SecurityConfigurationRuleProtocolAh, - "any": SecurityConfigurationRuleProtocolAny, - "esp": SecurityConfigurationRuleProtocolEsp, - "icmp": SecurityConfigurationRuleProtocolIcmp, - "tcp": SecurityConfigurationRuleProtocolTcp, - "udp": SecurityConfigurationRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleProtocol(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/id_networkmanager.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/id_networkmanager.go deleted file mode 100644 index eb40c45d568..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/id_networkmanager_test.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/id_networkmanager_test.go deleted file mode 100644 index 46325d537d8..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go deleted file mode 100644 index 38fd5b299da..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/method_listactivesecurityadminrules.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListActiveSecurityAdminRulesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ActiveSecurityAdminRulesListResult -} - -// ListActiveSecurityAdminRules ... -func (c NetworkManagerActiveConfigurationsClient) ListActiveSecurityAdminRules(ctx context.Context, id NetworkManagerId, input ActiveConfigurationParameter) (result ListActiveSecurityAdminRulesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listActiveSecurityAdminRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go deleted file mode 100644 index 668030e747e..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activebasesecurityadminrule.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveBaseSecurityAdminRule interface { -} - -func unmarshalActiveBaseSecurityAdminRuleImplementation(input []byte) (ActiveBaseSecurityAdminRule, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling ActiveBaseSecurityAdminRule into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Default") { - var out ActiveDefaultSecurityAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ActiveDefaultSecurityAdminRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Custom") { - var out ActiveSecurityAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into ActiveSecurityAdminRule: %+v", err) - } - return out, nil - } - - type RawActiveBaseSecurityAdminRuleImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawActiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activeconfigurationparameter.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activeconfigurationparameter.go deleted file mode 100644 index 309a4998c1b..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activeconfigurationparameter.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveConfigurationParameter struct { - Regions *[]string `json:"regions,omitempty"` - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go deleted file mode 100644 index 371ee82ef8c..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activedefaultsecurityadminrule.go +++ /dev/null @@ -1,63 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ActiveBaseSecurityAdminRule = ActiveDefaultSecurityAdminRule{} - -type ActiveDefaultSecurityAdminRule struct { - Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from ActiveBaseSecurityAdminRule - CommitTime *string `json:"commitTime,omitempty"` - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - Id *string `json:"id,omitempty"` - Region *string `json:"region,omitempty"` - RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -func (o *ActiveDefaultSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { - if o.CommitTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ActiveDefaultSecurityAdminRule) SetCommitTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTime = &formatted -} - -var _ json.Marshaler = ActiveDefaultSecurityAdminRule{} - -func (s ActiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { - type wrapper ActiveDefaultSecurityAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ActiveDefaultSecurityAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ActiveDefaultSecurityAdminRule: %+v", err) - } - decoded["kind"] = "Default" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ActiveDefaultSecurityAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go deleted file mode 100644 index 70266c6ff7c..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activesecurityadminrule.go +++ /dev/null @@ -1,63 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ ActiveBaseSecurityAdminRule = ActiveSecurityAdminRule{} - -type ActiveSecurityAdminRule struct { - Properties *AdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from ActiveBaseSecurityAdminRule - CommitTime *string `json:"commitTime,omitempty"` - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - Id *string `json:"id,omitempty"` - Region *string `json:"region,omitempty"` - RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -func (o *ActiveSecurityAdminRule) GetCommitTimeAsTime() (*time.Time, error) { - if o.CommitTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ActiveSecurityAdminRule) SetCommitTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTime = &formatted -} - -var _ json.Marshaler = ActiveSecurityAdminRule{} - -func (s ActiveSecurityAdminRule) MarshalJSON() ([]byte, error) { - type wrapper ActiveSecurityAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling ActiveSecurityAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling ActiveSecurityAdminRule: %+v", err) - } - decoded["kind"] = "Custom" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling ActiveSecurityAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go deleted file mode 100644 index c9007f5e0f3..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_activesecurityadminruleslistresult.go +++ /dev/null @@ -1,49 +0,0 @@ -package networkmanageractiveconfigurations - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveSecurityAdminRulesListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]ActiveBaseSecurityAdminRule `json:"value,omitempty"` -} - -var _ json.Unmarshaler = &ActiveSecurityAdminRulesListResult{} - -func (s *ActiveSecurityAdminRulesListResult) UnmarshalJSON(bytes []byte) error { - type alias ActiveSecurityAdminRulesListResult - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into ActiveSecurityAdminRulesListResult: %+v", err) - } - - s.SkipToken = decoded.SkipToken - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling ActiveSecurityAdminRulesListResult into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]ActiveBaseSecurityAdminRule, 0) - for i, val := range listTemp { - impl, err := unmarshalActiveBaseSecurityAdminRuleImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'ActiveSecurityAdminRulesListResult': %+v", i, err) - } - output = append(output, impl) - } - s.Value = &output - } - return nil -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_addressprefixitem.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_addressprefixitem.go deleted file mode 100644 index f82ae16f590..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_addressprefixitem.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixItem struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixType *AddressPrefixType `json:"addressPrefixType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_adminpropertiesformat.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_adminpropertiesformat.go deleted file mode 100644 index b71a27f6304..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_adminpropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminPropertiesFormat struct { - Access SecurityConfigurationRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction SecurityConfigurationRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityConfigurationRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_configurationgroup.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_configurationgroup.go deleted file mode 100644 index be051a18f2d..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_configurationgroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationGroup struct { - Id *string `json:"id,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_defaultadminpropertiesformat.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_defaultadminpropertiesformat.go deleted file mode 100644 index 495691739ac..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_defaultadminpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultAdminPropertiesFormat struct { - Access *SecurityConfigurationRuleAccess `json:"access,omitempty"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction *SecurityConfigurationRuleDirection `json:"direction,omitempty"` - Flag *string `json:"flag,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *SecurityConfigurationRuleProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_networkgroupproperties.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_networkgroupproperties.go deleted file mode 100644 index 4aa5d8501e7..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_networkmanagersecuritygroupitem.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_networkmanagersecuritygroupitem.go deleted file mode 100644 index 6457c3d0001..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/model_networkmanagersecuritygroupitem.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanageractiveconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerSecurityGroupItem struct { - NetworkGroupId string `json:"networkGroupId"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/version.go b/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/version.go deleted file mode 100644 index 4446cd0243e..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanageractiveconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/README.md b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/README.md deleted file mode 100644 index f6dc785e6e2..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations` Documentation - -The `networkmanageractiveconnectivityconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations" -``` - - -### Client Initialization - -```go -client := networkmanageractiveconnectivityconfigurations.NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerActiveConnectivityConfigurationsClient.ListActiveConnectivityConfigurations` - -```go -ctx := context.TODO() -id := networkmanageractiveconnectivityconfigurations.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanageractiveconnectivityconfigurations.ActiveConfigurationParameter{ - // ... -} - - -read, err := client.ListActiveConnectivityConfigurations(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/client.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/client.go deleted file mode 100644 index 23ed55c7d15..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerActiveConnectivityConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerActiveConnectivityConfigurationsClientWithBaseURI(api environments.Api) (*NetworkManagerActiveConnectivityConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanageractiveconnectivityconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerActiveConnectivityConfigurationsClient: %+v", err) - } - - return &NetworkManagerActiveConnectivityConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/constants.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/constants.go deleted file mode 100644 index ce9e85b744a..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/constants.go +++ /dev/null @@ -1,262 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityTopology string - -const ( - ConnectivityTopologyHubAndSpoke ConnectivityTopology = "HubAndSpoke" - ConnectivityTopologyMesh ConnectivityTopology = "Mesh" -) - -func PossibleValuesForConnectivityTopology() []string { - return []string{ - string(ConnectivityTopologyHubAndSpoke), - string(ConnectivityTopologyMesh), - } -} - -func (s *ConnectivityTopology) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectivityTopology(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectivityTopology(input string) (*ConnectivityTopology, error) { - vals := map[string]ConnectivityTopology{ - "hubandspoke": ConnectivityTopologyHubAndSpoke, - "mesh": ConnectivityTopologyMesh, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectivityTopology(input) - return &out, nil -} - -type DeleteExistingPeering string - -const ( - DeleteExistingPeeringFalse DeleteExistingPeering = "False" - DeleteExistingPeeringTrue DeleteExistingPeering = "True" -) - -func PossibleValuesForDeleteExistingPeering() []string { - return []string{ - string(DeleteExistingPeeringFalse), - string(DeleteExistingPeeringTrue), - } -} - -func (s *DeleteExistingPeering) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteExistingPeering(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteExistingPeering(input string) (*DeleteExistingPeering, error) { - vals := map[string]DeleteExistingPeering{ - "false": DeleteExistingPeeringFalse, - "true": DeleteExistingPeeringTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteExistingPeering(input) - return &out, nil -} - -type GroupConnectivity string - -const ( - GroupConnectivityDirectlyConnected GroupConnectivity = "DirectlyConnected" - GroupConnectivityNone GroupConnectivity = "None" -) - -func PossibleValuesForGroupConnectivity() []string { - return []string{ - string(GroupConnectivityDirectlyConnected), - string(GroupConnectivityNone), - } -} - -func (s *GroupConnectivity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGroupConnectivity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGroupConnectivity(input string) (*GroupConnectivity, error) { - vals := map[string]GroupConnectivity{ - "directlyconnected": GroupConnectivityDirectlyConnected, - "none": GroupConnectivityNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GroupConnectivity(input) - return &out, nil -} - -type IsGlobal string - -const ( - IsGlobalFalse IsGlobal = "False" - IsGlobalTrue IsGlobal = "True" -) - -func PossibleValuesForIsGlobal() []string { - return []string{ - string(IsGlobalFalse), - string(IsGlobalTrue), - } -} - -func (s *IsGlobal) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsGlobal(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsGlobal(input string) (*IsGlobal, error) { - vals := map[string]IsGlobal{ - "false": IsGlobalFalse, - "true": IsGlobalTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsGlobal(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type UseHubGateway string - -const ( - UseHubGatewayFalse UseHubGateway = "False" - UseHubGatewayTrue UseHubGateway = "True" -) - -func PossibleValuesForUseHubGateway() []string { - return []string{ - string(UseHubGatewayFalse), - string(UseHubGatewayTrue), - } -} - -func (s *UseHubGateway) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUseHubGateway(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUseHubGateway(input string) (*UseHubGateway, error) { - vals := map[string]UseHubGateway{ - "false": UseHubGatewayFalse, - "true": UseHubGatewayTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UseHubGateway(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go deleted file mode 100644 index 6f686aaaba2..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager_test.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager_test.go deleted file mode 100644 index af6ac289100..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go deleted file mode 100644 index e97620ff035..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/method_listactiveconnectivityconfigurations.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListActiveConnectivityConfigurationsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ActiveConnectivityConfigurationsListResult -} - -// ListActiveConnectivityConfigurations ... -func (c NetworkManagerActiveConnectivityConfigurationsClient) ListActiveConnectivityConfigurations(ctx context.Context, id NetworkManagerId, input ActiveConfigurationParameter) (result ListActiveConnectivityConfigurationsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listActiveConnectivityConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconfigurationparameter.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconfigurationparameter.go deleted file mode 100644 index 835513d64ee..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconfigurationparameter.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveConfigurationParameter struct { - Regions *[]string `json:"regions,omitempty"` - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfiguration.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfiguration.go deleted file mode 100644 index b836614744d..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfiguration.go +++ /dev/null @@ -1,30 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveConnectivityConfiguration struct { - CommitTime *string `json:"commitTime,omitempty"` - ConfigurationGroups *[]ConfigurationGroup `json:"configurationGroups,omitempty"` - Id *string `json:"id,omitempty"` - Properties *ConnectivityConfigurationProperties `json:"properties,omitempty"` - Region *string `json:"region,omitempty"` -} - -func (o *ActiveConnectivityConfiguration) GetCommitTimeAsTime() (*time.Time, error) { - if o.CommitTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *ActiveConnectivityConfiguration) SetCommitTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTime = &formatted -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfigurationslistresult.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfigurationslistresult.go deleted file mode 100644 index 6fbfafeb4f7..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_activeconnectivityconfigurationslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActiveConnectivityConfigurationsListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]ActiveConnectivityConfiguration `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_configurationgroup.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_configurationgroup.go deleted file mode 100644 index 2f7ac6eb77f..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_configurationgroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationGroup struct { - Id *string `json:"id,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_connectivityconfigurationproperties.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_connectivityconfigurationproperties.go deleted file mode 100644 index dccea295bae..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_connectivityconfigurationproperties.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationProperties struct { - AppliesToGroups []ConnectivityGroupItem `json:"appliesToGroups"` - ConnectivityTopology ConnectivityTopology `json:"connectivityTopology"` - DeleteExistingPeering *DeleteExistingPeering `json:"deleteExistingPeering,omitempty"` - Description *string `json:"description,omitempty"` - Hubs *[]Hub `json:"hubs,omitempty"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_connectivitygroupitem.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_connectivitygroupitem.go deleted file mode 100644 index 18571eaa75f..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_connectivitygroupitem.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityGroupItem struct { - GroupConnectivity GroupConnectivity `json:"groupConnectivity"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - NetworkGroupId string `json:"networkGroupId"` - UseHubGateway *UseHubGateway `json:"useHubGateway,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_hub.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_hub.go deleted file mode 100644 index 6d2eef46795..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_hub.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Hub struct { - ResourceId *string `json:"resourceId,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_networkgroupproperties.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_networkgroupproperties.go deleted file mode 100644 index a52d39a784c..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/version.go b/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/version.go deleted file mode 100644 index eae41b3f561..00000000000 --- a/resource-manager/network/2022-11-01/networkmanageractiveconnectivityconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanageractiveconnectivityconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanageractiveconnectivityconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/README.md b/resource-manager/network/2022-11-01/networkmanagerconnections/README.md deleted file mode 100644 index 6dd4e9e0dfb..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/README.md +++ /dev/null @@ -1,160 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagerconnections` Documentation - -The `networkmanagerconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagerconnections" -``` - - -### Client Initialization - -```go -client := networkmanagerconnections.NewNetworkManagerConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue") - -payload := networkmanagerconnections.NetworkManagerConnection{ - // ... -} - - -read, err := client.ManagementGroupNetworkManagerConnectionsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsDelete` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue") - -read, err := client.ManagementGroupNetworkManagerConnectionsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsGet` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue") - -read, err := client.ManagementGroupNetworkManagerConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.ManagementGroupNetworkManagerConnectionsList` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewManagementGroupID("groupIdValue") - -// alternatively `client.ManagementGroupNetworkManagerConnectionsList(ctx, id, networkmanagerconnections.DefaultManagementGroupNetworkManagerConnectionsListOperationOptions())` can be used to do batched pagination -items, err := client.ManagementGroupNetworkManagerConnectionsListComplete(ctx, id, networkmanagerconnections.DefaultManagementGroupNetworkManagerConnectionsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue") - -payload := networkmanagerconnections.NetworkManagerConnection{ - // ... -} - - -read, err := client.SubscriptionNetworkManagerConnectionsCreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsDelete` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue") - -read, err := client.SubscriptionNetworkManagerConnectionsDelete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsGet` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue") - -read, err := client.SubscriptionNetworkManagerConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagerConnectionsClient.SubscriptionNetworkManagerConnectionsList` - -```go -ctx := context.TODO() -id := networkmanagerconnections.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.SubscriptionNetworkManagerConnectionsList(ctx, id, networkmanagerconnections.DefaultSubscriptionNetworkManagerConnectionsListOperationOptions())` can be used to do batched pagination -items, err := client.SubscriptionNetworkManagerConnectionsListComplete(ctx, id, networkmanagerconnections.DefaultSubscriptionNetworkManagerConnectionsListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/client.go b/resource-manager/network/2022-11-01/networkmanagerconnections/client.go deleted file mode 100644 index 6e918e232b8..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanagerconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerConnectionsClientWithBaseURI(api environments.Api) (*NetworkManagerConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanagerconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerConnectionsClient: %+v", err) - } - - return &NetworkManagerConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/constants.go b/resource-manager/network/2022-11-01/networkmanagerconnections/constants.go deleted file mode 100644 index 47d6adfd207..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/constants.go +++ /dev/null @@ -1,60 +0,0 @@ -package networkmanagerconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionState string - -const ( - ScopeConnectionStateConflict ScopeConnectionState = "Conflict" - ScopeConnectionStateConnected ScopeConnectionState = "Connected" - ScopeConnectionStatePending ScopeConnectionState = "Pending" - ScopeConnectionStateRejected ScopeConnectionState = "Rejected" - ScopeConnectionStateRevoked ScopeConnectionState = "Revoked" -) - -func PossibleValuesForScopeConnectionState() []string { - return []string{ - string(ScopeConnectionStateConflict), - string(ScopeConnectionStateConnected), - string(ScopeConnectionStatePending), - string(ScopeConnectionStateRejected), - string(ScopeConnectionStateRevoked), - } -} - -func (s *ScopeConnectionState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScopeConnectionState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScopeConnectionState(input string) (*ScopeConnectionState, error) { - vals := map[string]ScopeConnectionState{ - "conflict": ScopeConnectionStateConflict, - "connected": ScopeConnectionStateConnected, - "pending": ScopeConnectionStatePending, - "rejected": ScopeConnectionStateRejected, - "revoked": ScopeConnectionStateRevoked, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScopeConnectionState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/id_networkmanagerconnection.go b/resource-manager/network/2022-11-01/networkmanagerconnections/id_networkmanagerconnection.go deleted file mode 100644 index 257d0dbb580..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/id_networkmanagerconnection.go +++ /dev/null @@ -1,114 +0,0 @@ -package networkmanagerconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerConnectionId{} - -// NetworkManagerConnectionId is a struct representing the Resource ID for a Network Manager Connection -type NetworkManagerConnectionId struct { - SubscriptionId string - NetworkManagerConnectionName string -} - -// NewNetworkManagerConnectionID returns a new NetworkManagerConnectionId struct -func NewNetworkManagerConnectionID(subscriptionId string, networkManagerConnectionName string) NetworkManagerConnectionId { - return NetworkManagerConnectionId{ - SubscriptionId: subscriptionId, - NetworkManagerConnectionName: networkManagerConnectionName, - } -} - -// ParseNetworkManagerConnectionID parses 'input' into a NetworkManagerConnectionId -func ParseNetworkManagerConnectionID(input string) (*NetworkManagerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerConnectionIDInsensitively parses 'input' case-insensitively into a NetworkManagerConnectionId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerConnectionIDInsensitively(input string) (*NetworkManagerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerConnectionID checks that 'input' can be parsed as a Network Manager Connection ID -func ValidateNetworkManagerConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager Connection ID -func (id NetworkManagerConnectionId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/networkManagerConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.NetworkManagerConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager Connection ID -func (id NetworkManagerConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagerConnections", "networkManagerConnections", "networkManagerConnections"), - resourceids.UserSpecifiedSegment("networkManagerConnectionName", "networkManagerConnectionValue"), - } -} - -// String returns a human-readable description of this Network Manager Connection ID -func (id NetworkManagerConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Network Manager Connection Name: %q", id.NetworkManagerConnectionName), - } - return fmt.Sprintf("Network Manager Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/id_networkmanagerconnection_test.go b/resource-manager/network/2022-11-01/networkmanagerconnections/id_networkmanagerconnection_test.go deleted file mode 100644 index 4f522e2f228..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/id_networkmanagerconnection_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package networkmanagerconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerConnectionId{} - -func TestNewNetworkManagerConnectionID(t *testing.T) { - id := NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.NetworkManagerConnectionName != "networkManagerConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerConnectionName'", id.NetworkManagerConnectionName, "networkManagerConnectionValue") - } -} - -func TestFormatNetworkManagerConnectionID(t *testing.T) { - actual := NewNetworkManagerConnectionID("12345678-1234-9876-4563-123456789012", "networkManagerConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue", - Expected: &NetworkManagerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkManagerConnectionName: "networkManagerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.NetworkManagerConnectionName != v.Expected.NetworkManagerConnectionName { - t.Fatalf("Expected %q but got %q for NetworkManagerConnectionName", v.Expected.NetworkManagerConnectionName, actual.NetworkManagerConnectionName) - } - - } -} - -func TestParseNetworkManagerConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue", - Expected: &NetworkManagerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkManagerConnectionName: "networkManagerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs/nEtWoRkMaNaGeRcOnNeCtIoNvAlUe", - Expected: &NetworkManagerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkManagerConnectionName: "nEtWoRkMaNaGeRcOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs/nEtWoRkMaNaGeRcOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.NetworkManagerConnectionName != v.Expected.NetworkManagerConnectionName { - t.Fatalf("Expected %q but got %q for NetworkManagerConnectionName", v.Expected.NetworkManagerConnectionName, actual.NetworkManagerConnectionName) - } - - } -} - -func TestSegmentsForNetworkManagerConnectionId(t *testing.T) { - segments := NetworkManagerConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/id_providers2networkmanagerconnection.go b/resource-manager/network/2022-11-01/networkmanagerconnections/id_providers2networkmanagerconnection.go deleted file mode 100644 index eb0ead3de30..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/id_providers2networkmanagerconnection.go +++ /dev/null @@ -1,116 +0,0 @@ -package networkmanagerconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = Providers2NetworkManagerConnectionId{} - -// Providers2NetworkManagerConnectionId is a struct representing the Resource ID for a Providers 2 Network Manager Connection -type Providers2NetworkManagerConnectionId struct { - ManagementGroupId string - NetworkManagerConnectionName string -} - -// NewProviders2NetworkManagerConnectionID returns a new Providers2NetworkManagerConnectionId struct -func NewProviders2NetworkManagerConnectionID(managementGroupId string, networkManagerConnectionName string) Providers2NetworkManagerConnectionId { - return Providers2NetworkManagerConnectionId{ - ManagementGroupId: managementGroupId, - NetworkManagerConnectionName: networkManagerConnectionName, - } -} - -// ParseProviders2NetworkManagerConnectionID parses 'input' into a Providers2NetworkManagerConnectionId -func ParseProviders2NetworkManagerConnectionID(input string) (*Providers2NetworkManagerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(Providers2NetworkManagerConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := Providers2NetworkManagerConnectionId{} - - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) - } - - return &id, nil -} - -// ParseProviders2NetworkManagerConnectionIDInsensitively parses 'input' case-insensitively into a Providers2NetworkManagerConnectionId -// note: this method should only be used for API response data and not user input -func ParseProviders2NetworkManagerConnectionIDInsensitively(input string) (*Providers2NetworkManagerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(Providers2NetworkManagerConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := Providers2NetworkManagerConnectionId{} - - if id.ManagementGroupId, ok = parsed.Parsed["managementGroupId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "managementGroupId", *parsed) - } - - if id.NetworkManagerConnectionName, ok = parsed.Parsed["networkManagerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateProviders2NetworkManagerConnectionID checks that 'input' can be parsed as a Providers 2 Network Manager Connection ID -func ValidateProviders2NetworkManagerConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviders2NetworkManagerConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Providers 2 Network Manager Connection ID -func (id Providers2NetworkManagerConnectionId) ID() string { - fmtString := "/providers/Microsoft.Management/managementGroups/%s/providers/Microsoft.Network/networkManagerConnections/%s" - return fmt.Sprintf(fmtString, id.ManagementGroupId, id.NetworkManagerConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Providers 2 Network Manager Connection ID -func (id Providers2NetworkManagerConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftManagement", "Microsoft.Management", "Microsoft.Management"), - resourceids.StaticSegment("staticManagementGroups", "managementGroups", "managementGroups"), - resourceids.UserSpecifiedSegment("managementGroupId", "managementGroupIdValue"), - resourceids.StaticSegment("staticProviders2", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagerConnections", "networkManagerConnections", "networkManagerConnections"), - resourceids.UserSpecifiedSegment("networkManagerConnectionName", "networkManagerConnectionValue"), - } -} - -// String returns a human-readable description of this Providers 2 Network Manager Connection ID -func (id Providers2NetworkManagerConnectionId) String() string { - components := []string{ - fmt.Sprintf("Management Group: %q", id.ManagementGroupId), - fmt.Sprintf("Network Manager Connection Name: %q", id.NetworkManagerConnectionName), - } - return fmt.Sprintf("Providers 2 Network Manager Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/id_providers2networkmanagerconnection_test.go b/resource-manager/network/2022-11-01/networkmanagerconnections/id_providers2networkmanagerconnection_test.go deleted file mode 100644 index c1797aa521e..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/id_providers2networkmanagerconnection_test.go +++ /dev/null @@ -1,267 +0,0 @@ -package networkmanagerconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = Providers2NetworkManagerConnectionId{} - -func TestNewProviders2NetworkManagerConnectionID(t *testing.T) { - id := NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue") - - if id.ManagementGroupId != "managementGroupIdValue" { - t.Fatalf("Expected %q but got %q for Segment 'ManagementGroupId'", id.ManagementGroupId, "managementGroupIdValue") - } - - if id.NetworkManagerConnectionName != "networkManagerConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerConnectionName'", id.NetworkManagerConnectionName, "networkManagerConnectionValue") - } -} - -func TestFormatProviders2NetworkManagerConnectionID(t *testing.T) { - actual := NewProviders2NetworkManagerConnectionID("managementGroupIdValue", "networkManagerConnectionValue").ID() - expected := "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviders2NetworkManagerConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *Providers2NetworkManagerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections", - Error: true, - }, - { - // Valid URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue", - Expected: &Providers2NetworkManagerConnectionId{ - ManagementGroupId: "managementGroupIdValue", - NetworkManagerConnectionName: "networkManagerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviders2NetworkManagerConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.ManagementGroupId != v.Expected.ManagementGroupId { - t.Fatalf("Expected %q but got %q for ManagementGroupId", v.Expected.ManagementGroupId, actual.ManagementGroupId) - } - - if actual.NetworkManagerConnectionName != v.Expected.NetworkManagerConnectionName { - t.Fatalf("Expected %q but got %q for NetworkManagerConnectionName", v.Expected.NetworkManagerConnectionName, actual.NetworkManagerConnectionName) - } - - } -} - -func TestParseProviders2NetworkManagerConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *Providers2NetworkManagerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue", - Expected: &Providers2NetworkManagerConnectionId{ - ManagementGroupId: "managementGroupIdValue", - NetworkManagerConnectionName: "networkManagerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/providers/Microsoft.Management/managementGroups/managementGroupIdValue/providers/Microsoft.Network/networkManagerConnections/networkManagerConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs/nEtWoRkMaNaGeRcOnNeCtIoNvAlUe", - Expected: &Providers2NetworkManagerConnectionId{ - ManagementGroupId: "mAnAgEmEnTgRoUpIdVaLuE", - NetworkManagerConnectionName: "nEtWoRkMaNaGeRcOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/pRoViDeRs/mIcRoSoFt.mAnAgEmEnT/mAnAgEmEnTgRoUpS/mAnAgEmEnTgRoUpIdVaLuE/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRcOnNeCtIoNs/nEtWoRkMaNaGeRcOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviders2NetworkManagerConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.ManagementGroupId != v.Expected.ManagementGroupId { - t.Fatalf("Expected %q but got %q for ManagementGroupId", v.Expected.ManagementGroupId, actual.ManagementGroupId) - } - - if actual.NetworkManagerConnectionName != v.Expected.NetworkManagerConnectionName { - t.Fatalf("Expected %q but got %q for NetworkManagerConnectionName", v.Expected.NetworkManagerConnectionName, actual.NetworkManagerConnectionName) - } - - } -} - -func TestSegmentsForProviders2NetworkManagerConnectionId(t *testing.T) { - segments := Providers2NetworkManagerConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("Providers2NetworkManagerConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go deleted file mode 100644 index 2a5cdf38de1..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionscreateorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagementGroupNetworkManagerConnectionsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerConnection -} - -// ManagementGroupNetworkManagerConnectionsCreateOrUpdate ... -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsCreateOrUpdate(ctx context.Context, id Providers2NetworkManagerConnectionId, input NetworkManagerConnection) (result ManagementGroupNetworkManagerConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsdelete.go b/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsdelete.go deleted file mode 100644 index 83c0e93f95b..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagementGroupNetworkManagerConnectionsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// ManagementGroupNetworkManagerConnectionsDelete ... -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsDelete(ctx context.Context, id Providers2NetworkManagerConnectionId) (result ManagementGroupNetworkManagerConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go b/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go deleted file mode 100644 index 8222ba28b95..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagementGroupNetworkManagerConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerConnection -} - -// ManagementGroupNetworkManagerConnectionsGet ... -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsGet(ctx context.Context, id Providers2NetworkManagerConnectionId) (result ManagementGroupNetworkManagerConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go b/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go deleted file mode 100644 index e6fa96ef069..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/method_managementgroupnetworkmanagerconnectionslist.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagementGroupNetworkManagerConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkManagerConnection -} - -type ManagementGroupNetworkManagerConnectionsListCompleteResult struct { - Items []NetworkManagerConnection -} - -type ManagementGroupNetworkManagerConnectionsListOperationOptions struct { - Top *int64 -} - -func DefaultManagementGroupNetworkManagerConnectionsListOperationOptions() ManagementGroupNetworkManagerConnectionsListOperationOptions { - return ManagementGroupNetworkManagerConnectionsListOperationOptions{} -} - -func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ManagementGroupNetworkManagerConnectionsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// ManagementGroupNetworkManagerConnectionsList ... -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsList(ctx context.Context, id commonids.ManagementGroupId, options ManagementGroupNetworkManagerConnectionsListOperationOptions) (result ManagementGroupNetworkManagerConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkManagerConnections", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkManagerConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ManagementGroupNetworkManagerConnectionsListComplete retrieves all the results into a single object -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsListComplete(ctx context.Context, id commonids.ManagementGroupId, options ManagementGroupNetworkManagerConnectionsListOperationOptions) (ManagementGroupNetworkManagerConnectionsListCompleteResult, error) { - return c.ManagementGroupNetworkManagerConnectionsListCompleteMatchingPredicate(ctx, id, options, NetworkManagerConnectionOperationPredicate{}) -} - -// ManagementGroupNetworkManagerConnectionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkManagerConnectionsClient) ManagementGroupNetworkManagerConnectionsListCompleteMatchingPredicate(ctx context.Context, id commonids.ManagementGroupId, options ManagementGroupNetworkManagerConnectionsListOperationOptions, predicate NetworkManagerConnectionOperationPredicate) (result ManagementGroupNetworkManagerConnectionsListCompleteResult, err error) { - items := make([]NetworkManagerConnection, 0) - - resp, err := c.ManagementGroupNetworkManagerConnectionsList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ManagementGroupNetworkManagerConnectionsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go b/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go deleted file mode 100644 index 40590270d62..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionscreateorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubscriptionNetworkManagerConnectionsCreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerConnection -} - -// SubscriptionNetworkManagerConnectionsCreateOrUpdate ... -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsCreateOrUpdate(ctx context.Context, id NetworkManagerConnectionId, input NetworkManagerConnection) (result SubscriptionNetworkManagerConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsdelete.go b/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsdelete.go deleted file mode 100644 index 43ebf8bb5e4..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsdelete.go +++ /dev/null @@ -1,47 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubscriptionNetworkManagerConnectionsDeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// SubscriptionNetworkManagerConnectionsDelete ... -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsDelete(ctx context.Context, id NetworkManagerConnectionId) (result SubscriptionNetworkManagerConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go b/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go deleted file mode 100644 index fd274a1db9f..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubscriptionNetworkManagerConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerConnection -} - -// SubscriptionNetworkManagerConnectionsGet ... -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsGet(ctx context.Context, id NetworkManagerConnectionId) (result SubscriptionNetworkManagerConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go b/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go deleted file mode 100644 index 44e7eb5799f..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/method_subscriptionnetworkmanagerconnectionslist.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkmanagerconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubscriptionNetworkManagerConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkManagerConnection -} - -type SubscriptionNetworkManagerConnectionsListCompleteResult struct { - Items []NetworkManagerConnection -} - -type SubscriptionNetworkManagerConnectionsListOperationOptions struct { - Top *int64 -} - -func DefaultSubscriptionNetworkManagerConnectionsListOperationOptions() SubscriptionNetworkManagerConnectionsListOperationOptions { - return SubscriptionNetworkManagerConnectionsListOperationOptions{} -} - -func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o SubscriptionNetworkManagerConnectionsListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// SubscriptionNetworkManagerConnectionsList ... -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsList(ctx context.Context, id commonids.SubscriptionId, options SubscriptionNetworkManagerConnectionsListOperationOptions) (result SubscriptionNetworkManagerConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkManagerConnections", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkManagerConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// SubscriptionNetworkManagerConnectionsListComplete retrieves all the results into a single object -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsListComplete(ctx context.Context, id commonids.SubscriptionId, options SubscriptionNetworkManagerConnectionsListOperationOptions) (SubscriptionNetworkManagerConnectionsListCompleteResult, error) { - return c.SubscriptionNetworkManagerConnectionsListCompleteMatchingPredicate(ctx, id, options, NetworkManagerConnectionOperationPredicate{}) -} - -// SubscriptionNetworkManagerConnectionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkManagerConnectionsClient) SubscriptionNetworkManagerConnectionsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options SubscriptionNetworkManagerConnectionsListOperationOptions, predicate NetworkManagerConnectionOperationPredicate) (result SubscriptionNetworkManagerConnectionsListCompleteResult, err error) { - items := make([]NetworkManagerConnection, 0) - - resp, err := c.SubscriptionNetworkManagerConnectionsList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = SubscriptionNetworkManagerConnectionsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/model_networkmanagerconnection.go b/resource-manager/network/2022-11-01/networkmanagerconnections/model_networkmanagerconnection.go deleted file mode 100644 index a7548b73699..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/model_networkmanagerconnection.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkmanagerconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkManagerConnectionProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/model_networkmanagerconnectionproperties.go b/resource-manager/network/2022-11-01/networkmanagerconnections/model_networkmanagerconnectionproperties.go deleted file mode 100644 index faec43c2f30..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/model_networkmanagerconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagerconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerConnectionProperties struct { - ConnectionState *ScopeConnectionState `json:"connectionState,omitempty"` - Description *string `json:"description,omitempty"` - NetworkManagerId *string `json:"networkManagerId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/predicates.go b/resource-manager/network/2022-11-01/networkmanagerconnections/predicates.go deleted file mode 100644 index 145b7b7261a..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package networkmanagerconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p NetworkManagerConnectionOperationPredicate) Matches(input NetworkManagerConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/networkmanagerconnections/version.go b/resource-manager/network/2022-11-01/networkmanagerconnections/version.go deleted file mode 100644 index 154e87e00ff..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagerconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanagerconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagerconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/README.md b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/README.md deleted file mode 100644 index db2a267dc3b..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration` Documentation - -The `networkmanagereffectiveconnectivityconfiguration` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration" -``` - - -### Client Initialization - -```go -client := networkmanagereffectiveconnectivityconfiguration.NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerEffectiveConnectivityConfigurationClient.ListNetworkManagerEffectiveConnectivityConfigurations` - -```go -ctx := context.TODO() -id := networkmanagereffectiveconnectivityconfiguration.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -payload := networkmanagereffectiveconnectivityconfiguration.QueryRequestOptions{ - // ... -} - - -read, err := client.ListNetworkManagerEffectiveConnectivityConfigurations(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/client.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/client.go deleted file mode 100644 index e1cc279732c..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerEffectiveConnectivityConfigurationClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerEffectiveConnectivityConfigurationClientWithBaseURI(api environments.Api) (*NetworkManagerEffectiveConnectivityConfigurationClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanagereffectiveconnectivityconfiguration", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerEffectiveConnectivityConfigurationClient: %+v", err) - } - - return &NetworkManagerEffectiveConnectivityConfigurationClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/constants.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/constants.go deleted file mode 100644 index 06b5b5629ff..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/constants.go +++ /dev/null @@ -1,262 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityTopology string - -const ( - ConnectivityTopologyHubAndSpoke ConnectivityTopology = "HubAndSpoke" - ConnectivityTopologyMesh ConnectivityTopology = "Mesh" -) - -func PossibleValuesForConnectivityTopology() []string { - return []string{ - string(ConnectivityTopologyHubAndSpoke), - string(ConnectivityTopologyMesh), - } -} - -func (s *ConnectivityTopology) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectivityTopology(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectivityTopology(input string) (*ConnectivityTopology, error) { - vals := map[string]ConnectivityTopology{ - "hubandspoke": ConnectivityTopologyHubAndSpoke, - "mesh": ConnectivityTopologyMesh, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectivityTopology(input) - return &out, nil -} - -type DeleteExistingPeering string - -const ( - DeleteExistingPeeringFalse DeleteExistingPeering = "False" - DeleteExistingPeeringTrue DeleteExistingPeering = "True" -) - -func PossibleValuesForDeleteExistingPeering() []string { - return []string{ - string(DeleteExistingPeeringFalse), - string(DeleteExistingPeeringTrue), - } -} - -func (s *DeleteExistingPeering) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteExistingPeering(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteExistingPeering(input string) (*DeleteExistingPeering, error) { - vals := map[string]DeleteExistingPeering{ - "false": DeleteExistingPeeringFalse, - "true": DeleteExistingPeeringTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteExistingPeering(input) - return &out, nil -} - -type GroupConnectivity string - -const ( - GroupConnectivityDirectlyConnected GroupConnectivity = "DirectlyConnected" - GroupConnectivityNone GroupConnectivity = "None" -) - -func PossibleValuesForGroupConnectivity() []string { - return []string{ - string(GroupConnectivityDirectlyConnected), - string(GroupConnectivityNone), - } -} - -func (s *GroupConnectivity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGroupConnectivity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGroupConnectivity(input string) (*GroupConnectivity, error) { - vals := map[string]GroupConnectivity{ - "directlyconnected": GroupConnectivityDirectlyConnected, - "none": GroupConnectivityNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GroupConnectivity(input) - return &out, nil -} - -type IsGlobal string - -const ( - IsGlobalFalse IsGlobal = "False" - IsGlobalTrue IsGlobal = "True" -) - -func PossibleValuesForIsGlobal() []string { - return []string{ - string(IsGlobalFalse), - string(IsGlobalTrue), - } -} - -func (s *IsGlobal) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsGlobal(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsGlobal(input string) (*IsGlobal, error) { - vals := map[string]IsGlobal{ - "false": IsGlobalFalse, - "true": IsGlobalTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsGlobal(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type UseHubGateway string - -const ( - UseHubGatewayFalse UseHubGateway = "False" - UseHubGatewayTrue UseHubGateway = "True" -) - -func PossibleValuesForUseHubGateway() []string { - return []string{ - string(UseHubGatewayFalse), - string(UseHubGatewayTrue), - } -} - -func (s *UseHubGateway) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUseHubGateway(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUseHubGateway(input string) (*UseHubGateway, error) { - vals := map[string]UseHubGateway{ - "false": UseHubGatewayFalse, - "true": UseHubGatewayTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UseHubGateway(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go deleted file mode 100644 index fab3b67c949..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/method_listnetworkmanagereffectiveconnectivityconfigurations.go +++ /dev/null @@ -1,57 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListNetworkManagerEffectiveConnectivityConfigurationsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerEffectiveConnectivityConfigurationListResult -} - -// ListNetworkManagerEffectiveConnectivityConfigurations ... -func (c NetworkManagerEffectiveConnectivityConfigurationClient) ListNetworkManagerEffectiveConnectivityConfigurations(ctx context.Context, id commonids.VirtualNetworkId, input QueryRequestOptions) (result ListNetworkManagerEffectiveConnectivityConfigurationsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listNetworkManagerEffectiveConnectivityConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_configurationgroup.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_configurationgroup.go deleted file mode 100644 index 219b2fe208e..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_configurationgroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationGroup struct { - Id *string `json:"id,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_connectivityconfigurationproperties.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_connectivityconfigurationproperties.go deleted file mode 100644 index b765b64e708..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_connectivityconfigurationproperties.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityConfigurationProperties struct { - AppliesToGroups []ConnectivityGroupItem `json:"appliesToGroups"` - ConnectivityTopology ConnectivityTopology `json:"connectivityTopology"` - DeleteExistingPeering *DeleteExistingPeering `json:"deleteExistingPeering,omitempty"` - Description *string `json:"description,omitempty"` - Hubs *[]Hub `json:"hubs,omitempty"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_connectivitygroupitem.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_connectivitygroupitem.go deleted file mode 100644 index d034adb388c..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_connectivitygroupitem.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityGroupItem struct { - GroupConnectivity GroupConnectivity `json:"groupConnectivity"` - IsGlobal *IsGlobal `json:"isGlobal,omitempty"` - NetworkGroupId string `json:"networkGroupId"` - UseHubGateway *UseHubGateway `json:"useHubGateway,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_effectiveconnectivityconfiguration.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_effectiveconnectivityconfiguration.go deleted file mode 100644 index ace2b882974..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_effectiveconnectivityconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveConnectivityConfiguration struct { - ConfigurationGroups *[]ConfigurationGroup `json:"configurationGroups,omitempty"` - Id *string `json:"id,omitempty"` - Properties *ConnectivityConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_hub.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_hub.go deleted file mode 100644 index 5564a1b1595..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_hub.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Hub struct { - ResourceId *string `json:"resourceId,omitempty"` - ResourceType *string `json:"resourceType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_networkgroupproperties.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_networkgroupproperties.go deleted file mode 100644 index 5b7bec9e8e6..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_networkmanagereffectiveconnectivityconfigurationlistresult.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_networkmanagereffectiveconnectivityconfigurationlistresult.go deleted file mode 100644 index 566b11872ea..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_networkmanagereffectiveconnectivityconfigurationlistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerEffectiveConnectivityConfigurationListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]EffectiveConnectivityConfiguration `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_queryrequestoptions.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_queryrequestoptions.go deleted file mode 100644 index b861fc62fb3..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/model_queryrequestoptions.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryRequestOptions struct { - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/version.go b/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/version.go deleted file mode 100644 index d84010fc360..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectiveconnectivityconfiguration/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanagereffectiveconnectivityconfiguration - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectiveconnectivityconfiguration/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/README.md b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/README.md deleted file mode 100644 index cada0f22053..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules` Documentation - -The `networkmanagereffectivesecurityadminrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules" -``` - - -### Client Initialization - -```go -client := networkmanagereffectivesecurityadminrules.NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagerEffectiveSecurityAdminRulesClient.ListNetworkManagerEffectiveSecurityAdminRules` - -```go -ctx := context.TODO() -id := networkmanagereffectivesecurityadminrules.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -payload := networkmanagereffectivesecurityadminrules.QueryRequestOptions{ - // ... -} - - -read, err := client.ListNetworkManagerEffectiveSecurityAdminRules(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/client.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/client.go deleted file mode 100644 index ea0d80cd16d..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerEffectiveSecurityAdminRulesClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagerEffectiveSecurityAdminRulesClientWithBaseURI(api environments.Api) (*NetworkManagerEffectiveSecurityAdminRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanagereffectivesecurityadminrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagerEffectiveSecurityAdminRulesClient: %+v", err) - } - - return &NetworkManagerEffectiveSecurityAdminRulesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/constants.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/constants.go deleted file mode 100644 index 280bd1bc97d..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/constants.go +++ /dev/null @@ -1,277 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixType string - -const ( - AddressPrefixTypeIPPrefix AddressPrefixType = "IPPrefix" - AddressPrefixTypeServiceTag AddressPrefixType = "ServiceTag" -) - -func PossibleValuesForAddressPrefixType() []string { - return []string{ - string(AddressPrefixTypeIPPrefix), - string(AddressPrefixTypeServiceTag), - } -} - -func (s *AddressPrefixType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAddressPrefixType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAddressPrefixType(input string) (*AddressPrefixType, error) { - vals := map[string]AddressPrefixType{ - "ipprefix": AddressPrefixTypeIPPrefix, - "servicetag": AddressPrefixTypeServiceTag, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AddressPrefixType(input) - return &out, nil -} - -type EffectiveAdminRuleKind string - -const ( - EffectiveAdminRuleKindCustom EffectiveAdminRuleKind = "Custom" - EffectiveAdminRuleKindDefault EffectiveAdminRuleKind = "Default" -) - -func PossibleValuesForEffectiveAdminRuleKind() []string { - return []string{ - string(EffectiveAdminRuleKindCustom), - string(EffectiveAdminRuleKindDefault), - } -} - -func (s *EffectiveAdminRuleKind) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveAdminRuleKind(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveAdminRuleKind(input string) (*EffectiveAdminRuleKind, error) { - vals := map[string]EffectiveAdminRuleKind{ - "custom": EffectiveAdminRuleKindCustom, - "default": EffectiveAdminRuleKindDefault, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveAdminRuleKind(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityConfigurationRuleAccess string - -const ( - SecurityConfigurationRuleAccessAllow SecurityConfigurationRuleAccess = "Allow" - SecurityConfigurationRuleAccessAlwaysAllow SecurityConfigurationRuleAccess = "AlwaysAllow" - SecurityConfigurationRuleAccessDeny SecurityConfigurationRuleAccess = "Deny" -) - -func PossibleValuesForSecurityConfigurationRuleAccess() []string { - return []string{ - string(SecurityConfigurationRuleAccessAllow), - string(SecurityConfigurationRuleAccessAlwaysAllow), - string(SecurityConfigurationRuleAccessDeny), - } -} - -func (s *SecurityConfigurationRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleAccess(input string) (*SecurityConfigurationRuleAccess, error) { - vals := map[string]SecurityConfigurationRuleAccess{ - "allow": SecurityConfigurationRuleAccessAllow, - "alwaysallow": SecurityConfigurationRuleAccessAlwaysAllow, - "deny": SecurityConfigurationRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleAccess(input) - return &out, nil -} - -type SecurityConfigurationRuleDirection string - -const ( - SecurityConfigurationRuleDirectionInbound SecurityConfigurationRuleDirection = "Inbound" - SecurityConfigurationRuleDirectionOutbound SecurityConfigurationRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityConfigurationRuleDirection() []string { - return []string{ - string(SecurityConfigurationRuleDirectionInbound), - string(SecurityConfigurationRuleDirectionOutbound), - } -} - -func (s *SecurityConfigurationRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleDirection(input string) (*SecurityConfigurationRuleDirection, error) { - vals := map[string]SecurityConfigurationRuleDirection{ - "inbound": SecurityConfigurationRuleDirectionInbound, - "outbound": SecurityConfigurationRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleDirection(input) - return &out, nil -} - -type SecurityConfigurationRuleProtocol string - -const ( - SecurityConfigurationRuleProtocolAh SecurityConfigurationRuleProtocol = "Ah" - SecurityConfigurationRuleProtocolAny SecurityConfigurationRuleProtocol = "Any" - SecurityConfigurationRuleProtocolEsp SecurityConfigurationRuleProtocol = "Esp" - SecurityConfigurationRuleProtocolIcmp SecurityConfigurationRuleProtocol = "Icmp" - SecurityConfigurationRuleProtocolTcp SecurityConfigurationRuleProtocol = "Tcp" - SecurityConfigurationRuleProtocolUdp SecurityConfigurationRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityConfigurationRuleProtocol() []string { - return []string{ - string(SecurityConfigurationRuleProtocolAh), - string(SecurityConfigurationRuleProtocolAny), - string(SecurityConfigurationRuleProtocolEsp), - string(SecurityConfigurationRuleProtocolIcmp), - string(SecurityConfigurationRuleProtocolTcp), - string(SecurityConfigurationRuleProtocolUdp), - } -} - -func (s *SecurityConfigurationRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityConfigurationRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityConfigurationRuleProtocol(input string) (*SecurityConfigurationRuleProtocol, error) { - vals := map[string]SecurityConfigurationRuleProtocol{ - "ah": SecurityConfigurationRuleProtocolAh, - "any": SecurityConfigurationRuleProtocolAny, - "esp": SecurityConfigurationRuleProtocolEsp, - "icmp": SecurityConfigurationRuleProtocolIcmp, - "tcp": SecurityConfigurationRuleProtocolTcp, - "udp": SecurityConfigurationRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityConfigurationRuleProtocol(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go deleted file mode 100644 index e39204d0b70..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/method_listnetworkmanagereffectivesecurityadminrules.go +++ /dev/null @@ -1,57 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListNetworkManagerEffectiveSecurityAdminRulesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerEffectiveSecurityAdminRulesListResult -} - -// ListNetworkManagerEffectiveSecurityAdminRules ... -func (c NetworkManagerEffectiveSecurityAdminRulesClient) ListNetworkManagerEffectiveSecurityAdminRules(ctx context.Context, id commonids.VirtualNetworkId, input QueryRequestOptions) (result ListNetworkManagerEffectiveSecurityAdminRulesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listNetworkManagerEffectiveSecurityAdminRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_addressprefixitem.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_addressprefixitem.go deleted file mode 100644 index 36a40aa2b75..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_addressprefixitem.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressPrefixItem struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixType *AddressPrefixType `json:"addressPrefixType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_adminpropertiesformat.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_adminpropertiesformat.go deleted file mode 100644 index b76a52edb2e..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_adminpropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AdminPropertiesFormat struct { - Access SecurityConfigurationRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction SecurityConfigurationRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityConfigurationRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_configurationgroup.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_configurationgroup.go deleted file mode 100644 index bfc45b0ab70..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_configurationgroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationGroup struct { - Id *string `json:"id,omitempty"` - Properties *NetworkGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_defaultadminpropertiesformat.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_defaultadminpropertiesformat.go deleted file mode 100644 index 190203916a6..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_defaultadminpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultAdminPropertiesFormat struct { - Access *SecurityConfigurationRuleAccess `json:"access,omitempty"` - Description *string `json:"description,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Destinations *[]AddressPrefixItem `json:"destinations,omitempty"` - Direction *SecurityConfigurationRuleDirection `json:"direction,omitempty"` - Flag *string `json:"flag,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *SecurityConfigurationRuleProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` - Sources *[]AddressPrefixItem `json:"sources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go deleted file mode 100644 index 7d79d1d14bd..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivebasesecurityadminrule.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveBaseSecurityAdminRule interface { -} - -func unmarshalEffectiveBaseSecurityAdminRuleImplementation(input []byte) (EffectiveBaseSecurityAdminRule, error) { - if input == nil { - return nil, nil - } - - var temp map[string]interface{} - if err := json.Unmarshal(input, &temp); err != nil { - return nil, fmt.Errorf("unmarshaling EffectiveBaseSecurityAdminRule into map[string]interface: %+v", err) - } - - value, ok := temp["kind"].(string) - if !ok { - return nil, nil - } - - if strings.EqualFold(value, "Default") { - var out EffectiveDefaultSecurityAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into EffectiveDefaultSecurityAdminRule: %+v", err) - } - return out, nil - } - - if strings.EqualFold(value, "Custom") { - var out EffectiveSecurityAdminRule - if err := json.Unmarshal(input, &out); err != nil { - return nil, fmt.Errorf("unmarshaling into EffectiveSecurityAdminRule: %+v", err) - } - return out, nil - } - - type RawEffectiveBaseSecurityAdminRuleImpl struct { - Type string `json:"-"` - Values map[string]interface{} `json:"-"` - } - out := RawEffectiveBaseSecurityAdminRuleImpl{ - Type: value, - Values: temp, - } - return out, nil - -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go deleted file mode 100644 index 17d5e7fdeb7..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivedefaultsecurityadminrule.go +++ /dev/null @@ -1,46 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ EffectiveBaseSecurityAdminRule = EffectiveDefaultSecurityAdminRule{} - -type EffectiveDefaultSecurityAdminRule struct { - Properties *DefaultAdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from EffectiveBaseSecurityAdminRule - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - Id *string `json:"id,omitempty"` - RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -var _ json.Marshaler = EffectiveDefaultSecurityAdminRule{} - -func (s EffectiveDefaultSecurityAdminRule) MarshalJSON() ([]byte, error) { - type wrapper EffectiveDefaultSecurityAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling EffectiveDefaultSecurityAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling EffectiveDefaultSecurityAdminRule: %+v", err) - } - decoded["kind"] = "Default" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling EffectiveDefaultSecurityAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go deleted file mode 100644 index ae90f9154f9..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_effectivesecurityadminrule.go +++ /dev/null @@ -1,46 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ EffectiveBaseSecurityAdminRule = EffectiveSecurityAdminRule{} - -type EffectiveSecurityAdminRule struct { - Properties *AdminPropertiesFormat `json:"properties,omitempty"` - - // Fields inherited from EffectiveBaseSecurityAdminRule - ConfigurationDescription *string `json:"configurationDescription,omitempty"` - Id *string `json:"id,omitempty"` - RuleCollectionAppliesToGroups *[]NetworkManagerSecurityGroupItem `json:"ruleCollectionAppliesToGroups,omitempty"` - RuleCollectionDescription *string `json:"ruleCollectionDescription,omitempty"` - RuleGroups *[]ConfigurationGroup `json:"ruleGroups,omitempty"` -} - -var _ json.Marshaler = EffectiveSecurityAdminRule{} - -func (s EffectiveSecurityAdminRule) MarshalJSON() ([]byte, error) { - type wrapper EffectiveSecurityAdminRule - wrapped := wrapper(s) - encoded, err := json.Marshal(wrapped) - if err != nil { - return nil, fmt.Errorf("marshaling EffectiveSecurityAdminRule: %+v", err) - } - - var decoded map[string]interface{} - if err := json.Unmarshal(encoded, &decoded); err != nil { - return nil, fmt.Errorf("unmarshaling EffectiveSecurityAdminRule: %+v", err) - } - decoded["kind"] = "Custom" - - encoded, err = json.Marshal(decoded) - if err != nil { - return nil, fmt.Errorf("re-marshaling EffectiveSecurityAdminRule: %+v", err) - } - - return encoded, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkgroupproperties.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkgroupproperties.go deleted file mode 100644 index 0f51af45445..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkgroupproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkGroupProperties struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go deleted file mode 100644 index 941c8a93ed6..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagereffectivesecurityadminruleslistresult.go +++ /dev/null @@ -1,49 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import ( - "encoding/json" - "fmt" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerEffectiveSecurityAdminRulesListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]EffectiveBaseSecurityAdminRule `json:"value,omitempty"` -} - -var _ json.Unmarshaler = &NetworkManagerEffectiveSecurityAdminRulesListResult{} - -func (s *NetworkManagerEffectiveSecurityAdminRulesListResult) UnmarshalJSON(bytes []byte) error { - type alias NetworkManagerEffectiveSecurityAdminRulesListResult - var decoded alias - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling into NetworkManagerEffectiveSecurityAdminRulesListResult: %+v", err) - } - - s.SkipToken = decoded.SkipToken - - var temp map[string]json.RawMessage - if err := json.Unmarshal(bytes, &temp); err != nil { - return fmt.Errorf("unmarshaling NetworkManagerEffectiveSecurityAdminRulesListResult into map[string]json.RawMessage: %+v", err) - } - - if v, ok := temp["value"]; ok { - var listTemp []json.RawMessage - if err := json.Unmarshal(v, &listTemp); err != nil { - return fmt.Errorf("unmarshaling Value into list []json.RawMessage: %+v", err) - } - - output := make([]EffectiveBaseSecurityAdminRule, 0) - for i, val := range listTemp { - impl, err := unmarshalEffectiveBaseSecurityAdminRuleImplementation(val) - if err != nil { - return fmt.Errorf("unmarshaling index %d field 'Value' for 'NetworkManagerEffectiveSecurityAdminRulesListResult': %+v", i, err) - } - output = append(output, impl) - } - s.Value = &output - } - return nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagersecuritygroupitem.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagersecuritygroupitem.go deleted file mode 100644 index 47b6055e402..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_networkmanagersecuritygroupitem.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerSecurityGroupItem struct { - NetworkGroupId string `json:"networkGroupId"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_queryrequestoptions.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_queryrequestoptions.go deleted file mode 100644 index 21a08175183..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/model_queryrequestoptions.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryRequestOptions struct { - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/version.go b/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/version.go deleted file mode 100644 index d4318e0fb13..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagereffectivesecurityadminrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanagereffectivesecurityadminrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagereffectivesecurityadminrules/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/README.md b/resource-manager/network/2022-11-01/networkmanagers/README.md deleted file mode 100644 index c869cb9a5b7..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/README.md +++ /dev/null @@ -1,162 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagers` Documentation - -The `networkmanagers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkmanagers" -``` - - -### Client Initialization - -```go -client := networkmanagers.NewNetworkManagersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkManagersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanagers.NetworkManager{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagersClient.Delete` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -if err := client.DeleteThenPoll(ctx, id, networkmanagers.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkManagersClient.Get` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagersClient.List` - -```go -ctx := context.TODO() -id := networkmanagers.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id, networkmanagers.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, networkmanagers.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkManagersClient.ListBySubscription` - -```go -ctx := context.TODO() -id := networkmanagers.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id, networkmanagers.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id, networkmanagers.DefaultListBySubscriptionOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkManagersClient.NetworkManagerCommitsPost` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanagers.NetworkManagerCommit{ - // ... -} - - -if err := client.NetworkManagerCommitsPostThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkManagersClient.NetworkManagerDeploymentStatusList` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanagers.NetworkManagerDeploymentStatusParameter{ - // ... -} - - -read, err := client.NetworkManagerDeploymentStatusList(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkManagersClient.Patch` - -```go -ctx := context.TODO() -id := networkmanagers.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -payload := networkmanagers.PatchObject{ - // ... -} - - -read, err := client.Patch(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/networkmanagers/client.go b/resource-manager/network/2022-11-01/networkmanagers/client.go deleted file mode 100644 index d3cd73d8b1c..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkmanagers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagersClient struct { - Client *resourcemanager.Client -} - -func NewNetworkManagersClientWithBaseURI(api environments.Api) (*NetworkManagersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkmanagers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkManagersClient: %+v", err) - } - - return &NetworkManagersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/constants.go b/resource-manager/network/2022-11-01/networkmanagers/constants.go deleted file mode 100644 index 2aa86ac1963..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/constants.go +++ /dev/null @@ -1,145 +0,0 @@ -package networkmanagers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationType string - -const ( - ConfigurationTypeConnectivity ConfigurationType = "Connectivity" - ConfigurationTypeSecurityAdmin ConfigurationType = "SecurityAdmin" -) - -func PossibleValuesForConfigurationType() []string { - return []string{ - string(ConfigurationTypeConnectivity), - string(ConfigurationTypeSecurityAdmin), - } -} - -func (s *ConfigurationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConfigurationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConfigurationType(input string) (*ConfigurationType, error) { - vals := map[string]ConfigurationType{ - "connectivity": ConfigurationTypeConnectivity, - "securityadmin": ConfigurationTypeSecurityAdmin, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConfigurationType(input) - return &out, nil -} - -type DeploymentStatus string - -const ( - DeploymentStatusDeployed DeploymentStatus = "Deployed" - DeploymentStatusDeploying DeploymentStatus = "Deploying" - DeploymentStatusFailed DeploymentStatus = "Failed" - DeploymentStatusNotStarted DeploymentStatus = "NotStarted" -) - -func PossibleValuesForDeploymentStatus() []string { - return []string{ - string(DeploymentStatusDeployed), - string(DeploymentStatusDeploying), - string(DeploymentStatusFailed), - string(DeploymentStatusNotStarted), - } -} - -func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeploymentStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeploymentStatus(input string) (*DeploymentStatus, error) { - vals := map[string]DeploymentStatus{ - "deployed": DeploymentStatusDeployed, - "deploying": DeploymentStatusDeploying, - "failed": DeploymentStatusFailed, - "notstarted": DeploymentStatusNotStarted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeploymentStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/id_networkmanager.go b/resource-manager/network/2022-11-01/networkmanagers/id_networkmanager.go deleted file mode 100644 index fa90a755a35..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkmanagers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/id_networkmanager_test.go b/resource-manager/network/2022-11-01/networkmanagers/id_networkmanager_test.go deleted file mode 100644 index c20acc4e730..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkmanagers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/method_createorupdate.go b/resource-manager/network/2022-11-01/networkmanagers/method_createorupdate.go deleted file mode 100644 index 69ede157544..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManager -} - -// CreateOrUpdate ... -func (c NetworkManagersClient) CreateOrUpdate(ctx context.Context, id NetworkManagerId, input NetworkManager) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/method_delete.go b/resource-manager/network/2022-11-01/networkmanagers/method_delete.go deleted file mode 100644 index ec825f20cb1..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c NetworkManagersClient) Delete(ctx context.Context, id NetworkManagerId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkManagersClient) DeleteThenPoll(ctx context.Context, id NetworkManagerId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/method_get.go b/resource-manager/network/2022-11-01/networkmanagers/method_get.go deleted file mode 100644 index 99b0c352ea5..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkmanagers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManager -} - -// Get ... -func (c NetworkManagersClient) Get(ctx context.Context, id NetworkManagerId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/method_list.go b/resource-manager/network/2022-11-01/networkmanagers/method_list.go deleted file mode 100644 index 59bd8501371..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/method_list.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkManager -} - -type ListCompleteResult struct { - Items []NetworkManager -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c NetworkManagersClient) List(ctx context.Context, id commonids.ResourceGroupId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkManagers", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkManager `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkManagersClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, NetworkManagerOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkManagersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListOperationOptions, predicate NetworkManagerOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkManager, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/method_listbysubscription.go b/resource-manager/network/2022-11-01/networkmanagers/method_listbysubscription.go deleted file mode 100644 index 55778d0cc05..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/method_listbysubscription.go +++ /dev/null @@ -1,118 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkManager -} - -type ListBySubscriptionCompleteResult struct { - Items []NetworkManager -} - -type ListBySubscriptionOperationOptions struct { - Top *int64 -} - -func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions { - return ListBySubscriptionOperationOptions{} -} - -func (o ListBySubscriptionOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListBySubscriptionOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListBySubscriptionOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// ListBySubscription ... -func (c NetworkManagersClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkManagers", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkManager `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c NetworkManagersClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, options, NetworkManagerOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkManagersClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListBySubscriptionOperationOptions, predicate NetworkManagerOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]NetworkManager, 0) - - resp, err := c.ListBySubscription(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/method_networkmanagercommitspost.go b/resource-manager/network/2022-11-01/networkmanagers/method_networkmanagercommitspost.go deleted file mode 100644 index b315295f9ed..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/method_networkmanagercommitspost.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerCommitsPostOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NetworkManagerCommitsPost ... -func (c NetworkManagersClient) NetworkManagerCommitsPost(ctx context.Context, id NetworkManagerId, input NetworkManagerCommit) (result NetworkManagerCommitsPostOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/commit", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NetworkManagerCommitsPostThenPoll performs NetworkManagerCommitsPost then polls until it's completed -func (c NetworkManagersClient) NetworkManagerCommitsPostThenPoll(ctx context.Context, id NetworkManagerId, input NetworkManagerCommit) error { - result, err := c.NetworkManagerCommitsPost(ctx, id, input) - if err != nil { - return fmt.Errorf("performing NetworkManagerCommitsPost: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NetworkManagerCommitsPost: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go b/resource-manager/network/2022-11-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go deleted file mode 100644 index a3aa6c82b2d..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/method_networkmanagerdeploymentstatuslist.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkmanagers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerDeploymentStatusListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManagerDeploymentStatusListResult -} - -// NetworkManagerDeploymentStatusList ... -func (c NetworkManagersClient) NetworkManagerDeploymentStatusList(ctx context.Context, id NetworkManagerId, input NetworkManagerDeploymentStatusParameter) (result NetworkManagerDeploymentStatusListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/listDeploymentStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/method_patch.go b/resource-manager/network/2022-11-01/networkmanagers/method_patch.go deleted file mode 100644 index fa842a793d9..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/method_patch.go +++ /dev/null @@ -1,55 +0,0 @@ -package networkmanagers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PatchOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkManager -} - -// Patch ... -func (c NetworkManagersClient) Patch(ctx context.Context, id NetworkManagerId, input PatchObject) (result PatchOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/model_crosstenantscopes.go b/resource-manager/network/2022-11-01/networkmanagers/model_crosstenantscopes.go deleted file mode 100644 index 537d9c70d4a..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/model_crosstenantscopes.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CrossTenantScopes struct { - ManagementGroups *[]string `json:"managementGroups,omitempty"` - Subscriptions *[]string `json:"subscriptions,omitempty"` - TenantId *string `json:"tenantId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanager.go b/resource-manager/network/2022-11-01/networkmanagers/model_networkmanager.go deleted file mode 100644 index 8f98dec3ed2..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanager.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkmanagers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManager struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkManagerProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagercommit.go b/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagercommit.go deleted file mode 100644 index 8649d0c0da8..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagercommit.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerCommit struct { - CommitId *string `json:"commitId,omitempty"` - CommitType ConfigurationType `json:"commitType"` - ConfigurationIds *[]string `json:"configurationIds,omitempty"` - TargetLocations []string `json:"targetLocations"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatus.go b/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatus.go deleted file mode 100644 index 5727d45e848..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatus.go +++ /dev/null @@ -1,31 +0,0 @@ -package networkmanagers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerDeploymentStatus struct { - CommitTime *string `json:"commitTime,omitempty"` - ConfigurationIds *[]string `json:"configurationIds,omitempty"` - DeploymentStatus *DeploymentStatus `json:"deploymentStatus,omitempty"` - DeploymentType *ConfigurationType `json:"deploymentType,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` - Region *string `json:"region,omitempty"` -} - -func (o *NetworkManagerDeploymentStatus) GetCommitTimeAsTime() (*time.Time, error) { - if o.CommitTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CommitTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *NetworkManagerDeploymentStatus) SetCommitTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CommitTime = &formatted -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatuslistresult.go b/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatuslistresult.go deleted file mode 100644 index 26a44c297a2..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatuslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerDeploymentStatusListResult struct { - SkipToken *string `json:"skipToken,omitempty"` - Value *[]NetworkManagerDeploymentStatus `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatusparameter.go b/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatusparameter.go deleted file mode 100644 index 1eb70a07ac3..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerdeploymentstatusparameter.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerDeploymentStatusParameter struct { - DeploymentTypes *[]ConfigurationType `json:"deploymentTypes,omitempty"` - Regions *[]string `json:"regions,omitempty"` - SkipToken *string `json:"skipToken,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerproperties.go b/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerproperties.go deleted file mode 100644 index 08fbfdbe8aa..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerProperties struct { - Description *string `json:"description,omitempty"` - NetworkManagerScopeAccesses []ConfigurationType `json:"networkManagerScopeAccesses"` - NetworkManagerScopes NetworkManagerPropertiesNetworkManagerScopes `json:"networkManagerScopes"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerpropertiesnetworkmanagerscopes.go b/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerpropertiesnetworkmanagerscopes.go deleted file mode 100644 index 2a91fc5b601..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/model_networkmanagerpropertiesnetworkmanagerscopes.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerPropertiesNetworkManagerScopes struct { - CrossTenantScopes *[]CrossTenantScopes `json:"crossTenantScopes,omitempty"` - ManagementGroups *[]string `json:"managementGroups,omitempty"` - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/model_patchobject.go b/resource-manager/network/2022-11-01/networkmanagers/model_patchobject.go deleted file mode 100644 index 775ef598685..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/model_patchobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PatchObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/predicates.go b/resource-manager/network/2022-11-01/networkmanagers/predicates.go deleted file mode 100644 index 7c1597c2666..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package networkmanagers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkManagerOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkManagerOperationPredicate) Matches(input NetworkManager) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/networkmanagers/version.go b/resource-manager/network/2022-11-01/networkmanagers/version.go deleted file mode 100644 index 2ffd526f385..00000000000 --- a/resource-manager/network/2022-11-01/networkmanagers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkmanagers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkmanagers/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/README.md b/resource-manager/network/2022-11-01/networkprofiles/README.md deleted file mode 100644 index 194a2a9bd37..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/README.md +++ /dev/null @@ -1,124 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkprofiles` Documentation - -The `networkprofiles` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkprofiles" -``` - - -### Client Initialization - -```go -client := networkprofiles.NewNetworkProfilesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkProfilesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkprofiles.NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - -payload := networkprofiles.NetworkProfile{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkProfilesClient.Delete` - -```go -ctx := context.TODO() -id := networkprofiles.NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkProfilesClient.Get` - -```go -ctx := context.TODO() -id := networkprofiles.NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - -read, err := client.Get(ctx, id, networkprofiles.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkProfilesClient.List` - -```go -ctx := context.TODO() -id := networkprofiles.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkProfilesClient.ListAll` - -```go -ctx := context.TODO() -id := networkprofiles.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkProfilesClient.UpdateTags` - -```go -ctx := context.TODO() -id := networkprofiles.NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - -payload := networkprofiles.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/networkprofiles/client.go b/resource-manager/network/2022-11-01/networkprofiles/client.go deleted file mode 100644 index c0d65005107..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkprofiles - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkProfilesClient struct { - Client *resourcemanager.Client -} - -func NewNetworkProfilesClientWithBaseURI(api environments.Api) (*NetworkProfilesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkprofiles", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkProfilesClient: %+v", err) - } - - return &NetworkProfilesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/constants.go b/resource-manager/network/2022-11-01/networkprofiles/constants.go deleted file mode 100644 index 3e1fea316fd..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package networkprofiles - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/id_networkprofile.go b/resource-manager/network/2022-11-01/networkprofiles/id_networkprofile.go deleted file mode 100644 index 0cacfb77d6a..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/id_networkprofile.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkprofiles - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkProfileId{} - -// NetworkProfileId is a struct representing the Resource ID for a Network Profile -type NetworkProfileId struct { - SubscriptionId string - ResourceGroupName string - NetworkProfileName string -} - -// NewNetworkProfileID returns a new NetworkProfileId struct -func NewNetworkProfileID(subscriptionId string, resourceGroupName string, networkProfileName string) NetworkProfileId { - return NetworkProfileId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkProfileName: networkProfileName, - } -} - -// ParseNetworkProfileID parses 'input' into a NetworkProfileId -func ParseNetworkProfileID(input string) (*NetworkProfileId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkProfileId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkProfileName, ok = parsed.Parsed["networkProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkProfileName", *parsed) - } - - return &id, nil -} - -// ParseNetworkProfileIDInsensitively parses 'input' case-insensitively into a NetworkProfileId -// note: this method should only be used for API response data and not user input -func ParseNetworkProfileIDInsensitively(input string) (*NetworkProfileId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkProfileId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkProfileId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkProfileName, ok = parsed.Parsed["networkProfileName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkProfileName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkProfileID checks that 'input' can be parsed as a Network Profile ID -func ValidateNetworkProfileID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkProfileID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Profile ID -func (id NetworkProfileId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkProfiles/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkProfileName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Profile ID -func (id NetworkProfileId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkProfiles", "networkProfiles", "networkProfiles"), - resourceids.UserSpecifiedSegment("networkProfileName", "networkProfileValue"), - } -} - -// String returns a human-readable description of this Network Profile ID -func (id NetworkProfileId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Profile Name: %q", id.NetworkProfileName), - } - return fmt.Sprintf("Network Profile (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/id_networkprofile_test.go b/resource-manager/network/2022-11-01/networkprofiles/id_networkprofile_test.go deleted file mode 100644 index d5bf7814b6d..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/id_networkprofile_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkprofiles - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkProfileId{} - -func TestNewNetworkProfileID(t *testing.T) { - id := NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkProfileName != "networkProfileValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkProfileName'", id.NetworkProfileName, "networkProfileValue") - } -} - -func TestFormatNetworkProfileID(t *testing.T) { - actual := NewNetworkProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkProfileValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkProfileID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkProfileId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue", - Expected: &NetworkProfileId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkProfileName: "networkProfileValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkProfileID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkProfileName != v.Expected.NetworkProfileName { - t.Fatalf("Expected %q but got %q for NetworkProfileName", v.Expected.NetworkProfileName, actual.NetworkProfileName) - } - - } -} - -func TestParseNetworkProfileIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkProfileId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkPrOfIlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue", - Expected: &NetworkProfileId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkProfileName: "networkProfileValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkProfiles/networkProfileValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkPrOfIlEs/nEtWoRkPrOfIlEvAlUe", - Expected: &NetworkProfileId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkProfileName: "nEtWoRkPrOfIlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkPrOfIlEs/nEtWoRkPrOfIlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkProfileIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkProfileName != v.Expected.NetworkProfileName { - t.Fatalf("Expected %q but got %q for NetworkProfileName", v.Expected.NetworkProfileName, actual.NetworkProfileName) - } - - } -} - -func TestSegmentsForNetworkProfileId(t *testing.T) { - segments := NetworkProfileId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkProfileId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/method_createorupdate.go b/resource-manager/network/2022-11-01/networkprofiles/method_createorupdate.go deleted file mode 100644 index cd2ab2921ac..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkprofiles - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkProfile -} - -// CreateOrUpdate ... -func (c NetworkProfilesClient) CreateOrUpdate(ctx context.Context, id NetworkProfileId, input NetworkProfile) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/method_delete.go b/resource-manager/network/2022-11-01/networkprofiles/method_delete.go deleted file mode 100644 index c5564f89c85..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package networkprofiles - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkProfilesClient) Delete(ctx context.Context, id NetworkProfileId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkProfilesClient) DeleteThenPoll(ctx context.Context, id NetworkProfileId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/method_get.go b/resource-manager/network/2022-11-01/networkprofiles/method_get.go deleted file mode 100644 index ed06c4e9d88..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package networkprofiles - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkProfile -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NetworkProfilesClient) Get(ctx context.Context, id NetworkProfileId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/method_list.go b/resource-manager/network/2022-11-01/networkprofiles/method_list.go deleted file mode 100644 index bd5d5250f77..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkprofiles - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkProfile -} - -type ListCompleteResult struct { - Items []NetworkProfile -} - -// List ... -func (c NetworkProfilesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkProfiles", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkProfile `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkProfilesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkProfileOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkProfilesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkProfileOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkProfile, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/method_listall.go b/resource-manager/network/2022-11-01/networkprofiles/method_listall.go deleted file mode 100644 index ae400cdd0fc..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkprofiles - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkProfile -} - -type ListAllCompleteResult struct { - Items []NetworkProfile -} - -// ListAll ... -func (c NetworkProfilesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkProfiles", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkProfile `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c NetworkProfilesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, NetworkProfileOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkProfilesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkProfileOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]NetworkProfile, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/method_updatetags.go b/resource-manager/network/2022-11-01/networkprofiles/method_updatetags.go deleted file mode 100644 index bf26d755460..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package networkprofiles - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkProfile -} - -// UpdateTags ... -func (c NetworkProfilesClient) UpdateTags(ctx context.Context, id NetworkProfileId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 0452928be63..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 03bee9ad4ae..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 7a1eea7761a..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 4e9c7a30701..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index b3a527e5678..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/networkprofiles/model_applicationsecuritygroup.go deleted file mode 100644 index a3c9e8c4026..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 962d80f7a83..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_backendaddresspool.go b/resource-manager/network/2022-11-01/networkprofiles/model_backendaddresspool.go deleted file mode 100644 index b7491b172ed..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 9d09d64790b..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterface.go b/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterface.go deleted file mode 100644 index 8319fdf7442..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterface.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterface struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ContainerNetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceconfiguration.go b/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceconfiguration.go deleted file mode 100644 index 1d0f89e15b4..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfaceConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ContainerNetworkInterfaceConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceconfigurationpropertiesformat.go deleted file mode 100644 index 1e85f54153a..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceconfigurationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { - ContainerNetworkInterfaces *[]SubResource `json:"containerNetworkInterfaces,omitempty"` - IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceipconfiguration.go deleted file mode 100644 index e74b8c6d59e..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ContainerNetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 07db6c62c7a..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfacepropertiesformat.go deleted file mode 100644 index 1c1efc89484..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_containernetworkinterfacepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ContainerNetworkInterfacePropertiesFormat struct { - Container *SubResource `json:"container,omitempty"` - ContainerNetworkInterfaceConfiguration *ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfiguration,omitempty"` - IPConfigurations *[]ContainerNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 4860aa0e2f3..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_ddossettings.go b/resource-manager/network/2022-11-01/networkprofiles/model_ddossettings.go deleted file mode 100644 index c5dc78bcc06..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_delegation.go b/resource-manager/network/2022-11-01/networkprofiles/model_delegation.go deleted file mode 100644 index 0195b7d30c3..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_flowlog.go b/resource-manager/network/2022-11-01/networkprofiles/model_flowlog.go deleted file mode 100644 index f60e3c562cb..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/networkprofiles/model_flowlogformatparameters.go deleted file mode 100644 index b92557232ff..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_flowlogpropertiesformat.go deleted file mode 100644 index adaaab9bc0c..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/networkprofiles/model_frontendipconfiguration.go deleted file mode 100644 index db5d6938998..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 82aea183299..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/networkprofiles/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index cb7a2956f0e..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_inboundnatrule.go b/resource-manager/network/2022-11-01/networkprofiles/model_inboundnatrule.go deleted file mode 100644 index 6b089d6c65c..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 0a3a0779932..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_ipconfiguration.go b/resource-manager/network/2022-11-01/networkprofiles/model_ipconfiguration.go deleted file mode 100644 index 940760b2c92..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationprofile.go deleted file mode 100644 index 373777029b1..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index ad8fa03c4f4..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index b90aa191e92..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_iptag.go b/resource-manager/network/2022-11-01/networkprofiles/model_iptag.go deleted file mode 100644 index 2e45e454060..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/networkprofiles/model_loadbalancerbackendaddress.go deleted file mode 100644 index 4484795804f..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 203a8fab13e..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_natgateway.go b/resource-manager/network/2022-11-01/networkprofiles/model_natgateway.go deleted file mode 100644 index 6197c623763..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_natgatewaypropertiesformat.go deleted file mode 100644 index 1c1b918fa25..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_natgatewaysku.go b/resource-manager/network/2022-11-01/networkprofiles/model_natgatewaysku.go deleted file mode 100644 index c3c91d290f2..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_natruleportmapping.go b/resource-manager/network/2022-11-01/networkprofiles/model_natruleportmapping.go deleted file mode 100644 index 033011c8a8b..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterface.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkinterface.go deleted file mode 100644 index 68e610eeff9..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacednssettings.go deleted file mode 100644 index 8451913a32f..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 139342da931..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 2456f55b927..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 2d7d8aa1bc8..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 8e4c0b29d33..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacetapconfiguration.go deleted file mode 100644 index daf580431c6..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 8a7e2121888..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkprofile.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkprofile.go deleted file mode 100644 index b11865bfdd6..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkprofile.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkProfilePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networkprofilepropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_networkprofilepropertiesformat.go deleted file mode 100644 index cf66d34892c..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networkprofilepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkProfilePropertiesFormat struct { - ContainerNetworkInterfaceConfigurations *[]ContainerNetworkInterfaceConfiguration `json:"containerNetworkInterfaceConfigurations,omitempty"` - ContainerNetworkInterfaces *[]ContainerNetworkInterface `json:"containerNetworkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/networkprofiles/model_networksecuritygroup.go deleted file mode 100644 index b24d89a9bdf..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 4a7e6641883..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpoint.go b/resource-manager/network/2022-11-01/networkprofiles/model_privateendpoint.go deleted file mode 100644 index 5fcc4823c22..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointconnection.go deleted file mode 100644 index 5ef26aa759d..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointconnectionproperties.go deleted file mode 100644 index ae03a204241..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointipconfiguration.go deleted file mode 100644 index eb56313d0fe..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index c252cc443f7..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointproperties.go deleted file mode 100644 index d63068a30ea..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkservice.go b/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkservice.go deleted file mode 100644 index 13e1f313103..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnection.go deleted file mode 100644 index f7c7b981511..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 36ba1ab614d..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 6c4d7083fb9..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 556206b6040..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 7cdb9347d51..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceproperties.go deleted file mode 100644 index bc001bea3c0..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddress.go b/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddress.go deleted file mode 100644 index 040a0bb56e8..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package networkprofiles - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddressdnssettings.go deleted file mode 100644 index 3172667a9f8..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 9e8c3ce846b..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddresssku.go deleted file mode 100644 index af7b63fcdc5..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/networkprofiles/model_resourcenavigationlink.go deleted file mode 100644 index d8706b6bc4d..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_resourcenavigationlinkformat.go deleted file mode 100644 index b9a518cd2ae..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_resourceset.go b/resource-manager/network/2022-11-01/networkprofiles/model_resourceset.go deleted file mode 100644 index 028384b4467..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/networkprofiles/model_retentionpolicyparameters.go deleted file mode 100644 index a39da241fee..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_route.go b/resource-manager/network/2022-11-01/networkprofiles/model_route.go deleted file mode 100644 index 01d1b1aee3b..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_routepropertiesformat.go deleted file mode 100644 index a0fba15da36..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_routetable.go b/resource-manager/network/2022-11-01/networkprofiles/model_routetable.go deleted file mode 100644 index e98510e4a99..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_routetablepropertiesformat.go deleted file mode 100644 index d3d001ea19c..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_securityrule.go b/resource-manager/network/2022-11-01/networkprofiles/model_securityrule.go deleted file mode 100644 index d3a303b69a8..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_securityrulepropertiesformat.go deleted file mode 100644 index 5a6f0550760..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/networkprofiles/model_serviceassociationlink.go deleted file mode 100644 index 185baa31acb..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index a8ddcda5b29..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_servicedelegationpropertiesformat.go deleted file mode 100644 index bbe89cb1074..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicy.go deleted file mode 100644 index fc7682e49f7..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 49d3abcfdf1..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 59c9a98a4df..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index c41bd5c801b..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpropertiesformat.go deleted file mode 100644 index e791f2598de..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_subnet.go b/resource-manager/network/2022-11-01/networkprofiles/model_subnet.go deleted file mode 100644 index 92e0d90839e..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_subnetpropertiesformat.go deleted file mode 100644 index bccc38cd921..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_subresource.go b/resource-manager/network/2022-11-01/networkprofiles/model_subresource.go deleted file mode 100644 index e7710003aae..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_tagsobject.go b/resource-manager/network/2022-11-01/networkprofiles/model_tagsobject.go deleted file mode 100644 index 4b300699106..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/networkprofiles/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 43e8bd0f29a..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/networkprofiles/model_trafficanalyticsproperties.go deleted file mode 100644 index 67da0952e73..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/networkprofiles/model_virtualnetworktap.go deleted file mode 100644 index 21bb960f571..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/networkprofiles/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 3e8521e5beb..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/predicates.go b/resource-manager/network/2022-11-01/networkprofiles/predicates.go deleted file mode 100644 index c8b72ff46b2..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package networkprofiles - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkProfileOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkProfileOperationPredicate) Matches(input NetworkProfile) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/networkprofiles/version.go b/resource-manager/network/2022-11-01/networkprofiles/version.go deleted file mode 100644 index b04481a1833..00000000000 --- a/resource-manager/network/2022-11-01/networkprofiles/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkprofiles - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkprofiles/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/README.md b/resource-manager/network/2022-11-01/networksecuritygroups/README.md deleted file mode 100644 index 9f4cfb2e4ed..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networksecuritygroups` Documentation - -The `networksecuritygroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networksecuritygroups" -``` - - -### Client Initialization - -```go -client := networksecuritygroups.NewNetworkSecurityGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkSecurityGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -payload := networksecuritygroups.NetworkSecurityGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.Delete` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.Get` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -read, err := client.Get(ctx, id, networksecuritygroups.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.List` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.ListAll` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkSecurityGroupsClient.UpdateTags` - -```go -ctx := context.TODO() -id := networksecuritygroups.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -payload := networksecuritygroups.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/client.go b/resource-manager/network/2022-11-01/networksecuritygroups/client.go deleted file mode 100644 index a297cbae4a7..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networksecuritygroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupsClient struct { - Client *resourcemanager.Client -} - -func NewNetworkSecurityGroupsClientWithBaseURI(api environments.Api) (*NetworkSecurityGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networksecuritygroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkSecurityGroupsClient: %+v", err) - } - - return &NetworkSecurityGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/constants.go b/resource-manager/network/2022-11-01/networksecuritygroups/constants.go deleted file mode 100644 index 5f35001e730..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package networksecuritygroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/id_networksecuritygroup.go b/resource-manager/network/2022-11-01/networksecuritygroups/id_networksecuritygroup.go deleted file mode 100644 index 976358d972c..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/id_networksecuritygroup.go +++ /dev/null @@ -1,127 +0,0 @@ -package networksecuritygroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkSecurityGroupId{} - -// NetworkSecurityGroupId is a struct representing the Resource ID for a Network Security Group -type NetworkSecurityGroupId struct { - SubscriptionId string - ResourceGroupName string - NetworkSecurityGroupName string -} - -// NewNetworkSecurityGroupID returns a new NetworkSecurityGroupId struct -func NewNetworkSecurityGroupID(subscriptionId string, resourceGroupName string, networkSecurityGroupName string) NetworkSecurityGroupId { - return NetworkSecurityGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkSecurityGroupName: networkSecurityGroupName, - } -} - -// ParseNetworkSecurityGroupID parses 'input' into a NetworkSecurityGroupId -func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkSecurityGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ParseNetworkSecurityGroupIDInsensitively parses 'input' case-insensitively into a NetworkSecurityGroupId -// note: this method should only be used for API response data and not user input -func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkSecurityGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkSecurityGroupID checks that 'input' can be parsed as a Network Security Group ID -func ValidateNetworkSecurityGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkSecurityGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Security Group ID -func (id NetworkSecurityGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkSecurityGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Security Group ID -func (id NetworkSecurityGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkSecurityGroups", "networkSecurityGroups", "networkSecurityGroups"), - resourceids.UserSpecifiedSegment("networkSecurityGroupName", "networkSecurityGroupValue"), - } -} - -// String returns a human-readable description of this Network Security Group ID -func (id NetworkSecurityGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Security Group Name: %q", id.NetworkSecurityGroupName), - } - return fmt.Sprintf("Network Security Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/id_networksecuritygroup_test.go b/resource-manager/network/2022-11-01/networksecuritygroups/id_networksecuritygroup_test.go deleted file mode 100644 index bb481c980cc..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/id_networksecuritygroup_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networksecuritygroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkSecurityGroupId{} - -func TestNewNetworkSecurityGroupID(t *testing.T) { - id := NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkSecurityGroupName != "networkSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkSecurityGroupName'", id.NetworkSecurityGroupName, "networkSecurityGroupValue") - } -} - -func TestFormatNetworkSecurityGroupID(t *testing.T) { - actual := NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkSecurityGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkSecurityGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - } -} - -func TestParseNetworkSecurityGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkSecurityGroupName: "nEtWoRkSeCuRiTyGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkSecurityGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - } -} - -func TestSegmentsForNetworkSecurityGroupId(t *testing.T) { - segments := NetworkSecurityGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkSecurityGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/method_createorupdate.go b/resource-manager/network/2022-11-01/networksecuritygroups/method_createorupdate.go deleted file mode 100644 index 177cdcd4d7b..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c NetworkSecurityGroupsClient) CreateOrUpdate(ctx context.Context, id NetworkSecurityGroupId, input NetworkSecurityGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c NetworkSecurityGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id NetworkSecurityGroupId, input NetworkSecurityGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/method_delete.go b/resource-manager/network/2022-11-01/networksecuritygroups/method_delete.go deleted file mode 100644 index 103ca330a5b..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkSecurityGroupsClient) Delete(ctx context.Context, id NetworkSecurityGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkSecurityGroupsClient) DeleteThenPoll(ctx context.Context, id NetworkSecurityGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/method_get.go b/resource-manager/network/2022-11-01/networksecuritygroups/method_get.go deleted file mode 100644 index 7eeb1b8f506..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkSecurityGroup -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NetworkSecurityGroupsClient) Get(ctx context.Context, id NetworkSecurityGroupId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/method_list.go b/resource-manager/network/2022-11-01/networksecuritygroups/method_list.go deleted file mode 100644 index aa3cb9f49b4..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkSecurityGroup -} - -type ListCompleteResult struct { - Items []NetworkSecurityGroup -} - -// List ... -func (c NetworkSecurityGroupsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkSecurityGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkSecurityGroupsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkSecurityGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkSecurityGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkSecurityGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkSecurityGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/method_listall.go b/resource-manager/network/2022-11-01/networksecuritygroups/method_listall.go deleted file mode 100644 index 55f720f0ff8..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkSecurityGroup -} - -type ListAllCompleteResult struct { - Items []NetworkSecurityGroup -} - -// ListAll ... -func (c NetworkSecurityGroupsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkSecurityGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkSecurityGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c NetworkSecurityGroupsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, NetworkSecurityGroupOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkSecurityGroupsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkSecurityGroupOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]NetworkSecurityGroup, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/method_updatetags.go b/resource-manager/network/2022-11-01/networksecuritygroups/method_updatetags.go deleted file mode 100644 index 005851871a6..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package networksecuritygroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkSecurityGroup -} - -// UpdateTags ... -func (c NetworkSecurityGroupsClient) UpdateTags(ctx context.Context, id NetworkSecurityGroupId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 62c1c3109c0..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 17bf1792be8..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index d96a3011a25..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewayipconfiguration.go deleted file mode 100644 index ebf65a382d3..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index e6f11b94c01..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationsecuritygroup.go deleted file mode 100644 index 50a0b0f53a7..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 5443c32837a..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_backendaddresspool.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_backendaddresspool.go deleted file mode 100644 index 0a216964329..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 31e2ba392e4..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index d6dd55786fc..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_ddossettings.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_ddossettings.go deleted file mode 100644 index 4b0d4e3dc9b..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_delegation.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_delegation.go deleted file mode 100644 index 42805b01ada..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_flowlog.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_flowlog.go deleted file mode 100644 index eee82c2d3b6..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_flowlogformatparameters.go deleted file mode 100644 index fdad354f6b8..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_flowlogpropertiesformat.go deleted file mode 100644 index bab4d923b54..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_frontendipconfiguration.go deleted file mode 100644 index 24b23145d47..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 5322ea68f34..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index fff6be9708f..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_inboundnatrule.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_inboundnatrule.go deleted file mode 100644 index 6391fbf065c..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 725fec85751..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfiguration.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfiguration.go deleted file mode 100644 index b9eec53b855..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationprofile.go deleted file mode 100644 index 4885926d9aa..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index ec7f93c0f2b..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index ca12abb4992..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_iptag.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_iptag.go deleted file mode 100644 index 3f5348f3776..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_loadbalancerbackendaddress.go deleted file mode 100644 index 8c8a91a5d1f..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 1843fe9fb85..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_natgateway.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_natgateway.go deleted file mode 100644 index 8d6ecb14bc5..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_natgatewaypropertiesformat.go deleted file mode 100644 index 389e752880f..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_natgatewaysku.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_natgatewaysku.go deleted file mode 100644 index 5e842304f20..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_natruleportmapping.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_natruleportmapping.go deleted file mode 100644 index 30f812c7c78..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterface.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterface.go deleted file mode 100644 index a4a62c2d6ea..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacednssettings.go deleted file mode 100644 index f3819f01474..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 40cf733a9f0..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index caa03f6e413..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 4199a4aa864..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 95a8c67d71c..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 5e60c1bbfc4..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index d110d193645..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networksecuritygroup.go deleted file mode 100644 index dd84b3efc89..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 704a86496f2..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpoint.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpoint.go deleted file mode 100644 index 753cd13341b..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointconnection.go deleted file mode 100644 index b28eaa1a213..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointconnectionproperties.go deleted file mode 100644 index 9649070d1a7..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointipconfiguration.go deleted file mode 100644 index af86de8f897..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 550ef75ec1d..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointproperties.go deleted file mode 100644 index 36ad3ca4ffb..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkservice.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkservice.go deleted file mode 100644 index f880da9d89d..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnection.go deleted file mode 100644 index 3a721ae3637..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 50b8f7e352f..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 619e38d131d..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index dcbf418522b..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index abc8d2f4904..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceproperties.go deleted file mode 100644 index 5d51b182a49..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddress.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddress.go deleted file mode 100644 index 7b797b006f5..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package networksecuritygroups - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddressdnssettings.go deleted file mode 100644 index 2db9ef3f2c3..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddresspropertiesformat.go deleted file mode 100644 index cac3fce28ce..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddresssku.go deleted file mode 100644 index 24fe5573abd..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_resourcenavigationlink.go deleted file mode 100644 index 8d6ec604942..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_resourcenavigationlinkformat.go deleted file mode 100644 index 0bf207481cb..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_resourceset.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_resourceset.go deleted file mode 100644 index 751d06dd732..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_retentionpolicyparameters.go deleted file mode 100644 index b1e9035c2f8..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_route.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_route.go deleted file mode 100644 index 9b712ab4e81..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_routepropertiesformat.go deleted file mode 100644 index 3225a4673f2..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_routetable.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_routetable.go deleted file mode 100644 index 9aff39efe9e..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_routetablepropertiesformat.go deleted file mode 100644 index 5eee448b410..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_securityrule.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_securityrule.go deleted file mode 100644 index 1119115e9eb..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_securityrulepropertiesformat.go deleted file mode 100644 index 01270911682..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceassociationlink.go deleted file mode 100644 index 050ee6cb43f..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 81a4ac35e4a..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 089e2e1dc0c..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicy.go deleted file mode 100644 index 6ca2d4bff53..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 2a8648b7931..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index c70380704b7..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 3000410cde3..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 299fb5fdadb..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_subnet.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_subnet.go deleted file mode 100644 index 499cc289ec3..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_subnetpropertiesformat.go deleted file mode 100644 index 210e772e083..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_subresource.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_subresource.go deleted file mode 100644 index 8fa7fe6b59d..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_tagsobject.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_tagsobject.go deleted file mode 100644 index bb9ad0a6373..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index ddb354c4a7c..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_trafficanalyticsproperties.go deleted file mode 100644 index f74d8a12ecb..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_virtualnetworktap.go deleted file mode 100644 index cfc1b073467..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/networksecuritygroups/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 01620fae8c8..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/predicates.go b/resource-manager/network/2022-11-01/networksecuritygroups/predicates.go deleted file mode 100644 index b9f6d3f3df5..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package networksecuritygroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkSecurityGroupOperationPredicate) Matches(input NetworkSecurityGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/networksecuritygroups/version.go b/resource-manager/network/2022-11-01/networksecuritygroups/version.go deleted file mode 100644 index 282b30051fa..00000000000 --- a/resource-manager/network/2022-11-01/networksecuritygroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networksecuritygroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networksecuritygroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/README.md b/resource-manager/network/2022-11-01/networkvirtualappliances/README.md deleted file mode 100644 index 41b56ab5499..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/README.md +++ /dev/null @@ -1,137 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkvirtualappliances` Documentation - -The `networkvirtualappliances` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkvirtualappliances" -``` - - -### Client Initialization - -```go -client := networkvirtualappliances.NewNetworkVirtualAppliancesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -payload := networkvirtualappliances.NetworkVirtualAppliance{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.Delete` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.Get` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -read, err := client.Get(ctx, id, networkvirtualappliances.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.InboundSecurityRuleCreateOrUpdate` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewInboundSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "inboundSecurityRuleValue") - -payload := networkvirtualappliances.InboundSecurityRule{ - // ... -} - - -if err := client.InboundSecurityRuleCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.List` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `NetworkVirtualAppliancesClient.UpdateTags` - -```go -ctx := context.TODO() -id := networkvirtualappliances.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -payload := networkvirtualappliances.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/client.go b/resource-manager/network/2022-11-01/networkvirtualappliances/client.go deleted file mode 100644 index 78dbf8c120b..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkvirtualappliances - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualAppliancesClient struct { - Client *resourcemanager.Client -} - -func NewNetworkVirtualAppliancesClientWithBaseURI(api environments.Api) (*NetworkVirtualAppliancesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkvirtualappliances", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkVirtualAppliancesClient: %+v", err) - } - - return &NetworkVirtualAppliancesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/constants.go b/resource-manager/network/2022-11-01/networkvirtualappliances/constants.go deleted file mode 100644 index d744d8f8da2..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/constants.go +++ /dev/null @@ -1,98 +0,0 @@ -package networkvirtualappliances - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRulesProtocol string - -const ( - InboundSecurityRulesProtocolTCP InboundSecurityRulesProtocol = "TCP" - InboundSecurityRulesProtocolUDP InboundSecurityRulesProtocol = "UDP" -) - -func PossibleValuesForInboundSecurityRulesProtocol() []string { - return []string{ - string(InboundSecurityRulesProtocolTCP), - string(InboundSecurityRulesProtocolUDP), - } -} - -func (s *InboundSecurityRulesProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseInboundSecurityRulesProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseInboundSecurityRulesProtocol(input string) (*InboundSecurityRulesProtocol, error) { - vals := map[string]InboundSecurityRulesProtocol{ - "tcp": InboundSecurityRulesProtocolTCP, - "udp": InboundSecurityRulesProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := InboundSecurityRulesProtocol(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/id_inboundsecurityrule.go b/resource-manager/network/2022-11-01/networkvirtualappliances/id_inboundsecurityrule.go deleted file mode 100644 index 57ed3f89cae..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/id_inboundsecurityrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package networkvirtualappliances - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = InboundSecurityRuleId{} - -// InboundSecurityRuleId is a struct representing the Resource ID for a Inbound Security Rule -type InboundSecurityRuleId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string - InboundSecurityRuleName string -} - -// NewInboundSecurityRuleID returns a new InboundSecurityRuleId struct -func NewInboundSecurityRuleID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string, inboundSecurityRuleName string) InboundSecurityRuleId { - return InboundSecurityRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - InboundSecurityRuleName: inboundSecurityRuleName, - } -} - -// ParseInboundSecurityRuleID parses 'input' into a InboundSecurityRuleId -func ParseInboundSecurityRuleID(input string) (*InboundSecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(InboundSecurityRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := InboundSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.InboundSecurityRuleName, ok = parsed.Parsed["inboundSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundSecurityRuleName", *parsed) - } - - return &id, nil -} - -// ParseInboundSecurityRuleIDInsensitively parses 'input' case-insensitively into a InboundSecurityRuleId -// note: this method should only be used for API response data and not user input -func ParseInboundSecurityRuleIDInsensitively(input string) (*InboundSecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(InboundSecurityRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := InboundSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.InboundSecurityRuleName, ok = parsed.Parsed["inboundSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "inboundSecurityRuleName", *parsed) - } - - return &id, nil -} - -// ValidateInboundSecurityRuleID checks that 'input' can be parsed as a Inbound Security Rule ID -func ValidateInboundSecurityRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseInboundSecurityRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Inbound Security Rule ID -func (id InboundSecurityRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s/inboundSecurityRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName, id.InboundSecurityRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Inbound Security Rule ID -func (id InboundSecurityRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - resourceids.StaticSegment("staticInboundSecurityRules", "inboundSecurityRules", "inboundSecurityRules"), - resourceids.UserSpecifiedSegment("inboundSecurityRuleName", "inboundSecurityRuleValue"), - } -} - -// String returns a human-readable description of this Inbound Security Rule ID -func (id InboundSecurityRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - fmt.Sprintf("Inbound Security Rule Name: %q", id.InboundSecurityRuleName), - } - return fmt.Sprintf("Inbound Security Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/id_inboundsecurityrule_test.go b/resource-manager/network/2022-11-01/networkvirtualappliances/id_inboundsecurityrule_test.go deleted file mode 100644 index dc2ebe0d44c..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/id_inboundsecurityrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package networkvirtualappliances - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = InboundSecurityRuleId{} - -func TestNewInboundSecurityRuleID(t *testing.T) { - id := NewInboundSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "inboundSecurityRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } - - if id.InboundSecurityRuleName != "inboundSecurityRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'InboundSecurityRuleName'", id.InboundSecurityRuleName, "inboundSecurityRuleValue") - } -} - -func TestFormatInboundSecurityRuleID(t *testing.T) { - actual := NewInboundSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "inboundSecurityRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseInboundSecurityRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *InboundSecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue", - Expected: &InboundSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - InboundSecurityRuleName: "inboundSecurityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseInboundSecurityRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.InboundSecurityRuleName != v.Expected.InboundSecurityRuleName { - t.Fatalf("Expected %q but got %q for InboundSecurityRuleName", v.Expected.InboundSecurityRuleName, actual.InboundSecurityRuleName) - } - - } -} - -func TestParseInboundSecurityRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *InboundSecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/iNbOuNdSeCuRiTyRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue", - Expected: &InboundSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - InboundSecurityRuleName: "inboundSecurityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/inboundSecurityRules/inboundSecurityRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/iNbOuNdSeCuRiTyRuLeS/iNbOuNdSeCuRiTyRuLeVaLuE", - Expected: &InboundSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - InboundSecurityRuleName: "iNbOuNdSeCuRiTyRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/iNbOuNdSeCuRiTyRuLeS/iNbOuNdSeCuRiTyRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseInboundSecurityRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.InboundSecurityRuleName != v.Expected.InboundSecurityRuleName { - t.Fatalf("Expected %q but got %q for InboundSecurityRuleName", v.Expected.InboundSecurityRuleName, actual.InboundSecurityRuleName) - } - - } -} - -func TestSegmentsForInboundSecurityRuleId(t *testing.T) { - segments := InboundSecurityRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("InboundSecurityRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/id_networkvirtualappliance.go b/resource-manager/network/2022-11-01/networkvirtualappliances/id_networkvirtualappliance.go deleted file mode 100644 index c4feaf36235..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/id_networkvirtualappliance.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkvirtualappliances - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -// NetworkVirtualApplianceId is a struct representing the Resource ID for a Network Virtual Appliance -type NetworkVirtualApplianceId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string -} - -// NewNetworkVirtualApplianceID returns a new NetworkVirtualApplianceId struct -func NewNetworkVirtualApplianceID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string) NetworkVirtualApplianceId { - return NetworkVirtualApplianceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - } -} - -// ParseNetworkVirtualApplianceID parses 'input' into a NetworkVirtualApplianceId -func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ParseNetworkVirtualApplianceIDInsensitively parses 'input' case-insensitively into a NetworkVirtualApplianceId -// note: this method should only be used for API response data and not user input -func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkVirtualApplianceID checks that 'input' can be parsed as a Network Virtual Appliance ID -func ValidateNetworkVirtualApplianceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkVirtualApplianceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - } -} - -// String returns a human-readable description of this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - } - return fmt.Sprintf("Network Virtual Appliance (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/id_networkvirtualappliance_test.go b/resource-manager/network/2022-11-01/networkvirtualappliances/id_networkvirtualappliance_test.go deleted file mode 100644 index 3d16176db6a..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/id_networkvirtualappliance_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkvirtualappliances - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -func TestNewNetworkVirtualApplianceID(t *testing.T) { - id := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } -} - -func TestFormatNetworkVirtualApplianceID(t *testing.T) { - actual := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkVirtualApplianceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestParseNetworkVirtualApplianceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestSegmentsForNetworkVirtualApplianceId(t *testing.T) { - segments := NetworkVirtualApplianceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkVirtualApplianceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/method_createorupdate.go b/resource-manager/network/2022-11-01/networkvirtualappliances/method_createorupdate.go deleted file mode 100644 index 1730b596e66..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c NetworkVirtualAppliancesClient) CreateOrUpdate(ctx context.Context, id NetworkVirtualApplianceId, input NetworkVirtualAppliance) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c NetworkVirtualAppliancesClient) CreateOrUpdateThenPoll(ctx context.Context, id NetworkVirtualApplianceId, input NetworkVirtualAppliance) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/method_delete.go b/resource-manager/network/2022-11-01/networkvirtualappliances/method_delete.go deleted file mode 100644 index 9eb9b6f13ac..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkVirtualAppliancesClient) Delete(ctx context.Context, id NetworkVirtualApplianceId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkVirtualAppliancesClient) DeleteThenPoll(ctx context.Context, id NetworkVirtualApplianceId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/method_get.go b/resource-manager/network/2022-11-01/networkvirtualappliances/method_get.go deleted file mode 100644 index e750e7bc23c..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkVirtualAppliance -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c NetworkVirtualAppliancesClient) Get(ctx context.Context, id NetworkVirtualApplianceId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/method_inboundsecurityrulecreateorupdate.go b/resource-manager/network/2022-11-01/networkvirtualappliances/method_inboundsecurityrulecreateorupdate.go deleted file mode 100644 index d7c19477e5b..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/method_inboundsecurityrulecreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRuleCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// InboundSecurityRuleCreateOrUpdate ... -func (c NetworkVirtualAppliancesClient) InboundSecurityRuleCreateOrUpdate(ctx context.Context, id InboundSecurityRuleId, input InboundSecurityRule) (result InboundSecurityRuleCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// InboundSecurityRuleCreateOrUpdateThenPoll performs InboundSecurityRuleCreateOrUpdate then polls until it's completed -func (c NetworkVirtualAppliancesClient) InboundSecurityRuleCreateOrUpdateThenPoll(ctx context.Context, id InboundSecurityRuleId, input InboundSecurityRule) error { - result, err := c.InboundSecurityRuleCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing InboundSecurityRuleCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after InboundSecurityRuleCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/method_list.go b/resource-manager/network/2022-11-01/networkvirtualappliances/method_list.go deleted file mode 100644 index a9d87cc79e6..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkVirtualAppliance -} - -type ListCompleteResult struct { - Items []NetworkVirtualAppliance -} - -// List ... -func (c NetworkVirtualAppliancesClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkVirtualAppliances", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkVirtualAppliance `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c NetworkVirtualAppliancesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkVirtualApplianceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkVirtualAppliancesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkVirtualApplianceOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkVirtualAppliance, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/networkvirtualappliances/method_listbyresourcegroup.go deleted file mode 100644 index 57def9f778d..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkVirtualAppliance -} - -type ListByResourceGroupCompleteResult struct { - Items []NetworkVirtualAppliance -} - -// ListByResourceGroup ... -func (c NetworkVirtualAppliancesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkVirtualAppliances", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkVirtualAppliance `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c NetworkVirtualAppliancesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, NetworkVirtualApplianceOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c NetworkVirtualAppliancesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate NetworkVirtualApplianceOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]NetworkVirtualAppliance, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/method_updatetags.go b/resource-manager/network/2022-11-01/networkvirtualappliances/method_updatetags.go deleted file mode 100644 index c79705d335a..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package networkvirtualappliances - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkVirtualAppliance -} - -// UpdateTags ... -func (c NetworkVirtualAppliancesClient) UpdateTags(ctx context.Context, id NetworkVirtualApplianceId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_delegationproperties.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_delegationproperties.go deleted file mode 100644 index cf2170e1c38..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_delegationproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DelegationProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityrule.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityrule.go deleted file mode 100644 index f921a8c6534..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundSecurityRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityruleproperties.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityruleproperties.go deleted file mode 100644 index 11569615b5c..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityruleproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRuleProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]InboundSecurityRules `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityrules.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityrules.go deleted file mode 100644 index c03db57794b..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_inboundsecurityrules.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundSecurityRules struct { - DestinationPortRange *int64 `json:"destinationPortRange,omitempty"` - Protocol *InboundSecurityRulesProtocol `json:"protocol,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_networkvirtualappliance.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_networkvirtualappliance.go deleted file mode 100644 index 03612c989df..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_networkvirtualappliance.go +++ /dev/null @@ -1,19 +0,0 @@ -package networkvirtualappliances - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualAppliance struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkVirtualAppliancePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_networkvirtualappliancepropertiesformat.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_networkvirtualappliancepropertiesformat.go deleted file mode 100644 index c321e0bc6e9..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_networkvirtualappliancepropertiesformat.go +++ /dev/null @@ -1,24 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualAppliancePropertiesFormat struct { - AdditionalNics *[]VirtualApplianceAdditionalNicProperties `json:"additionalNics,omitempty"` - AddressPrefix *string `json:"addressPrefix,omitempty"` - BootStrapConfigurationBlobs *[]string `json:"bootStrapConfigurationBlobs,omitempty"` - CloudInitConfiguration *string `json:"cloudInitConfiguration,omitempty"` - CloudInitConfigurationBlobs *[]string `json:"cloudInitConfigurationBlobs,omitempty"` - Delegation *DelegationProperties `json:"delegation,omitempty"` - DeploymentType *string `json:"deploymentType,omitempty"` - InboundSecurityRules *[]SubResource `json:"inboundSecurityRules,omitempty"` - NvaSku *VirtualApplianceSkuProperties `json:"nvaSku,omitempty"` - PartnerManagedResource *PartnerManagedResourceProperties `json:"partnerManagedResource,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SshPublicKey *string `json:"sshPublicKey,omitempty"` - VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"` - VirtualApplianceConnections *[]SubResource `json:"virtualApplianceConnections,omitempty"` - VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"` - VirtualApplianceSites *[]SubResource `json:"virtualApplianceSites,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_partnermanagedresourceproperties.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_partnermanagedresourceproperties.go deleted file mode 100644 index e89793be377..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_partnermanagedresourceproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PartnerManagedResourceProperties struct { - Id *string `json:"id,omitempty"` - InternalLoadBalancerId *string `json:"internalLoadBalancerId,omitempty"` - StandardLoadBalancerId *string `json:"standardLoadBalancerId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_subresource.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_subresource.go deleted file mode 100644 index 8df29cf1031..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_tagsobject.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_tagsobject.go deleted file mode 100644 index 3ad1ec8468c..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualapplianceadditionalnicproperties.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualapplianceadditionalnicproperties.go deleted file mode 100644 index 7eb59c309c1..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualapplianceadditionalnicproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceAdditionalNicProperties struct { - HasPublicIP *bool `json:"hasPublicIp,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualappliancenicproperties.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualappliancenicproperties.go deleted file mode 100644 index bfd6f5f914b..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualappliancenicproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceNicProperties struct { - InstanceName *string `json:"instanceName,omitempty"` - Name *string `json:"name,omitempty"` - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualapplianceskuproperties.go b/resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualapplianceskuproperties.go deleted file mode 100644 index b194523806f..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/model_virtualapplianceskuproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSkuProperties struct { - BundledScaleUnit *string `json:"bundledScaleUnit,omitempty"` - MarketPlaceVersion *string `json:"marketPlaceVersion,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/predicates.go b/resource-manager/network/2022-11-01/networkvirtualappliances/predicates.go deleted file mode 100644 index 676b2af6c25..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package networkvirtualappliances - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkVirtualApplianceOperationPredicate) Matches(input NetworkVirtualAppliance) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/networkvirtualappliances/version.go b/resource-manager/network/2022-11-01/networkvirtualappliances/version.go deleted file mode 100644 index e0dcc255ebb..00000000000 --- a/resource-manager/network/2022-11-01/networkvirtualappliances/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkvirtualappliances - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkvirtualappliances/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/README.md b/resource-manager/network/2022-11-01/networkwatchers/README.md deleted file mode 100644 index 282d445e629..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/README.md +++ /dev/null @@ -1,330 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkwatchers` Documentation - -The `networkwatchers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/networkwatchers" -``` - - -### Client Initialization - -```go -client := networkwatchers.NewNetworkWatchersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `NetworkWatchersClient.CheckConnectivity` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.ConnectivityParameters{ - // ... -} - - -if err := client.CheckConnectivityThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.NetworkWatcher{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.Delete` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.Get` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.GetAzureReachabilityReport` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.AzureReachabilityReportParameters{ - // ... -} - - -if err := client.GetAzureReachabilityReportThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetFlowLogStatus` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.FlowLogStatusParameters{ - // ... -} - - -if err := client.GetFlowLogStatusThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetNetworkConfigurationDiagnostic` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.NetworkConfigurationDiagnosticParameters{ - // ... -} - - -if err := client.GetNetworkConfigurationDiagnosticThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetNextHop` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.NextHopParameters{ - // ... -} - - -if err := client.GetNextHopThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetTopology` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.TopologyParameters{ - // ... -} - - -read, err := client.GetTopology(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.GetTroubleshooting` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.TroubleshootingParameters{ - // ... -} - - -if err := client.GetTroubleshootingThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetTroubleshootingResult` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.QueryTroubleshootingParameters{ - // ... -} - - -if err := client.GetTroubleshootingResultThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.GetVMSecurityRules` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.SecurityGroupViewParameters{ - // ... -} - - -if err := client.GetVMSecurityRulesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.List` - -```go -ctx := context.TODO() -id := networkwatchers.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.ListAll` - -```go -ctx := context.TODO() -id := networkwatchers.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -read, err := client.ListAll(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.ListAvailableProviders` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.AvailableProvidersListParameters{ - // ... -} - - -if err := client.ListAvailableProvidersThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.SetFlowLogConfiguration` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.FlowLogInformation{ - // ... -} - - -if err := client.SetFlowLogConfigurationThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `NetworkWatchersClient.UpdateTags` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `NetworkWatchersClient.VerifyIPFlow` - -```go -ctx := context.TODO() -id := networkwatchers.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := networkwatchers.VerificationIPFlowParameters{ - // ... -} - - -if err := client.VerifyIPFlowThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/networkwatchers/client.go b/resource-manager/network/2022-11-01/networkwatchers/client.go deleted file mode 100644 index d0f44155ba5..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkwatchers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatchersClient struct { - Client *resourcemanager.Client -} - -func NewNetworkWatchersClientWithBaseURI(api environments.Api) (*NetworkWatchersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "networkwatchers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating NetworkWatchersClient: %+v", err) - } - - return &NetworkWatchersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/constants.go b/resource-manager/network/2022-11-01/networkwatchers/constants.go deleted file mode 100644 index 2e400cad0f7..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/constants.go +++ /dev/null @@ -1,855 +0,0 @@ -package networkwatchers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Access string - -const ( - AccessAllow Access = "Allow" - AccessDeny Access = "Deny" -) - -func PossibleValuesForAccess() []string { - return []string{ - string(AccessAllow), - string(AccessDeny), - } -} - -func (s *Access) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAccess(input string) (*Access, error) { - vals := map[string]Access{ - "allow": AccessAllow, - "deny": AccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Access(input) - return &out, nil -} - -type AssociationType string - -const ( - AssociationTypeAssociated AssociationType = "Associated" - AssociationTypeContains AssociationType = "Contains" -) - -func PossibleValuesForAssociationType() []string { - return []string{ - string(AssociationTypeAssociated), - string(AssociationTypeContains), - } -} - -func (s *AssociationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAssociationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAssociationType(input string) (*AssociationType, error) { - vals := map[string]AssociationType{ - "associated": AssociationTypeAssociated, - "contains": AssociationTypeContains, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AssociationType(input) - return &out, nil -} - -type ConnectionStatus string - -const ( - ConnectionStatusConnected ConnectionStatus = "Connected" - ConnectionStatusDegraded ConnectionStatus = "Degraded" - ConnectionStatusDisconnected ConnectionStatus = "Disconnected" - ConnectionStatusUnknown ConnectionStatus = "Unknown" -) - -func PossibleValuesForConnectionStatus() []string { - return []string{ - string(ConnectionStatusConnected), - string(ConnectionStatusDegraded), - string(ConnectionStatusDisconnected), - string(ConnectionStatusUnknown), - } -} - -func (s *ConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseConnectionStatus(input string) (*ConnectionStatus, error) { - vals := map[string]ConnectionStatus{ - "connected": ConnectionStatusConnected, - "degraded": ConnectionStatusDegraded, - "disconnected": ConnectionStatusDisconnected, - "unknown": ConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ConnectionStatus(input) - return &out, nil -} - -type Direction string - -const ( - DirectionInbound Direction = "Inbound" - DirectionOutbound Direction = "Outbound" -) - -func PossibleValuesForDirection() []string { - return []string{ - string(DirectionInbound), - string(DirectionOutbound), - } -} - -func (s *Direction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDirection(input string) (*Direction, error) { - vals := map[string]Direction{ - "inbound": DirectionInbound, - "outbound": DirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Direction(input) - return &out, nil -} - -type EffectiveSecurityRuleProtocol string - -const ( - EffectiveSecurityRuleProtocolAll EffectiveSecurityRuleProtocol = "All" - EffectiveSecurityRuleProtocolTcp EffectiveSecurityRuleProtocol = "Tcp" - EffectiveSecurityRuleProtocolUdp EffectiveSecurityRuleProtocol = "Udp" -) - -func PossibleValuesForEffectiveSecurityRuleProtocol() []string { - return []string{ - string(EffectiveSecurityRuleProtocolAll), - string(EffectiveSecurityRuleProtocolTcp), - string(EffectiveSecurityRuleProtocolUdp), - } -} - -func (s *EffectiveSecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseEffectiveSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseEffectiveSecurityRuleProtocol(input string) (*EffectiveSecurityRuleProtocol, error) { - vals := map[string]EffectiveSecurityRuleProtocol{ - "all": EffectiveSecurityRuleProtocolAll, - "tcp": EffectiveSecurityRuleProtocolTcp, - "udp": EffectiveSecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := EffectiveSecurityRuleProtocol(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type HTTPMethod string - -const ( - HTTPMethodGet HTTPMethod = "Get" -) - -func PossibleValuesForHTTPMethod() []string { - return []string{ - string(HTTPMethodGet), - } -} - -func (s *HTTPMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHTTPMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHTTPMethod(input string) (*HTTPMethod, error) { - vals := map[string]HTTPMethod{ - "get": HTTPMethodGet, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HTTPMethod(input) - return &out, nil -} - -type IPFlowProtocol string - -const ( - IPFlowProtocolTCP IPFlowProtocol = "TCP" - IPFlowProtocolUDP IPFlowProtocol = "UDP" -) - -func PossibleValuesForIPFlowProtocol() []string { - return []string{ - string(IPFlowProtocolTCP), - string(IPFlowProtocolUDP), - } -} - -func (s *IPFlowProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPFlowProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPFlowProtocol(input string) (*IPFlowProtocol, error) { - vals := map[string]IPFlowProtocol{ - "tcp": IPFlowProtocolTCP, - "udp": IPFlowProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPFlowProtocol(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type IssueType string - -const ( - IssueTypeAgentStopped IssueType = "AgentStopped" - IssueTypeDnsResolution IssueType = "DnsResolution" - IssueTypeGuestFirewall IssueType = "GuestFirewall" - IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" - IssueTypePlatform IssueType = "Platform" - IssueTypePortThrottled IssueType = "PortThrottled" - IssueTypeSocketBind IssueType = "SocketBind" - IssueTypeUnknown IssueType = "Unknown" - IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" -) - -func PossibleValuesForIssueType() []string { - return []string{ - string(IssueTypeAgentStopped), - string(IssueTypeDnsResolution), - string(IssueTypeGuestFirewall), - string(IssueTypeNetworkSecurityRule), - string(IssueTypePlatform), - string(IssueTypePortThrottled), - string(IssueTypeSocketBind), - string(IssueTypeUnknown), - string(IssueTypeUserDefinedRoute), - } -} - -func (s *IssueType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIssueType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIssueType(input string) (*IssueType, error) { - vals := map[string]IssueType{ - "agentstopped": IssueTypeAgentStopped, - "dnsresolution": IssueTypeDnsResolution, - "guestfirewall": IssueTypeGuestFirewall, - "networksecurityrule": IssueTypeNetworkSecurityRule, - "platform": IssueTypePlatform, - "portthrottled": IssueTypePortThrottled, - "socketbind": IssueTypeSocketBind, - "unknown": IssueTypeUnknown, - "userdefinedroute": IssueTypeUserDefinedRoute, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IssueType(input) - return &out, nil -} - -type NextHopType string - -const ( - NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" - NextHopTypeInternet NextHopType = "Internet" - NextHopTypeNone NextHopType = "None" - NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" - NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" - NextHopTypeVnetLocal NextHopType = "VnetLocal" -) - -func PossibleValuesForNextHopType() []string { - return []string{ - string(NextHopTypeHyperNetGateway), - string(NextHopTypeInternet), - string(NextHopTypeNone), - string(NextHopTypeVirtualAppliance), - string(NextHopTypeVirtualNetworkGateway), - string(NextHopTypeVnetLocal), - } -} - -func (s *NextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNextHopType(input string) (*NextHopType, error) { - vals := map[string]NextHopType{ - "hypernetgateway": NextHopTypeHyperNetGateway, - "internet": NextHopTypeInternet, - "none": NextHopTypeNone, - "virtualappliance": NextHopTypeVirtualAppliance, - "virtualnetworkgateway": NextHopTypeVirtualNetworkGateway, - "vnetlocal": NextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NextHopType(input) - return &out, nil -} - -type Origin string - -const ( - OriginInbound Origin = "Inbound" - OriginLocal Origin = "Local" - OriginOutbound Origin = "Outbound" -) - -func PossibleValuesForOrigin() []string { - return []string{ - string(OriginInbound), - string(OriginLocal), - string(OriginOutbound), - } -} - -func (s *Origin) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOrigin(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOrigin(input string) (*Origin, error) { - vals := map[string]Origin{ - "inbound": OriginInbound, - "local": OriginLocal, - "outbound": OriginOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Origin(input) - return &out, nil -} - -type Protocol string - -const ( - ProtocolHTTP Protocol = "Http" - ProtocolHTTPS Protocol = "Https" - ProtocolIcmp Protocol = "Icmp" - ProtocolTcp Protocol = "Tcp" -) - -func PossibleValuesForProtocol() []string { - return []string{ - string(ProtocolHTTP), - string(ProtocolHTTPS), - string(ProtocolIcmp), - string(ProtocolTcp), - } -} - -func (s *Protocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProtocol(input string) (*Protocol, error) { - vals := map[string]Protocol{ - "http": ProtocolHTTP, - "https": ProtocolHTTPS, - "icmp": ProtocolIcmp, - "tcp": ProtocolTcp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Protocol(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type Severity string - -const ( - SeverityError Severity = "Error" - SeverityWarning Severity = "Warning" -) - -func PossibleValuesForSeverity() []string { - return []string{ - string(SeverityError), - string(SeverityWarning), - } -} - -func (s *Severity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSeverity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSeverity(input string) (*Severity, error) { - vals := map[string]Severity{ - "error": SeverityError, - "warning": SeverityWarning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Severity(input) - return &out, nil -} - -type VerbosityLevel string - -const ( - VerbosityLevelFull VerbosityLevel = "Full" - VerbosityLevelMinimum VerbosityLevel = "Minimum" - VerbosityLevelNormal VerbosityLevel = "Normal" -) - -func PossibleValuesForVerbosityLevel() []string { - return []string{ - string(VerbosityLevelFull), - string(VerbosityLevelMinimum), - string(VerbosityLevelNormal), - } -} - -func (s *VerbosityLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVerbosityLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVerbosityLevel(input string) (*VerbosityLevel, error) { - vals := map[string]VerbosityLevel{ - "full": VerbosityLevelFull, - "minimum": VerbosityLevelMinimum, - "normal": VerbosityLevelNormal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VerbosityLevel(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/id_networkwatcher.go b/resource-manager/network/2022-11-01/networkwatchers/id_networkwatcher.go deleted file mode 100644 index 2cb57313a16..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package networkwatchers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/id_networkwatcher_test.go b/resource-manager/network/2022-11-01/networkwatchers/id_networkwatcher_test.go deleted file mode 100644 index 685f32fd1ec..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package networkwatchers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_checkconnectivity.go b/resource-manager/network/2022-11-01/networkwatchers/method_checkconnectivity.go deleted file mode 100644 index a73f25552b5..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_checkconnectivity.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckConnectivityOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CheckConnectivity ... -func (c NetworkWatchersClient) CheckConnectivity(ctx context.Context, id NetworkWatcherId, input ConnectivityParameters) (result CheckConnectivityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/connectivityCheck", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CheckConnectivityThenPoll performs CheckConnectivity then polls until it's completed -func (c NetworkWatchersClient) CheckConnectivityThenPoll(ctx context.Context, id NetworkWatcherId, input ConnectivityParameters) error { - result, err := c.CheckConnectivity(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CheckConnectivity: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CheckConnectivity: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_createorupdate.go b/resource-manager/network/2022-11-01/networkwatchers/method_createorupdate.go deleted file mode 100644 index 71f8f61017f..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkwatchers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcher -} - -// CreateOrUpdate ... -func (c NetworkWatchersClient) CreateOrUpdate(ctx context.Context, id NetworkWatcherId, input NetworkWatcher) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_delete.go b/resource-manager/network/2022-11-01/networkwatchers/method_delete.go deleted file mode 100644 index 4c59058ef03..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_delete.go +++ /dev/null @@ -1,70 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c NetworkWatchersClient) Delete(ctx context.Context, id NetworkWatcherId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c NetworkWatchersClient) DeleteThenPoll(ctx context.Context, id NetworkWatcherId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_get.go b/resource-manager/network/2022-11-01/networkwatchers/method_get.go deleted file mode 100644 index 02bf5a8e953..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package networkwatchers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcher -} - -// Get ... -func (c NetworkWatchersClient) Get(ctx context.Context, id NetworkWatcherId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_getazurereachabilityreport.go b/resource-manager/network/2022-11-01/networkwatchers/method_getazurereachabilityreport.go deleted file mode 100644 index dd101399d96..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_getazurereachabilityreport.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetAzureReachabilityReportOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetAzureReachabilityReport ... -func (c NetworkWatchersClient) GetAzureReachabilityReport(ctx context.Context, id NetworkWatcherId, input AzureReachabilityReportParameters) (result GetAzureReachabilityReportOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/azureReachabilityReport", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetAzureReachabilityReportThenPoll performs GetAzureReachabilityReport then polls until it's completed -func (c NetworkWatchersClient) GetAzureReachabilityReportThenPoll(ctx context.Context, id NetworkWatcherId, input AzureReachabilityReportParameters) error { - result, err := c.GetAzureReachabilityReport(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetAzureReachabilityReport: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetAzureReachabilityReport: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_getflowlogstatus.go b/resource-manager/network/2022-11-01/networkwatchers/method_getflowlogstatus.go deleted file mode 100644 index 940c5651390..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_getflowlogstatus.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetFlowLogStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetFlowLogStatus ... -func (c NetworkWatchersClient) GetFlowLogStatus(ctx context.Context, id NetworkWatcherId, input FlowLogStatusParameters) (result GetFlowLogStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryFlowLogStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetFlowLogStatusThenPoll performs GetFlowLogStatus then polls until it's completed -func (c NetworkWatchersClient) GetFlowLogStatusThenPoll(ctx context.Context, id NetworkWatcherId, input FlowLogStatusParameters) error { - result, err := c.GetFlowLogStatus(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetFlowLogStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetFlowLogStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_getnetworkconfigurationdiagnostic.go b/resource-manager/network/2022-11-01/networkwatchers/method_getnetworkconfigurationdiagnostic.go deleted file mode 100644 index 8a2434e53ae..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_getnetworkconfigurationdiagnostic.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetNetworkConfigurationDiagnosticOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetNetworkConfigurationDiagnostic ... -func (c NetworkWatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Context, id NetworkWatcherId, input NetworkConfigurationDiagnosticParameters) (result GetNetworkConfigurationDiagnosticOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/networkConfigurationDiagnostic", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetNetworkConfigurationDiagnosticThenPoll performs GetNetworkConfigurationDiagnostic then polls until it's completed -func (c NetworkWatchersClient) GetNetworkConfigurationDiagnosticThenPoll(ctx context.Context, id NetworkWatcherId, input NetworkConfigurationDiagnosticParameters) error { - result, err := c.GetNetworkConfigurationDiagnostic(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetNetworkConfigurationDiagnostic: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetNetworkConfigurationDiagnostic: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_getnexthop.go b/resource-manager/network/2022-11-01/networkwatchers/method_getnexthop.go deleted file mode 100644 index 4926381ad22..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_getnexthop.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetNextHopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetNextHop ... -func (c NetworkWatchersClient) GetNextHop(ctx context.Context, id NetworkWatcherId, input NextHopParameters) (result GetNextHopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/nextHop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetNextHopThenPoll performs GetNextHop then polls until it's completed -func (c NetworkWatchersClient) GetNextHopThenPoll(ctx context.Context, id NetworkWatcherId, input NextHopParameters) error { - result, err := c.GetNextHop(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetNextHop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetNextHop: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_gettopology.go b/resource-manager/network/2022-11-01/networkwatchers/method_gettopology.go deleted file mode 100644 index 7dd011942f7..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_gettopology.go +++ /dev/null @@ -1,56 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTopologyOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Topology -} - -// GetTopology ... -func (c NetworkWatchersClient) GetTopology(ctx context.Context, id NetworkWatcherId, input TopologyParameters) (result GetTopologyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/topology", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_gettroubleshooting.go b/resource-manager/network/2022-11-01/networkwatchers/method_gettroubleshooting.go deleted file mode 100644 index 603907c72b4..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_gettroubleshooting.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTroubleshootingOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetTroubleshooting ... -func (c NetworkWatchersClient) GetTroubleshooting(ctx context.Context, id NetworkWatcherId, input TroubleshootingParameters) (result GetTroubleshootingOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/troubleshoot", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetTroubleshootingThenPoll performs GetTroubleshooting then polls until it's completed -func (c NetworkWatchersClient) GetTroubleshootingThenPoll(ctx context.Context, id NetworkWatcherId, input TroubleshootingParameters) error { - result, err := c.GetTroubleshooting(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetTroubleshooting: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetTroubleshooting: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_gettroubleshootingresult.go b/resource-manager/network/2022-11-01/networkwatchers/method_gettroubleshootingresult.go deleted file mode 100644 index 280ad2a6f75..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_gettroubleshootingresult.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetTroubleshootingResultOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetTroubleshootingResult ... -func (c NetworkWatchersClient) GetTroubleshootingResult(ctx context.Context, id NetworkWatcherId, input QueryTroubleshootingParameters) (result GetTroubleshootingResultOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryTroubleshootResult", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetTroubleshootingResultThenPoll performs GetTroubleshootingResult then polls until it's completed -func (c NetworkWatchersClient) GetTroubleshootingResultThenPoll(ctx context.Context, id NetworkWatcherId, input QueryTroubleshootingParameters) error { - result, err := c.GetTroubleshootingResult(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetTroubleshootingResult: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetTroubleshootingResult: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_getvmsecurityrules.go b/resource-manager/network/2022-11-01/networkwatchers/method_getvmsecurityrules.go deleted file mode 100644 index 3fc37816b2b..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_getvmsecurityrules.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVMSecurityRulesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetVMSecurityRules ... -func (c NetworkWatchersClient) GetVMSecurityRules(ctx context.Context, id NetworkWatcherId, input SecurityGroupViewParameters) (result GetVMSecurityRulesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/securityGroupView", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetVMSecurityRulesThenPoll performs GetVMSecurityRules then polls until it's completed -func (c NetworkWatchersClient) GetVMSecurityRulesThenPoll(ctx context.Context, id NetworkWatcherId, input SecurityGroupViewParameters) error { - result, err := c.GetVMSecurityRules(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetVMSecurityRules: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetVMSecurityRules: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_list.go b/resource-manager/network/2022-11-01/networkwatchers/method_list.go deleted file mode 100644 index 6cb2b3f378e..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_list.go +++ /dev/null @@ -1,53 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcherListResult -} - -// List ... -func (c NetworkWatchersClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkWatchers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_listall.go b/resource-manager/network/2022-11-01/networkwatchers/method_listall.go deleted file mode 100644 index b50a401a869..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_listall.go +++ /dev/null @@ -1,53 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcherListResult -} - -// ListAll ... -func (c NetworkWatchersClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkWatchers", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_listavailableproviders.go b/resource-manager/network/2022-11-01/networkwatchers/method_listavailableproviders.go deleted file mode 100644 index aa0f4603a3d..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_listavailableproviders.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAvailableProvidersOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ListAvailableProviders ... -func (c NetworkWatchersClient) ListAvailableProviders(ctx context.Context, id NetworkWatcherId, input AvailableProvidersListParameters) (result ListAvailableProvidersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/availableProvidersList", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ListAvailableProvidersThenPoll performs ListAvailableProviders then polls until it's completed -func (c NetworkWatchersClient) ListAvailableProvidersThenPoll(ctx context.Context, id NetworkWatcherId, input AvailableProvidersListParameters) error { - result, err := c.ListAvailableProviders(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ListAvailableProviders: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ListAvailableProviders: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_setflowlogconfiguration.go b/resource-manager/network/2022-11-01/networkwatchers/method_setflowlogconfiguration.go deleted file mode 100644 index 49ad85bd00e..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_setflowlogconfiguration.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SetFlowLogConfigurationOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SetFlowLogConfiguration ... -func (c NetworkWatchersClient) SetFlowLogConfiguration(ctx context.Context, id NetworkWatcherId, input FlowLogInformation) (result SetFlowLogConfigurationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/configureFlowLog", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SetFlowLogConfigurationThenPoll performs SetFlowLogConfiguration then polls until it's completed -func (c NetworkWatchersClient) SetFlowLogConfigurationThenPoll(ctx context.Context, id NetworkWatcherId, input FlowLogInformation) error { - result, err := c.SetFlowLogConfiguration(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SetFlowLogConfiguration: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SetFlowLogConfiguration: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_updatetags.go b/resource-manager/network/2022-11-01/networkwatchers/method_updatetags.go deleted file mode 100644 index 6033f1aea8a..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package networkwatchers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkWatcher -} - -// UpdateTags ... -func (c NetworkWatchersClient) UpdateTags(ctx context.Context, id NetworkWatcherId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/method_verifyipflow.go b/resource-manager/network/2022-11-01/networkwatchers/method_verifyipflow.go deleted file mode 100644 index 9ffd4b8b7f6..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/method_verifyipflow.go +++ /dev/null @@ -1,74 +0,0 @@ -package networkwatchers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VerifyIPFlowOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VerifyIPFlow ... -func (c NetworkWatchersClient) VerifyIPFlow(ctx context.Context, id NetworkWatcherId, input VerificationIPFlowParameters) (result VerifyIPFlowOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/ipFlowVerify", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VerifyIPFlowThenPoll performs VerifyIPFlow then polls until it's completed -func (c NetworkWatchersClient) VerifyIPFlowThenPoll(ctx context.Context, id NetworkWatcherId, input VerificationIPFlowParameters) error { - result, err := c.VerifyIPFlow(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VerifyIPFlow: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VerifyIPFlow: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/networkwatchers/model_applicationsecuritygroup.go deleted file mode 100644 index d93456b39dc..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/networkwatchers/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 1edb4c6e9fd..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslist.go b/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslist.go deleted file mode 100644 index f97306f3eb4..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslist.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersList struct { - Countries []AvailableProvidersListCountry `json:"countries"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistcity.go b/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistcity.go deleted file mode 100644 index ad5727a8ad0..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistcity.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersListCity struct { - CityName *string `json:"cityName,omitempty"` - Providers *[]string `json:"providers,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistcountry.go b/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistcountry.go deleted file mode 100644 index 98f3996ac17..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistcountry.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersListCountry struct { - CountryName *string `json:"countryName,omitempty"` - Providers *[]string `json:"providers,omitempty"` - States *[]AvailableProvidersListState `json:"states,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistparameters.go deleted file mode 100644 index e884f5cdb40..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_availableproviderslistparameters.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersListParameters struct { - AzureLocations *[]string `json:"azureLocations,omitempty"` - City *string `json:"city,omitempty"` - Country *string `json:"country,omitempty"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_availableprovidersliststate.go b/resource-manager/network/2022-11-01/networkwatchers/model_availableprovidersliststate.go deleted file mode 100644 index 3504bafbcf0..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_availableprovidersliststate.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailableProvidersListState struct { - Cities *[]AvailableProvidersListCity `json:"cities,omitempty"` - Providers *[]string `json:"providers,omitempty"` - StateName *string `json:"stateName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreport.go b/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreport.go deleted file mode 100644 index e045a1522bc..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreport.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReport struct { - AggregationLevel string `json:"aggregationLevel"` - ProviderLocation AzureReachabilityReportLocation `json:"providerLocation"` - ReachabilityReport []AzureReachabilityReportItem `json:"reachabilityReport"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportitem.go b/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportitem.go deleted file mode 100644 index 50e7da37b25..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportitem.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReportItem struct { - AzureLocation *string `json:"azureLocation,omitempty"` - Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` - Provider *string `json:"provider,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportlatencyinfo.go b/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportlatencyinfo.go deleted file mode 100644 index 6755737d707..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportlatencyinfo.go +++ /dev/null @@ -1,27 +0,0 @@ -package networkwatchers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReportLatencyInfo struct { - Score *int64 `json:"score,omitempty"` - TimeStamp *string `json:"timeStamp,omitempty"` -} - -func (o *AzureReachabilityReportLatencyInfo) GetTimeStampAsTime() (*time.Time, error) { - if o.TimeStamp == nil { - return nil, nil - } - return dates.ParseAsFormat(o.TimeStamp, "2006-01-02T15:04:05Z07:00") -} - -func (o *AzureReachabilityReportLatencyInfo) SetTimeStampAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.TimeStamp = &formatted -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportlocation.go b/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportlocation.go deleted file mode 100644 index 15b7ba2a6ee..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportlocation.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReportLocation struct { - City *string `json:"city,omitempty"` - Country string `json:"country"` - State *string `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportparameters.go deleted file mode 100644 index 81d91ee2074..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_azurereachabilityreportparameters.go +++ /dev/null @@ -1,36 +0,0 @@ -package networkwatchers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureReachabilityReportParameters struct { - AzureLocations *[]string `json:"azureLocations,omitempty"` - EndTime string `json:"endTime"` - ProviderLocation AzureReachabilityReportLocation `json:"providerLocation"` - Providers *[]string `json:"providers,omitempty"` - StartTime string `json:"startTime"` -} - -func (o *AzureReachabilityReportParameters) GetEndTimeAsTime() (*time.Time, error) { - return dates.ParseAsFormat(&o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AzureReachabilityReportParameters) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = formatted -} - -func (o *AzureReachabilityReportParameters) GetStartTimeAsTime() (*time.Time, error) { - return dates.ParseAsFormat(&o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *AzureReachabilityReportParameters) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = formatted -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_connectivitydestination.go b/resource-manager/network/2022-11-01/networkwatchers/model_connectivitydestination.go deleted file mode 100644 index fd92ab947d7..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_connectivitydestination.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityDestination struct { - Address *string `json:"address,omitempty"` - Port *int64 `json:"port,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_connectivityhop.go b/resource-manager/network/2022-11-01/networkwatchers/model_connectivityhop.go deleted file mode 100644 index b199aef7d99..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_connectivityhop.go +++ /dev/null @@ -1,16 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityHop struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` - Issues *[]ConnectivityIssue `json:"issues,omitempty"` - Links *[]HopLink `json:"links,omitempty"` - NextHopIds *[]string `json:"nextHopIds,omitempty"` - PreviousHopIds *[]string `json:"previousHopIds,omitempty"` - PreviousLinks *[]HopLink `json:"previousLinks,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_connectivityinformation.go b/resource-manager/network/2022-11-01/networkwatchers/model_connectivityinformation.go deleted file mode 100644 index 0ce37ca8e82..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_connectivityinformation.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityInformation struct { - AvgLatencyInMs *int64 `json:"avgLatencyInMs,omitempty"` - ConnectionStatus *ConnectionStatus `json:"connectionStatus,omitempty"` - Hops *[]ConnectivityHop `json:"hops,omitempty"` - MaxLatencyInMs *int64 `json:"maxLatencyInMs,omitempty"` - MinLatencyInMs *int64 `json:"minLatencyInMs,omitempty"` - ProbesFailed *int64 `json:"probesFailed,omitempty"` - ProbesSent *int64 `json:"probesSent,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_connectivityissue.go b/resource-manager/network/2022-11-01/networkwatchers/model_connectivityissue.go deleted file mode 100644 index ba9f23e149c..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_connectivityissue.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityIssue struct { - Context *[]map[string]string `json:"context,omitempty"` - Origin *Origin `json:"origin,omitempty"` - Severity *Severity `json:"severity,omitempty"` - Type *IssueType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_connectivityparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_connectivityparameters.go deleted file mode 100644 index 2fd0eea7e96..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_connectivityparameters.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivityParameters struct { - Destination ConnectivityDestination `json:"destination"` - PreferredIPVersion *IPVersion `json:"preferredIPVersion,omitempty"` - Protocol *Protocol `json:"protocol,omitempty"` - ProtocolConfiguration *ProtocolConfiguration `json:"protocolConfiguration,omitempty"` - Source ConnectivitySource `json:"source"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_connectivitysource.go b/resource-manager/network/2022-11-01/networkwatchers/model_connectivitysource.go deleted file mode 100644 index 471f2e79c48..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_connectivitysource.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectivitySource struct { - Port *int64 `json:"port,omitempty"` - ResourceId string `json:"resourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_effectivenetworksecurityrule.go b/resource-manager/network/2022-11-01/networkwatchers/model_effectivenetworksecurityrule.go deleted file mode 100644 index 738fb4c583d..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_effectivenetworksecurityrule.go +++ /dev/null @@ -1,22 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveNetworkSecurityRule struct { - Access *SecurityRuleAccess `json:"access,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction *SecurityRuleDirection `json:"direction,omitempty"` - ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` - ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` - Name *string `json:"name,omitempty"` - Priority *int64 `json:"priority,omitempty"` - Protocol *EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_evaluatednetworksecuritygroup.go b/resource-manager/network/2022-11-01/networkwatchers/model_evaluatednetworksecuritygroup.go deleted file mode 100644 index c471d60f7c3..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_evaluatednetworksecuritygroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EvaluatedNetworkSecurityGroup struct { - AppliedTo *string `json:"appliedTo,omitempty"` - MatchedRule *MatchedRule `json:"matchedRule,omitempty"` - NetworkSecurityGroupId *string `json:"networkSecurityGroupId,omitempty"` - RulesEvaluationResult *[]NetworkSecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_flowlogformatparameters.go deleted file mode 100644 index 804e14368ee..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_flowloginformation.go b/resource-manager/network/2022-11-01/networkwatchers/model_flowloginformation.go deleted file mode 100644 index e624cdf59fe..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_flowloginformation.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogInformation struct { - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Properties FlowLogProperties `json:"properties"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_flowlogproperties.go b/resource-manager/network/2022-11-01/networkwatchers/model_flowlogproperties.go deleted file mode 100644 index c51e0fd967e..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_flowlogproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogProperties struct { - Enabled bool `json:"enabled"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_flowlogstatusparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_flowlogstatusparameters.go deleted file mode 100644 index 7adddbce138..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_flowlogstatusparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogStatusParameters struct { - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_hoplink.go b/resource-manager/network/2022-11-01/networkwatchers/model_hoplink.go deleted file mode 100644 index ad0c1a88c32..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_hoplink.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HopLink struct { - Context *map[string]string `json:"context,omitempty"` - Issues *[]ConnectivityIssue `json:"issues,omitempty"` - LinkType *string `json:"linkType,omitempty"` - NextHopId *string `json:"nextHopId,omitempty"` - Properties *HopLinkProperties `json:"properties,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_hoplinkproperties.go b/resource-manager/network/2022-11-01/networkwatchers/model_hoplinkproperties.go deleted file mode 100644 index efce6d24581..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_hoplinkproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HopLinkProperties struct { - RoundTripTimeAvg *int64 `json:"roundTripTimeAvg,omitempty"` - RoundTripTimeMax *int64 `json:"roundTripTimeMax,omitempty"` - RoundTripTimeMin *int64 `json:"roundTripTimeMin,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_httpconfiguration.go b/resource-manager/network/2022-11-01/networkwatchers/model_httpconfiguration.go deleted file mode 100644 index e469c4b2e2a..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_httpconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HTTPConfiguration struct { - Headers *[]HTTPHeader `json:"headers,omitempty"` - Method *HTTPMethod `json:"method,omitempty"` - ValidStatusCodes *[]int64 `json:"validStatusCodes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_httpheader.go b/resource-manager/network/2022-11-01/networkwatchers/model_httpheader.go deleted file mode 100644 index 5f0b41332f3..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_httpheader.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HTTPHeader struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_matchedrule.go b/resource-manager/network/2022-11-01/networkwatchers/model_matchedrule.go deleted file mode 100644 index 7ccb0bf4ff1..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_matchedrule.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MatchedRule struct { - Action *string `json:"action,omitempty"` - RuleName *string `json:"ruleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticparameters.go deleted file mode 100644 index 62d57417ce8..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkConfigurationDiagnosticParameters struct { - Profiles []NetworkConfigurationDiagnosticProfile `json:"profiles"` - TargetResourceId string `json:"targetResourceId"` - VerbosityLevel *VerbosityLevel `json:"verbosityLevel,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticprofile.go b/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticprofile.go deleted file mode 100644 index 2591d3cb1bc..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkConfigurationDiagnosticProfile struct { - Destination string `json:"destination"` - DestinationPort string `json:"destinationPort"` - Direction Direction `json:"direction"` - Protocol string `json:"protocol"` - Source string `json:"source"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticresponse.go b/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticresponse.go deleted file mode 100644 index a30c9686e57..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkConfigurationDiagnosticResponse struct { - Results *[]NetworkConfigurationDiagnosticResult `json:"results,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticresult.go b/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticresult.go deleted file mode 100644 index c0c796377f7..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networkconfigurationdiagnosticresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkConfigurationDiagnosticResult struct { - NetworkSecurityGroupResult *NetworkSecurityGroupResult `json:"networkSecurityGroupResult,omitempty"` - Profile *NetworkConfigurationDiagnosticProfile `json:"profile,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networkinterfaceassociation.go b/resource-manager/network/2022-11-01/networkwatchers/model_networkinterfaceassociation.go deleted file mode 100644 index 0583e0225fd..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networkinterfaceassociation.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceAssociation struct { - Id *string `json:"id,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networksecuritygroupresult.go b/resource-manager/network/2022-11-01/networkwatchers/model_networksecuritygroupresult.go deleted file mode 100644 index 60f125dff53..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networksecuritygroupresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupResult struct { - EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"` - SecurityRuleAccessResult *SecurityRuleAccess `json:"securityRuleAccessResult,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networksecurityrulesevaluationresult.go b/resource-manager/network/2022-11-01/networkwatchers/model_networksecurityrulesevaluationresult.go deleted file mode 100644 index c54e4c0dc86..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networksecurityrulesevaluationresult.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityRulesEvaluationResult struct { - DestinationMatched *bool `json:"destinationMatched,omitempty"` - DestinationPortMatched *bool `json:"destinationPortMatched,omitempty"` - Name *string `json:"name,omitempty"` - ProtocolMatched *bool `json:"protocolMatched,omitempty"` - SourceMatched *bool `json:"sourceMatched,omitempty"` - SourcePortMatched *bool `json:"sourcePortMatched,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networkwatcher.go b/resource-manager/network/2022-11-01/networkwatchers/model_networkwatcher.go deleted file mode 100644 index 4f58f1863d8..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networkwatcher.go +++ /dev/null @@ -1,14 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatcher struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkWatcherPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networkwatcherlistresult.go b/resource-manager/network/2022-11-01/networkwatchers/model_networkwatcherlistresult.go deleted file mode 100644 index b78fc59bf86..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networkwatcherlistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatcherListResult struct { - Value *[]NetworkWatcher `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_networkwatcherpropertiesformat.go b/resource-manager/network/2022-11-01/networkwatchers/model_networkwatcherpropertiesformat.go deleted file mode 100644 index d0d1c07ed9e..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_networkwatcherpropertiesformat.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatcherPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_nexthopparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_nexthopparameters.go deleted file mode 100644 index b8a7b00f4f3..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_nexthopparameters.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NextHopParameters struct { - DestinationIPAddress string `json:"destinationIPAddress"` - SourceIPAddress string `json:"sourceIPAddress"` - TargetNicResourceId *string `json:"targetNicResourceId,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_nexthopresult.go b/resource-manager/network/2022-11-01/networkwatchers/model_nexthopresult.go deleted file mode 100644 index a8a2ba32b01..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_nexthopresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NextHopResult struct { - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType *NextHopType `json:"nextHopType,omitempty"` - RouteTableId *string `json:"routeTableId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_protocolconfiguration.go b/resource-manager/network/2022-11-01/networkwatchers/model_protocolconfiguration.go deleted file mode 100644 index e4592ed2fe5..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_protocolconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProtocolConfiguration struct { - HTTPConfiguration *HTTPConfiguration `json:"HTTPConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_querytroubleshootingparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_querytroubleshootingparameters.go deleted file mode 100644 index d6bf4abce2c..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_querytroubleshootingparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type QueryTroubleshootingParameters struct { - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_retentionpolicyparameters.go deleted file mode 100644 index 64b952abec0..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_securitygroupnetworkinterface.go b/resource-manager/network/2022-11-01/networkwatchers/model_securitygroupnetworkinterface.go deleted file mode 100644 index e22bcd0a9ed..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_securitygroupnetworkinterface.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupNetworkInterface struct { - Id *string `json:"id,omitempty"` - SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_securitygroupviewparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_securitygroupviewparameters.go deleted file mode 100644 index 9cbdf854c96..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_securitygroupviewparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupViewParameters struct { - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_securitygroupviewresult.go b/resource-manager/network/2022-11-01/networkwatchers/model_securitygroupviewresult.go deleted file mode 100644 index eff95f05919..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_securitygroupviewresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityGroupViewResult struct { - NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_securityrule.go b/resource-manager/network/2022-11-01/networkwatchers/model_securityrule.go deleted file mode 100644 index c1dded9fca0..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_securityruleassociations.go b/resource-manager/network/2022-11-01/networkwatchers/model_securityruleassociations.go deleted file mode 100644 index 0ce7cc68a9c..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_securityruleassociations.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRuleAssociations struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` - NetworkInterfaceAssociation *NetworkInterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` - SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/networkwatchers/model_securityrulepropertiesformat.go deleted file mode 100644 index ae100c6915e..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_subnetassociation.go b/resource-manager/network/2022-11-01/networkwatchers/model_subnetassociation.go deleted file mode 100644 index 8b89222ca9e..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_subnetassociation.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetAssociation struct { - Id *string `json:"id,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_subresource.go b/resource-manager/network/2022-11-01/networkwatchers/model_subresource.go deleted file mode 100644 index b98b68a29dd..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_tagsobject.go b/resource-manager/network/2022-11-01/networkwatchers/model_tagsobject.go deleted file mode 100644 index f022d1785d9..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_topology.go b/resource-manager/network/2022-11-01/networkwatchers/model_topology.go deleted file mode 100644 index c582a36ae6c..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_topology.go +++ /dev/null @@ -1,41 +0,0 @@ -package networkwatchers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Topology struct { - CreatedDateTime *string `json:"createdDateTime,omitempty"` - Id *string `json:"id,omitempty"` - LastModified *string `json:"lastModified,omitempty"` - Resources *[]TopologyResource `json:"resources,omitempty"` -} - -func (o *Topology) GetCreatedDateTimeAsTime() (*time.Time, error) { - if o.CreatedDateTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CreatedDateTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *Topology) SetCreatedDateTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CreatedDateTime = &formatted -} - -func (o *Topology) GetLastModifiedAsTime() (*time.Time, error) { - if o.LastModified == nil { - return nil, nil - } - return dates.ParseAsFormat(o.LastModified, "2006-01-02T15:04:05Z07:00") -} - -func (o *Topology) SetLastModifiedAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.LastModified = &formatted -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_topologyassociation.go b/resource-manager/network/2022-11-01/networkwatchers/model_topologyassociation.go deleted file mode 100644 index 9607c85650b..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_topologyassociation.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TopologyAssociation struct { - AssociationType *AssociationType `json:"associationType,omitempty"` - Name *string `json:"name,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_topologyparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_topologyparameters.go deleted file mode 100644 index 25bc77b5345..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_topologyparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TopologyParameters struct { - TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` - TargetSubnet *SubResource `json:"targetSubnet,omitempty"` - TargetVirtualNetwork *SubResource `json:"targetVirtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_topologyresource.go b/resource-manager/network/2022-11-01/networkwatchers/model_topologyresource.go deleted file mode 100644 index e126c541c8e..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_topologyresource.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TopologyResource struct { - Associations *[]TopologyAssociation `json:"associations,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/networkwatchers/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 63df321f46e..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/networkwatchers/model_trafficanalyticsproperties.go deleted file mode 100644 index 415ca1a8f5e..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingdetails.go b/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingdetails.go deleted file mode 100644 index 2bc7443b168..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingdetails.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingDetails struct { - Detail *string `json:"detail,omitempty"` - Id *string `json:"id,omitempty"` - ReasonType *string `json:"reasonType,omitempty"` - RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` - Summary *string `json:"summary,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingparameters.go deleted file mode 100644 index 5ee881c84a7..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingParameters struct { - Properties TroubleshootingProperties `json:"properties"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingproperties.go b/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingproperties.go deleted file mode 100644 index 8d187050a32..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingProperties struct { - StorageId string `json:"storageId"` - StoragePath string `json:"storagePath"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingrecommendedactions.go b/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingrecommendedactions.go deleted file mode 100644 index c4e5781e659..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingrecommendedactions.go +++ /dev/null @@ -1,11 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingRecommendedActions struct { - ActionId *string `json:"actionId,omitempty"` - ActionText *string `json:"actionText,omitempty"` - ActionUri *string `json:"actionUri,omitempty"` - ActionUriText *string `json:"actionUriText,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingresult.go b/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingresult.go deleted file mode 100644 index 62df62353d2..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_troubleshootingresult.go +++ /dev/null @@ -1,41 +0,0 @@ -package networkwatchers - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TroubleshootingResult struct { - Code *string `json:"code,omitempty"` - EndTime *string `json:"endTime,omitempty"` - Results *[]TroubleshootingDetails `json:"results,omitempty"` - StartTime *string `json:"startTime,omitempty"` -} - -func (o *TroubleshootingResult) GetEndTimeAsTime() (*time.Time, error) { - if o.EndTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.EndTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *TroubleshootingResult) SetEndTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.EndTime = &formatted -} - -func (o *TroubleshootingResult) GetStartTimeAsTime() (*time.Time, error) { - if o.StartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.StartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *TroubleshootingResult) SetStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.StartTime = &formatted -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_verificationipflowparameters.go b/resource-manager/network/2022-11-01/networkwatchers/model_verificationipflowparameters.go deleted file mode 100644 index 05165f3ed26..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_verificationipflowparameters.go +++ /dev/null @@ -1,15 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VerificationIPFlowParameters struct { - Direction Direction `json:"direction"` - LocalIPAddress string `json:"localIPAddress"` - LocalPort string `json:"localPort"` - Protocol IPFlowProtocol `json:"protocol"` - RemoteIPAddress string `json:"remoteIPAddress"` - RemotePort string `json:"remotePort"` - TargetNicResourceId *string `json:"targetNicResourceId,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/model_verificationipflowresult.go b/resource-manager/network/2022-11-01/networkwatchers/model_verificationipflowresult.go deleted file mode 100644 index 97318928bd8..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/model_verificationipflowresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package networkwatchers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VerificationIPFlowResult struct { - Access *Access `json:"access,omitempty"` - RuleName *string `json:"ruleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/networkwatchers/version.go b/resource-manager/network/2022-11-01/networkwatchers/version.go deleted file mode 100644 index 7bbc3d0663a..00000000000 --- a/resource-manager/network/2022-11-01/networkwatchers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package networkwatchers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/networkwatchers/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/README.md b/resource-manager/network/2022-11-01/p2svpngateways/README.md deleted file mode 100644 index 1f61e9e730c..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/README.md +++ /dev/null @@ -1,112 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/p2svpngateways` Documentation - -The `p2svpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/p2svpngateways" -``` - - -### Client Initialization - -```go -client := p2svpngateways.NewP2sVpnGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `P2sVpnGatewaysClient.DisconnectP2sVpnConnections` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := p2svpngateways.P2SVpnConnectionRequest{ - // ... -} - - -if err := client.DisconnectP2sVpnConnectionsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.GenerateVpnProfile` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := p2svpngateways.P2SVpnProfileParameters{ - // ... -} - - -if err := client.GenerateVpnProfileThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.GetP2sVpnConnectionHealth` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -if err := client.GetP2sVpnConnectionHealthThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.GetP2sVpnConnectionHealthDetailed` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := p2svpngateways.P2SVpnConnectionHealthRequest{ - // ... -} - - -if err := client.GetP2sVpnConnectionHealthDetailedThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.Reset` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -if err := client.ResetThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `P2sVpnGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := p2svpngateways.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := p2svpngateways.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/p2svpngateways/client.go b/resource-manager/network/2022-11-01/p2svpngateways/client.go deleted file mode 100644 index 893958568c2..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package p2svpngateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewP2sVpnGatewaysClientWithBaseURI(api environments.Api) (*P2sVpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "p2svpngateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating P2sVpnGatewaysClient: %+v", err) - } - - return &P2sVpnGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/constants.go b/resource-manager/network/2022-11-01/p2svpngateways/constants.go deleted file mode 100644 index e0d727fd608..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/constants.go +++ /dev/null @@ -1,183 +0,0 @@ -package p2svpngateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationMethod string - -const ( - AuthenticationMethodEAPMSCHAPvTwo AuthenticationMethod = "EAPMSCHAPv2" - AuthenticationMethodEAPTLS AuthenticationMethod = "EAPTLS" -) - -func PossibleValuesForAuthenticationMethod() []string { - return []string{ - string(AuthenticationMethodEAPMSCHAPvTwo), - string(AuthenticationMethodEAPTLS), - } -} - -func (s *AuthenticationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationMethod(input string) (*AuthenticationMethod, error) { - vals := map[string]AuthenticationMethod{ - "eapmschapv2": AuthenticationMethodEAPMSCHAPvTwo, - "eaptls": AuthenticationMethodEAPTLS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationMethod(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/method_disconnectp2svpnconnections.go b/resource-manager/network/2022-11-01/p2svpngateways/method_disconnectp2svpnconnections.go deleted file mode 100644 index c7746ee57d0..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/method_disconnectp2svpnconnections.go +++ /dev/null @@ -1,75 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DisconnectP2sVpnConnectionsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DisconnectP2sVpnConnections ... -func (c P2sVpnGatewaysClient) DisconnectP2sVpnConnections(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnConnectionRequest) (result DisconnectP2sVpnConnectionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/disconnectP2sVpnConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DisconnectP2sVpnConnectionsThenPoll performs DisconnectP2sVpnConnections then polls until it's completed -func (c P2sVpnGatewaysClient) DisconnectP2sVpnConnectionsThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnConnectionRequest) error { - result, err := c.DisconnectP2sVpnConnections(ctx, id, input) - if err != nil { - return fmt.Errorf("performing DisconnectP2sVpnConnections: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DisconnectP2sVpnConnections: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/method_generatevpnprofile.go b/resource-manager/network/2022-11-01/p2svpngateways/method_generatevpnprofile.go deleted file mode 100644 index 3370a813619..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/method_generatevpnprofile.go +++ /dev/null @@ -1,75 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateVpnProfileOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GenerateVpnProfile ... -func (c P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnProfileParameters) (result GenerateVpnProfileOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generatevpnprofile", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GenerateVpnProfileThenPoll performs GenerateVpnProfile then polls until it's completed -func (c P2sVpnGatewaysClient) GenerateVpnProfileThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnProfileParameters) error { - result, err := c.GenerateVpnProfile(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GenerateVpnProfile: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GenerateVpnProfile: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/method_getp2svpnconnectionhealth.go b/resource-manager/network/2022-11-01/p2svpngateways/method_getp2svpnconnectionhealth.go deleted file mode 100644 index cb52ffa29e7..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/method_getp2svpnconnectionhealth.go +++ /dev/null @@ -1,71 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetP2sVpnConnectionHealthOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetP2sVpnConnectionHealth ... -func (c P2sVpnGatewaysClient) GetP2sVpnConnectionHealth(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) (result GetP2sVpnConnectionHealthOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getP2sVpnConnectionHealth", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetP2sVpnConnectionHealthThenPoll performs GetP2sVpnConnectionHealth then polls until it's completed -func (c P2sVpnGatewaysClient) GetP2sVpnConnectionHealthThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) error { - result, err := c.GetP2sVpnConnectionHealth(ctx, id) - if err != nil { - return fmt.Errorf("performing GetP2sVpnConnectionHealth: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetP2sVpnConnectionHealth: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/method_getp2svpnconnectionhealthdetailed.go b/resource-manager/network/2022-11-01/p2svpngateways/method_getp2svpnconnectionhealthdetailed.go deleted file mode 100644 index 4d77cdd5c2f..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/method_getp2svpnconnectionhealthdetailed.go +++ /dev/null @@ -1,75 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetP2sVpnConnectionHealthDetailedOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetP2sVpnConnectionHealthDetailed ... -func (c P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailed(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnConnectionHealthRequest) (result GetP2sVpnConnectionHealthDetailedOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getP2sVpnConnectionHealthDetailed", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetP2sVpnConnectionHealthDetailedThenPoll performs GetP2sVpnConnectionHealthDetailed then polls until it's completed -func (c P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnConnectionHealthRequest) error { - result, err := c.GetP2sVpnConnectionHealthDetailed(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GetP2sVpnConnectionHealthDetailed: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetP2sVpnConnectionHealthDetailed: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/method_reset.go b/resource-manager/network/2022-11-01/p2svpngateways/method_reset.go deleted file mode 100644 index 0c1edf99dbe..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/method_reset.go +++ /dev/null @@ -1,71 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Reset ... -func (c P2sVpnGatewaysClient) Reset(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) (result ResetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/reset", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetThenPoll performs Reset then polls until it's completed -func (c P2sVpnGatewaysClient) ResetThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) error { - result, err := c.Reset(ctx, id) - if err != nil { - return fmt.Errorf("performing Reset: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Reset: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/method_updatetags.go b/resource-manager/network/2022-11-01/p2svpngateways/method_updatetags.go deleted file mode 100644 index 09fa908bc39..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/method_updatetags.go +++ /dev/null @@ -1,75 +0,0 @@ -package p2svpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c P2sVpnGatewaysClient) UpdateTags(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c P2sVpnGatewaysClient) UpdateTagsThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_addressspace.go b/resource-manager/network/2022-11-01/p2svpngateways/model_addressspace.go deleted file mode 100644 index 7c79876f047..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_p2sconnectionconfiguration.go b/resource-manager/network/2022-11-01/p2svpngateways/model_p2sconnectionconfiguration.go deleted file mode 100644 index 278f2d7145d..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_p2sconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *P2SConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_p2sconnectionconfigurationproperties.go b/resource-manager/network/2022-11-01/p2svpngateways/model_p2sconnectionconfigurationproperties.go deleted file mode 100644 index 33a16482774..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_p2sconnectionconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfigurationProperties struct { - ConfigurationPolicyGroupAssociations *[]SubResource `json:"configurationPolicyGroupAssociations,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - PreviousConfigurationPolicyGroupAssociations *[]VpnServerConfigurationPolicyGroup `json:"previousConfigurationPolicyGroupAssociations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionhealth.go b/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionhealth.go deleted file mode 100644 index 42b227bbf63..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionhealth.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnConnectionHealth struct { - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionhealthrequest.go b/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionhealthrequest.go deleted file mode 100644 index d0cd806bd05..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionhealthrequest.go +++ /dev/null @@ -1,9 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnConnectionHealthRequest struct { - OutputBlobSasUrl *string `json:"outputBlobSasUrl,omitempty"` - VpnUserNamesFilter *[]string `json:"vpnUserNamesFilter,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionrequest.go b/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionrequest.go deleted file mode 100644 index f7b746fc648..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnconnectionrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnConnectionRequest struct { - VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpngateway.go b/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpngateway.go deleted file mode 100644 index 9dfde1858d2..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *P2SVpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpngatewayproperties.go b/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpngatewayproperties.go deleted file mode 100644 index 6099821abd6..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpngatewayproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGatewayProperties struct { - CustomDnsServers *[]string `json:"customDnsServers,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` - VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnprofileparameters.go b/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnprofileparameters.go deleted file mode 100644 index 7f798f2ae40..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_p2svpnprofileparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnProfileParameters struct { - AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_propagatedroutetable.go b/resource-manager/network/2022-11-01/p2svpngateways/model_propagatedroutetable.go deleted file mode 100644 index f137f52cc84..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_routingconfiguration.go b/resource-manager/network/2022-11-01/p2svpngateways/model_routingconfiguration.go deleted file mode 100644 index abe87c9515c..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_staticroute.go b/resource-manager/network/2022-11-01/p2svpngateways/model_staticroute.go deleted file mode 100644 index 0a7ee0c9c99..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_staticroutesconfig.go b/resource-manager/network/2022-11-01/p2svpngateways/model_staticroutesconfig.go deleted file mode 100644 index 063926c25d3..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_subresource.go b/resource-manager/network/2022-11-01/p2svpngateways/model_subresource.go deleted file mode 100644 index 80d7b205b99..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_tagsobject.go b/resource-manager/network/2022-11-01/p2svpngateways/model_tagsobject.go deleted file mode 100644 index f314ca6d15c..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_vnetroute.go b/resource-manager/network/2022-11-01/p2svpngateways/model_vnetroute.go deleted file mode 100644 index 445ec97bfa1..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnclientconnectionhealth.go b/resource-manager/network/2022-11-01/p2svpngateways/model_vpnclientconnectionhealth.go deleted file mode 100644 index fb3596341d9..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnclientconnectionhealth.go +++ /dev/null @@ -1,11 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealth struct { - AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"` - TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"` - TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"` - VpnClientConnectionsCount *int64 `json:"vpnClientConnectionsCount,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnprofileresponse.go b/resource-manager/network/2022-11-01/p2svpngateways/model_vpnprofileresponse.go deleted file mode 100644 index 55f4d81d16c..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnprofileresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnProfileResponse struct { - ProfileUrl *string `json:"profileUrl,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroup.go b/resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroup.go deleted file mode 100644 index fe026c0a264..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationPolicyGroupProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroupmember.go b/resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroupmember.go deleted file mode 100644 index cebb5053164..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroupproperties.go b/resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroupproperties.go deleted file mode 100644 index f7a9edb1a56..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/model_vpnserverconfigurationpolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package p2svpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupProperties struct { - IsDefault *bool `json:"isDefault,omitempty"` - P2SConnectionConfigurations *[]SubResource `json:"p2SConnectionConfigurations,omitempty"` - PolicyMembers *[]VpnServerConfigurationPolicyGroupMember `json:"policyMembers,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/p2svpngateways/version.go b/resource-manager/network/2022-11-01/p2svpngateways/version.go deleted file mode 100644 index 7492b78c40d..00000000000 --- a/resource-manager/network/2022-11-01/p2svpngateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package p2svpngateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/p2svpngateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/README.md b/resource-manager/network/2022-11-01/packetcaptures/README.md deleted file mode 100644 index ca43e5aed99..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/README.md +++ /dev/null @@ -1,105 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/packetcaptures` Documentation - -The `packetcaptures` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/packetcaptures" -``` - - -### Client Initialization - -```go -client := packetcaptures.NewPacketCapturesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PacketCapturesClient.Create` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -payload := packetcaptures.PacketCapture{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PacketCapturesClient.Delete` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PacketCapturesClient.Get` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PacketCapturesClient.GetStatus` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -if err := client.GetStatusThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PacketCapturesClient.List` - -```go -ctx := context.TODO() -id := packetcaptures.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PacketCapturesClient.Stop` - -```go -ctx := context.TODO() -id := packetcaptures.NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - -if err := client.StopThenPoll(ctx, id); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/packetcaptures/client.go b/resource-manager/network/2022-11-01/packetcaptures/client.go deleted file mode 100644 index 0a4a3398869..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package packetcaptures - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCapturesClient struct { - Client *resourcemanager.Client -} - -func NewPacketCapturesClientWithBaseURI(api environments.Api) (*PacketCapturesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "packetcaptures", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PacketCapturesClient: %+v", err) - } - - return &PacketCapturesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/constants.go b/resource-manager/network/2022-11-01/packetcaptures/constants.go deleted file mode 100644 index 52471a03c9e..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/constants.go +++ /dev/null @@ -1,242 +0,0 @@ -package packetcaptures - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureTargetType string - -const ( - PacketCaptureTargetTypeAzureVM PacketCaptureTargetType = "AzureVM" - PacketCaptureTargetTypeAzureVMSS PacketCaptureTargetType = "AzureVMSS" -) - -func PossibleValuesForPacketCaptureTargetType() []string { - return []string{ - string(PacketCaptureTargetTypeAzureVM), - string(PacketCaptureTargetTypeAzureVMSS), - } -} - -func (s *PacketCaptureTargetType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePacketCaptureTargetType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePacketCaptureTargetType(input string) (*PacketCaptureTargetType, error) { - vals := map[string]PacketCaptureTargetType{ - "azurevm": PacketCaptureTargetTypeAzureVM, - "azurevmss": PacketCaptureTargetTypeAzureVMSS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PacketCaptureTargetType(input) - return &out, nil -} - -type PcError string - -const ( - PcErrorAgentStopped PcError = "AgentStopped" - PcErrorCaptureFailed PcError = "CaptureFailed" - PcErrorInternalError PcError = "InternalError" - PcErrorLocalFileFailed PcError = "LocalFileFailed" - PcErrorStorageFailed PcError = "StorageFailed" -) - -func PossibleValuesForPcError() []string { - return []string{ - string(PcErrorAgentStopped), - string(PcErrorCaptureFailed), - string(PcErrorInternalError), - string(PcErrorLocalFileFailed), - string(PcErrorStorageFailed), - } -} - -func (s *PcError) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePcError(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePcError(input string) (*PcError, error) { - vals := map[string]PcError{ - "agentstopped": PcErrorAgentStopped, - "capturefailed": PcErrorCaptureFailed, - "internalerror": PcErrorInternalError, - "localfilefailed": PcErrorLocalFileFailed, - "storagefailed": PcErrorStorageFailed, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PcError(input) - return &out, nil -} - -type PcProtocol string - -const ( - PcProtocolAny PcProtocol = "Any" - PcProtocolTCP PcProtocol = "TCP" - PcProtocolUDP PcProtocol = "UDP" -) - -func PossibleValuesForPcProtocol() []string { - return []string{ - string(PcProtocolAny), - string(PcProtocolTCP), - string(PcProtocolUDP), - } -} - -func (s *PcProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePcProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePcProtocol(input string) (*PcProtocol, error) { - vals := map[string]PcProtocol{ - "any": PcProtocolAny, - "tcp": PcProtocolTCP, - "udp": PcProtocolUDP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PcProtocol(input) - return &out, nil -} - -type PcStatus string - -const ( - PcStatusError PcStatus = "Error" - PcStatusNotStarted PcStatus = "NotStarted" - PcStatusRunning PcStatus = "Running" - PcStatusStopped PcStatus = "Stopped" - PcStatusUnknown PcStatus = "Unknown" -) - -func PossibleValuesForPcStatus() []string { - return []string{ - string(PcStatusError), - string(PcStatusNotStarted), - string(PcStatusRunning), - string(PcStatusStopped), - string(PcStatusUnknown), - } -} - -func (s *PcStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePcStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePcStatus(input string) (*PcStatus, error) { - vals := map[string]PcStatus{ - "error": PcStatusError, - "notstarted": PcStatusNotStarted, - "running": PcStatusRunning, - "stopped": PcStatusStopped, - "unknown": PcStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PcStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/id_networkwatcher.go b/resource-manager/network/2022-11-01/packetcaptures/id_networkwatcher.go deleted file mode 100644 index b5478e241e2..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package packetcaptures - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/id_networkwatcher_test.go b/resource-manager/network/2022-11-01/packetcaptures/id_networkwatcher_test.go deleted file mode 100644 index fa74ce013ea..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package packetcaptures - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/id_packetcapture.go b/resource-manager/network/2022-11-01/packetcaptures/id_packetcapture.go deleted file mode 100644 index 57e35d5f1f2..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/id_packetcapture.go +++ /dev/null @@ -1,140 +0,0 @@ -package packetcaptures - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PacketCaptureId{} - -// PacketCaptureId is a struct representing the Resource ID for a Packet Capture -type PacketCaptureId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string - PacketCaptureName string -} - -// NewPacketCaptureID returns a new PacketCaptureId struct -func NewPacketCaptureID(subscriptionId string, resourceGroupName string, networkWatcherName string, packetCaptureName string) PacketCaptureId { - return PacketCaptureId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - PacketCaptureName: packetCaptureName, - } -} - -// ParsePacketCaptureID parses 'input' into a PacketCaptureId -func ParsePacketCaptureID(input string) (*PacketCaptureId, error) { - parser := resourceids.NewParserFromResourceIdType(PacketCaptureId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PacketCaptureId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.PacketCaptureName, ok = parsed.Parsed["packetCaptureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCaptureName", *parsed) - } - - return &id, nil -} - -// ParsePacketCaptureIDInsensitively parses 'input' case-insensitively into a PacketCaptureId -// note: this method should only be used for API response data and not user input -func ParsePacketCaptureIDInsensitively(input string) (*PacketCaptureId, error) { - parser := resourceids.NewParserFromResourceIdType(PacketCaptureId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PacketCaptureId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - if id.PacketCaptureName, ok = parsed.Parsed["packetCaptureName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "packetCaptureName", *parsed) - } - - return &id, nil -} - -// ValidatePacketCaptureID checks that 'input' can be parsed as a Packet Capture ID -func ValidatePacketCaptureID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePacketCaptureID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Packet Capture ID -func (id PacketCaptureId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s/packetCaptures/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName, id.PacketCaptureName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Packet Capture ID -func (id PacketCaptureId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - resourceids.StaticSegment("staticPacketCaptures", "packetCaptures", "packetCaptures"), - resourceids.UserSpecifiedSegment("packetCaptureName", "packetCaptureValue"), - } -} - -// String returns a human-readable description of this Packet Capture ID -func (id PacketCaptureId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - fmt.Sprintf("Packet Capture Name: %q", id.PacketCaptureName), - } - return fmt.Sprintf("Packet Capture (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/id_packetcapture_test.go b/resource-manager/network/2022-11-01/packetcaptures/id_packetcapture_test.go deleted file mode 100644 index 2e4a39e0952..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/id_packetcapture_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package packetcaptures - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PacketCaptureId{} - -func TestNewPacketCaptureID(t *testing.T) { - id := NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } - - if id.PacketCaptureName != "packetCaptureValue" { - t.Fatalf("Expected %q but got %q for Segment 'PacketCaptureName'", id.PacketCaptureName, "packetCaptureValue") - } -} - -func TestFormatPacketCaptureID(t *testing.T) { - actual := NewPacketCaptureID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue", "packetCaptureValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePacketCaptureID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PacketCaptureId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue", - Expected: &PacketCaptureId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - PacketCaptureName: "packetCaptureValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePacketCaptureID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.PacketCaptureName != v.Expected.PacketCaptureName { - t.Fatalf("Expected %q but got %q for PacketCaptureName", v.Expected.PacketCaptureName, actual.PacketCaptureName) - } - - } -} - -func TestParsePacketCaptureIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PacketCaptureId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/pAcKeTcApTuReS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue", - Expected: &PacketCaptureId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - PacketCaptureName: "packetCaptureValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/packetCaptures/packetCaptureValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/pAcKeTcApTuReS/pAcKeTcApTuReVaLuE", - Expected: &PacketCaptureId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - PacketCaptureName: "pAcKeTcApTuReVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/pAcKeTcApTuReS/pAcKeTcApTuReVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePacketCaptureIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - if actual.PacketCaptureName != v.Expected.PacketCaptureName { - t.Fatalf("Expected %q but got %q for PacketCaptureName", v.Expected.PacketCaptureName, actual.PacketCaptureName) - } - - } -} - -func TestSegmentsForPacketCaptureId(t *testing.T) { - segments := PacketCaptureId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PacketCaptureId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/method_create.go b/resource-manager/network/2022-11-01/packetcaptures/method_create.go deleted file mode 100644 index bdb1568fae7..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/method_create.go +++ /dev/null @@ -1,73 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Create ... -func (c PacketCapturesClient) Create(ctx context.Context, id PacketCaptureId, input PacketCapture) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c PacketCapturesClient) CreateThenPoll(ctx context.Context, id PacketCaptureId, input PacketCapture) error { - result, err := c.Create(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/method_delete.go b/resource-manager/network/2022-11-01/packetcaptures/method_delete.go deleted file mode 100644 index d35a3b48efa..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/method_delete.go +++ /dev/null @@ -1,70 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PacketCapturesClient) Delete(ctx context.Context, id PacketCaptureId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PacketCapturesClient) DeleteThenPoll(ctx context.Context, id PacketCaptureId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/method_get.go b/resource-manager/network/2022-11-01/packetcaptures/method_get.go deleted file mode 100644 index 4f97c6ab835..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package packetcaptures - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PacketCaptureResult -} - -// Get ... -func (c PacketCapturesClient) Get(ctx context.Context, id PacketCaptureId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/method_getstatus.go b/resource-manager/network/2022-11-01/packetcaptures/method_getstatus.go deleted file mode 100644 index 19bf63cc79d..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/method_getstatus.go +++ /dev/null @@ -1,70 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetStatus ... -func (c PacketCapturesClient) GetStatus(ctx context.Context, id PacketCaptureId) (result GetStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetStatusThenPoll performs GetStatus then polls until it's completed -func (c PacketCapturesClient) GetStatusThenPoll(ctx context.Context, id PacketCaptureId) error { - result, err := c.GetStatus(ctx, id) - if err != nil { - return fmt.Errorf("performing GetStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/method_list.go b/resource-manager/network/2022-11-01/packetcaptures/method_list.go deleted file mode 100644 index 5f4d9a97536..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/method_list.go +++ /dev/null @@ -1,52 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PacketCaptureListResult -} - -// List ... -func (c PacketCapturesClient) List(ctx context.Context, id NetworkWatcherId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/packetCaptures", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/method_stop.go b/resource-manager/network/2022-11-01/packetcaptures/method_stop.go deleted file mode 100644 index 31a3b050169..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/method_stop.go +++ /dev/null @@ -1,70 +0,0 @@ -package packetcaptures - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Stop ... -func (c PacketCapturesClient) Stop(ctx context.Context, id PacketCaptureId) (result StopOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stop", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopThenPoll performs Stop then polls until it's completed -func (c PacketCapturesClient) StopThenPoll(ctx context.Context, id PacketCaptureId) error { - result, err := c.Stop(ctx, id) - if err != nil { - return fmt.Errorf("performing Stop: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Stop: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapture.go b/resource-manager/network/2022-11-01/packetcaptures/model_packetcapture.go deleted file mode 100644 index 592cd89a6e7..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapture.go +++ /dev/null @@ -1,8 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCapture struct { - Properties PacketCaptureParameters `json:"properties"` -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturefilter.go b/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturefilter.go deleted file mode 100644 index fb301880566..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturefilter.go +++ /dev/null @@ -1,12 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureFilter struct { - LocalIPAddress *string `json:"localIPAddress,omitempty"` - LocalPort *string `json:"localPort,omitempty"` - Protocol *PcProtocol `json:"protocol,omitempty"` - RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` - RemotePort *string `json:"remotePort,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturelistresult.go b/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturelistresult.go deleted file mode 100644 index 54c50c44871..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturelistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureListResult struct { - Value *[]PacketCaptureResult `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturemachinescope.go b/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturemachinescope.go deleted file mode 100644 index 99b476671ba..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturemachinescope.go +++ /dev/null @@ -1,9 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureMachineScope struct { - Exclude *[]string `json:"exclude,omitempty"` - Include *[]string `json:"include,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureparameters.go b/resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureparameters.go deleted file mode 100644 index dd18ed71be2..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureparameters.go +++ /dev/null @@ -1,15 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureParameters struct { - BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"` - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` - Scope *PacketCaptureMachineScope `json:"scope,omitempty"` - StorageLocation PacketCaptureStorageLocation `json:"storageLocation"` - Target string `json:"target"` - TargetType *PacketCaptureTargetType `json:"targetType,omitempty"` - TimeLimitInSeconds *int64 `json:"timeLimitInSeconds,omitempty"` - TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturequerystatusresult.go b/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturequerystatusresult.go deleted file mode 100644 index edea164feae..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturequerystatusresult.go +++ /dev/null @@ -1,31 +0,0 @@ -package packetcaptures - -import ( - "time" - - "github.com/hashicorp/go-azure-helpers/lang/dates" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureQueryStatusResult struct { - CaptureStartTime *string `json:"captureStartTime,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - PacketCaptureError *[]PcError `json:"packetCaptureError,omitempty"` - PacketCaptureStatus *PcStatus `json:"packetCaptureStatus,omitempty"` - StopReason *string `json:"stopReason,omitempty"` -} - -func (o *PacketCaptureQueryStatusResult) GetCaptureStartTimeAsTime() (*time.Time, error) { - if o.CaptureStartTime == nil { - return nil, nil - } - return dates.ParseAsFormat(o.CaptureStartTime, "2006-01-02T15:04:05Z07:00") -} - -func (o *PacketCaptureQueryStatusResult) SetCaptureStartTimeAsTime(input time.Time) { - formatted := input.Format("2006-01-02T15:04:05Z07:00") - o.CaptureStartTime = &formatted -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureresult.go b/resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureresult.go deleted file mode 100644 index a2e7cd88e02..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureResult struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PacketCaptureResultProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureresultproperties.go b/resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureresultproperties.go deleted file mode 100644 index 61dbaf130bb..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/model_packetcaptureresultproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureResultProperties struct { - BytesToCapturePerPacket *int64 `json:"bytesToCapturePerPacket,omitempty"` - Filters *[]PacketCaptureFilter `json:"filters,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Scope *PacketCaptureMachineScope `json:"scope,omitempty"` - StorageLocation PacketCaptureStorageLocation `json:"storageLocation"` - Target string `json:"target"` - TargetType *PacketCaptureTargetType `json:"targetType,omitempty"` - TimeLimitInSeconds *int64 `json:"timeLimitInSeconds,omitempty"` - TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturestoragelocation.go b/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturestoragelocation.go deleted file mode 100644 index 5cbd5d6b25e..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/model_packetcapturestoragelocation.go +++ /dev/null @@ -1,10 +0,0 @@ -package packetcaptures - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PacketCaptureStorageLocation struct { - FilePath *string `json:"filePath,omitempty"` - StorageId *string `json:"storageId,omitempty"` - StoragePath *string `json:"storagePath,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/packetcaptures/version.go b/resource-manager/network/2022-11-01/packetcaptures/version.go deleted file mode 100644 index aa314406569..00000000000 --- a/resource-manager/network/2022-11-01/packetcaptures/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package packetcaptures - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/packetcaptures/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/README.md b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/README.md deleted file mode 100644 index a7396d2c3e6..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections` Documentation - -The `peerexpressroutecircuitconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections" -``` - - -### Client Initialization - -```go -client := peerexpressroutecircuitconnections.NewPeerExpressRouteCircuitConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PeerExpressRouteCircuitConnectionsClient.Get` - -```go -ctx := context.TODO() -id := peerexpressroutecircuitconnections.NewPeerConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "peerConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PeerExpressRouteCircuitConnectionsClient.List` - -```go -ctx := context.TODO() -id := peerexpressroutecircuitconnections.NewExpressRouteCircuitPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/client.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/client.go deleted file mode 100644 index c153e5d3b4a..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewPeerExpressRouteCircuitConnectionsClientWithBaseURI(api environments.Api) (*PeerExpressRouteCircuitConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "peerexpressroutecircuitconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PeerExpressRouteCircuitConnectionsClient: %+v", err) - } - - return &PeerExpressRouteCircuitConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/constants.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/constants.go deleted file mode 100644 index eda70745480..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/constants.go +++ /dev/null @@ -1,101 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/id_peerconnection.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/id_peerconnection.go deleted file mode 100644 index 9e974b3fad5..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/id_peerconnection.go +++ /dev/null @@ -1,153 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeerConnectionId{} - -// PeerConnectionId is a struct representing the Resource ID for a Peer Connection -type PeerConnectionId struct { - SubscriptionId string - ResourceGroupName string - ExpressRouteCircuitName string - PeeringName string - PeerConnectionName string -} - -// NewPeerConnectionID returns a new PeerConnectionId struct -func NewPeerConnectionID(subscriptionId string, resourceGroupName string, expressRouteCircuitName string, peeringName string, peerConnectionName string) PeerConnectionId { - return PeerConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ExpressRouteCircuitName: expressRouteCircuitName, - PeeringName: peeringName, - PeerConnectionName: peerConnectionName, - } -} - -// ParsePeerConnectionID parses 'input' into a PeerConnectionId -func ParsePeerConnectionID(input string) (*PeerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PeerConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.PeerConnectionName, ok = parsed.Parsed["peerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peerConnectionName", *parsed) - } - - return &id, nil -} - -// ParsePeerConnectionIDInsensitively parses 'input' case-insensitively into a PeerConnectionId -// note: this method should only be used for API response data and not user input -func ParsePeerConnectionIDInsensitively(input string) (*PeerConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PeerConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PeerConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ExpressRouteCircuitName, ok = parsed.Parsed["expressRouteCircuitName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "expressRouteCircuitName", *parsed) - } - - if id.PeeringName, ok = parsed.Parsed["peeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peeringName", *parsed) - } - - if id.PeerConnectionName, ok = parsed.Parsed["peerConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "peerConnectionName", *parsed) - } - - return &id, nil -} - -// ValidatePeerConnectionID checks that 'input' can be parsed as a Peer Connection ID -func ValidatePeerConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePeerConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Peer Connection ID -func (id PeerConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/expressRouteCircuits/%s/peerings/%s/peerConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ExpressRouteCircuitName, id.PeeringName, id.PeerConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Peer Connection ID -func (id PeerConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticExpressRouteCircuits", "expressRouteCircuits", "expressRouteCircuits"), - resourceids.UserSpecifiedSegment("expressRouteCircuitName", "expressRouteCircuitValue"), - resourceids.StaticSegment("staticPeerings", "peerings", "peerings"), - resourceids.UserSpecifiedSegment("peeringName", "peeringValue"), - resourceids.StaticSegment("staticPeerConnections", "peerConnections", "peerConnections"), - resourceids.UserSpecifiedSegment("peerConnectionName", "peerConnectionValue"), - } -} - -// String returns a human-readable description of this Peer Connection ID -func (id PeerConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Express Route Circuit Name: %q", id.ExpressRouteCircuitName), - fmt.Sprintf("Peering Name: %q", id.PeeringName), - fmt.Sprintf("Peer Connection Name: %q", id.PeerConnectionName), - } - return fmt.Sprintf("Peer Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/id_peerconnection_test.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/id_peerconnection_test.go deleted file mode 100644 index 1539f6e6033..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/id_peerconnection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PeerConnectionId{} - -func TestNewPeerConnectionID(t *testing.T) { - id := NewPeerConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "peerConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ExpressRouteCircuitName != "expressRouteCircuitValue" { - t.Fatalf("Expected %q but got %q for Segment 'ExpressRouteCircuitName'", id.ExpressRouteCircuitName, "expressRouteCircuitValue") - } - - if id.PeeringName != "peeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeeringName'", id.PeeringName, "peeringValue") - } - - if id.PeerConnectionName != "peerConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'PeerConnectionName'", id.PeerConnectionName, "peerConnectionValue") - } -} - -func TestFormatPeerConnectionID(t *testing.T) { - actual := NewPeerConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "expressRouteCircuitValue", "peeringValue", "peerConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePeerConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue", - Expected: &PeerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - PeerConnectionName: "peerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeerConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.PeerConnectionName != v.Expected.PeerConnectionName { - t.Fatalf("Expected %q but got %q for PeerConnectionName", v.Expected.PeerConnectionName, actual.PeerConnectionName) - } - - } -} - -func TestParsePeerConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PeerConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/pEeRcOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue", - Expected: &PeerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ExpressRouteCircuitName: "expressRouteCircuitValue", - PeeringName: "peeringValue", - PeerConnectionName: "peerConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitValue/peerings/peeringValue/peerConnections/peerConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/pEeRcOnNeCtIoNs/pEeRcOnNeCtIoNvAlUe", - Expected: &PeerConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ExpressRouteCircuitName: "eXpReSsRoUtEcIrCuItVaLuE", - PeeringName: "pEeRiNgVaLuE", - PeerConnectionName: "pEeRcOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/eXpReSsRoUtEcIrCuItS/eXpReSsRoUtEcIrCuItVaLuE/pEeRiNgS/pEeRiNgVaLuE/pEeRcOnNeCtIoNs/pEeRcOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePeerConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ExpressRouteCircuitName != v.Expected.ExpressRouteCircuitName { - t.Fatalf("Expected %q but got %q for ExpressRouteCircuitName", v.Expected.ExpressRouteCircuitName, actual.ExpressRouteCircuitName) - } - - if actual.PeeringName != v.Expected.PeeringName { - t.Fatalf("Expected %q but got %q for PeeringName", v.Expected.PeeringName, actual.PeeringName) - } - - if actual.PeerConnectionName != v.Expected.PeerConnectionName { - t.Fatalf("Expected %q but got %q for PeerConnectionName", v.Expected.PeerConnectionName, actual.PeerConnectionName) - } - - } -} - -func TestSegmentsForPeerConnectionId(t *testing.T) { - segments := PeerConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PeerConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/method_get.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/method_get.go deleted file mode 100644 index 1865b66be51..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PeerExpressRouteCircuitConnection -} - -// Get ... -func (c PeerExpressRouteCircuitConnectionsClient) Get(ctx context.Context, id PeerConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/method_list.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/method_list.go deleted file mode 100644 index ea092d55ca6..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package peerexpressroutecircuitconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PeerExpressRouteCircuitConnection -} - -type ListCompleteResult struct { - Items []PeerExpressRouteCircuitConnection -} - -// List ... -func (c PeerExpressRouteCircuitConnectionsClient) List(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/peerConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PeerExpressRouteCircuitConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PeerExpressRouteCircuitConnectionsClient) ListComplete(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PeerExpressRouteCircuitConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PeerExpressRouteCircuitConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ExpressRouteCircuitPeeringId, predicate PeerExpressRouteCircuitConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PeerExpressRouteCircuitConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnection.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnection.go deleted file mode 100644 index 0ba2f68f213..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package peerexpressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index c4a72c247d0..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_peerexpressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package peerexpressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthResourceGuid *string `json:"authResourceGuid,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ConnectionName *string `json:"connectionName,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_subresource.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_subresource.go deleted file mode 100644 index da8f131efb2..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package peerexpressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/predicates.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/predicates.go deleted file mode 100644 index c0766bb2d18..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package peerexpressroutecircuitconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p PeerExpressRouteCircuitConnectionOperationPredicate) Matches(input PeerExpressRouteCircuitConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/version.go b/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/version.go deleted file mode 100644 index d079340d570..00000000000 --- a/resource-manager/network/2022-11-01/peerexpressroutecircuitconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package peerexpressroutecircuitconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/peerexpressroutecircuitconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/README.md b/resource-manager/network/2022-11-01/privatednszonegroups/README.md deleted file mode 100644 index 69bfd381932..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privatednszonegroups` Documentation - -The `privatednszonegroups` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privatednszonegroups" -``` - - -### Client Initialization - -```go -client := privatednszonegroups.NewPrivateDnsZoneGroupsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateDnsZoneGroupsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := privatednszonegroups.NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue") - -payload := privatednszonegroups.PrivateDnsZoneGroup{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateDnsZoneGroupsClient.Delete` - -```go -ctx := context.TODO() -id := privatednszonegroups.NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateDnsZoneGroupsClient.Get` - -```go -ctx := context.TODO() -id := privatednszonegroups.NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateDnsZoneGroupsClient.List` - -```go -ctx := context.TODO() -id := privatednszonegroups.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/client.go b/resource-manager/network/2022-11-01/privatednszonegroups/client.go deleted file mode 100644 index 872a0ea57cd..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatednszonegroups - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneGroupsClient struct { - Client *resourcemanager.Client -} - -func NewPrivateDnsZoneGroupsClientWithBaseURI(api environments.Api) (*PrivateDnsZoneGroupsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "privatednszonegroups", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateDnsZoneGroupsClient: %+v", err) - } - - return &PrivateDnsZoneGroupsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/constants.go b/resource-manager/network/2022-11-01/privatednszonegroups/constants.go deleted file mode 100644 index a68ae3a4523..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package privatednszonegroups - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/id_privatednszonegroup.go b/resource-manager/network/2022-11-01/privatednszonegroups/id_privatednszonegroup.go deleted file mode 100644 index 532e498e159..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/id_privatednszonegroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package privatednszonegroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateDnsZoneGroupId{} - -// PrivateDnsZoneGroupId is a struct representing the Resource ID for a Private Dns Zone Group -type PrivateDnsZoneGroupId struct { - SubscriptionId string - ResourceGroupName string - PrivateEndpointName string - PrivateDnsZoneGroupName string -} - -// NewPrivateDnsZoneGroupID returns a new PrivateDnsZoneGroupId struct -func NewPrivateDnsZoneGroupID(subscriptionId string, resourceGroupName string, privateEndpointName string, privateDnsZoneGroupName string) PrivateDnsZoneGroupId { - return PrivateDnsZoneGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateEndpointName: privateEndpointName, - PrivateDnsZoneGroupName: privateDnsZoneGroupName, - } -} - -// ParsePrivateDnsZoneGroupID parses 'input' into a PrivateDnsZoneGroupId -func ParsePrivateDnsZoneGroupID(input string) (*PrivateDnsZoneGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateDnsZoneGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateDnsZoneGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - if id.PrivateDnsZoneGroupName, ok = parsed.Parsed["privateDnsZoneGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneGroupName", *parsed) - } - - return &id, nil -} - -// ParsePrivateDnsZoneGroupIDInsensitively parses 'input' case-insensitively into a PrivateDnsZoneGroupId -// note: this method should only be used for API response data and not user input -func ParsePrivateDnsZoneGroupIDInsensitively(input string) (*PrivateDnsZoneGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateDnsZoneGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateDnsZoneGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - if id.PrivateDnsZoneGroupName, ok = parsed.Parsed["privateDnsZoneGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateDnsZoneGroupName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateDnsZoneGroupID checks that 'input' can be parsed as a Private Dns Zone Group ID -func ValidatePrivateDnsZoneGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateDnsZoneGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Dns Zone Group ID -func (id PrivateDnsZoneGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateEndpoints/%s/privateDnsZoneGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateEndpointName, id.PrivateDnsZoneGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Dns Zone Group ID -func (id PrivateDnsZoneGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateEndpoints", "privateEndpoints", "privateEndpoints"), - resourceids.UserSpecifiedSegment("privateEndpointName", "privateEndpointValue"), - resourceids.StaticSegment("staticPrivateDnsZoneGroups", "privateDnsZoneGroups", "privateDnsZoneGroups"), - resourceids.UserSpecifiedSegment("privateDnsZoneGroupName", "privateDnsZoneGroupValue"), - } -} - -// String returns a human-readable description of this Private Dns Zone Group ID -func (id PrivateDnsZoneGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Endpoint Name: %q", id.PrivateEndpointName), - fmt.Sprintf("Private Dns Zone Group Name: %q", id.PrivateDnsZoneGroupName), - } - return fmt.Sprintf("Private Dns Zone Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/id_privatednszonegroup_test.go b/resource-manager/network/2022-11-01/privatednszonegroups/id_privatednszonegroup_test.go deleted file mode 100644 index 0c58fbbf7fe..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/id_privatednszonegroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package privatednszonegroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateDnsZoneGroupId{} - -func TestNewPrivateDnsZoneGroupID(t *testing.T) { - id := NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateEndpointName != "privateEndpointValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointName'", id.PrivateEndpointName, "privateEndpointValue") - } - - if id.PrivateDnsZoneGroupName != "privateDnsZoneGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateDnsZoneGroupName'", id.PrivateDnsZoneGroupName, "privateDnsZoneGroupValue") - } -} - -func TestFormatPrivateDnsZoneGroupID(t *testing.T) { - actual := NewPrivateDnsZoneGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue", "privateDnsZoneGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateDnsZoneGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateDnsZoneGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue", - Expected: &PrivateDnsZoneGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - PrivateDnsZoneGroupName: "privateDnsZoneGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateDnsZoneGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - if actual.PrivateDnsZoneGroupName != v.Expected.PrivateDnsZoneGroupName { - t.Fatalf("Expected %q but got %q for PrivateDnsZoneGroupName", v.Expected.PrivateDnsZoneGroupName, actual.PrivateDnsZoneGroupName) - } - - } -} - -func TestParsePrivateDnsZoneGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateDnsZoneGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/pRiVaTeDnSzOnEgRoUpS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue", - Expected: &PrivateDnsZoneGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - PrivateDnsZoneGroupName: "privateDnsZoneGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/privateDnsZoneGroups/privateDnsZoneGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/pRiVaTeDnSzOnEgRoUpS/pRiVaTeDnSzOnEgRoUpVaLuE", - Expected: &PrivateDnsZoneGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateEndpointName: "pRiVaTeEnDpOiNtVaLuE", - PrivateDnsZoneGroupName: "pRiVaTeDnSzOnEgRoUpVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/pRiVaTeDnSzOnEgRoUpS/pRiVaTeDnSzOnEgRoUpVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateDnsZoneGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - if actual.PrivateDnsZoneGroupName != v.Expected.PrivateDnsZoneGroupName { - t.Fatalf("Expected %q but got %q for PrivateDnsZoneGroupName", v.Expected.PrivateDnsZoneGroupName, actual.PrivateDnsZoneGroupName) - } - - } -} - -func TestSegmentsForPrivateDnsZoneGroupId(t *testing.T) { - segments := PrivateDnsZoneGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateDnsZoneGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/id_privateendpoint.go b/resource-manager/network/2022-11-01/privatednszonegroups/id_privateendpoint.go deleted file mode 100644 index a547392c0f3..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/id_privateendpoint.go +++ /dev/null @@ -1,127 +0,0 @@ -package privatednszonegroups - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointId{} - -// PrivateEndpointId is a struct representing the Resource ID for a Private Endpoint -type PrivateEndpointId struct { - SubscriptionId string - ResourceGroupName string - PrivateEndpointName string -} - -// NewPrivateEndpointID returns a new PrivateEndpointId struct -func NewPrivateEndpointID(subscriptionId string, resourceGroupName string, privateEndpointName string) PrivateEndpointId { - return PrivateEndpointId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateEndpointName: privateEndpointName, - } -} - -// ParsePrivateEndpointID parses 'input' into a PrivateEndpointId -func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - return &id, nil -} - -// ParsePrivateEndpointIDInsensitively parses 'input' case-insensitively into a PrivateEndpointId -// note: this method should only be used for API response data and not user input -func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateEndpointID checks that 'input' can be parsed as a Private Endpoint ID -func ValidatePrivateEndpointID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateEndpointID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Endpoint ID -func (id PrivateEndpointId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateEndpoints/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateEndpointName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint ID -func (id PrivateEndpointId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateEndpoints", "privateEndpoints", "privateEndpoints"), - resourceids.UserSpecifiedSegment("privateEndpointName", "privateEndpointValue"), - } -} - -// String returns a human-readable description of this Private Endpoint ID -func (id PrivateEndpointId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Endpoint Name: %q", id.PrivateEndpointName), - } - return fmt.Sprintf("Private Endpoint (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/id_privateendpoint_test.go b/resource-manager/network/2022-11-01/privatednszonegroups/id_privateendpoint_test.go deleted file mode 100644 index d91c7053eb8..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/id_privateendpoint_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privatednszonegroups - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointId{} - -func TestNewPrivateEndpointID(t *testing.T) { - id := NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateEndpointName != "privateEndpointValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointName'", id.PrivateEndpointName, "privateEndpointValue") - } -} - -func TestFormatPrivateEndpointID(t *testing.T) { - actual := NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateEndpointID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - } -} - -func TestParsePrivateEndpointIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateEndpointName: "pRiVaTeEnDpOiNtVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - } -} - -func TestSegmentsForPrivateEndpointId(t *testing.T) { - segments := PrivateEndpointId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateEndpointId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/method_createorupdate.go b/resource-manager/network/2022-11-01/privatednszonegroups/method_createorupdate.go deleted file mode 100644 index 446e42244fc..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package privatednszonegroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PrivateDnsZoneGroupsClient) CreateOrUpdate(ctx context.Context, id PrivateDnsZoneGroupId, input PrivateDnsZoneGroup) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PrivateDnsZoneGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateDnsZoneGroupId, input PrivateDnsZoneGroup) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/method_delete.go b/resource-manager/network/2022-11-01/privatednszonegroups/method_delete.go deleted file mode 100644 index cdf382f2686..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package privatednszonegroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PrivateDnsZoneGroupsClient) Delete(ctx context.Context, id PrivateDnsZoneGroupId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PrivateDnsZoneGroupsClient) DeleteThenPoll(ctx context.Context, id PrivateDnsZoneGroupId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/method_get.go b/resource-manager/network/2022-11-01/privatednszonegroups/method_get.go deleted file mode 100644 index 8588f80e9e1..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package privatednszonegroups - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateDnsZoneGroup -} - -// Get ... -func (c PrivateDnsZoneGroupsClient) Get(ctx context.Context, id PrivateDnsZoneGroupId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/method_list.go b/resource-manager/network/2022-11-01/privatednszonegroups/method_list.go deleted file mode 100644 index 1a9b85295d0..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package privatednszonegroups - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateDnsZoneGroup -} - -type ListCompleteResult struct { - Items []PrivateDnsZoneGroup -} - -// List ... -func (c PrivateDnsZoneGroupsClient) List(ctx context.Context, id PrivateEndpointId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateDnsZoneGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateDnsZoneGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PrivateDnsZoneGroupsClient) ListComplete(ctx context.Context, id PrivateEndpointId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PrivateDnsZoneGroupOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateDnsZoneGroupsClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateEndpointId, predicate PrivateDnsZoneGroupOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PrivateDnsZoneGroup, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszoneconfig.go b/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszoneconfig.go deleted file mode 100644 index e44ef143e5c..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszoneconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneConfig struct { - Name *string `json:"name,omitempty"` - Properties *PrivateDnsZonePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonegroup.go b/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonegroup.go deleted file mode 100644 index 75533fc47a5..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonegroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateDnsZoneGroupPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonegrouppropertiesformat.go b/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonegrouppropertiesformat.go deleted file mode 100644 index f892f554965..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonegrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneGroupPropertiesFormat struct { - PrivateDnsZoneConfigs *[]PrivateDnsZoneConfig `json:"privateDnsZoneConfigs,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonepropertiesformat.go b/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonepropertiesformat.go deleted file mode 100644 index 33858bfe24e..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/model_privatednszonepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZonePropertiesFormat struct { - PrivateDnsZoneId *string `json:"privateDnsZoneId,omitempty"` - RecordSets *[]RecordSet `json:"recordSets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/model_recordset.go b/resource-manager/network/2022-11-01/privatednszonegroups/model_recordset.go deleted file mode 100644 index 4a39969425d..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/model_recordset.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RecordSet struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RecordSetName *string `json:"recordSetName,omitempty"` - RecordType *string `json:"recordType,omitempty"` - Ttl *int64 `json:"ttl,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/predicates.go b/resource-manager/network/2022-11-01/privatednszonegroups/predicates.go deleted file mode 100644 index 4d27803d6e2..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package privatednszonegroups - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateDnsZoneGroupOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p PrivateDnsZoneGroupOperationPredicate) Matches(input PrivateDnsZoneGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/privatednszonegroups/version.go b/resource-manager/network/2022-11-01/privatednszonegroups/version.go deleted file mode 100644 index 1f2e2a643c5..00000000000 --- a/resource-manager/network/2022-11-01/privatednszonegroups/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatednszonegroups - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatednszonegroups/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/README.md b/resource-manager/network/2022-11-01/privateendpoints/README.md deleted file mode 100644 index 342fe696aa2..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/README.md +++ /dev/null @@ -1,133 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privateendpoints` Documentation - -The `privateendpoints` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privateendpoints" -``` - - -### Client Initialization - -```go -client := privateendpoints.NewPrivateEndpointsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateEndpointsClient.AvailablePrivateEndpointTypesList` - -```go -ctx := context.TODO() -id := privateendpoints.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.AvailablePrivateEndpointTypesList(ctx, id)` can be used to do batched pagination -items, err := client.AvailablePrivateEndpointTypesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointsClient.AvailablePrivateEndpointTypesListByResourceGroup` - -```go -ctx := context.TODO() -id := privateendpoints.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -// alternatively `client.AvailablePrivateEndpointTypesListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.AvailablePrivateEndpointTypesListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -payload := privateendpoints.PrivateEndpoint{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateEndpointsClient.Delete` - -```go -ctx := context.TODO() -id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateEndpointsClient.Get` - -```go -ctx := context.TODO() -id := privateendpoints.NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - -read, err := client.Get(ctx, id, privateendpoints.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateEndpointsClient.List` - -```go -ctx := context.TODO() -id := privateendpoints.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateEndpointsClient.ListBySubscription` - -```go -ctx := context.TODO() -id := privateendpoints.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/privateendpoints/client.go b/resource-manager/network/2022-11-01/privateendpoints/client.go deleted file mode 100644 index 8ef83ec0060..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privateendpoints - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointsClient struct { - Client *resourcemanager.Client -} - -func NewPrivateEndpointsClientWithBaseURI(api environments.Api) (*PrivateEndpointsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "privateendpoints", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateEndpointsClient: %+v", err) - } - - return &PrivateEndpointsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/constants.go b/resource-manager/network/2022-11-01/privateendpoints/constants.go deleted file mode 100644 index 3e04260a7ac..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package privateendpoints - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/id_location.go b/resource-manager/network/2022-11-01/privateendpoints/id_location.go deleted file mode 100644 index 146a6110738..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package privateendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/id_location_test.go b/resource-manager/network/2022-11-01/privateendpoints/id_location_test.go deleted file mode 100644 index 0309ae8635e..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package privateendpoints - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/id_privateendpoint.go b/resource-manager/network/2022-11-01/privateendpoints/id_privateendpoint.go deleted file mode 100644 index 219fe0f7906..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/id_privateendpoint.go +++ /dev/null @@ -1,127 +0,0 @@ -package privateendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointId{} - -// PrivateEndpointId is a struct representing the Resource ID for a Private Endpoint -type PrivateEndpointId struct { - SubscriptionId string - ResourceGroupName string - PrivateEndpointName string -} - -// NewPrivateEndpointID returns a new PrivateEndpointId struct -func NewPrivateEndpointID(subscriptionId string, resourceGroupName string, privateEndpointName string) PrivateEndpointId { - return PrivateEndpointId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateEndpointName: privateEndpointName, - } -} - -// ParsePrivateEndpointID parses 'input' into a PrivateEndpointId -func ParsePrivateEndpointID(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - return &id, nil -} - -// ParsePrivateEndpointIDInsensitively parses 'input' case-insensitively into a PrivateEndpointId -// note: this method should only be used for API response data and not user input -func ParsePrivateEndpointIDInsensitively(input string) (*PrivateEndpointId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateEndpointName, ok = parsed.Parsed["privateEndpointName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateEndpointID checks that 'input' can be parsed as a Private Endpoint ID -func ValidatePrivateEndpointID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateEndpointID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Endpoint ID -func (id PrivateEndpointId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateEndpoints/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateEndpointName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint ID -func (id PrivateEndpointId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateEndpoints", "privateEndpoints", "privateEndpoints"), - resourceids.UserSpecifiedSegment("privateEndpointName", "privateEndpointValue"), - } -} - -// String returns a human-readable description of this Private Endpoint ID -func (id PrivateEndpointId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Endpoint Name: %q", id.PrivateEndpointName), - } - return fmt.Sprintf("Private Endpoint (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/id_privateendpoint_test.go b/resource-manager/network/2022-11-01/privateendpoints/id_privateendpoint_test.go deleted file mode 100644 index c03cea2e814..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/id_privateendpoint_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privateendpoints - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointId{} - -func TestNewPrivateEndpointID(t *testing.T) { - id := NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateEndpointName != "privateEndpointValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointName'", id.PrivateEndpointName, "privateEndpointValue") - } -} - -func TestFormatPrivateEndpointID(t *testing.T) { - actual := NewPrivateEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateEndpointValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateEndpointID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - } -} - -func TestParsePrivateEndpointIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateEndpointName: "privateEndpointValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateEndpoints/privateEndpointValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE", - Expected: &PrivateEndpointId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateEndpointName: "pRiVaTeEnDpOiNtVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeEnDpOiNtS/pRiVaTeEnDpOiNtVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateEndpointName != v.Expected.PrivateEndpointName { - t.Fatalf("Expected %q but got %q for PrivateEndpointName", v.Expected.PrivateEndpointName, actual.PrivateEndpointName) - } - - } -} - -func TestSegmentsForPrivateEndpointId(t *testing.T) { - segments := PrivateEndpointId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateEndpointId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/id_providerlocation.go b/resource-manager/network/2022-11-01/privateendpoints/id_providerlocation.go deleted file mode 100644 index bdc082c0530..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/id_providerlocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package privateendpoints - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -// ProviderLocationId is a struct representing the Resource ID for a Provider Location -type ProviderLocationId struct { - SubscriptionId string - ResourceGroupName string - LocationName string -} - -// NewProviderLocationID returns a new ProviderLocationId struct -func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { - return ProviderLocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocationName: locationName, - } -} - -// ParseProviderLocationID parses 'input' into a ProviderLocationId -func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId -// note: this method should only be used for API response data and not user input -func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID -func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Location ID -func (id ProviderLocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID -func (id ProviderLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Provider Location ID -func (id ProviderLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/id_providerlocation_test.go b/resource-manager/network/2022-11-01/privateendpoints/id_providerlocation_test.go deleted file mode 100644 index 02c60f97242..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/id_providerlocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privateendpoints - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -func TestNewProviderLocationID(t *testing.T) { - id := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatProviderLocationID(t *testing.T) { - actual := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseProviderLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForProviderLocationId(t *testing.T) { - segments := ProviderLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/method_availableprivateendpointtypeslist.go b/resource-manager/network/2022-11-01/privateendpoints/method_availableprivateendpointtypeslist.go deleted file mode 100644 index 2cb59080a74..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/method_availableprivateendpointtypeslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointTypesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailablePrivateEndpointType -} - -type AvailablePrivateEndpointTypesListCompleteResult struct { - Items []AvailablePrivateEndpointType -} - -// AvailablePrivateEndpointTypesList ... -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesList(ctx context.Context, id LocationId) (result AvailablePrivateEndpointTypesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availablePrivateEndpointTypes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailablePrivateEndpointType `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailablePrivateEndpointTypesListComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListComplete(ctx context.Context, id LocationId) (AvailablePrivateEndpointTypesListCompleteResult, error) { - return c.AvailablePrivateEndpointTypesListCompleteMatchingPredicate(ctx, id, AvailablePrivateEndpointTypeOperationPredicate{}) -} - -// AvailablePrivateEndpointTypesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AvailablePrivateEndpointTypeOperationPredicate) (result AvailablePrivateEndpointTypesListCompleteResult, err error) { - items := make([]AvailablePrivateEndpointType, 0) - - resp, err := c.AvailablePrivateEndpointTypesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailablePrivateEndpointTypesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go b/resource-manager/network/2022-11-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go deleted file mode 100644 index d819f6c432c..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/method_availableprivateendpointtypeslistbyresourcegroup.go +++ /dev/null @@ -1,89 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointTypesListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AvailablePrivateEndpointType -} - -type AvailablePrivateEndpointTypesListByResourceGroupCompleteResult struct { - Items []AvailablePrivateEndpointType -} - -// AvailablePrivateEndpointTypesListByResourceGroup ... -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroup(ctx context.Context, id ProviderLocationId) (result AvailablePrivateEndpointTypesListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/availablePrivateEndpointTypes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AvailablePrivateEndpointType `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// AvailablePrivateEndpointTypesListByResourceGroupComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroupComplete(ctx context.Context, id ProviderLocationId) (AvailablePrivateEndpointTypesListByResourceGroupCompleteResult, error) { - return c.AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate(ctx, id, AvailablePrivateEndpointTypeOperationPredicate{}) -} - -// AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) AvailablePrivateEndpointTypesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AvailablePrivateEndpointTypeOperationPredicate) (result AvailablePrivateEndpointTypesListByResourceGroupCompleteResult, err error) { - items := make([]AvailablePrivateEndpointType, 0) - - resp, err := c.AvailablePrivateEndpointTypesListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = AvailablePrivateEndpointTypesListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/method_createorupdate.go b/resource-manager/network/2022-11-01/privateendpoints/method_createorupdate.go deleted file mode 100644 index 04fee084ffc..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, id PrivateEndpointId, input PrivateEndpoint) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PrivateEndpointsClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateEndpointId, input PrivateEndpoint) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/method_delete.go b/resource-manager/network/2022-11-01/privateendpoints/method_delete.go deleted file mode 100644 index 70f382bf8e3..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PrivateEndpointsClient) Delete(ctx context.Context, id PrivateEndpointId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PrivateEndpointsClient) DeleteThenPoll(ctx context.Context, id PrivateEndpointId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/method_get.go b/resource-manager/network/2022-11-01/privateendpoints/method_get.go deleted file mode 100644 index 3530642f24e..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpoint -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c PrivateEndpointsClient) Get(ctx context.Context, id PrivateEndpointId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/method_list.go b/resource-manager/network/2022-11-01/privateendpoints/method_list.go deleted file mode 100644 index 8191e9553b0..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateEndpoint -} - -type ListCompleteResult struct { - Items []PrivateEndpoint -} - -// List ... -func (c PrivateEndpointsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PrivateEndpointOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PrivateEndpointOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PrivateEndpoint, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/method_listbysubscription.go b/resource-manager/network/2022-11-01/privateendpoints/method_listbysubscription.go deleted file mode 100644 index 52761988c2d..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/method_listbysubscription.go +++ /dev/null @@ -1,90 +0,0 @@ -package privateendpoints - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateEndpoint -} - -type ListBySubscriptionCompleteResult struct { - Items []PrivateEndpoint -} - -// ListBySubscription ... -func (c PrivateEndpointsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateEndpoints", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateEndpoint `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c PrivateEndpointsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, PrivateEndpointOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateEndpointsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PrivateEndpointOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]PrivateEndpoint, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddress.go deleted file mode 100644 index b8767a924d3..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index faea7af9635..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index bc45532ef99..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewayipconfiguration.go deleted file mode 100644 index d7b619385a0..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 0975b3a3c18..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/privateendpoints/model_applicationsecuritygroup.go deleted file mode 100644 index b514ce65a10..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index c505be8adad..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_availableprivateendpointtype.go b/resource-manager/network/2022-11-01/privateendpoints/model_availableprivateendpointtype.go deleted file mode 100644 index c6aa8839dc1..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_availableprivateendpointtype.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointType struct { - DisplayName *string `json:"displayName,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - ResourceName *string `json:"resourceName,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_backendaddresspool.go b/resource-manager/network/2022-11-01/privateendpoints/model_backendaddresspool.go deleted file mode 100644 index afaee89cd0a..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 9c21e3e14cb..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index a078479b1cf..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_ddossettings.go b/resource-manager/network/2022-11-01/privateendpoints/model_ddossettings.go deleted file mode 100644 index 6253ff1e5a4..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_delegation.go b/resource-manager/network/2022-11-01/privateendpoints/model_delegation.go deleted file mode 100644 index fd6104e1e68..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_flowlog.go b/resource-manager/network/2022-11-01/privateendpoints/model_flowlog.go deleted file mode 100644 index bce1bcfe8ad..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/privateendpoints/model_flowlogformatparameters.go deleted file mode 100644 index a15c48049c6..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_flowlogpropertiesformat.go deleted file mode 100644 index 6f45378b9d1..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/privateendpoints/model_frontendipconfiguration.go deleted file mode 100644 index 3dcb8560fec..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 8980fc3756f..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index dde47c23fb2..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_inboundnatrule.go b/resource-manager/network/2022-11-01/privateendpoints/model_inboundnatrule.go deleted file mode 100644 index 38c0ffd6728..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index b952302ddeb..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_ipconfiguration.go b/resource-manager/network/2022-11-01/privateendpoints/model_ipconfiguration.go deleted file mode 100644 index cf18ee9415b..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationprofile.go deleted file mode 100644 index d493529c992..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index dabdbd7c841..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index fdfdcd1d175..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_iptag.go b/resource-manager/network/2022-11-01/privateendpoints/model_iptag.go deleted file mode 100644 index 83206500edc..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/privateendpoints/model_loadbalancerbackendaddress.go deleted file mode 100644 index ee77fec93c3..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 9be73b64841..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_natgateway.go b/resource-manager/network/2022-11-01/privateendpoints/model_natgateway.go deleted file mode 100644 index e197bcd7ada..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_natgatewaypropertiesformat.go deleted file mode 100644 index fc0ee1ef6da..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_natgatewaysku.go b/resource-manager/network/2022-11-01/privateendpoints/model_natgatewaysku.go deleted file mode 100644 index c0b2d583e49..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_natruleportmapping.go b/resource-manager/network/2022-11-01/privateendpoints/model_natruleportmapping.go deleted file mode 100644 index 07eeaf979f4..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterface.go b/resource-manager/network/2022-11-01/privateendpoints/model_networkinterface.go deleted file mode 100644 index 9e9c7fcfa82..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacednssettings.go deleted file mode 100644 index 5182d846bf1..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfiguration.go deleted file mode 100644 index e41eb348a7b..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index ac6a234dd34..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index cacb1e17719..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacepropertiesformat.go deleted file mode 100644 index a5fd36f9266..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacetapconfiguration.go deleted file mode 100644 index ebe35c0a178..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 54e437f339f..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/privateendpoints/model_networksecuritygroup.go deleted file mode 100644 index cb420b60990..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index b03a951faff..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpoint.go b/resource-manager/network/2022-11-01/privateendpoints/model_privateendpoint.go deleted file mode 100644 index 5e9da21fedb..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointconnection.go deleted file mode 100644 index 5bd8301f4f3..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointconnectionproperties.go deleted file mode 100644 index 8c0662fe4e2..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointipconfiguration.go deleted file mode 100644 index 1fbe08553f6..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 3772b023f53..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointproperties.go deleted file mode 100644 index ac88e7637f3..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkservice.go b/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkservice.go deleted file mode 100644 index e4c8723fc8b..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnection.go deleted file mode 100644 index be10aca683d..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index da2a7ed3871..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 1d19bec0830..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 358ee0e7450..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 81634dd44b1..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceproperties.go deleted file mode 100644 index d246ec00f40..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddress.go b/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddress.go deleted file mode 100644 index eeca2133c31..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package privateendpoints - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddressdnssettings.go deleted file mode 100644 index bc8acd1515a..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddresspropertiesformat.go deleted file mode 100644 index bed9d0ba8d7..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddresssku.go deleted file mode 100644 index 2bbd107f243..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/privateendpoints/model_resourcenavigationlink.go deleted file mode 100644 index d8890442923..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_resourcenavigationlinkformat.go deleted file mode 100644 index 281da0ffc97..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_resourceset.go b/resource-manager/network/2022-11-01/privateendpoints/model_resourceset.go deleted file mode 100644 index 999b1817a30..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/privateendpoints/model_retentionpolicyparameters.go deleted file mode 100644 index b3df6ba5fd1..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_route.go b/resource-manager/network/2022-11-01/privateendpoints/model_route.go deleted file mode 100644 index 98c7a5ae476..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_routepropertiesformat.go deleted file mode 100644 index ca3956916f3..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_routetable.go b/resource-manager/network/2022-11-01/privateendpoints/model_routetable.go deleted file mode 100644 index e1f695300d8..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_routetablepropertiesformat.go deleted file mode 100644 index 4976a28f0ea..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_securityrule.go b/resource-manager/network/2022-11-01/privateendpoints/model_securityrule.go deleted file mode 100644 index ccfc50b4a7e..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_securityrulepropertiesformat.go deleted file mode 100644 index 2b19d6a628d..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/privateendpoints/model_serviceassociationlink.go deleted file mode 100644 index a88015b02e1..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 7a779312074..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 84e538e8350..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicy.go deleted file mode 100644 index ea8ff121174..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicydefinition.go deleted file mode 100644 index cc2054776fa..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 8355dfbaae0..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index dbdcdea1442..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5b54f3ef673..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_subnet.go b/resource-manager/network/2022-11-01/privateendpoints/model_subnet.go deleted file mode 100644 index 1eee73db2bd..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_subnetpropertiesformat.go deleted file mode 100644 index 01c2d0455ce..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_subresource.go b/resource-manager/network/2022-11-01/privateendpoints/model_subresource.go deleted file mode 100644 index 134c4f66102..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index fc7cf55257e..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/privateendpoints/model_trafficanalyticsproperties.go deleted file mode 100644 index 8a4f6042fa4..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/privateendpoints/model_virtualnetworktap.go deleted file mode 100644 index 99fe7d7fe1d..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/privateendpoints/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index c7fa6565e0f..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/predicates.go b/resource-manager/network/2022-11-01/privateendpoints/predicates.go deleted file mode 100644 index c99098d0163..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/predicates.go +++ /dev/null @@ -1,70 +0,0 @@ -package privateendpoints - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AvailablePrivateEndpointTypeOperationPredicate struct { - DisplayName *string - Id *string - Name *string - ResourceName *string - Type *string -} - -func (p AvailablePrivateEndpointTypeOperationPredicate) Matches(input AvailablePrivateEndpointType) bool { - - if p.DisplayName != nil && (input.DisplayName == nil || *p.DisplayName != *input.DisplayName) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.ResourceName != nil && (input.ResourceName == nil || *p.ResourceName != *input.ResourceName) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type PrivateEndpointOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PrivateEndpointOperationPredicate) Matches(input PrivateEndpoint) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/privateendpoints/version.go b/resource-manager/network/2022-11-01/privateendpoints/version.go deleted file mode 100644 index b4d6c8d5de1..00000000000 --- a/resource-manager/network/2022-11-01/privateendpoints/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privateendpoints - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privateendpoints/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/README.md b/resource-manager/network/2022-11-01/privatelinkservice/README.md deleted file mode 100644 index 6ab81949ad2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privatelinkservice` Documentation - -The `privatelinkservice` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privatelinkservice" -``` - - -### Client Initialization - -```go -client := privatelinkservice.NewPrivateLinkServiceClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateLinkServiceClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := privatelinkservice.NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - -payload := privatelinkservice.PrivateLinkService{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/privatelinkservice/client.go b/resource-manager/network/2022-11-01/privatelinkservice/client.go deleted file mode 100644 index b2b1cce0fce..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatelinkservice - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceClient struct { - Client *resourcemanager.Client -} - -func NewPrivateLinkServiceClientWithBaseURI(api environments.Api) (*PrivateLinkServiceClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "privatelinkservice", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateLinkServiceClient: %+v", err) - } - - return &PrivateLinkServiceClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/constants.go b/resource-manager/network/2022-11-01/privatelinkservice/constants.go deleted file mode 100644 index 78d689c9d9a..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package privatelinkservice - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/id_privatelinkservice.go b/resource-manager/network/2022-11-01/privatelinkservice/id_privatelinkservice.go deleted file mode 100644 index 1565b227dbd..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/id_privatelinkservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package privatelinkservice - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateLinkServiceId{} - -// PrivateLinkServiceId is a struct representing the Resource ID for a Private Link Service -type PrivateLinkServiceId struct { - SubscriptionId string - ResourceGroupName string - PrivateLinkServiceName string -} - -// NewPrivateLinkServiceID returns a new PrivateLinkServiceId struct -func NewPrivateLinkServiceID(subscriptionId string, resourceGroupName string, privateLinkServiceName string) PrivateLinkServiceId { - return PrivateLinkServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateLinkServiceName: privateLinkServiceName, - } -} - -// ParsePrivateLinkServiceID parses 'input' into a PrivateLinkServiceId -func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - return &id, nil -} - -// ParsePrivateLinkServiceIDInsensitively parses 'input' case-insensitively into a PrivateLinkServiceId -// note: this method should only be used for API response data and not user input -func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateLinkServiceID checks that 'input' can be parsed as a Private Link Service ID -func ValidatePrivateLinkServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateLinkServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Link Service ID -func (id PrivateLinkServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateLinkServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Link Service ID -func (id PrivateLinkServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateLinkServices", "privateLinkServices", "privateLinkServices"), - resourceids.UserSpecifiedSegment("privateLinkServiceName", "privateLinkServiceValue"), - } -} - -// String returns a human-readable description of this Private Link Service ID -func (id PrivateLinkServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Link Service Name: %q", id.PrivateLinkServiceName), - } - return fmt.Sprintf("Private Link Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/id_privatelinkservice_test.go b/resource-manager/network/2022-11-01/privatelinkservice/id_privatelinkservice_test.go deleted file mode 100644 index 76b34d6fdf8..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/id_privatelinkservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privatelinkservice - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateLinkServiceId{} - -func TestNewPrivateLinkServiceID(t *testing.T) { - id := NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateLinkServiceName != "privateLinkServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateLinkServiceName'", id.PrivateLinkServiceName, "privateLinkServiceValue") - } -} - -func TestFormatPrivateLinkServiceID(t *testing.T) { - actual := NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateLinkServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateLinkServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateLinkServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - } -} - -func TestParsePrivateLinkServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateLinkServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateLinkServiceName: "pRiVaTeLiNkSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateLinkServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - } -} - -func TestSegmentsForPrivateLinkServiceId(t *testing.T) { - segments := PrivateLinkServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateLinkServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/method_createorupdate.go b/resource-manager/network/2022-11-01/privatelinkservice/method_createorupdate.go deleted file mode 100644 index 89d7e625a08..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package privatelinkservice - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PrivateLinkServiceClient) CreateOrUpdate(ctx context.Context, id PrivateLinkServiceId, input PrivateLinkService) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PrivateLinkServiceClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateLinkServiceId, input PrivateLinkService) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 37bf309268d..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 727bb2c29ae..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index ce6b69f5f1c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 8eb6892414c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 08c65321f9b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/privatelinkservice/model_applicationsecuritygroup.go deleted file mode 100644 index 65af972a908..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 7053e6085f8..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_backendaddresspool.go b/resource-manager/network/2022-11-01/privatelinkservice/model_backendaddresspool.go deleted file mode 100644 index 4605353c0e8..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index b63d022cddb..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 64fa8c44b23..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_ddossettings.go b/resource-manager/network/2022-11-01/privatelinkservice/model_ddossettings.go deleted file mode 100644 index 5e258a59dcf..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_delegation.go b/resource-manager/network/2022-11-01/privatelinkservice/model_delegation.go deleted file mode 100644 index 38895e795b0..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_flowlog.go b/resource-manager/network/2022-11-01/privatelinkservice/model_flowlog.go deleted file mode 100644 index 368d825fd7e..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/privatelinkservice/model_flowlogformatparameters.go deleted file mode 100644 index 75ef563d7b2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_flowlogpropertiesformat.go deleted file mode 100644 index 47d0ad02b7b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservice/model_frontendipconfiguration.go deleted file mode 100644 index b2284248cab..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index e2ab5bed55b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/privatelinkservice/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index b0e2ec4fe5b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_inboundnatrule.go b/resource-manager/network/2022-11-01/privatelinkservice/model_inboundnatrule.go deleted file mode 100644 index 68fa8ece3f2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index a54a17cf8a7..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfiguration.go deleted file mode 100644 index dd6a48d0e5b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationprofile.go deleted file mode 100644 index 5e226d14d4d..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 554fee929b4..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 62a93ec4c44..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_iptag.go b/resource-manager/network/2022-11-01/privatelinkservice/model_iptag.go deleted file mode 100644 index 7131a53eded..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/privatelinkservice/model_loadbalancerbackendaddress.go deleted file mode 100644 index 6ce64f5f2e6..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 9abe2a4572f..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_natgateway.go b/resource-manager/network/2022-11-01/privatelinkservice/model_natgateway.go deleted file mode 100644 index f9980bf5e6c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_natgatewaypropertiesformat.go deleted file mode 100644 index 7d3be08b309..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_natgatewaysku.go b/resource-manager/network/2022-11-01/privatelinkservice/model_natgatewaysku.go deleted file mode 100644 index a7a67521076..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_natruleportmapping.go b/resource-manager/network/2022-11-01/privatelinkservice/model_natruleportmapping.go deleted file mode 100644 index 1c0a32d9e67..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterface.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterface.go deleted file mode 100644 index 4df820c2913..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacednssettings.go deleted file mode 100644 index 16bd0705ad7..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 48b4f130f1a..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index b649c26692b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 0f1de88a39a..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 79f71ee5063..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 3e58e2268a1..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index d9c267e2c48..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networksecuritygroup.go deleted file mode 100644 index bc7b4758c7c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 6a30ce3d224..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpoint.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpoint.go deleted file mode 100644 index 60ed6db0b7b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointconnection.go deleted file mode 100644 index 6564f05bf19..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointconnectionproperties.go deleted file mode 100644 index 8cdbcae827f..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointipconfiguration.go deleted file mode 100644 index f4a1b24ff36..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 14abbc46b00..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointproperties.go deleted file mode 100644 index ca2dc587f19..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkservice.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkservice.go deleted file mode 100644 index 84ab357bba4..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnection.go deleted file mode 100644 index 0ab35853be3..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index bc13ca31ec4..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index b11296ec55c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 06cf43e9c19..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index e9a6be5f6ba..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceproperties.go deleted file mode 100644 index d23a2b93b7d..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddress.go b/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddress.go deleted file mode 100644 index 10ad261e57f..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package privatelinkservice - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddressdnssettings.go deleted file mode 100644 index b2e6f22b6be..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 4597323a4ee..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddresssku.go deleted file mode 100644 index 17a772dc295..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/privatelinkservice/model_resourcenavigationlink.go deleted file mode 100644 index 04005314e56..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_resourcenavigationlinkformat.go deleted file mode 100644 index db56f8f9a50..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_resourceset.go b/resource-manager/network/2022-11-01/privatelinkservice/model_resourceset.go deleted file mode 100644 index 8244a36994e..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/privatelinkservice/model_retentionpolicyparameters.go deleted file mode 100644 index a0d81108fdc..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_route.go b/resource-manager/network/2022-11-01/privatelinkservice/model_route.go deleted file mode 100644 index 7d46047e973..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_routepropertiesformat.go deleted file mode 100644 index 55a0f3dc715..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_routetable.go b/resource-manager/network/2022-11-01/privatelinkservice/model_routetable.go deleted file mode 100644 index 11ada0b3ad6..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_routetablepropertiesformat.go deleted file mode 100644 index 9231c6ea535..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_securityrule.go b/resource-manager/network/2022-11-01/privatelinkservice/model_securityrule.go deleted file mode 100644 index a6fef4ca3ef..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_securityrulepropertiesformat.go deleted file mode 100644 index 141c746c9fc..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/privatelinkservice/model_serviceassociationlink.go deleted file mode 100644 index 6d4f38c281f..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 6e34df786f4..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_servicedelegationpropertiesformat.go deleted file mode 100644 index df4acacdfe6..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicy.go deleted file mode 100644 index 164ba053a63..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicydefinition.go deleted file mode 100644 index b85a151c4ba..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 3357b4cc130..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 8094ad8968c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 8278551c833..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_subnet.go b/resource-manager/network/2022-11-01/privatelinkservice/model_subnet.go deleted file mode 100644 index 53bbcfc93b9..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_subnetpropertiesformat.go deleted file mode 100644 index d0603886fd8..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_subresource.go b/resource-manager/network/2022-11-01/privatelinkservice/model_subresource.go deleted file mode 100644 index 2295e457c86..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/privatelinkservice/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 04a2870aab9..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/privatelinkservice/model_trafficanalyticsproperties.go deleted file mode 100644 index 14cea562579..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/privatelinkservice/model_virtualnetworktap.go deleted file mode 100644 index 75924e524e2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservice/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 0425352fa06..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservice - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservice/version.go b/resource-manager/network/2022-11-01/privatelinkservice/version.go deleted file mode 100644 index 2c2df45f9a3..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservice/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservice - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkservice/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/README.md b/resource-manager/network/2022-11-01/privatelinkservices/README.md deleted file mode 100644 index 7879598db31..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/README.md +++ /dev/null @@ -1,216 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privatelinkservices` Documentation - -The `privatelinkservices` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/privatelinkservices" -``` - - -### Client Initialization - -```go -client := privatelinkservices.NewPrivateLinkServicesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility` - -```go -ctx := context.TODO() -id := privatelinkservices.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -payload := privatelinkservices.CheckPrivateLinkServiceVisibilityRequest{ - // ... -} - - -if err := client.CheckPrivateLinkServiceVisibilityThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup` - -```go -ctx := context.TODO() -id := privatelinkservices.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -payload := privatelinkservices.CheckPrivateLinkServiceVisibilityRequest{ - // ... -} - - -if err := client.CheckPrivateLinkServiceVisibilityByResourceGroupThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateLinkServicesClient.Delete` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateLinkServicesClient.DeletePrivateEndpointConnection` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue") - -if err := client.DeletePrivateEndpointConnectionThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PrivateLinkServicesClient.Get` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - -read, err := client.Get(ctx, id, privatelinkservices.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateLinkServicesClient.GetPrivateEndpointConnection` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue") - -read, err := client.GetPrivateEndpointConnection(ctx, id, privatelinkservices.DefaultGetPrivateEndpointConnectionOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PrivateLinkServicesClient.List` - -```go -ctx := context.TODO() -id := privatelinkservices.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices` - -```go -ctx := context.TODO() -id := privatelinkservices.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.ListAutoApprovedPrivateLinkServices(ctx, id)` can be used to do batched pagination -items, err := client.ListAutoApprovedPrivateLinkServicesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup` - -```go -ctx := context.TODO() -id := privatelinkservices.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - -// alternatively `client.ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListAutoApprovedPrivateLinkServicesByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.ListBySubscription` - -```go -ctx := context.TODO() -id := privatelinkservices.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.ListPrivateEndpointConnections` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - -// alternatively `client.ListPrivateEndpointConnections(ctx, id)` can be used to do batched pagination -items, err := client.ListPrivateEndpointConnectionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PrivateLinkServicesClient.UpdatePrivateEndpointConnection` - -```go -ctx := context.TODO() -id := privatelinkservices.NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue") - -payload := privatelinkservices.PrivateEndpointConnection{ - // ... -} - - -read, err := client.UpdatePrivateEndpointConnection(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/privatelinkservices/client.go b/resource-manager/network/2022-11-01/privatelinkservices/client.go deleted file mode 100644 index ef379b0edb5..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServicesClient struct { - Client *resourcemanager.Client -} - -func NewPrivateLinkServicesClientWithBaseURI(api environments.Api) (*PrivateLinkServicesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "privatelinkservices", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PrivateLinkServicesClient: %+v", err) - } - - return &PrivateLinkServicesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/constants.go b/resource-manager/network/2022-11-01/privatelinkservices/constants.go deleted file mode 100644 index 8d26f941c91..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package privatelinkservices - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/id_location.go b/resource-manager/network/2022-11-01/privatelinkservices/id_location.go deleted file mode 100644 index 24e86662059..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/id_location_test.go b/resource-manager/network/2022-11-01/privatelinkservices/id_location_test.go deleted file mode 100644 index 52940b50853..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package privatelinkservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/id_privateendpointconnection.go b/resource-manager/network/2022-11-01/privatelinkservices/id_privateendpointconnection.go deleted file mode 100644 index d6a66965d1b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/id_privateendpointconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointConnectionId{} - -// PrivateEndpointConnectionId is a struct representing the Resource ID for a Private Endpoint Connection -type PrivateEndpointConnectionId struct { - SubscriptionId string - ResourceGroupName string - PrivateLinkServiceName string - PrivateEndpointConnectionName string -} - -// NewPrivateEndpointConnectionID returns a new PrivateEndpointConnectionId struct -func NewPrivateEndpointConnectionID(subscriptionId string, resourceGroupName string, privateLinkServiceName string, privateEndpointConnectionName string) PrivateEndpointConnectionId { - return PrivateEndpointConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateLinkServiceName: privateLinkServiceName, - PrivateEndpointConnectionName: privateEndpointConnectionName, - } -} - -// ParsePrivateEndpointConnectionID parses 'input' into a PrivateEndpointConnectionId -func ParsePrivateEndpointConnectionID(input string) (*PrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) - } - - return &id, nil -} - -// ParsePrivateEndpointConnectionIDInsensitively parses 'input' case-insensitively into a PrivateEndpointConnectionId -// note: this method should only be used for API response data and not user input -func ParsePrivateEndpointConnectionIDInsensitively(input string) (*PrivateEndpointConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateEndpointConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateEndpointConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - if id.PrivateEndpointConnectionName, ok = parsed.Parsed["privateEndpointConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateEndpointConnectionName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateEndpointConnectionID checks that 'input' can be parsed as a Private Endpoint Connection ID -func ValidatePrivateEndpointConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateEndpointConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Endpoint Connection ID -func (id PrivateEndpointConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateLinkServices/%s/privateEndpointConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkServiceName, id.PrivateEndpointConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Endpoint Connection ID -func (id PrivateEndpointConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateLinkServices", "privateLinkServices", "privateLinkServices"), - resourceids.UserSpecifiedSegment("privateLinkServiceName", "privateLinkServiceValue"), - resourceids.StaticSegment("staticPrivateEndpointConnections", "privateEndpointConnections", "privateEndpointConnections"), - resourceids.UserSpecifiedSegment("privateEndpointConnectionName", "privateEndpointConnectionValue"), - } -} - -// String returns a human-readable description of this Private Endpoint Connection ID -func (id PrivateEndpointConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Link Service Name: %q", id.PrivateLinkServiceName), - fmt.Sprintf("Private Endpoint Connection Name: %q", id.PrivateEndpointConnectionName), - } - return fmt.Sprintf("Private Endpoint Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/id_privateendpointconnection_test.go b/resource-manager/network/2022-11-01/privatelinkservices/id_privateendpointconnection_test.go deleted file mode 100644 index 90b8124dd93..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/id_privateendpointconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package privatelinkservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateEndpointConnectionId{} - -func TestNewPrivateEndpointConnectionID(t *testing.T) { - id := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateLinkServiceName != "privateLinkServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateLinkServiceName'", id.PrivateLinkServiceName, "privateLinkServiceValue") - } - - if id.PrivateEndpointConnectionName != "privateEndpointConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateEndpointConnectionName'", id.PrivateEndpointConnectionName, "privateEndpointConnectionValue") - } -} - -func TestFormatPrivateEndpointConnectionID(t *testing.T) { - actual := NewPrivateEndpointConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue", "privateEndpointConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateEndpointConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue", - Expected: &PrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - PrivateEndpointConnectionName: "privateEndpointConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { - t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) - } - - } -} - -func TestParsePrivateEndpointConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateEndpointConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue", - Expected: &PrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - PrivateEndpointConnectionName: "privateEndpointConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/privateEndpointConnections/privateEndpointConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", - Expected: &PrivateEndpointConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateLinkServiceName: "pRiVaTeLiNkSeRvIcEvAlUe", - PrivateEndpointConnectionName: "pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/pRiVaTeEnDpOiNtCoNnEcTiOnS/pRiVaTeEnDpOiNtCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateEndpointConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - if actual.PrivateEndpointConnectionName != v.Expected.PrivateEndpointConnectionName { - t.Fatalf("Expected %q but got %q for PrivateEndpointConnectionName", v.Expected.PrivateEndpointConnectionName, actual.PrivateEndpointConnectionName) - } - - } -} - -func TestSegmentsForPrivateEndpointConnectionId(t *testing.T) { - segments := PrivateEndpointConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateEndpointConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/id_privatelinkservice.go b/resource-manager/network/2022-11-01/privatelinkservices/id_privatelinkservice.go deleted file mode 100644 index 94f3432277b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/id_privatelinkservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateLinkServiceId{} - -// PrivateLinkServiceId is a struct representing the Resource ID for a Private Link Service -type PrivateLinkServiceId struct { - SubscriptionId string - ResourceGroupName string - PrivateLinkServiceName string -} - -// NewPrivateLinkServiceID returns a new PrivateLinkServiceId struct -func NewPrivateLinkServiceID(subscriptionId string, resourceGroupName string, privateLinkServiceName string) PrivateLinkServiceId { - return PrivateLinkServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PrivateLinkServiceName: privateLinkServiceName, - } -} - -// ParsePrivateLinkServiceID parses 'input' into a PrivateLinkServiceId -func ParsePrivateLinkServiceID(input string) (*PrivateLinkServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - return &id, nil -} - -// ParsePrivateLinkServiceIDInsensitively parses 'input' case-insensitively into a PrivateLinkServiceId -// note: this method should only be used for API response data and not user input -func ParsePrivateLinkServiceIDInsensitively(input string) (*PrivateLinkServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(PrivateLinkServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PrivateLinkServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PrivateLinkServiceName, ok = parsed.Parsed["privateLinkServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "privateLinkServiceName", *parsed) - } - - return &id, nil -} - -// ValidatePrivateLinkServiceID checks that 'input' can be parsed as a Private Link Service ID -func ValidatePrivateLinkServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePrivateLinkServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Private Link Service ID -func (id PrivateLinkServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/privateLinkServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PrivateLinkServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Private Link Service ID -func (id PrivateLinkServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPrivateLinkServices", "privateLinkServices", "privateLinkServices"), - resourceids.UserSpecifiedSegment("privateLinkServiceName", "privateLinkServiceValue"), - } -} - -// String returns a human-readable description of this Private Link Service ID -func (id PrivateLinkServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Private Link Service Name: %q", id.PrivateLinkServiceName), - } - return fmt.Sprintf("Private Link Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/id_privatelinkservice_test.go b/resource-manager/network/2022-11-01/privatelinkservices/id_privatelinkservice_test.go deleted file mode 100644 index 44ba3293fa9..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/id_privatelinkservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privatelinkservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PrivateLinkServiceId{} - -func TestNewPrivateLinkServiceID(t *testing.T) { - id := NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PrivateLinkServiceName != "privateLinkServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'PrivateLinkServiceName'", id.PrivateLinkServiceName, "privateLinkServiceValue") - } -} - -func TestFormatPrivateLinkServiceID(t *testing.T) { - actual := NewPrivateLinkServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateLinkServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePrivateLinkServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateLinkServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateLinkServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - } -} - -func TestParsePrivateLinkServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PrivateLinkServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PrivateLinkServiceName: "privateLinkServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/privateLinkServices/privateLinkServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe", - Expected: &PrivateLinkServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PrivateLinkServiceName: "pRiVaTeLiNkSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pRiVaTeLiNkSeRvIcEs/pRiVaTeLiNkSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePrivateLinkServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PrivateLinkServiceName != v.Expected.PrivateLinkServiceName { - t.Fatalf("Expected %q but got %q for PrivateLinkServiceName", v.Expected.PrivateLinkServiceName, actual.PrivateLinkServiceName) - } - - } -} - -func TestSegmentsForPrivateLinkServiceId(t *testing.T) { - segments := PrivateLinkServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PrivateLinkServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/id_providerlocation.go b/resource-manager/network/2022-11-01/privatelinkservices/id_providerlocation.go deleted file mode 100644 index 2b075dec749..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/id_providerlocation.go +++ /dev/null @@ -1,127 +0,0 @@ -package privatelinkservices - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -// ProviderLocationId is a struct representing the Resource ID for a Provider Location -type ProviderLocationId struct { - SubscriptionId string - ResourceGroupName string - LocationName string -} - -// NewProviderLocationID returns a new ProviderLocationId struct -func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId { - return ProviderLocationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - LocationName: locationName, - } -} - -// ParseProviderLocationID parses 'input' into a ProviderLocationId -func ParseProviderLocationID(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId -// note: this method should only be used for API response data and not user input -func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error) { - parser := resourceids.NewParserFromResourceIdType(ProviderLocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ProviderLocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID -func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseProviderLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Provider Location ID -func (id ProviderLocationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Provider Location ID -func (id ProviderLocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Provider Location ID -func (id ProviderLocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Provider Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/id_providerlocation_test.go b/resource-manager/network/2022-11-01/privatelinkservices/id_providerlocation_test.go deleted file mode 100644 index 8ee36f53716..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/id_providerlocation_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package privatelinkservices - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ProviderLocationId{} - -func TestNewProviderLocationID(t *testing.T) { - id := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatProviderLocationID(t *testing.T) { - actual := NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseProviderLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseProviderLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ProviderLocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &ProviderLocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseProviderLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForProviderLocationId(t *testing.T) { - segments := ProviderLocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ProviderLocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_checkprivatelinkservicevisibility.go b/resource-manager/network/2022-11-01/privatelinkservices/method_checkprivatelinkservicevisibility.go deleted file mode 100644 index 900260bc29f..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_checkprivatelinkservicevisibility.go +++ /dev/null @@ -1,74 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckPrivateLinkServiceVisibilityOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CheckPrivateLinkServiceVisibility ... -func (c PrivateLinkServicesClient) CheckPrivateLinkServiceVisibility(ctx context.Context, id LocationId, input CheckPrivateLinkServiceVisibilityRequest) (result CheckPrivateLinkServiceVisibilityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/checkPrivateLinkServiceVisibility", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CheckPrivateLinkServiceVisibilityThenPoll performs CheckPrivateLinkServiceVisibility then polls until it's completed -func (c PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityThenPoll(ctx context.Context, id LocationId, input CheckPrivateLinkServiceVisibilityRequest) error { - result, err := c.CheckPrivateLinkServiceVisibility(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CheckPrivateLinkServiceVisibility: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CheckPrivateLinkServiceVisibility: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_checkprivatelinkservicevisibilitybyresourcegroup.go b/resource-manager/network/2022-11-01/privatelinkservices/method_checkprivatelinkservicevisibilitybyresourcegroup.go deleted file mode 100644 index b42f3afbe23..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_checkprivatelinkservicevisibilitybyresourcegroup.go +++ /dev/null @@ -1,74 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckPrivateLinkServiceVisibilityByResourceGroupOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CheckPrivateLinkServiceVisibilityByResourceGroup ... -func (c PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, id ProviderLocationId, input CheckPrivateLinkServiceVisibilityRequest) (result CheckPrivateLinkServiceVisibilityByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/checkPrivateLinkServiceVisibility", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CheckPrivateLinkServiceVisibilityByResourceGroupThenPoll performs CheckPrivateLinkServiceVisibilityByResourceGroup then polls until it's completed -func (c PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupThenPoll(ctx context.Context, id ProviderLocationId, input CheckPrivateLinkServiceVisibilityRequest) error { - result, err := c.CheckPrivateLinkServiceVisibilityByResourceGroup(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CheckPrivateLinkServiceVisibilityByResourceGroup: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CheckPrivateLinkServiceVisibilityByResourceGroup: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_delete.go b/resource-manager/network/2022-11-01/privatelinkservices/method_delete.go deleted file mode 100644 index d518ac5aede..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PrivateLinkServicesClient) Delete(ctx context.Context, id PrivateLinkServiceId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PrivateLinkServicesClient) DeleteThenPoll(ctx context.Context, id PrivateLinkServiceId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_deleteprivateendpointconnection.go b/resource-manager/network/2022-11-01/privatelinkservices/method_deleteprivateendpointconnection.go deleted file mode 100644 index 92593766f11..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_deleteprivateendpointconnection.go +++ /dev/null @@ -1,71 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeletePrivateEndpointConnectionOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DeletePrivateEndpointConnection ... -func (c PrivateLinkServicesClient) DeletePrivateEndpointConnection(ctx context.Context, id PrivateEndpointConnectionId) (result DeletePrivateEndpointConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeletePrivateEndpointConnectionThenPoll performs DeletePrivateEndpointConnection then polls until it's completed -func (c PrivateLinkServicesClient) DeletePrivateEndpointConnectionThenPoll(ctx context.Context, id PrivateEndpointConnectionId) error { - result, err := c.DeletePrivateEndpointConnection(ctx, id) - if err != nil { - return fmt.Errorf("performing DeletePrivateEndpointConnection: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DeletePrivateEndpointConnection: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_get.go b/resource-manager/network/2022-11-01/privatelinkservices/method_get.go deleted file mode 100644 index 8445d2bb96a..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateLinkService -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c PrivateLinkServicesClient) Get(ctx context.Context, id PrivateLinkServiceId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_getprivateendpointconnection.go b/resource-manager/network/2022-11-01/privatelinkservices/method_getprivateendpointconnection.go deleted file mode 100644 index 768c4254d14..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_getprivateendpointconnection.go +++ /dev/null @@ -1,80 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetPrivateEndpointConnectionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpointConnection -} - -type GetPrivateEndpointConnectionOperationOptions struct { - Expand *string -} - -func DefaultGetPrivateEndpointConnectionOperationOptions() GetPrivateEndpointConnectionOperationOptions { - return GetPrivateEndpointConnectionOperationOptions{} -} - -func (o GetPrivateEndpointConnectionOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetPrivateEndpointConnectionOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetPrivateEndpointConnectionOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// GetPrivateEndpointConnection ... -func (c PrivateLinkServicesClient) GetPrivateEndpointConnection(ctx context.Context, id PrivateEndpointConnectionId, options GetPrivateEndpointConnectionOperationOptions) (result GetPrivateEndpointConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_list.go b/resource-manager/network/2022-11-01/privatelinkservices/method_list.go deleted file mode 100644 index 5b6a32bc705..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateLinkService -} - -type ListCompleteResult struct { - Items []PrivateLinkService -} - -// List ... -func (c PrivateLinkServicesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateLinkServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateLinkService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PrivateLinkServiceOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PrivateLinkServiceOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PrivateLinkService, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_listautoapprovedprivatelinkservices.go b/resource-manager/network/2022-11-01/privatelinkservices/method_listautoapprovedprivatelinkservices.go deleted file mode 100644 index 5ab44e05b50..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_listautoapprovedprivatelinkservices.go +++ /dev/null @@ -1,89 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAutoApprovedPrivateLinkServicesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AutoApprovedPrivateLinkService -} - -type ListAutoApprovedPrivateLinkServicesCompleteResult struct { - Items []AutoApprovedPrivateLinkService -} - -// ListAutoApprovedPrivateLinkServices ... -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServices(ctx context.Context, id LocationId) (result ListAutoApprovedPrivateLinkServicesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/autoApprovedPrivateLinkServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AutoApprovedPrivateLinkService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAutoApprovedPrivateLinkServicesComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesComplete(ctx context.Context, id LocationId) (ListAutoApprovedPrivateLinkServicesCompleteResult, error) { - return c.ListAutoApprovedPrivateLinkServicesCompleteMatchingPredicate(ctx, id, AutoApprovedPrivateLinkServiceOperationPredicate{}) -} - -// ListAutoApprovedPrivateLinkServicesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate AutoApprovedPrivateLinkServiceOperationPredicate) (result ListAutoApprovedPrivateLinkServicesCompleteResult, err error) { - items := make([]AutoApprovedPrivateLinkService, 0) - - resp, err := c.ListAutoApprovedPrivateLinkServices(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAutoApprovedPrivateLinkServicesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_listautoapprovedprivatelinkservicesbyresourcegroup.go b/resource-manager/network/2022-11-01/privatelinkservices/method_listautoapprovedprivatelinkservicesbyresourcegroup.go deleted file mode 100644 index f8031ba6846..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_listautoapprovedprivatelinkservicesbyresourcegroup.go +++ /dev/null @@ -1,89 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAutoApprovedPrivateLinkServicesByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AutoApprovedPrivateLinkService -} - -type ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteResult struct { - Items []AutoApprovedPrivateLinkService -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroup ... -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx context.Context, id ProviderLocationId) (result ListAutoApprovedPrivateLinkServicesByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/autoApprovedPrivateLinkServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AutoApprovedPrivateLinkService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroupComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupComplete(ctx context.Context, id ProviderLocationId) (ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteResult, error) { - return c.ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteMatchingPredicate(ctx, id, AutoApprovedPrivateLinkServiceOperationPredicate{}) -} - -// ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate AutoApprovedPrivateLinkServiceOperationPredicate) (result ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteResult, err error) { - items := make([]AutoApprovedPrivateLinkService, 0) - - resp, err := c.ListAutoApprovedPrivateLinkServicesByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAutoApprovedPrivateLinkServicesByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_listbysubscription.go b/resource-manager/network/2022-11-01/privatelinkservices/method_listbysubscription.go deleted file mode 100644 index 0db89a408f2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_listbysubscription.go +++ /dev/null @@ -1,90 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateLinkService -} - -type ListBySubscriptionCompleteResult struct { - Items []PrivateLinkService -} - -// ListBySubscription ... -func (c PrivateLinkServicesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/privateLinkServices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateLinkService `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, PrivateLinkServiceOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PrivateLinkServiceOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]PrivateLinkService, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_listprivateendpointconnections.go b/resource-manager/network/2022-11-01/privatelinkservices/method_listprivateendpointconnections.go deleted file mode 100644 index 721080febb4..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_listprivateendpointconnections.go +++ /dev/null @@ -1,89 +0,0 @@ -package privatelinkservices - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListPrivateEndpointConnectionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PrivateEndpointConnection -} - -type ListPrivateEndpointConnectionsCompleteResult struct { - Items []PrivateEndpointConnection -} - -// ListPrivateEndpointConnections ... -func (c PrivateLinkServicesClient) ListPrivateEndpointConnections(ctx context.Context, id PrivateLinkServiceId) (result ListPrivateEndpointConnectionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/privateEndpointConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PrivateEndpointConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListPrivateEndpointConnectionsComplete retrieves all the results into a single object -func (c PrivateLinkServicesClient) ListPrivateEndpointConnectionsComplete(ctx context.Context, id PrivateLinkServiceId) (ListPrivateEndpointConnectionsCompleteResult, error) { - return c.ListPrivateEndpointConnectionsCompleteMatchingPredicate(ctx, id, PrivateEndpointConnectionOperationPredicate{}) -} - -// ListPrivateEndpointConnectionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PrivateLinkServicesClient) ListPrivateEndpointConnectionsCompleteMatchingPredicate(ctx context.Context, id PrivateLinkServiceId, predicate PrivateEndpointConnectionOperationPredicate) (result ListPrivateEndpointConnectionsCompleteResult, err error) { - items := make([]PrivateEndpointConnection, 0) - - resp, err := c.ListPrivateEndpointConnections(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListPrivateEndpointConnectionsCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/method_updateprivateendpointconnection.go b/resource-manager/network/2022-11-01/privatelinkservices/method_updateprivateendpointconnection.go deleted file mode 100644 index 861e164e7d2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/method_updateprivateendpointconnection.go +++ /dev/null @@ -1,55 +0,0 @@ -package privatelinkservices - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdatePrivateEndpointConnectionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PrivateEndpointConnection -} - -// UpdatePrivateEndpointConnection ... -func (c PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx context.Context, id PrivateEndpointConnectionId, input PrivateEndpointConnection) (result UpdatePrivateEndpointConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 6e064132ab8..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 2b8b30f76cf..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 687ec802ef4..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 23747316443..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index bc231fd9d60..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/privatelinkservices/model_applicationsecuritygroup.go deleted file mode 100644 index 102038ead97..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index b9a224260e0..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_autoapprovedprivatelinkservice.go b/resource-manager/network/2022-11-01/privatelinkservices/model_autoapprovedprivatelinkservice.go deleted file mode 100644 index e8eb368b9fd..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_autoapprovedprivatelinkservice.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoApprovedPrivateLinkService struct { - PrivateLinkService *string `json:"privateLinkService,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_backendaddresspool.go b/resource-manager/network/2022-11-01/privatelinkservices/model_backendaddresspool.go deleted file mode 100644 index e621fc409e7..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 10ee2869126..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_checkprivatelinkservicevisibilityrequest.go b/resource-manager/network/2022-11-01/privatelinkservices/model_checkprivatelinkservicevisibilityrequest.go deleted file mode 100644 index d338d570a52..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_checkprivatelinkservicevisibilityrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CheckPrivateLinkServiceVisibilityRequest struct { - PrivateLinkServiceAlias *string `json:"privateLinkServiceAlias,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 5bb831424b8..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_ddossettings.go b/resource-manager/network/2022-11-01/privatelinkservices/model_ddossettings.go deleted file mode 100644 index a88f6af3346..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_delegation.go b/resource-manager/network/2022-11-01/privatelinkservices/model_delegation.go deleted file mode 100644 index 861d7dccc33..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_flowlog.go b/resource-manager/network/2022-11-01/privatelinkservices/model_flowlog.go deleted file mode 100644 index b57c99ff1b7..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/privatelinkservices/model_flowlogformatparameters.go deleted file mode 100644 index e5d4b9b0d2f..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_flowlogpropertiesformat.go deleted file mode 100644 index 477b2ca2cb0..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservices/model_frontendipconfiguration.go deleted file mode 100644 index c4908a4dc2b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 2a655d02dfc..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/privatelinkservices/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 57e817e63b2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_inboundnatrule.go b/resource-manager/network/2022-11-01/privatelinkservices/model_inboundnatrule.go deleted file mode 100644 index acd7d0aa709..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 8bf73e3faf8..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfiguration.go deleted file mode 100644 index 3ad6065a48e..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationprofile.go deleted file mode 100644 index 0b4a7cbc860..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index f1bae207cc2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 2852a27e2c3..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_iptag.go b/resource-manager/network/2022-11-01/privatelinkservices/model_iptag.go deleted file mode 100644 index a7e33392ad2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/privatelinkservices/model_loadbalancerbackendaddress.go deleted file mode 100644 index 09bc3c7f06c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index a567721ac6c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_natgateway.go b/resource-manager/network/2022-11-01/privatelinkservices/model_natgateway.go deleted file mode 100644 index 077d2bc5d5f..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_natgatewaypropertiesformat.go deleted file mode 100644 index 85150f10453..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_natgatewaysku.go b/resource-manager/network/2022-11-01/privatelinkservices/model_natgatewaysku.go deleted file mode 100644 index ceae4c33372..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_natruleportmapping.go b/resource-manager/network/2022-11-01/privatelinkservices/model_natruleportmapping.go deleted file mode 100644 index e081a336375..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterface.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterface.go deleted file mode 100644 index 6ac282778d7..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacednssettings.go deleted file mode 100644 index b7993919c62..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 766f136f852..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 4e4cefa66b4..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 82f5e6747c6..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 1c2bfc6ae43..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 66b7aeeab62..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 307c8944af0..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networksecuritygroup.go deleted file mode 100644 index 1a2792e0f88..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 7990d29a1bb..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpoint.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpoint.go deleted file mode 100644 index d3a77eea754..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointconnection.go deleted file mode 100644 index bb755a70536..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointconnectionproperties.go deleted file mode 100644 index 5966a68df2a..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointipconfiguration.go deleted file mode 100644 index 6327ca28ff1..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 5e70530aabf..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointproperties.go deleted file mode 100644 index 4d6d18b46a5..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkservice.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkservice.go deleted file mode 100644 index 4a672116bc2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnection.go deleted file mode 100644 index eb5e26941fd..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index a991f868fe8..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index f227e3d5e6c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index de38cfbbde6..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index b1809f0d71c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceproperties.go deleted file mode 100644 index cc7c8cdc0f0..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkservicevisibility.go b/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkservicevisibility.go deleted file mode 100644 index 38f95ae51a1..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_privatelinkservicevisibility.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceVisibility struct { - Visible *bool `json:"visible,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddress.go b/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddress.go deleted file mode 100644 index cdcddd86935..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package privatelinkservices - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddressdnssettings.go deleted file mode 100644 index 268300edf0b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 2b9a811495b..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddresssku.go deleted file mode 100644 index 80c5ef44ece..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/privatelinkservices/model_resourcenavigationlink.go deleted file mode 100644 index 68ad67e053e..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_resourcenavigationlinkformat.go deleted file mode 100644 index 57d6954d294..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_resourceset.go b/resource-manager/network/2022-11-01/privatelinkservices/model_resourceset.go deleted file mode 100644 index e923870d39f..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/privatelinkservices/model_retentionpolicyparameters.go deleted file mode 100644 index 96f98884163..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_route.go b/resource-manager/network/2022-11-01/privatelinkservices/model_route.go deleted file mode 100644 index 901d0eadcc6..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_routepropertiesformat.go deleted file mode 100644 index 12088248968..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_routetable.go b/resource-manager/network/2022-11-01/privatelinkservices/model_routetable.go deleted file mode 100644 index 8afe228ccfd..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_routetablepropertiesformat.go deleted file mode 100644 index 6377cd08fd9..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_securityrule.go b/resource-manager/network/2022-11-01/privatelinkservices/model_securityrule.go deleted file mode 100644 index df53714a81c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_securityrulepropertiesformat.go deleted file mode 100644 index 52b151efed9..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/privatelinkservices/model_serviceassociationlink.go deleted file mode 100644 index 5f9234cbb82..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 87f29c8ca65..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 2ad5375c2ca..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicy.go deleted file mode 100644 index c93c759f93a..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicydefinition.go deleted file mode 100644 index d1116eb2a61..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 7f68e9513e3..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 5af6f94d80f..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 65b0e07a1a8..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_subnet.go b/resource-manager/network/2022-11-01/privatelinkservices/model_subnet.go deleted file mode 100644 index afb102ed10a..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_subnetpropertiesformat.go deleted file mode 100644 index c45ef181de2..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_subresource.go b/resource-manager/network/2022-11-01/privatelinkservices/model_subresource.go deleted file mode 100644 index b9dcdcf56bf..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/privatelinkservices/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index c500218a37c..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/privatelinkservices/model_trafficanalyticsproperties.go deleted file mode 100644 index b98eb28874d..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/privatelinkservices/model_virtualnetworktap.go deleted file mode 100644 index 8dbee65a21a..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/privatelinkservices/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 4fb395dbc76..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/predicates.go b/resource-manager/network/2022-11-01/privatelinkservices/predicates.go deleted file mode 100644 index f7e18f9feee..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/predicates.go +++ /dev/null @@ -1,78 +0,0 @@ -package privatelinkservices - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AutoApprovedPrivateLinkServiceOperationPredicate struct { - PrivateLinkService *string -} - -func (p AutoApprovedPrivateLinkServiceOperationPredicate) Matches(input AutoApprovedPrivateLinkService) bool { - - if p.PrivateLinkService != nil && (input.PrivateLinkService == nil || *p.PrivateLinkService != *input.PrivateLinkService) { - return false - } - - return true -} - -type PrivateEndpointConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p PrivateEndpointConnectionOperationPredicate) Matches(input PrivateEndpointConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type PrivateLinkServiceOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PrivateLinkServiceOperationPredicate) Matches(input PrivateLinkService) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/privatelinkservices/version.go b/resource-manager/network/2022-11-01/privatelinkservices/version.go deleted file mode 100644 index 519b69e1d0a..00000000000 --- a/resource-manager/network/2022-11-01/privatelinkservices/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package privatelinkservices - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/privatelinkservices/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/README.md b/resource-manager/network/2022-11-01/publicipaddresses/README.md deleted file mode 100644 index bf4a543df98..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/README.md +++ /dev/null @@ -1,132 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/publicipaddresses` Documentation - -The `publicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/publicipaddresses" -``` - - -### Client Initialization - -```go -client := publicipaddresses.NewPublicIPAddressesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PublicIPAddressesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -payload := publicipaddresses.PublicIPAddress{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPAddressesClient.DdosProtectionStatus` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -if err := client.DdosProtectionStatusThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPAddressesClient.Delete` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPAddressesClient.Get` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -read, err := client.Get(ctx, id, publicipaddresses.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PublicIPAddressesClient.List` - -```go -ctx := context.TODO() -id := publicipaddresses.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PublicIPAddressesClient.ListAll` - -```go -ctx := context.TODO() -id := publicipaddresses.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PublicIPAddressesClient.UpdateTags` - -```go -ctx := context.TODO() -id := publicipaddresses.NewPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPAddressValue") - -payload := publicipaddresses.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/publicipaddresses/client.go b/resource-manager/network/2022-11-01/publicipaddresses/client.go deleted file mode 100644 index 58a629943e3..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package publicipaddresses - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesClient struct { - Client *resourcemanager.Client -} - -func NewPublicIPAddressesClientWithBaseURI(api environments.Api) (*PublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "publicipaddresses", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PublicIPAddressesClient: %+v", err) - } - - return &PublicIPAddressesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/constants.go b/resource-manager/network/2022-11-01/publicipaddresses/constants.go deleted file mode 100644 index 90258928297..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/constants.go +++ /dev/null @@ -1,1151 +0,0 @@ -package publicipaddresses - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type IsWorkloadProtected string - -const ( - IsWorkloadProtectedFalse IsWorkloadProtected = "False" - IsWorkloadProtectedTrue IsWorkloadProtected = "True" -) - -func PossibleValuesForIsWorkloadProtected() []string { - return []string{ - string(IsWorkloadProtectedFalse), - string(IsWorkloadProtectedTrue), - } -} - -func (s *IsWorkloadProtected) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsWorkloadProtected(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsWorkloadProtected(input string) (*IsWorkloadProtected, error) { - vals := map[string]IsWorkloadProtected{ - "false": IsWorkloadProtectedFalse, - "true": IsWorkloadProtectedTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsWorkloadProtected(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/method_createorupdate.go b/resource-manager/network/2022-11-01/publicipaddresses/method_createorupdate.go deleted file mode 100644 index 06166709826..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, id commonids.PublicIPAddressId, input PublicIPAddress) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PublicIPAddressesClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.PublicIPAddressId, input PublicIPAddress) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/method_ddosprotectionstatus.go b/resource-manager/network/2022-11-01/publicipaddresses/method_ddosprotectionstatus.go deleted file mode 100644 index be7c136a8e9..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/method_ddosprotectionstatus.go +++ /dev/null @@ -1,71 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosProtectionStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DdosProtectionStatus ... -func (c PublicIPAddressesClient) DdosProtectionStatus(ctx context.Context, id commonids.PublicIPAddressId) (result DdosProtectionStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/ddosProtectionStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DdosProtectionStatusThenPoll performs DdosProtectionStatus then polls until it's completed -func (c PublicIPAddressesClient) DdosProtectionStatusThenPoll(ctx context.Context, id commonids.PublicIPAddressId) error { - result, err := c.DdosProtectionStatus(ctx, id) - if err != nil { - return fmt.Errorf("performing DdosProtectionStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DdosProtectionStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/method_delete.go b/resource-manager/network/2022-11-01/publicipaddresses/method_delete.go deleted file mode 100644 index 20c57a22e75..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PublicIPAddressesClient) Delete(ctx context.Context, id commonids.PublicIPAddressId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PublicIPAddressesClient) DeleteThenPoll(ctx context.Context, id commonids.PublicIPAddressId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/method_get.go b/resource-manager/network/2022-11-01/publicipaddresses/method_get.go deleted file mode 100644 index 735f68ae936..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/method_get.go +++ /dev/null @@ -1,81 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPAddress -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c PublicIPAddressesClient) Get(ctx context.Context, id commonids.PublicIPAddressId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/method_list.go b/resource-manager/network/2022-11-01/publicipaddresses/method_list.go deleted file mode 100644 index 553a59afb95..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type ListCompleteResult struct { - Items []PublicIPAddress -} - -// List ... -func (c PublicIPAddressesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PublicIPAddressesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PublicIPAddressesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PublicIPAddressOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/method_listall.go b/resource-manager/network/2022-11-01/publicipaddresses/method_listall.go deleted file mode 100644 index 90d65200741..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package publicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type ListAllCompleteResult struct { - Items []PublicIPAddress -} - -// ListAll ... -func (c PublicIPAddressesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c PublicIPAddressesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PublicIPAddressesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PublicIPAddressOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/method_updatetags.go b/resource-manager/network/2022-11-01/publicipaddresses/method_updatetags.go deleted file mode 100644 index 2338b85adda..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/method_updatetags.go +++ /dev/null @@ -1,56 +0,0 @@ -package publicipaddresses - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPAddress -} - -// UpdateTags ... -func (c PublicIPAddressesClient) UpdateTags(ctx context.Context, id commonids.PublicIPAddressId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddress.go deleted file mode 100644 index d89d17bbae7..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 433f6b69df9..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 14750d210a4..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 33311f968a8..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 69ba272007f..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/publicipaddresses/model_applicationsecuritygroup.go deleted file mode 100644 index 7ab7c1cc362..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 3de744e7bae..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_backendaddresspool.go b/resource-manager/network/2022-11-01/publicipaddresses/model_backendaddresspool.go deleted file mode 100644 index c693d24a91b..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index d18a26b3c77..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 2bbec7ab523..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_ddossettings.go b/resource-manager/network/2022-11-01/publicipaddresses/model_ddossettings.go deleted file mode 100644 index 360538854a2..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_delegation.go b/resource-manager/network/2022-11-01/publicipaddresses/model_delegation.go deleted file mode 100644 index 1036beaaf72..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_flowlog.go b/resource-manager/network/2022-11-01/publicipaddresses/model_flowlog.go deleted file mode 100644 index 3ab56bececf..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/publicipaddresses/model_flowlogformatparameters.go deleted file mode 100644 index 28da49ecc43..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_flowlogpropertiesformat.go deleted file mode 100644 index 6690c7ec880..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/publicipaddresses/model_frontendipconfiguration.go deleted file mode 100644 index 72aec2b5437..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 2d86f96cffb..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/publicipaddresses/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 9d2c813c821..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_inboundnatrule.go b/resource-manager/network/2022-11-01/publicipaddresses/model_inboundnatrule.go deleted file mode 100644 index bd6a9711828..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 320809245cf..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfiguration.go b/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfiguration.go deleted file mode 100644 index 398840974cd..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationprofile.go deleted file mode 100644 index 1bf1de27441..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1523f28e63d..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index bb4f647f729..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_iptag.go b/resource-manager/network/2022-11-01/publicipaddresses/model_iptag.go deleted file mode 100644 index 7ea58148bb2..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/publicipaddresses/model_loadbalancerbackendaddress.go deleted file mode 100644 index e427662f2a6..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 349c22b64f5..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_natgateway.go b/resource-manager/network/2022-11-01/publicipaddresses/model_natgateway.go deleted file mode 100644 index fc10c7874b7..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_natgatewaypropertiesformat.go deleted file mode 100644 index 3a740fb997b..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_natgatewaysku.go b/resource-manager/network/2022-11-01/publicipaddresses/model_natgatewaysku.go deleted file mode 100644 index 764ce1ec4aa..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_natruleportmapping.go b/resource-manager/network/2022-11-01/publicipaddresses/model_natruleportmapping.go deleted file mode 100644 index 8c9fe6cf53d..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterface.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterface.go deleted file mode 100644 index 5297e480153..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacednssettings.go deleted file mode 100644 index b5db798efaa..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 9840f48b636..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 7815eb1f03a..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index d4350e06603..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacepropertiesformat.go deleted file mode 100644 index b50c25d8086..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 060a9d5285a..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index d229b2dfb8d..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networksecuritygroup.go deleted file mode 100644 index 485cb7f8e07..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 8fef2ca403a..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpoint.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpoint.go deleted file mode 100644 index dd63348ae6f..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointconnection.go deleted file mode 100644 index b449098f79d..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointconnectionproperties.go deleted file mode 100644 index 8a20b5b22e7..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointipconfiguration.go deleted file mode 100644 index e75d758ed00..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 42574e02e61..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointproperties.go deleted file mode 100644 index a0108e9c621..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkservice.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkservice.go deleted file mode 100644 index b4d87fc1513..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnection.go deleted file mode 100644 index 2039fef8e1a..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 37f23eb3b44..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index ee170e64109..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 8dce57f93b6..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 17839c3231f..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceproperties.go deleted file mode 100644 index 7307dfa6a24..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddress.go b/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddress.go deleted file mode 100644 index 6be86648487..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package publicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddressdnssettings.go deleted file mode 100644 index 19bd5c73bdd..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 90c1d772012..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddresssku.go deleted file mode 100644 index af0178060c9..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipddosprotectionstatusresult.go b/resource-manager/network/2022-11-01/publicipaddresses/model_publicipddosprotectionstatusresult.go deleted file mode 100644 index dbf51354f05..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_publicipddosprotectionstatusresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPDdosProtectionStatusResult struct { - DdosProtectionPlanId *string `json:"ddosProtectionPlanId,omitempty"` - IsWorkloadProtected *IsWorkloadProtected `json:"isWorkloadProtected,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` - PublicIPAddressId *string `json:"publicIpAddressId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/publicipaddresses/model_resourcenavigationlink.go deleted file mode 100644 index 8df0e65c796..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_resourcenavigationlinkformat.go deleted file mode 100644 index 912dad5e9b9..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_resourceset.go b/resource-manager/network/2022-11-01/publicipaddresses/model_resourceset.go deleted file mode 100644 index eb4ec2e13c4..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/publicipaddresses/model_retentionpolicyparameters.go deleted file mode 100644 index 57e746e6800..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_route.go b/resource-manager/network/2022-11-01/publicipaddresses/model_route.go deleted file mode 100644 index 6aaf9130e49..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_routepropertiesformat.go deleted file mode 100644 index 19e40f46ddb..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_routetable.go b/resource-manager/network/2022-11-01/publicipaddresses/model_routetable.go deleted file mode 100644 index eed83ddcb84..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_routetablepropertiesformat.go deleted file mode 100644 index f408090b5c7..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_securityrule.go b/resource-manager/network/2022-11-01/publicipaddresses/model_securityrule.go deleted file mode 100644 index 056a5506bcc..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_securityrulepropertiesformat.go deleted file mode 100644 index e076569ccb4..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/publicipaddresses/model_serviceassociationlink.go deleted file mode 100644 index 80405186b49..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index e0afefd43a1..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_servicedelegationpropertiesformat.go deleted file mode 100644 index dfdf08665d4..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicy.go deleted file mode 100644 index 2937667f2df..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicydefinition.go deleted file mode 100644 index a5c2fb10189..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 6eae5a09363..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 77840b5f2bd..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 8d53fbdcd1e..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_subnet.go b/resource-manager/network/2022-11-01/publicipaddresses/model_subnet.go deleted file mode 100644 index 4dc6901bd98..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_subnetpropertiesformat.go deleted file mode 100644 index 97b1a3a4493..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_subresource.go b/resource-manager/network/2022-11-01/publicipaddresses/model_subresource.go deleted file mode 100644 index f4a7d6a3248..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_tagsobject.go b/resource-manager/network/2022-11-01/publicipaddresses/model_tagsobject.go deleted file mode 100644 index 717ed6f5d3d..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/publicipaddresses/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index f3cbae91cdc..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/publicipaddresses/model_trafficanalyticsproperties.go deleted file mode 100644 index 4e34016e12e..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/publicipaddresses/model_virtualnetworktap.go deleted file mode 100644 index b4791998c22..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/publicipaddresses/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 4f32bce3226..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/predicates.go b/resource-manager/network/2022-11-01/publicipaddresses/predicates.go deleted file mode 100644 index 07d29ffa733..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package publicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PublicIPAddressOperationPredicate) Matches(input PublicIPAddress) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/publicipaddresses/version.go b/resource-manager/network/2022-11-01/publicipaddresses/version.go deleted file mode 100644 index 64092e13b0f..00000000000 --- a/resource-manager/network/2022-11-01/publicipaddresses/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipaddresses - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipaddresses/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/README.md b/resource-manager/network/2022-11-01/publicipprefixes/README.md deleted file mode 100644 index cca864cd82e..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/publicipprefixes` Documentation - -The `publicipprefixes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/publicipprefixes" -``` - - -### Client Initialization - -```go -client := publicipprefixes.NewPublicIPPrefixesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `PublicIPPrefixesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := publicipprefixes.NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - -payload := publicipprefixes.PublicIPPrefix{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPPrefixesClient.Delete` - -```go -ctx := context.TODO() -id := publicipprefixes.NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `PublicIPPrefixesClient.Get` - -```go -ctx := context.TODO() -id := publicipprefixes.NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - -read, err := client.Get(ctx, id, publicipprefixes.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `PublicIPPrefixesClient.List` - -```go -ctx := context.TODO() -id := publicipprefixes.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PublicIPPrefixesClient.ListAll` - -```go -ctx := context.TODO() -id := publicipprefixes.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `PublicIPPrefixesClient.UpdateTags` - -```go -ctx := context.TODO() -id := publicipprefixes.NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - -payload := publicipprefixes.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/publicipprefixes/client.go b/resource-manager/network/2022-11-01/publicipprefixes/client.go deleted file mode 100644 index 9a1637fc3ce..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package publicipprefixes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefixesClient struct { - Client *resourcemanager.Client -} - -func NewPublicIPPrefixesClientWithBaseURI(api environments.Api) (*PublicIPPrefixesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "publicipprefixes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating PublicIPPrefixesClient: %+v", err) - } - - return &PublicIPPrefixesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/constants.go b/resource-manager/network/2022-11-01/publicipprefixes/constants.go deleted file mode 100644 index a8c1328b07b..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/constants.go +++ /dev/null @@ -1,215 +0,0 @@ -package publicipprefixes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPPrefixSkuName string - -const ( - PublicIPPrefixSkuNameStandard PublicIPPrefixSkuName = "Standard" -) - -func PossibleValuesForPublicIPPrefixSkuName() []string { - return []string{ - string(PublicIPPrefixSkuNameStandard), - } -} - -func (s *PublicIPPrefixSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPPrefixSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPPrefixSkuName(input string) (*PublicIPPrefixSkuName, error) { - vals := map[string]PublicIPPrefixSkuName{ - "standard": PublicIPPrefixSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPPrefixSkuName(input) - return &out, nil -} - -type PublicIPPrefixSkuTier string - -const ( - PublicIPPrefixSkuTierGlobal PublicIPPrefixSkuTier = "Global" - PublicIPPrefixSkuTierRegional PublicIPPrefixSkuTier = "Regional" -) - -func PossibleValuesForPublicIPPrefixSkuTier() []string { - return []string{ - string(PublicIPPrefixSkuTierGlobal), - string(PublicIPPrefixSkuTierRegional), - } -} - -func (s *PublicIPPrefixSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPPrefixSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPPrefixSkuTier(input string) (*PublicIPPrefixSkuTier, error) { - vals := map[string]PublicIPPrefixSkuTier{ - "global": PublicIPPrefixSkuTierGlobal, - "regional": PublicIPPrefixSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPPrefixSkuTier(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/id_publicipprefix.go b/resource-manager/network/2022-11-01/publicipprefixes/id_publicipprefix.go deleted file mode 100644 index 545d5140e51..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/id_publicipprefix.go +++ /dev/null @@ -1,127 +0,0 @@ -package publicipprefixes - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PublicIPPrefixId{} - -// PublicIPPrefixId is a struct representing the Resource ID for a Public I P Prefix -type PublicIPPrefixId struct { - SubscriptionId string - ResourceGroupName string - PublicIPPrefixName string -} - -// NewPublicIPPrefixID returns a new PublicIPPrefixId struct -func NewPublicIPPrefixID(subscriptionId string, resourceGroupName string, publicIPPrefixName string) PublicIPPrefixId { - return PublicIPPrefixId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - PublicIPPrefixName: publicIPPrefixName, - } -} - -// ParsePublicIPPrefixID parses 'input' into a PublicIPPrefixId -func ParsePublicIPPrefixID(input string) (*PublicIPPrefixId, error) { - parser := resourceids.NewParserFromResourceIdType(PublicIPPrefixId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PublicIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PublicIPPrefixName, ok = parsed.Parsed["publicIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publicIPPrefixName", *parsed) - } - - return &id, nil -} - -// ParsePublicIPPrefixIDInsensitively parses 'input' case-insensitively into a PublicIPPrefixId -// note: this method should only be used for API response data and not user input -func ParsePublicIPPrefixIDInsensitively(input string) (*PublicIPPrefixId, error) { - parser := resourceids.NewParserFromResourceIdType(PublicIPPrefixId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := PublicIPPrefixId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.PublicIPPrefixName, ok = parsed.Parsed["publicIPPrefixName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "publicIPPrefixName", *parsed) - } - - return &id, nil -} - -// ValidatePublicIPPrefixID checks that 'input' can be parsed as a Public I P Prefix ID -func ValidatePublicIPPrefixID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParsePublicIPPrefixID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Public I P Prefix ID -func (id PublicIPPrefixId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/publicIPPrefixes/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.PublicIPPrefixName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Public I P Prefix ID -func (id PublicIPPrefixId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticPublicIPPrefixes", "publicIPPrefixes", "publicIPPrefixes"), - resourceids.UserSpecifiedSegment("publicIPPrefixName", "publicIPPrefixValue"), - } -} - -// String returns a human-readable description of this Public I P Prefix ID -func (id PublicIPPrefixId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Public I P Prefix Name: %q", id.PublicIPPrefixName), - } - return fmt.Sprintf("Public I P Prefix (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/id_publicipprefix_test.go b/resource-manager/network/2022-11-01/publicipprefixes/id_publicipprefix_test.go deleted file mode 100644 index e8109504ea5..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/id_publicipprefix_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package publicipprefixes - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = PublicIPPrefixId{} - -func TestNewPublicIPPrefixID(t *testing.T) { - id := NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.PublicIPPrefixName != "publicIPPrefixValue" { - t.Fatalf("Expected %q but got %q for Segment 'PublicIPPrefixName'", id.PublicIPPrefixName, "publicIPPrefixValue") - } -} - -func TestFormatPublicIPPrefixID(t *testing.T) { - actual := NewPublicIPPrefixID("12345678-1234-9876-4563-123456789012", "example-resource-group", "publicIPPrefixValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParsePublicIPPrefixID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PublicIPPrefixId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue", - Expected: &PublicIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PublicIPPrefixName: "publicIPPrefixValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePublicIPPrefixID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PublicIPPrefixName != v.Expected.PublicIPPrefixName { - t.Fatalf("Expected %q but got %q for PublicIPPrefixName", v.Expected.PublicIPPrefixName, actual.PublicIPPrefixName) - } - - } -} - -func TestParsePublicIPPrefixIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *PublicIPPrefixId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pUbLiCiPpReFiXeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue", - Expected: &PublicIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - PublicIPPrefixName: "publicIPPrefixValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/publicIPPrefixes/publicIPPrefixValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pUbLiCiPpReFiXeS/pUbLiCiPpReFiXvAlUe", - Expected: &PublicIPPrefixId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - PublicIPPrefixName: "pUbLiCiPpReFiXvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/pUbLiCiPpReFiXeS/pUbLiCiPpReFiXvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParsePublicIPPrefixIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.PublicIPPrefixName != v.Expected.PublicIPPrefixName { - t.Fatalf("Expected %q but got %q for PublicIPPrefixName", v.Expected.PublicIPPrefixName, actual.PublicIPPrefixName) - } - - } -} - -func TestSegmentsForPublicIPPrefixId(t *testing.T) { - segments := PublicIPPrefixId{}.Segments() - if len(segments) == 0 { - t.Fatalf("PublicIPPrefixId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/method_createorupdate.go b/resource-manager/network/2022-11-01/publicipprefixes/method_createorupdate.go deleted file mode 100644 index a1ec59b764b..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, id PublicIPPrefixId, input PublicIPPrefix) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c PublicIPPrefixesClient) CreateOrUpdateThenPoll(ctx context.Context, id PublicIPPrefixId, input PublicIPPrefix) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/method_delete.go b/resource-manager/network/2022-11-01/publicipprefixes/method_delete.go deleted file mode 100644 index 4ef74511d04..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c PublicIPPrefixesClient) Delete(ctx context.Context, id PublicIPPrefixId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c PublicIPPrefixesClient) DeleteThenPoll(ctx context.Context, id PublicIPPrefixId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/method_get.go b/resource-manager/network/2022-11-01/publicipprefixes/method_get.go deleted file mode 100644 index f36b44de97b..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPPrefix -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c PublicIPPrefixesClient) Get(ctx context.Context, id PublicIPPrefixId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/method_list.go b/resource-manager/network/2022-11-01/publicipprefixes/method_list.go deleted file mode 100644 index 4e1577bfc9b..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPPrefix -} - -type ListCompleteResult struct { - Items []PublicIPPrefix -} - -// List ... -func (c PublicIPPrefixesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/publicIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPPrefix `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c PublicIPPrefixesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, PublicIPPrefixOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PublicIPPrefixesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate PublicIPPrefixOperationPredicate) (result ListCompleteResult, err error) { - items := make([]PublicIPPrefix, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/method_listall.go b/resource-manager/network/2022-11-01/publicipprefixes/method_listall.go deleted file mode 100644 index cd56ffc13cf..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package publicipprefixes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPPrefix -} - -type ListAllCompleteResult struct { - Items []PublicIPPrefix -} - -// ListAll ... -func (c PublicIPPrefixesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/publicIPPrefixes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPPrefix `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c PublicIPPrefixesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, PublicIPPrefixOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c PublicIPPrefixesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate PublicIPPrefixOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]PublicIPPrefix, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/method_updatetags.go b/resource-manager/network/2022-11-01/publicipprefixes/method_updatetags.go deleted file mode 100644 index 421bdd50b7f..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package publicipprefixes - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPPrefix -} - -// UpdateTags ... -func (c PublicIPPrefixesClient) UpdateTags(ctx context.Context, id PublicIPPrefixId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_iptag.go b/resource-manager/network/2022-11-01/publicipprefixes/model_iptag.go deleted file mode 100644 index e1bbbc73a6e..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_natgateway.go b/resource-manager/network/2022-11-01/publicipprefixes/model_natgateway.go deleted file mode 100644 index 170eeff6848..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package publicipprefixes - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/publicipprefixes/model_natgatewaypropertiesformat.go deleted file mode 100644 index 5c1f46d3737..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_natgatewaysku.go b/resource-manager/network/2022-11-01/publicipprefixes/model_natgatewaysku.go deleted file mode 100644 index 465e471e903..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefix.go b/resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefix.go deleted file mode 100644 index 6679bada47d..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefix.go +++ /dev/null @@ -1,22 +0,0 @@ -package publicipprefixes - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefix struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPPrefixPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPPrefixSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefixpropertiesformat.go b/resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefixpropertiesformat.go deleted file mode 100644 index 32b58a818b3..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefixpropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefixPropertiesFormat struct { - CustomIPPrefix *SubResource `json:"customIPPrefix,omitempty"` - IPPrefix *string `json:"ipPrefix,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIpConfiguration,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - PrefixLength *int64 `json:"prefixLength,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAddresses *[]ReferencedPublicIPAddress `json:"publicIPAddresses,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefixsku.go b/resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefixsku.go deleted file mode 100644 index 0737b92dee1..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_publicipprefixsku.go +++ /dev/null @@ -1,9 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefixSku struct { - Name *PublicIPPrefixSkuName `json:"name,omitempty"` - Tier *PublicIPPrefixSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_referencedpublicipaddress.go b/resource-manager/network/2022-11-01/publicipprefixes/model_referencedpublicipaddress.go deleted file mode 100644 index 26027a800a2..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_referencedpublicipaddress.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ReferencedPublicIPAddress struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_subresource.go b/resource-manager/network/2022-11-01/publicipprefixes/model_subresource.go deleted file mode 100644 index 53e3c780cbf..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/model_tagsobject.go b/resource-manager/network/2022-11-01/publicipprefixes/model_tagsobject.go deleted file mode 100644 index 6a82f86f28f..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/predicates.go b/resource-manager/network/2022-11-01/publicipprefixes/predicates.go deleted file mode 100644 index 7deb3ca2bbf..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package publicipprefixes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPPrefixOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PublicIPPrefixOperationPredicate) Matches(input PublicIPPrefix) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/publicipprefixes/version.go b/resource-manager/network/2022-11-01/publicipprefixes/version.go deleted file mode 100644 index eec8f72ce74..00000000000 --- a/resource-manager/network/2022-11-01/publicipprefixes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package publicipprefixes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/publicipprefixes/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/README.md b/resource-manager/network/2022-11-01/routefilterrules/README.md deleted file mode 100644 index 98b86f1863d..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routefilterrules` Documentation - -The `routefilterrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routefilterrules" -``` - - -### Client Initialization - -```go -client := routefilterrules.NewRouteFilterRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RouteFilterRulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := routefilterrules.NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue") - -payload := routefilterrules.RouteFilterRule{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteFilterRulesClient.Delete` - -```go -ctx := context.TODO() -id := routefilterrules.NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteFilterRulesClient.Get` - -```go -ctx := context.TODO() -id := routefilterrules.NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RouteFilterRulesClient.ListByRouteFilter` - -```go -ctx := context.TODO() -id := routefilterrules.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -// alternatively `client.ListByRouteFilter(ctx, id)` can be used to do batched pagination -items, err := client.ListByRouteFilterComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/routefilterrules/client.go b/resource-manager/network/2022-11-01/routefilterrules/client.go deleted file mode 100644 index 44483c23138..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package routefilterrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRulesClient struct { - Client *resourcemanager.Client -} - -func NewRouteFilterRulesClientWithBaseURI(api environments.Api) (*RouteFilterRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "routefilterrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating RouteFilterRulesClient: %+v", err) - } - - return &RouteFilterRulesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/constants.go b/resource-manager/network/2022-11-01/routefilterrules/constants.go deleted file mode 100644 index cf65052c645..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/constants.go +++ /dev/null @@ -1,136 +0,0 @@ -package routefilterrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Access string - -const ( - AccessAllow Access = "Allow" - AccessDeny Access = "Deny" -) - -func PossibleValuesForAccess() []string { - return []string{ - string(AccessAllow), - string(AccessDeny), - } -} - -func (s *Access) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAccess(input string) (*Access, error) { - vals := map[string]Access{ - "allow": AccessAllow, - "deny": AccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Access(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type RouteFilterRuleType string - -const ( - RouteFilterRuleTypeCommunity RouteFilterRuleType = "Community" -) - -func PossibleValuesForRouteFilterRuleType() []string { - return []string{ - string(RouteFilterRuleTypeCommunity), - } -} - -func (s *RouteFilterRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteFilterRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteFilterRuleType(input string) (*RouteFilterRuleType, error) { - vals := map[string]RouteFilterRuleType{ - "community": RouteFilterRuleTypeCommunity, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteFilterRuleType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/id_routefilter.go b/resource-manager/network/2022-11-01/routefilterrules/id_routefilter.go deleted file mode 100644 index 6ada8a037fc..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/id_routefilter.go +++ /dev/null @@ -1,127 +0,0 @@ -package routefilterrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterId{} - -// RouteFilterId is a struct representing the Resource ID for a Route Filter -type RouteFilterId struct { - SubscriptionId string - ResourceGroupName string - RouteFilterName string -} - -// NewRouteFilterID returns a new RouteFilterId struct -func NewRouteFilterID(subscriptionId string, resourceGroupName string, routeFilterName string) RouteFilterId { - return RouteFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteFilterName: routeFilterName, - } -} - -// ParseRouteFilterID parses 'input' into a RouteFilterId -func ParseRouteFilterID(input string) (*RouteFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - return &id, nil -} - -// ParseRouteFilterIDInsensitively parses 'input' case-insensitively into a RouteFilterId -// note: this method should only be used for API response data and not user input -func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - return &id, nil -} - -// ValidateRouteFilterID checks that 'input' can be parsed as a Route Filter ID -func ValidateRouteFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Filter ID -func (id RouteFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Filter ID -func (id RouteFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteFilters", "routeFilters", "routeFilters"), - resourceids.UserSpecifiedSegment("routeFilterName", "routeFilterValue"), - } -} - -// String returns a human-readable description of this Route Filter ID -func (id RouteFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Filter Name: %q", id.RouteFilterName), - } - return fmt.Sprintf("Route Filter (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/id_routefilter_test.go b/resource-manager/network/2022-11-01/routefilterrules/id_routefilter_test.go deleted file mode 100644 index 2a03535f87c..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/id_routefilter_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package routefilterrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterId{} - -func TestNewRouteFilterID(t *testing.T) { - id := NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteFilterName != "routeFilterValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteFilterName'", id.RouteFilterName, "routeFilterValue") - } -} - -func TestFormatRouteFilterID(t *testing.T) { - actual := NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteFilterID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - } -} - -func TestParseRouteFilterIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteFilterName: "rOuTeFiLtErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - } -} - -func TestSegmentsForRouteFilterId(t *testing.T) { - segments := RouteFilterId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteFilterId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/id_routefilterrule.go b/resource-manager/network/2022-11-01/routefilterrules/id_routefilterrule.go deleted file mode 100644 index e4cf470acdc..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/id_routefilterrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package routefilterrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterRuleId{} - -// RouteFilterRuleId is a struct representing the Resource ID for a Route Filter Rule -type RouteFilterRuleId struct { - SubscriptionId string - ResourceGroupName string - RouteFilterName string - RouteFilterRuleName string -} - -// NewRouteFilterRuleID returns a new RouteFilterRuleId struct -func NewRouteFilterRuleID(subscriptionId string, resourceGroupName string, routeFilterName string, routeFilterRuleName string) RouteFilterRuleId { - return RouteFilterRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteFilterName: routeFilterName, - RouteFilterRuleName: routeFilterRuleName, - } -} - -// ParseRouteFilterRuleID parses 'input' into a RouteFilterRuleId -func ParseRouteFilterRuleID(input string) (*RouteFilterRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - if id.RouteFilterRuleName, ok = parsed.Parsed["routeFilterRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterRuleName", *parsed) - } - - return &id, nil -} - -// ParseRouteFilterRuleIDInsensitively parses 'input' case-insensitively into a RouteFilterRuleId -// note: this method should only be used for API response data and not user input -func ParseRouteFilterRuleIDInsensitively(input string) (*RouteFilterRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - if id.RouteFilterRuleName, ok = parsed.Parsed["routeFilterRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterRuleName", *parsed) - } - - return &id, nil -} - -// ValidateRouteFilterRuleID checks that 'input' can be parsed as a Route Filter Rule ID -func ValidateRouteFilterRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteFilterRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Filter Rule ID -func (id RouteFilterRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeFilters/%s/routeFilterRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteFilterName, id.RouteFilterRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Filter Rule ID -func (id RouteFilterRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteFilters", "routeFilters", "routeFilters"), - resourceids.UserSpecifiedSegment("routeFilterName", "routeFilterValue"), - resourceids.StaticSegment("staticRouteFilterRules", "routeFilterRules", "routeFilterRules"), - resourceids.UserSpecifiedSegment("routeFilterRuleName", "routeFilterRuleValue"), - } -} - -// String returns a human-readable description of this Route Filter Rule ID -func (id RouteFilterRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Filter Name: %q", id.RouteFilterName), - fmt.Sprintf("Route Filter Rule Name: %q", id.RouteFilterRuleName), - } - return fmt.Sprintf("Route Filter Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/id_routefilterrule_test.go b/resource-manager/network/2022-11-01/routefilterrules/id_routefilterrule_test.go deleted file mode 100644 index 6e486f9df91..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/id_routefilterrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package routefilterrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterRuleId{} - -func TestNewRouteFilterRuleID(t *testing.T) { - id := NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteFilterName != "routeFilterValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteFilterName'", id.RouteFilterName, "routeFilterValue") - } - - if id.RouteFilterRuleName != "routeFilterRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteFilterRuleName'", id.RouteFilterRuleName, "routeFilterRuleValue") - } -} - -func TestFormatRouteFilterRuleID(t *testing.T) { - actual := NewRouteFilterRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue", "routeFilterRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteFilterRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue", - Expected: &RouteFilterRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - RouteFilterRuleName: "routeFilterRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - if actual.RouteFilterRuleName != v.Expected.RouteFilterRuleName { - t.Fatalf("Expected %q but got %q for RouteFilterRuleName", v.Expected.RouteFilterRuleName, actual.RouteFilterRuleName) - } - - } -} - -func TestParseRouteFilterRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/rOuTeFiLtErRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue", - Expected: &RouteFilterRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - RouteFilterRuleName: "routeFilterRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/routeFilterRules/routeFilterRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/rOuTeFiLtErRuLeS/rOuTeFiLtErRuLeVaLuE", - Expected: &RouteFilterRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteFilterName: "rOuTeFiLtErVaLuE", - RouteFilterRuleName: "rOuTeFiLtErRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/rOuTeFiLtErRuLeS/rOuTeFiLtErRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - if actual.RouteFilterRuleName != v.Expected.RouteFilterRuleName { - t.Fatalf("Expected %q but got %q for RouteFilterRuleName", v.Expected.RouteFilterRuleName, actual.RouteFilterRuleName) - } - - } -} - -func TestSegmentsForRouteFilterRuleId(t *testing.T) { - segments := RouteFilterRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteFilterRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/method_createorupdate.go b/resource-manager/network/2022-11-01/routefilterrules/method_createorupdate.go deleted file mode 100644 index d9ea66e2dd4..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package routefilterrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, id RouteFilterRuleId, input RouteFilterRule) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c RouteFilterRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id RouteFilterRuleId, input RouteFilterRule) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/method_delete.go b/resource-manager/network/2022-11-01/routefilterrules/method_delete.go deleted file mode 100644 index bbac130984b..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package routefilterrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c RouteFilterRulesClient) Delete(ctx context.Context, id RouteFilterRuleId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c RouteFilterRulesClient) DeleteThenPoll(ctx context.Context, id RouteFilterRuleId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/method_get.go b/resource-manager/network/2022-11-01/routefilterrules/method_get.go deleted file mode 100644 index f3c2de77462..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package routefilterrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteFilterRule -} - -// Get ... -func (c RouteFilterRulesClient) Get(ctx context.Context, id RouteFilterRuleId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/method_listbyroutefilter.go b/resource-manager/network/2022-11-01/routefilterrules/method_listbyroutefilter.go deleted file mode 100644 index 2496369e0e3..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/method_listbyroutefilter.go +++ /dev/null @@ -1,89 +0,0 @@ -package routefilterrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByRouteFilterOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteFilterRule -} - -type ListByRouteFilterCompleteResult struct { - Items []RouteFilterRule -} - -// ListByRouteFilter ... -func (c RouteFilterRulesClient) ListByRouteFilter(ctx context.Context, id RouteFilterId) (result ListByRouteFilterOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routeFilterRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteFilterRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByRouteFilterComplete retrieves all the results into a single object -func (c RouteFilterRulesClient) ListByRouteFilterComplete(ctx context.Context, id RouteFilterId) (ListByRouteFilterCompleteResult, error) { - return c.ListByRouteFilterCompleteMatchingPredicate(ctx, id, RouteFilterRuleOperationPredicate{}) -} - -// ListByRouteFilterCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteFilterRulesClient) ListByRouteFilterCompleteMatchingPredicate(ctx context.Context, id RouteFilterId, predicate RouteFilterRuleOperationPredicate) (result ListByRouteFilterCompleteResult, err error) { - items := make([]RouteFilterRule, 0) - - resp, err := c.ListByRouteFilter(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByRouteFilterCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/model_routefilterrule.go b/resource-manager/network/2022-11-01/routefilterrules/model_routefilterrule.go deleted file mode 100644 index d3ad4488a83..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/model_routefilterrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilterrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/model_routefilterrulepropertiesformat.go b/resource-manager/network/2022-11-01/routefilterrules/model_routefilterrulepropertiesformat.go deleted file mode 100644 index e59fbff04f1..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/model_routefilterrulepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package routefilterrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRulePropertiesFormat struct { - Access Access `json:"access"` - Communities []string `json:"communities"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilterRuleType RouteFilterRuleType `json:"routeFilterRuleType"` -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/predicates.go b/resource-manager/network/2022-11-01/routefilterrules/predicates.go deleted file mode 100644 index 3067b052089..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package routefilterrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRuleOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string -} - -func (p RouteFilterRuleOperationPredicate) Matches(input RouteFilterRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/routefilterrules/version.go b/resource-manager/network/2022-11-01/routefilterrules/version.go deleted file mode 100644 index 32f80d5abd2..00000000000 --- a/resource-manager/network/2022-11-01/routefilterrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilterrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilterrules/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/routefilters/README.md b/resource-manager/network/2022-11-01/routefilters/README.md deleted file mode 100644 index cb3749b4ea8..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routefilters` Documentation - -The `routefilters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routefilters" -``` - - -### Client Initialization - -```go -client := routefilters.NewRouteFiltersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RouteFiltersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := routefilters.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -payload := routefilters.RouteFilter{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteFiltersClient.Delete` - -```go -ctx := context.TODO() -id := routefilters.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteFiltersClient.Get` - -```go -ctx := context.TODO() -id := routefilters.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -read, err := client.Get(ctx, id, routefilters.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RouteFiltersClient.List` - -```go -ctx := context.TODO() -id := routefilters.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RouteFiltersClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := routefilters.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RouteFiltersClient.UpdateTags` - -```go -ctx := context.TODO() -id := routefilters.NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - -payload := routefilters.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/routefilters/client.go b/resource-manager/network/2022-11-01/routefilters/client.go deleted file mode 100644 index e233141d003..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package routefilters - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFiltersClient struct { - Client *resourcemanager.Client -} - -func NewRouteFiltersClientWithBaseURI(api environments.Api) (*RouteFiltersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "routefilters", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating RouteFiltersClient: %+v", err) - } - - return &RouteFiltersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/routefilters/constants.go b/resource-manager/network/2022-11-01/routefilters/constants.go deleted file mode 100644 index 47cec86d290..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/constants.go +++ /dev/null @@ -1,353 +0,0 @@ -package routefilters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Access string - -const ( - AccessAllow Access = "Allow" - AccessDeny Access = "Deny" -) - -func PossibleValuesForAccess() []string { - return []string{ - string(AccessAllow), - string(AccessDeny), - } -} - -func (s *Access) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAccess(input string) (*Access, error) { - vals := map[string]Access{ - "allow": AccessAllow, - "deny": AccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := Access(input) - return &out, nil -} - -type CircuitConnectionStatus string - -const ( - CircuitConnectionStatusConnected CircuitConnectionStatus = "Connected" - CircuitConnectionStatusConnecting CircuitConnectionStatus = "Connecting" - CircuitConnectionStatusDisconnected CircuitConnectionStatus = "Disconnected" -) - -func PossibleValuesForCircuitConnectionStatus() []string { - return []string{ - string(CircuitConnectionStatusConnected), - string(CircuitConnectionStatusConnecting), - string(CircuitConnectionStatusDisconnected), - } -} - -func (s *CircuitConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseCircuitConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseCircuitConnectionStatus(input string) (*CircuitConnectionStatus, error) { - vals := map[string]CircuitConnectionStatus{ - "connected": CircuitConnectionStatusConnected, - "connecting": CircuitConnectionStatusConnecting, - "disconnected": CircuitConnectionStatusDisconnected, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := CircuitConnectionStatus(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string - -const ( - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" -) - -func PossibleValuesForExpressRouteCircuitPeeringAdvertisedPublicPrefixState() []string { - return []string{ - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured), - string(ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded), - } -} - -func (s *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input string) (*ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, error) { - vals := map[string]ExpressRouteCircuitPeeringAdvertisedPublicPrefixState{ - "configured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfigured, - "configuring": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateConfiguring, - "notconfigured": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateNotConfigured, - "validationneeded": ExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValidationNeeded, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(input) - return &out, nil -} - -type ExpressRouteCircuitPeeringState string - -const ( - ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" -) - -func PossibleValuesForExpressRouteCircuitPeeringState() []string { - return []string{ - string(ExpressRouteCircuitPeeringStateDisabled), - string(ExpressRouteCircuitPeeringStateEnabled), - } -} - -func (s *ExpressRouteCircuitPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRouteCircuitPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRouteCircuitPeeringState(input string) (*ExpressRouteCircuitPeeringState, error) { - vals := map[string]ExpressRouteCircuitPeeringState{ - "disabled": ExpressRouteCircuitPeeringStateDisabled, - "enabled": ExpressRouteCircuitPeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRouteCircuitPeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringState string - -const ( - ExpressRoutePeeringStateDisabled ExpressRoutePeeringState = "Disabled" - ExpressRoutePeeringStateEnabled ExpressRoutePeeringState = "Enabled" -) - -func PossibleValuesForExpressRoutePeeringState() []string { - return []string{ - string(ExpressRoutePeeringStateDisabled), - string(ExpressRoutePeeringStateEnabled), - } -} - -func (s *ExpressRoutePeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringState(input string) (*ExpressRoutePeeringState, error) { - vals := map[string]ExpressRoutePeeringState{ - "disabled": ExpressRoutePeeringStateDisabled, - "enabled": ExpressRoutePeeringStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringState(input) - return &out, nil -} - -type ExpressRoutePeeringType string - -const ( - ExpressRoutePeeringTypeAzurePrivatePeering ExpressRoutePeeringType = "AzurePrivatePeering" - ExpressRoutePeeringTypeAzurePublicPeering ExpressRoutePeeringType = "AzurePublicPeering" - ExpressRoutePeeringTypeMicrosoftPeering ExpressRoutePeeringType = "MicrosoftPeering" -) - -func PossibleValuesForExpressRoutePeeringType() []string { - return []string{ - string(ExpressRoutePeeringTypeAzurePrivatePeering), - string(ExpressRoutePeeringTypeAzurePublicPeering), - string(ExpressRoutePeeringTypeMicrosoftPeering), - } -} - -func (s *ExpressRoutePeeringType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseExpressRoutePeeringType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseExpressRoutePeeringType(input string) (*ExpressRoutePeeringType, error) { - vals := map[string]ExpressRoutePeeringType{ - "azureprivatepeering": ExpressRoutePeeringTypeAzurePrivatePeering, - "azurepublicpeering": ExpressRoutePeeringTypeAzurePublicPeering, - "microsoftpeering": ExpressRoutePeeringTypeMicrosoftPeering, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ExpressRoutePeeringType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type RouteFilterRuleType string - -const ( - RouteFilterRuleTypeCommunity RouteFilterRuleType = "Community" -) - -func PossibleValuesForRouteFilterRuleType() []string { - return []string{ - string(RouteFilterRuleTypeCommunity), - } -} - -func (s *RouteFilterRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteFilterRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteFilterRuleType(input string) (*RouteFilterRuleType, error) { - vals := map[string]RouteFilterRuleType{ - "community": RouteFilterRuleTypeCommunity, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteFilterRuleType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/routefilters/id_routefilter.go b/resource-manager/network/2022-11-01/routefilters/id_routefilter.go deleted file mode 100644 index 0d539e18cc3..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/id_routefilter.go +++ /dev/null @@ -1,127 +0,0 @@ -package routefilters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterId{} - -// RouteFilterId is a struct representing the Resource ID for a Route Filter -type RouteFilterId struct { - SubscriptionId string - ResourceGroupName string - RouteFilterName string -} - -// NewRouteFilterID returns a new RouteFilterId struct -func NewRouteFilterID(subscriptionId string, resourceGroupName string, routeFilterName string) RouteFilterId { - return RouteFilterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteFilterName: routeFilterName, - } -} - -// ParseRouteFilterID parses 'input' into a RouteFilterId -func ParseRouteFilterID(input string) (*RouteFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - return &id, nil -} - -// ParseRouteFilterIDInsensitively parses 'input' case-insensitively into a RouteFilterId -// note: this method should only be used for API response data and not user input -func ParseRouteFilterIDInsensitively(input string) (*RouteFilterId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteFilterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteFilterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteFilterName, ok = parsed.Parsed["routeFilterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeFilterName", *parsed) - } - - return &id, nil -} - -// ValidateRouteFilterID checks that 'input' can be parsed as a Route Filter ID -func ValidateRouteFilterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteFilterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Filter ID -func (id RouteFilterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeFilters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteFilterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Filter ID -func (id RouteFilterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteFilters", "routeFilters", "routeFilters"), - resourceids.UserSpecifiedSegment("routeFilterName", "routeFilterValue"), - } -} - -// String returns a human-readable description of this Route Filter ID -func (id RouteFilterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Filter Name: %q", id.RouteFilterName), - } - return fmt.Sprintf("Route Filter (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/routefilters/id_routefilter_test.go b/resource-manager/network/2022-11-01/routefilters/id_routefilter_test.go deleted file mode 100644 index 82418c4d29e..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/id_routefilter_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package routefilters - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteFilterId{} - -func TestNewRouteFilterID(t *testing.T) { - id := NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteFilterName != "routeFilterValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteFilterName'", id.RouteFilterName, "routeFilterValue") - } -} - -func TestFormatRouteFilterID(t *testing.T) { - actual := NewRouteFilterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeFilterValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteFilterID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - } -} - -func TestParseRouteFilterIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteFilterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteFilterName: "routeFilterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeFilters/routeFilterValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE", - Expected: &RouteFilterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteFilterName: "rOuTeFiLtErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeFiLtErS/rOuTeFiLtErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteFilterIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteFilterName != v.Expected.RouteFilterName { - t.Fatalf("Expected %q but got %q for RouteFilterName", v.Expected.RouteFilterName, actual.RouteFilterName) - } - - } -} - -func TestSegmentsForRouteFilterId(t *testing.T) { - segments := RouteFilterId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteFilterId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/routefilters/method_createorupdate.go b/resource-manager/network/2022-11-01/routefilters/method_createorupdate.go deleted file mode 100644 index 9bcba818d23..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c RouteFiltersClient) CreateOrUpdate(ctx context.Context, id RouteFilterId, input RouteFilter) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c RouteFiltersClient) CreateOrUpdateThenPoll(ctx context.Context, id RouteFilterId, input RouteFilter) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/routefilters/method_delete.go b/resource-manager/network/2022-11-01/routefilters/method_delete.go deleted file mode 100644 index 1a389b5108c..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c RouteFiltersClient) Delete(ctx context.Context, id RouteFilterId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c RouteFiltersClient) DeleteThenPoll(ctx context.Context, id RouteFilterId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/routefilters/method_get.go b/resource-manager/network/2022-11-01/routefilters/method_get.go deleted file mode 100644 index 780247673d5..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteFilter -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c RouteFiltersClient) Get(ctx context.Context, id RouteFilterId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/routefilters/method_list.go b/resource-manager/network/2022-11-01/routefilters/method_list.go deleted file mode 100644 index 54448a67f8d..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteFilter -} - -type ListCompleteResult struct { - Items []RouteFilter -} - -// List ... -func (c RouteFiltersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/routeFilters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteFilter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c RouteFiltersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, RouteFilterOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteFiltersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RouteFilterOperationPredicate) (result ListCompleteResult, err error) { - items := make([]RouteFilter, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/routefilters/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/routefilters/method_listbyresourcegroup.go deleted file mode 100644 index 938f6ef5830..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package routefilters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteFilter -} - -type ListByResourceGroupCompleteResult struct { - Items []RouteFilter -} - -// ListByResourceGroup ... -func (c RouteFiltersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/routeFilters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteFilter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c RouteFiltersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, RouteFilterOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteFiltersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate RouteFilterOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]RouteFilter, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/routefilters/method_updatetags.go b/resource-manager/network/2022-11-01/routefilters/method_updatetags.go deleted file mode 100644 index a36ab91797b..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package routefilters - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteFilter -} - -// UpdateTags ... -func (c RouteFiltersClient) UpdateTags(ctx context.Context, id RouteFilterId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitconnection.go b/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitconnection.go deleted file mode 100644 index b4ee9836dca..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index 2e9948e07f4..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthorizationKey *string `json:"authorizationKey,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - IPv6CircuitConnectionConfig *IPv6CircuitConnectionConfig `json:"ipv6CircuitConnectionConfig,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeering.go b/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeering.go deleted file mode 100644 index 79ef27f6ed8..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ExpressRouteCircuitPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeeringconfig.go deleted file mode 100644 index 43de7805714..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,13 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringConfig struct { - AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` - AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` - AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` - CustomerASN *int64 `json:"customerASN,omitempty"` - LegacyMode *int64 `json:"legacyMode,omitempty"` - RoutingRegistryName *string `json:"routingRegistryName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeeringpropertiesformat.go b/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeeringpropertiesformat.go deleted file mode 100644 index 1f5f8e7a726..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitpeeringpropertiesformat.go +++ /dev/null @@ -1,27 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitPeeringPropertiesFormat struct { - AzureASN *int64 `json:"azureASN,omitempty"` - Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"` - ExpressRouteConnection *ExpressRouteConnectionId `json:"expressRouteConnection,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - IPv6PeeringConfig *IPv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PeerASN *int64 `json:"peerASN,omitempty"` - PeeredConnections *[]PeerExpressRouteCircuitConnection `json:"peeredConnections,omitempty"` - PeeringType *ExpressRoutePeeringType `json:"peeringType,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - State *ExpressRoutePeeringState `json:"state,omitempty"` - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - VlanId *int64 `json:"vlanId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitstats.go b/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitstats.go deleted file mode 100644 index b57109bba40..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_expressroutecircuitstats.go +++ /dev/null @@ -1,11 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteCircuitStats struct { - PrimarybytesIn *int64 `json:"primarybytesIn,omitempty"` - PrimarybytesOut *int64 `json:"primarybytesOut,omitempty"` - SecondarybytesIn *int64 `json:"secondarybytesIn,omitempty"` - SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_expressrouteconnectionid.go b/resource-manager/network/2022-11-01/routefilters/model_expressrouteconnectionid.go deleted file mode 100644 index 8d033b8e0e1..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_expressrouteconnectionid.go +++ /dev/null @@ -1,8 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExpressRouteConnectionId struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_ipv6circuitconnectionconfig.go b/resource-manager/network/2022-11-01/routefilters/model_ipv6circuitconnectionconfig.go deleted file mode 100644 index 036a19fa8aa..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_ipv6circuitconnectionconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6CircuitConnectionConfig struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_ipv6expressroutecircuitpeeringconfig.go b/resource-manager/network/2022-11-01/routefilters/model_ipv6expressroutecircuitpeeringconfig.go deleted file mode 100644 index 66f1810d2ef..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_ipv6expressroutecircuitpeeringconfig.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPv6ExpressRouteCircuitPeeringConfig struct { - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - RouteFilter *SubResource `json:"routeFilter,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - State *ExpressRouteCircuitPeeringState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_peerexpressroutecircuitconnection.go b/resource-manager/network/2022-11-01/routefilters/model_peerexpressroutecircuitconnection.go deleted file mode 100644 index 1cceefb8321..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_peerexpressroutecircuitconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PeerExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_peerexpressroutecircuitconnectionpropertiesformat.go b/resource-manager/network/2022-11-01/routefilters/model_peerexpressroutecircuitconnectionpropertiesformat.go deleted file mode 100644 index ae3652f5c1b..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_peerexpressroutecircuitconnectionpropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerExpressRouteCircuitConnectionPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AuthResourceGuid *string `json:"authResourceGuid,omitempty"` - CircuitConnectionStatus *CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"` - ConnectionName *string `json:"connectionName,omitempty"` - ExpressRouteCircuitPeering *SubResource `json:"expressRouteCircuitPeering,omitempty"` - PeerExpressRouteCircuitPeering *SubResource `json:"peerExpressRouteCircuitPeering,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_routefilter.go b/resource-manager/network/2022-11-01/routefilters/model_routefilter.go deleted file mode 100644 index 1a6d290ed31..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_routefilter.go +++ /dev/null @@ -1,14 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilter struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *RouteFilterPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_routefilterpropertiesformat.go b/resource-manager/network/2022-11-01/routefilters/model_routefilterpropertiesformat.go deleted file mode 100644 index 3442c803e11..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_routefilterpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterPropertiesFormat struct { - IPv6Peerings *[]ExpressRouteCircuitPeering `json:"ipv6Peerings,omitempty"` - Peerings *[]ExpressRouteCircuitPeering `json:"peerings,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]RouteFilterRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_routefilterrule.go b/resource-manager/network/2022-11-01/routefilters/model_routefilterrule.go deleted file mode 100644 index 7bce6e5cdbc..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_routefilterrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteFilterRulePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_routefilterrulepropertiesformat.go b/resource-manager/network/2022-11-01/routefilters/model_routefilterrulepropertiesformat.go deleted file mode 100644 index 70f71e0d28d..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_routefilterrulepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterRulePropertiesFormat struct { - Access Access `json:"access"` - Communities []string `json:"communities"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteFilterRuleType RouteFilterRuleType `json:"routeFilterRuleType"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_subresource.go b/resource-manager/network/2022-11-01/routefilters/model_subresource.go deleted file mode 100644 index 18344aa65b5..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/model_tagsobject.go b/resource-manager/network/2022-11-01/routefilters/model_tagsobject.go deleted file mode 100644 index 7657d1402ea..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routefilters/predicates.go b/resource-manager/network/2022-11-01/routefilters/predicates.go deleted file mode 100644 index 62b69547730..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package routefilters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteFilterOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p RouteFilterOperationPredicate) Matches(input RouteFilter) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/routefilters/version.go b/resource-manager/network/2022-11-01/routefilters/version.go deleted file mode 100644 index d38044a47f0..00000000000 --- a/resource-manager/network/2022-11-01/routefilters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package routefilters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routefilters/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/routes/README.md b/resource-manager/network/2022-11-01/routes/README.md deleted file mode 100644 index 421d9b14674..00000000000 --- a/resource-manager/network/2022-11-01/routes/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routes` Documentation - -The `routes` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routes" -``` - - -### Client Initialization - -```go -client := routes.NewRoutesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RoutesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue") - -payload := routes.Route{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RoutesClient.Delete` - -```go -ctx := context.TODO() -id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `RoutesClient.Get` - -```go -ctx := context.TODO() -id := routes.NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RoutesClient.List` - -```go -ctx := context.TODO() -id := routes.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/routes/client.go b/resource-manager/network/2022-11-01/routes/client.go deleted file mode 100644 index d82a569dd0e..00000000000 --- a/resource-manager/network/2022-11-01/routes/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package routes - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutesClient struct { - Client *resourcemanager.Client -} - -func NewRoutesClientWithBaseURI(api environments.Api) (*RoutesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "routes", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating RoutesClient: %+v", err) - } - - return &RoutesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/routes/constants.go b/resource-manager/network/2022-11-01/routes/constants.go deleted file mode 100644 index e26bed906c5..00000000000 --- a/resource-manager/network/2022-11-01/routes/constants.go +++ /dev/null @@ -1,107 +0,0 @@ -package routes - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/routes/id_route.go b/resource-manager/network/2022-11-01/routes/id_route.go deleted file mode 100644 index f2bbb0efdb5..00000000000 --- a/resource-manager/network/2022-11-01/routes/id_route.go +++ /dev/null @@ -1,140 +0,0 @@ -package routes - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteId{} - -// RouteId is a struct representing the Resource ID for a Route -type RouteId struct { - SubscriptionId string - ResourceGroupName string - RouteTableName string - RouteName string -} - -// NewRouteID returns a new RouteId struct -func NewRouteID(subscriptionId string, resourceGroupName string, routeTableName string, routeName string) RouteId { - return RouteId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteTableName: routeTableName, - RouteName: routeName, - } -} - -// ParseRouteID parses 'input' into a RouteId -func ParseRouteID(input string) (*RouteId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - if id.RouteName, ok = parsed.Parsed["routeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeName", *parsed) - } - - return &id, nil -} - -// ParseRouteIDInsensitively parses 'input' case-insensitively into a RouteId -// note: this method should only be used for API response data and not user input -func ParseRouteIDInsensitively(input string) (*RouteId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - if id.RouteName, ok = parsed.Parsed["routeName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeName", *parsed) - } - - return &id, nil -} - -// ValidateRouteID checks that 'input' can be parsed as a Route ID -func ValidateRouteID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route ID -func (id RouteId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeTables/%s/routes/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteTableName, id.RouteName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route ID -func (id RouteId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - resourceids.StaticSegment("staticRoutes", "routes", "routes"), - resourceids.UserSpecifiedSegment("routeName", "routeValue"), - } -} - -// String returns a human-readable description of this Route ID -func (id RouteId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - fmt.Sprintf("Route Name: %q", id.RouteName), - } - return fmt.Sprintf("Route (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/routes/id_route_test.go b/resource-manager/network/2022-11-01/routes/id_route_test.go deleted file mode 100644 index cc9559ee238..00000000000 --- a/resource-manager/network/2022-11-01/routes/id_route_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package routes - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteId{} - -func TestNewRouteID(t *testing.T) { - id := NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } - - if id.RouteName != "routeValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteName'", id.RouteName, "routeValue") - } -} - -func TestFormatRouteID(t *testing.T) { - actual := NewRouteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue", "routeValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue", - Expected: &RouteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - RouteName: "routeValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - if actual.RouteName != v.Expected.RouteName { - t.Fatalf("Expected %q but got %q for RouteName", v.Expected.RouteName, actual.RouteName) - } - - } -} - -func TestParseRouteIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/rOuTeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue", - Expected: &RouteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - RouteName: "routeValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/routes/routeValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/rOuTeS/rOuTeVaLuE", - Expected: &RouteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteTableName: "rOuTeTaBlEvAlUe", - RouteName: "rOuTeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/rOuTeS/rOuTeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - if actual.RouteName != v.Expected.RouteName { - t.Fatalf("Expected %q but got %q for RouteName", v.Expected.RouteName, actual.RouteName) - } - - } -} - -func TestSegmentsForRouteId(t *testing.T) { - segments := RouteId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/routes/id_routetable.go b/resource-manager/network/2022-11-01/routes/id_routetable.go deleted file mode 100644 index c8aadc85160..00000000000 --- a/resource-manager/network/2022-11-01/routes/id_routetable.go +++ /dev/null @@ -1,127 +0,0 @@ -package routes - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTableId{} - -// RouteTableId is a struct representing the Resource ID for a Route Table -type RouteTableId struct { - SubscriptionId string - ResourceGroupName string - RouteTableName string -} - -// NewRouteTableID returns a new RouteTableId struct -func NewRouteTableID(subscriptionId string, resourceGroupName string, routeTableName string) RouteTableId { - return RouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteTableName: routeTableName, - } -} - -// ParseRouteTableID parses 'input' into a RouteTableId -func ParseRouteTableID(input string) (*RouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParseRouteTableIDInsensitively parses 'input' case-insensitively into a RouteTableId -// note: this method should only be used for API response data and not user input -func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidateRouteTableID checks that 'input' can be parsed as a Route Table ID -func ValidateRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Table ID -func (id RouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Table ID -func (id RouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Route Table ID -func (id RouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/routes/id_routetable_test.go b/resource-manager/network/2022-11-01/routes/id_routetable_test.go deleted file mode 100644 index d4e8b54b32b..00000000000 --- a/resource-manager/network/2022-11-01/routes/id_routetable_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package routes - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTableId{} - -func TestNewRouteTableID(t *testing.T) { - id := NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatRouteTableID(t *testing.T) { - actual := NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParseRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForRouteTableId(t *testing.T) { - segments := RouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/routes/method_createorupdate.go b/resource-manager/network/2022-11-01/routes/method_createorupdate.go deleted file mode 100644 index c48c20f8ef7..00000000000 --- a/resource-manager/network/2022-11-01/routes/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package routes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c RoutesClient) CreateOrUpdate(ctx context.Context, id RouteId, input Route) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c RoutesClient) CreateOrUpdateThenPoll(ctx context.Context, id RouteId, input Route) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/routes/method_delete.go b/resource-manager/network/2022-11-01/routes/method_delete.go deleted file mode 100644 index f6cee23c133..00000000000 --- a/resource-manager/network/2022-11-01/routes/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package routes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c RoutesClient) Delete(ctx context.Context, id RouteId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c RoutesClient) DeleteThenPoll(ctx context.Context, id RouteId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/routes/method_get.go b/resource-manager/network/2022-11-01/routes/method_get.go deleted file mode 100644 index afe6e4a6434..00000000000 --- a/resource-manager/network/2022-11-01/routes/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package routes - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Route -} - -// Get ... -func (c RoutesClient) Get(ctx context.Context, id RouteId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/routes/method_list.go b/resource-manager/network/2022-11-01/routes/method_list.go deleted file mode 100644 index c2d72c97aa3..00000000000 --- a/resource-manager/network/2022-11-01/routes/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package routes - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Route -} - -type ListCompleteResult struct { - Items []Route -} - -// List ... -func (c RoutesClient) List(ctx context.Context, id RouteTableId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Route `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c RoutesClient) ListComplete(ctx context.Context, id RouteTableId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, RouteOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RoutesClient) ListCompleteMatchingPredicate(ctx context.Context, id RouteTableId, predicate RouteOperationPredicate) (result ListCompleteResult, err error) { - items := make([]Route, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/routes/model_route.go b/resource-manager/network/2022-11-01/routes/model_route.go deleted file mode 100644 index 364b3bb3322..00000000000 --- a/resource-manager/network/2022-11-01/routes/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package routes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routes/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/routes/model_routepropertiesformat.go deleted file mode 100644 index 82a30d0f4e0..00000000000 --- a/resource-manager/network/2022-11-01/routes/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routes/predicates.go b/resource-manager/network/2022-11-01/routes/predicates.go deleted file mode 100644 index b0ff24a6573..00000000000 --- a/resource-manager/network/2022-11-01/routes/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package routes - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p RouteOperationPredicate) Matches(input Route) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/routes/version.go b/resource-manager/network/2022-11-01/routes/version.go deleted file mode 100644 index 83d8e3c3fb5..00000000000 --- a/resource-manager/network/2022-11-01/routes/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package routes - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routes/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/routetables/README.md b/resource-manager/network/2022-11-01/routetables/README.md deleted file mode 100644 index 9ac56a02875..00000000000 --- a/resource-manager/network/2022-11-01/routetables/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routetables` Documentation - -The `routetables` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/routetables" -``` - - -### Client Initialization - -```go -client := routetables.NewRouteTablesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `RouteTablesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := routetables.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -payload := routetables.RouteTable{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteTablesClient.Delete` - -```go -ctx := context.TODO() -id := routetables.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `RouteTablesClient.Get` - -```go -ctx := context.TODO() -id := routetables.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -read, err := client.Get(ctx, id, routetables.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `RouteTablesClient.List` - -```go -ctx := context.TODO() -id := routetables.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RouteTablesClient.ListAll` - -```go -ctx := context.TODO() -id := routetables.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `RouteTablesClient.UpdateTags` - -```go -ctx := context.TODO() -id := routetables.NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - -payload := routetables.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/routetables/client.go b/resource-manager/network/2022-11-01/routetables/client.go deleted file mode 100644 index 98894d48e67..00000000000 --- a/resource-manager/network/2022-11-01/routetables/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package routetables - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablesClient struct { - Client *resourcemanager.Client -} - -func NewRouteTablesClientWithBaseURI(api environments.Api) (*RouteTablesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "routetables", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating RouteTablesClient: %+v", err) - } - - return &RouteTablesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/routetables/constants.go b/resource-manager/network/2022-11-01/routetables/constants.go deleted file mode 100644 index 393d462f1e6..00000000000 --- a/resource-manager/network/2022-11-01/routetables/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package routetables - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/routetables/id_routetable.go b/resource-manager/network/2022-11-01/routetables/id_routetable.go deleted file mode 100644 index 15838ef16b1..00000000000 --- a/resource-manager/network/2022-11-01/routetables/id_routetable.go +++ /dev/null @@ -1,127 +0,0 @@ -package routetables - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTableId{} - -// RouteTableId is a struct representing the Resource ID for a Route Table -type RouteTableId struct { - SubscriptionId string - ResourceGroupName string - RouteTableName string -} - -// NewRouteTableID returns a new RouteTableId struct -func NewRouteTableID(subscriptionId string, resourceGroupName string, routeTableName string) RouteTableId { - return RouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - RouteTableName: routeTableName, - } -} - -// ParseRouteTableID parses 'input' into a RouteTableId -func ParseRouteTableID(input string) (*RouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParseRouteTableIDInsensitively parses 'input' case-insensitively into a RouteTableId -// note: this method should only be used for API response data and not user input -func ParseRouteTableIDInsensitively(input string) (*RouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidateRouteTableID checks that 'input' can be parsed as a Route Table ID -func ValidateRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Table ID -func (id RouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Table ID -func (id RouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Route Table ID -func (id RouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/routetables/id_routetable_test.go b/resource-manager/network/2022-11-01/routetables/id_routetable_test.go deleted file mode 100644 index 6d79f18c17a..00000000000 --- a/resource-manager/network/2022-11-01/routetables/id_routetable_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package routetables - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteTableId{} - -func TestNewRouteTableID(t *testing.T) { - id := NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatRouteTableID(t *testing.T) { - actual := NewRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParseRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &RouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForRouteTableId(t *testing.T) { - segments := RouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/routetables/method_createorupdate.go b/resource-manager/network/2022-11-01/routetables/method_createorupdate.go deleted file mode 100644 index 513a723fa59..00000000000 --- a/resource-manager/network/2022-11-01/routetables/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c RouteTablesClient) CreateOrUpdate(ctx context.Context, id RouteTableId, input RouteTable) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c RouteTablesClient) CreateOrUpdateThenPoll(ctx context.Context, id RouteTableId, input RouteTable) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/routetables/method_delete.go b/resource-manager/network/2022-11-01/routetables/method_delete.go deleted file mode 100644 index 6ef6e0e531d..00000000000 --- a/resource-manager/network/2022-11-01/routetables/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c RouteTablesClient) Delete(ctx context.Context, id RouteTableId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c RouteTablesClient) DeleteThenPoll(ctx context.Context, id RouteTableId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/routetables/method_get.go b/resource-manager/network/2022-11-01/routetables/method_get.go deleted file mode 100644 index 982dfc8c9bb..00000000000 --- a/resource-manager/network/2022-11-01/routetables/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteTable -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c RouteTablesClient) Get(ctx context.Context, id RouteTableId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/routetables/method_list.go b/resource-manager/network/2022-11-01/routetables/method_list.go deleted file mode 100644 index fe8b71a9bb8..00000000000 --- a/resource-manager/network/2022-11-01/routetables/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteTable -} - -type ListCompleteResult struct { - Items []RouteTable -} - -// List ... -func (c RouteTablesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/routeTables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteTable `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c RouteTablesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, RouteTableOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteTablesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate RouteTableOperationPredicate) (result ListCompleteResult, err error) { - items := make([]RouteTable, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/routetables/method_listall.go b/resource-manager/network/2022-11-01/routetables/method_listall.go deleted file mode 100644 index be85d8a046c..00000000000 --- a/resource-manager/network/2022-11-01/routetables/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package routetables - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteTable -} - -type ListAllCompleteResult struct { - Items []RouteTable -} - -// ListAll ... -func (c RouteTablesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/routeTables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteTable `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c RouteTablesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, RouteTableOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c RouteTablesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate RouteTableOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]RouteTable, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/routetables/method_updatetags.go b/resource-manager/network/2022-11-01/routetables/method_updatetags.go deleted file mode 100644 index 796310232ed..00000000000 --- a/resource-manager/network/2022-11-01/routetables/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package routetables - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteTable -} - -// UpdateTags ... -func (c RouteTablesClient) UpdateTags(ctx context.Context, id RouteTableId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 3f1666af192..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index aa535e08a6a..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 26b2afe4fb6..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/routetables/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 2474ea7f89e..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index b0ea966f8a5..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/routetables/model_applicationsecuritygroup.go deleted file mode 100644 index da94563b915..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index d270ac905b2..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_backendaddresspool.go b/resource-manager/network/2022-11-01/routetables/model_backendaddresspool.go deleted file mode 100644 index 90a55576b63..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index c1ff3fcd065..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index d85f90834ef..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_ddossettings.go b/resource-manager/network/2022-11-01/routetables/model_ddossettings.go deleted file mode 100644 index ffd9663e361..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_delegation.go b/resource-manager/network/2022-11-01/routetables/model_delegation.go deleted file mode 100644 index 2098ca8ace8..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_flowlog.go b/resource-manager/network/2022-11-01/routetables/model_flowlog.go deleted file mode 100644 index cea97564b72..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/routetables/model_flowlogformatparameters.go deleted file mode 100644 index 46d83a48283..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_flowlogpropertiesformat.go deleted file mode 100644 index 23f3648b1da..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/routetables/model_frontendipconfiguration.go deleted file mode 100644 index 15308372f3a..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index c3ba5e8cb16..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/routetables/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index f99a910776d..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_inboundnatrule.go b/resource-manager/network/2022-11-01/routetables/model_inboundnatrule.go deleted file mode 100644 index b540b7a4ff5..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 5fa1c54256c..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_ipconfiguration.go b/resource-manager/network/2022-11-01/routetables/model_ipconfiguration.go deleted file mode 100644 index 7f86bd442fd..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/routetables/model_ipconfigurationprofile.go deleted file mode 100644 index 10063b56d94..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 8be23ea8407..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 33538e3da04..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_iptag.go b/resource-manager/network/2022-11-01/routetables/model_iptag.go deleted file mode 100644 index 0591a6fbb81..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/routetables/model_loadbalancerbackendaddress.go deleted file mode 100644 index 6eb63262bd2..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index b4070586d52..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_natgateway.go b/resource-manager/network/2022-11-01/routetables/model_natgateway.go deleted file mode 100644 index cdcecbfa098..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_natgatewaypropertiesformat.go deleted file mode 100644 index dd643c79c79..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_natgatewaysku.go b/resource-manager/network/2022-11-01/routetables/model_natgatewaysku.go deleted file mode 100644 index 8e15e8b1250..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_natruleportmapping.go b/resource-manager/network/2022-11-01/routetables/model_natruleportmapping.go deleted file mode 100644 index 665d5f253ce..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networkinterface.go b/resource-manager/network/2022-11-01/routetables/model_networkinterface.go deleted file mode 100644 index fac5f0869e6..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/routetables/model_networkinterfacednssettings.go deleted file mode 100644 index 9d476ca2642..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 7db216219a1..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 60fdba4dd13..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 3f36842e1f3..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 4cc36c8f7f5..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/routetables/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 6f876f8ce53..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index fbd84b3af86..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/routetables/model_networksecuritygroup.go deleted file mode 100644 index 84c0fadac17..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 633f7012e04..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privateendpoint.go b/resource-manager/network/2022-11-01/routetables/model_privateendpoint.go deleted file mode 100644 index 80308b3a2a6..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/routetables/model_privateendpointconnection.go deleted file mode 100644 index 0e503458e9c..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/routetables/model_privateendpointconnectionproperties.go deleted file mode 100644 index f8d3eeab02b..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/routetables/model_privateendpointipconfiguration.go deleted file mode 100644 index de4e0254405..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/routetables/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 1ba73d98f4a..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/routetables/model_privateendpointproperties.go deleted file mode 100644 index 3d92a4a92e1..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privatelinkservice.go b/resource-manager/network/2022-11-01/routetables/model_privatelinkservice.go deleted file mode 100644 index 29bf0cf5834..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnection.go deleted file mode 100644 index 4adf690c566..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 063a4faec37..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 3b1634cb059..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index e3ad61faa8f..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 430eebd19ae..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceproperties.go deleted file mode 100644 index 9e26fa01a75..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_publicipaddress.go b/resource-manager/network/2022-11-01/routetables/model_publicipaddress.go deleted file mode 100644 index 8248c499a22..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package routetables - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/routetables/model_publicipaddressdnssettings.go deleted file mode 100644 index 84b1e72e903..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_publicipaddresspropertiesformat.go deleted file mode 100644 index ba0c692ec23..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/routetables/model_publicipaddresssku.go deleted file mode 100644 index 956c758896f..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/routetables/model_resourcenavigationlink.go deleted file mode 100644 index c5d74e0472b..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/routetables/model_resourcenavigationlinkformat.go deleted file mode 100644 index eca6b593c69..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_resourceset.go b/resource-manager/network/2022-11-01/routetables/model_resourceset.go deleted file mode 100644 index 8a57a8fb40d..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/routetables/model_retentionpolicyparameters.go deleted file mode 100644 index 37bad49cdcb..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_route.go b/resource-manager/network/2022-11-01/routetables/model_route.go deleted file mode 100644 index 10c17005b28..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_routepropertiesformat.go deleted file mode 100644 index 028abe93e73..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_routetable.go b/resource-manager/network/2022-11-01/routetables/model_routetable.go deleted file mode 100644 index 1b2bb754997..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_routetablepropertiesformat.go deleted file mode 100644 index 64470e39699..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_securityrule.go b/resource-manager/network/2022-11-01/routetables/model_securityrule.go deleted file mode 100644 index ab6f4a35210..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_securityrulepropertiesformat.go deleted file mode 100644 index 636af5195f0..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/routetables/model_serviceassociationlink.go deleted file mode 100644 index 682b3659989..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 7ed4a93de00..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_servicedelegationpropertiesformat.go deleted file mode 100644 index fba1a21dc46..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicy.go deleted file mode 100644 index c941578ec3f..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 6a6135ec206..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index a9fcdcec846..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 25a22cda3fd..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_serviceendpointpropertiesformat.go deleted file mode 100644 index ffdfaa0569b..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_subnet.go b/resource-manager/network/2022-11-01/routetables/model_subnet.go deleted file mode 100644 index 949e07613d6..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_subnetpropertiesformat.go deleted file mode 100644 index 95f54741d81..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_subresource.go b/resource-manager/network/2022-11-01/routetables/model_subresource.go deleted file mode 100644 index eab315946e0..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_tagsobject.go b/resource-manager/network/2022-11-01/routetables/model_tagsobject.go deleted file mode 100644 index 61b33687ad4..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/routetables/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index e02ff0c097e..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/routetables/model_trafficanalyticsproperties.go deleted file mode 100644 index d88b7ea067e..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/routetables/model_virtualnetworktap.go deleted file mode 100644 index 7551bed07c8..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/routetables/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 2094070851f..00000000000 --- a/resource-manager/network/2022-11-01/routetables/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/routetables/predicates.go b/resource-manager/network/2022-11-01/routetables/predicates.go deleted file mode 100644 index e1d89b9fbd4..00000000000 --- a/resource-manager/network/2022-11-01/routetables/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package routetables - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTableOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p RouteTableOperationPredicate) Matches(input RouteTable) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/routetables/version.go b/resource-manager/network/2022-11-01/routetables/version.go deleted file mode 100644 index b8c2d074f25..00000000000 --- a/resource-manager/network/2022-11-01/routetables/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package routetables - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/routetables/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/README.md b/resource-manager/network/2022-11-01/scopeconnections/README.md deleted file mode 100644 index ee9f3cd5bf9..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/README.md +++ /dev/null @@ -1,90 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/scopeconnections` Documentation - -The `scopeconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/scopeconnections" -``` - - -### Client Initialization - -```go -client := scopeconnections.NewScopeConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ScopeConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := scopeconnections.NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue") - -payload := scopeconnections.ScopeConnection{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ScopeConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := scopeconnections.NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ScopeConnectionsClient.Get` - -```go -ctx := context.TODO() -id := scopeconnections.NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ScopeConnectionsClient.List` - -```go -ctx := context.TODO() -id := scopeconnections.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -// alternatively `client.List(ctx, id, scopeconnections.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, scopeconnections.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/scopeconnections/client.go b/resource-manager/network/2022-11-01/scopeconnections/client.go deleted file mode 100644 index 65a0f58dd04..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package scopeconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewScopeConnectionsClientWithBaseURI(api environments.Api) (*ScopeConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "scopeconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ScopeConnectionsClient: %+v", err) - } - - return &ScopeConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/constants.go b/resource-manager/network/2022-11-01/scopeconnections/constants.go deleted file mode 100644 index 24a9bb99e3a..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/constants.go +++ /dev/null @@ -1,60 +0,0 @@ -package scopeconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionState string - -const ( - ScopeConnectionStateConflict ScopeConnectionState = "Conflict" - ScopeConnectionStateConnected ScopeConnectionState = "Connected" - ScopeConnectionStatePending ScopeConnectionState = "Pending" - ScopeConnectionStateRejected ScopeConnectionState = "Rejected" - ScopeConnectionStateRevoked ScopeConnectionState = "Revoked" -) - -func PossibleValuesForScopeConnectionState() []string { - return []string{ - string(ScopeConnectionStateConflict), - string(ScopeConnectionStateConnected), - string(ScopeConnectionStatePending), - string(ScopeConnectionStateRejected), - string(ScopeConnectionStateRevoked), - } -} - -func (s *ScopeConnectionState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScopeConnectionState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScopeConnectionState(input string) (*ScopeConnectionState, error) { - vals := map[string]ScopeConnectionState{ - "conflict": ScopeConnectionStateConflict, - "connected": ScopeConnectionStateConnected, - "pending": ScopeConnectionStatePending, - "rejected": ScopeConnectionStateRejected, - "revoked": ScopeConnectionStateRevoked, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScopeConnectionState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/id_networkmanager.go b/resource-manager/network/2022-11-01/scopeconnections/id_networkmanager.go deleted file mode 100644 index 8e518126e3d..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package scopeconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/id_networkmanager_test.go b/resource-manager/network/2022-11-01/scopeconnections/id_networkmanager_test.go deleted file mode 100644 index 876b6320d1e..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package scopeconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/id_scopeconnection.go b/resource-manager/network/2022-11-01/scopeconnections/id_scopeconnection.go deleted file mode 100644 index dbc1fb7a7a7..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/id_scopeconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package scopeconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ScopeConnectionId{} - -// ScopeConnectionId is a struct representing the Resource ID for a Scope Connection -type ScopeConnectionId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - ScopeConnectionName string -} - -// NewScopeConnectionID returns a new ScopeConnectionId struct -func NewScopeConnectionID(subscriptionId string, resourceGroupName string, networkManagerName string, scopeConnectionName string) ScopeConnectionId { - return ScopeConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - ScopeConnectionName: scopeConnectionName, - } -} - -// ParseScopeConnectionID parses 'input' into a ScopeConnectionId -func ParseScopeConnectionID(input string) (*ScopeConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ScopeConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ScopeConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ScopeConnectionName, ok = parsed.Parsed["scopeConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeConnectionName", *parsed) - } - - return &id, nil -} - -// ParseScopeConnectionIDInsensitively parses 'input' case-insensitively into a ScopeConnectionId -// note: this method should only be used for API response data and not user input -func ParseScopeConnectionIDInsensitively(input string) (*ScopeConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ScopeConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ScopeConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.ScopeConnectionName, ok = parsed.Parsed["scopeConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "scopeConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateScopeConnectionID checks that 'input' can be parsed as a Scope Connection ID -func ValidateScopeConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseScopeConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Scope Connection ID -func (id ScopeConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/scopeConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.ScopeConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Scope Connection ID -func (id ScopeConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticScopeConnections", "scopeConnections", "scopeConnections"), - resourceids.UserSpecifiedSegment("scopeConnectionName", "scopeConnectionValue"), - } -} - -// String returns a human-readable description of this Scope Connection ID -func (id ScopeConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Scope Connection Name: %q", id.ScopeConnectionName), - } - return fmt.Sprintf("Scope Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/id_scopeconnection_test.go b/resource-manager/network/2022-11-01/scopeconnections/id_scopeconnection_test.go deleted file mode 100644 index beaf9da865e..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/id_scopeconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package scopeconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ScopeConnectionId{} - -func TestNewScopeConnectionID(t *testing.T) { - id := NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.ScopeConnectionName != "scopeConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ScopeConnectionName'", id.ScopeConnectionName, "scopeConnectionValue") - } -} - -func TestFormatScopeConnectionID(t *testing.T) { - actual := NewScopeConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "scopeConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseScopeConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ScopeConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue", - Expected: &ScopeConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - ScopeConnectionName: "scopeConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseScopeConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.ScopeConnectionName != v.Expected.ScopeConnectionName { - t.Fatalf("Expected %q but got %q for ScopeConnectionName", v.Expected.ScopeConnectionName, actual.ScopeConnectionName) - } - - } -} - -func TestParseScopeConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ScopeConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sCoPeCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue", - Expected: &ScopeConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - ScopeConnectionName: "scopeConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/scopeConnections/scopeConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sCoPeCoNnEcTiOnS/sCoPeCoNnEcTiOnVaLuE", - Expected: &ScopeConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - ScopeConnectionName: "sCoPeCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sCoPeCoNnEcTiOnS/sCoPeCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseScopeConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.ScopeConnectionName != v.Expected.ScopeConnectionName { - t.Fatalf("Expected %q but got %q for ScopeConnectionName", v.Expected.ScopeConnectionName, actual.ScopeConnectionName) - } - - } -} - -func TestSegmentsForScopeConnectionId(t *testing.T) { - segments := ScopeConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ScopeConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/method_createorupdate.go b/resource-manager/network/2022-11-01/scopeconnections/method_createorupdate.go deleted file mode 100644 index 7501f601353..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package scopeconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ScopeConnection -} - -// CreateOrUpdate ... -func (c ScopeConnectionsClient) CreateOrUpdate(ctx context.Context, id ScopeConnectionId, input ScopeConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/method_delete.go b/resource-manager/network/2022-11-01/scopeconnections/method_delete.go deleted file mode 100644 index 0ef9f60e8f6..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/method_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package scopeconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ScopeConnectionsClient) Delete(ctx context.Context, id ScopeConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/method_get.go b/resource-manager/network/2022-11-01/scopeconnections/method_get.go deleted file mode 100644 index a6a23e9f8f3..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package scopeconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ScopeConnection -} - -// Get ... -func (c ScopeConnectionsClient) Get(ctx context.Context, id ScopeConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/method_list.go b/resource-manager/network/2022-11-01/scopeconnections/method_list.go deleted file mode 100644 index 1d069906d4c..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package scopeconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ScopeConnection -} - -type ListCompleteResult struct { - Items []ScopeConnection -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c ScopeConnectionsClient) List(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/scopeConnections", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ScopeConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ScopeConnectionsClient) ListComplete(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, ScopeConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ScopeConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate ScopeConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ScopeConnection, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/model_scopeconnection.go b/resource-manager/network/2022-11-01/scopeconnections/model_scopeconnection.go deleted file mode 100644 index ddb7dcfd3ff..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/model_scopeconnection.go +++ /dev/null @@ -1,17 +0,0 @@ -package scopeconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ScopeConnectionProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/model_scopeconnectionproperties.go b/resource-manager/network/2022-11-01/scopeconnections/model_scopeconnectionproperties.go deleted file mode 100644 index 0997147a2a9..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/model_scopeconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package scopeconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionProperties struct { - ConnectionState *ScopeConnectionState `json:"connectionState,omitempty"` - Description *string `json:"description,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` - TenantId *string `json:"tenantId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/predicates.go b/resource-manager/network/2022-11-01/scopeconnections/predicates.go deleted file mode 100644 index eda309664f4..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package scopeconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ScopeConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ScopeConnectionOperationPredicate) Matches(input ScopeConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/scopeconnections/version.go b/resource-manager/network/2022-11-01/scopeconnections/version.go deleted file mode 100644 index 64c755153c7..00000000000 --- a/resource-manager/network/2022-11-01/scopeconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package scopeconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/scopeconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/README.md b/resource-manager/network/2022-11-01/securityadminconfigurations/README.md deleted file mode 100644 index 6d9bb64a52e..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/securityadminconfigurations` Documentation - -The `securityadminconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/securityadminconfigurations" -``` - - -### Client Initialization - -```go -client := securityadminconfigurations.NewSecurityAdminConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SecurityAdminConfigurationsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := securityadminconfigurations.NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - -payload := securityadminconfigurations.SecurityAdminConfiguration{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityAdminConfigurationsClient.Delete` - -```go -ctx := context.TODO() -id := securityadminconfigurations.NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - -if err := client.DeleteThenPoll(ctx, id, securityadminconfigurations.DefaultDeleteOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityAdminConfigurationsClient.Get` - -```go -ctx := context.TODO() -id := securityadminconfigurations.NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityAdminConfigurationsClient.List` - -```go -ctx := context.TODO() -id := securityadminconfigurations.NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - -// alternatively `client.List(ctx, id, securityadminconfigurations.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, securityadminconfigurations.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/client.go b/resource-manager/network/2022-11-01/securityadminconfigurations/client.go deleted file mode 100644 index 4462d9db2c9..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package securityadminconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAdminConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewSecurityAdminConfigurationsClientWithBaseURI(api environments.Api) (*SecurityAdminConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "securityadminconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating SecurityAdminConfigurationsClient: %+v", err) - } - - return &SecurityAdminConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/constants.go b/resource-manager/network/2022-11-01/securityadminconfigurations/constants.go deleted file mode 100644 index bfadf6115a8..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/constants.go +++ /dev/null @@ -1,101 +0,0 @@ -package securityadminconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkIntentPolicyBasedService string - -const ( - NetworkIntentPolicyBasedServiceAll NetworkIntentPolicyBasedService = "All" - NetworkIntentPolicyBasedServiceAllowRulesOnly NetworkIntentPolicyBasedService = "AllowRulesOnly" - NetworkIntentPolicyBasedServiceNone NetworkIntentPolicyBasedService = "None" -) - -func PossibleValuesForNetworkIntentPolicyBasedService() []string { - return []string{ - string(NetworkIntentPolicyBasedServiceAll), - string(NetworkIntentPolicyBasedServiceAllowRulesOnly), - string(NetworkIntentPolicyBasedServiceNone), - } -} - -func (s *NetworkIntentPolicyBasedService) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkIntentPolicyBasedService(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkIntentPolicyBasedService(input string) (*NetworkIntentPolicyBasedService, error) { - vals := map[string]NetworkIntentPolicyBasedService{ - "all": NetworkIntentPolicyBasedServiceAll, - "allowrulesonly": NetworkIntentPolicyBasedServiceAllowRulesOnly, - "none": NetworkIntentPolicyBasedServiceNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkIntentPolicyBasedService(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/id_networkmanager.go b/resource-manager/network/2022-11-01/securityadminconfigurations/id_networkmanager.go deleted file mode 100644 index aec8d0fdd53..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/id_networkmanager.go +++ /dev/null @@ -1,127 +0,0 @@ -package securityadminconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -// NetworkManagerId is a struct representing the Resource ID for a Network Manager -type NetworkManagerId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string -} - -// NewNetworkManagerID returns a new NetworkManagerId struct -func NewNetworkManagerID(subscriptionId string, resourceGroupName string, networkManagerName string) NetworkManagerId { - return NetworkManagerId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - } -} - -// ParseNetworkManagerID parses 'input' into a NetworkManagerId -func ParseNetworkManagerID(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ParseNetworkManagerIDInsensitively parses 'input' case-insensitively into a NetworkManagerId -// note: this method should only be used for API response data and not user input -func ParseNetworkManagerIDInsensitively(input string) (*NetworkManagerId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkManagerId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkManagerId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkManagerID checks that 'input' can be parsed as a Network Manager ID -func ValidateNetworkManagerID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkManagerID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Manager ID -func (id NetworkManagerId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Manager ID -func (id NetworkManagerId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - } -} - -// String returns a human-readable description of this Network Manager ID -func (id NetworkManagerId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - } - return fmt.Sprintf("Network Manager (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/id_networkmanager_test.go b/resource-manager/network/2022-11-01/securityadminconfigurations/id_networkmanager_test.go deleted file mode 100644 index 3cb74c96600..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/id_networkmanager_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package securityadminconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkManagerId{} - -func TestNewNetworkManagerID(t *testing.T) { - id := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } -} - -func TestFormatNetworkManagerID(t *testing.T) { - actual := NewNetworkManagerID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkManagerID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestParseNetworkManagerIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkManagerId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Expected: &NetworkManagerId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkManagerIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - } -} - -func TestSegmentsForNetworkManagerId(t *testing.T) { - segments := NetworkManagerId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkManagerId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/id_securityadminconfiguration.go b/resource-manager/network/2022-11-01/securityadminconfigurations/id_securityadminconfiguration.go deleted file mode 100644 index 3c2a8543126..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/id_securityadminconfiguration.go +++ /dev/null @@ -1,140 +0,0 @@ -package securityadminconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityAdminConfigurationId{} - -// SecurityAdminConfigurationId is a struct representing the Resource ID for a Security Admin Configuration -type SecurityAdminConfigurationId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - SecurityAdminConfigurationName string -} - -// NewSecurityAdminConfigurationID returns a new SecurityAdminConfigurationId struct -func NewSecurityAdminConfigurationID(subscriptionId string, resourceGroupName string, networkManagerName string, securityAdminConfigurationName string) SecurityAdminConfigurationId { - return SecurityAdminConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - SecurityAdminConfigurationName: securityAdminConfigurationName, - } -} - -// ParseSecurityAdminConfigurationID parses 'input' into a SecurityAdminConfigurationId -func ParseSecurityAdminConfigurationID(input string) (*SecurityAdminConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityAdminConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseSecurityAdminConfigurationIDInsensitively parses 'input' case-insensitively into a SecurityAdminConfigurationId -// note: this method should only be used for API response data and not user input -func ParseSecurityAdminConfigurationIDInsensitively(input string) (*SecurityAdminConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityAdminConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityAdminConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.SecurityAdminConfigurationName, ok = parsed.Parsed["securityAdminConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityAdminConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateSecurityAdminConfigurationID checks that 'input' can be parsed as a Security Admin Configuration ID -func ValidateSecurityAdminConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseSecurityAdminConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Security Admin Configuration ID -func (id SecurityAdminConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/securityAdminConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.SecurityAdminConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Security Admin Configuration ID -func (id SecurityAdminConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticSecurityAdminConfigurations", "securityAdminConfigurations", "securityAdminConfigurations"), - resourceids.UserSpecifiedSegment("securityAdminConfigurationName", "securityAdminConfigurationValue"), - } -} - -// String returns a human-readable description of this Security Admin Configuration ID -func (id SecurityAdminConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Security Admin Configuration Name: %q", id.SecurityAdminConfigurationName), - } - return fmt.Sprintf("Security Admin Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/id_securityadminconfiguration_test.go b/resource-manager/network/2022-11-01/securityadminconfigurations/id_securityadminconfiguration_test.go deleted file mode 100644 index 19df83d16df..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/id_securityadminconfiguration_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package securityadminconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityAdminConfigurationId{} - -func TestNewSecurityAdminConfigurationID(t *testing.T) { - id := NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.SecurityAdminConfigurationName != "securityAdminConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityAdminConfigurationName'", id.SecurityAdminConfigurationName, "securityAdminConfigurationValue") - } -} - -func TestFormatSecurityAdminConfigurationID(t *testing.T) { - actual := NewSecurityAdminConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "securityAdminConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseSecurityAdminConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityAdminConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityAdminConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - } -} - -func TestParseSecurityAdminConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityAdminConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - SecurityAdminConfigurationName: "securityAdminConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/securityAdminConfigurations/securityAdminConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - Expected: &SecurityAdminConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - SecurityAdminConfigurationName: "sEcUrItYaDmInCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/sEcUrItYaDmInCoNfIgUrAtIoNs/sEcUrItYaDmInCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityAdminConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.SecurityAdminConfigurationName != v.Expected.SecurityAdminConfigurationName { - t.Fatalf("Expected %q but got %q for SecurityAdminConfigurationName", v.Expected.SecurityAdminConfigurationName, actual.SecurityAdminConfigurationName) - } - - } -} - -func TestSegmentsForSecurityAdminConfigurationId(t *testing.T) { - segments := SecurityAdminConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("SecurityAdminConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/method_createorupdate.go b/resource-manager/network/2022-11-01/securityadminconfigurations/method_createorupdate.go deleted file mode 100644 index f0b44f47219..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package securityadminconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityAdminConfiguration -} - -// CreateOrUpdate ... -func (c SecurityAdminConfigurationsClient) CreateOrUpdate(ctx context.Context, id SecurityAdminConfigurationId, input SecurityAdminConfiguration) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/method_delete.go b/resource-manager/network/2022-11-01/securityadminconfigurations/method_delete.go deleted file mode 100644 index d08913b2c20..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/method_delete.go +++ /dev/null @@ -1,99 +0,0 @@ -package securityadminconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type DeleteOperationOptions struct { - Force *bool -} - -func DefaultDeleteOperationOptions() DeleteOperationOptions { - return DeleteOperationOptions{} -} - -func (o DeleteOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o DeleteOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o DeleteOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Force != nil { - out.Append("force", fmt.Sprintf("%v", *o.Force)) - } - return &out -} - -// Delete ... -func (c SecurityAdminConfigurationsClient) Delete(ctx context.Context, id SecurityAdminConfigurationId, options DeleteOperationOptions) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c SecurityAdminConfigurationsClient) DeleteThenPoll(ctx context.Context, id SecurityAdminConfigurationId, options DeleteOperationOptions) error { - result, err := c.Delete(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/method_get.go b/resource-manager/network/2022-11-01/securityadminconfigurations/method_get.go deleted file mode 100644 index fbc3b845a75..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package securityadminconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityAdminConfiguration -} - -// Get ... -func (c SecurityAdminConfigurationsClient) Get(ctx context.Context, id SecurityAdminConfigurationId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/method_list.go b/resource-manager/network/2022-11-01/securityadminconfigurations/method_list.go deleted file mode 100644 index 3396789e5c1..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package securityadminconfigurations - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityAdminConfiguration -} - -type ListCompleteResult struct { - Items []SecurityAdminConfiguration -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c SecurityAdminConfigurationsClient) List(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/securityAdminConfigurations", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityAdminConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c SecurityAdminConfigurationsClient) ListComplete(ctx context.Context, id NetworkManagerId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, SecurityAdminConfigurationOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityAdminConfigurationsClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkManagerId, options ListOperationOptions, predicate SecurityAdminConfigurationOperationPredicate) (result ListCompleteResult, err error) { - items := make([]SecurityAdminConfiguration, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/model_securityadminconfiguration.go b/resource-manager/network/2022-11-01/securityadminconfigurations/model_securityadminconfiguration.go deleted file mode 100644 index 004c4d46b07..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/model_securityadminconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package securityadminconfigurations - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAdminConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityAdminConfigurationPropertiesFormat `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/model_securityadminconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/securityadminconfigurations/model_securityadminconfigurationpropertiesformat.go deleted file mode 100644 index ad8903223e2..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/model_securityadminconfigurationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package securityadminconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAdminConfigurationPropertiesFormat struct { - ApplyOnNetworkIntentPolicyBasedServices *[]NetworkIntentPolicyBasedService `json:"applyOnNetworkIntentPolicyBasedServices,omitempty"` - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/predicates.go b/resource-manager/network/2022-11-01/securityadminconfigurations/predicates.go deleted file mode 100644 index bcc5de9a6a8..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package securityadminconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityAdminConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p SecurityAdminConfigurationOperationPredicate) Matches(input SecurityAdminConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/securityadminconfigurations/version.go b/resource-manager/network/2022-11-01/securityadminconfigurations/version.go deleted file mode 100644 index cd236d8dfea..00000000000 --- a/resource-manager/network/2022-11-01/securityadminconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package securityadminconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityadminconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/README.md b/resource-manager/network/2022-11-01/securitypartnerproviders/README.md deleted file mode 100644 index 00ba709c4fb..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/securitypartnerproviders` Documentation - -The `securitypartnerproviders` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/securitypartnerproviders" -``` - - -### Client Initialization - -```go -client := securitypartnerproviders.NewSecurityPartnerProvidersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SecurityPartnerProvidersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - -payload := securitypartnerproviders.SecurityPartnerProvider{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.Delete` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.Get` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.List` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SecurityPartnerProvidersClient.UpdateTags` - -```go -ctx := context.TODO() -id := securitypartnerproviders.NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - -payload := securitypartnerproviders.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/client.go b/resource-manager/network/2022-11-01/securitypartnerproviders/client.go deleted file mode 100644 index 8e43fdacd61..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package securitypartnerproviders - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityPartnerProvidersClient struct { - Client *resourcemanager.Client -} - -func NewSecurityPartnerProvidersClientWithBaseURI(api environments.Api) (*SecurityPartnerProvidersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "securitypartnerproviders", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating SecurityPartnerProvidersClient: %+v", err) - } - - return &SecurityPartnerProvidersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/constants.go b/resource-manager/network/2022-11-01/securitypartnerproviders/constants.go deleted file mode 100644 index 2390c77210a..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/constants.go +++ /dev/null @@ -1,148 +0,0 @@ -package securitypartnerproviders - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityPartnerProviderConnectionStatus string - -const ( - SecurityPartnerProviderConnectionStatusConnected SecurityPartnerProviderConnectionStatus = "Connected" - SecurityPartnerProviderConnectionStatusNotConnected SecurityPartnerProviderConnectionStatus = "NotConnected" - SecurityPartnerProviderConnectionStatusPartiallyConnected SecurityPartnerProviderConnectionStatus = "PartiallyConnected" - SecurityPartnerProviderConnectionStatusUnknown SecurityPartnerProviderConnectionStatus = "Unknown" -) - -func PossibleValuesForSecurityPartnerProviderConnectionStatus() []string { - return []string{ - string(SecurityPartnerProviderConnectionStatusConnected), - string(SecurityPartnerProviderConnectionStatusNotConnected), - string(SecurityPartnerProviderConnectionStatusPartiallyConnected), - string(SecurityPartnerProviderConnectionStatusUnknown), - } -} - -func (s *SecurityPartnerProviderConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityPartnerProviderConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityPartnerProviderConnectionStatus(input string) (*SecurityPartnerProviderConnectionStatus, error) { - vals := map[string]SecurityPartnerProviderConnectionStatus{ - "connected": SecurityPartnerProviderConnectionStatusConnected, - "notconnected": SecurityPartnerProviderConnectionStatusNotConnected, - "partiallyconnected": SecurityPartnerProviderConnectionStatusPartiallyConnected, - "unknown": SecurityPartnerProviderConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityPartnerProviderConnectionStatus(input) - return &out, nil -} - -type SecurityProviderName string - -const ( - SecurityProviderNameCheckpoint SecurityProviderName = "Checkpoint" - SecurityProviderNameIBoss SecurityProviderName = "IBoss" - SecurityProviderNameZScaler SecurityProviderName = "ZScaler" -) - -func PossibleValuesForSecurityProviderName() []string { - return []string{ - string(SecurityProviderNameCheckpoint), - string(SecurityProviderNameIBoss), - string(SecurityProviderNameZScaler), - } -} - -func (s *SecurityProviderName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityProviderName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityProviderName(input string) (*SecurityProviderName, error) { - vals := map[string]SecurityProviderName{ - "checkpoint": SecurityProviderNameCheckpoint, - "iboss": SecurityProviderNameIBoss, - "zscaler": SecurityProviderNameZScaler, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityProviderName(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/id_securitypartnerprovider.go b/resource-manager/network/2022-11-01/securitypartnerproviders/id_securitypartnerprovider.go deleted file mode 100644 index 3ebe53eb67a..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/id_securitypartnerprovider.go +++ /dev/null @@ -1,127 +0,0 @@ -package securitypartnerproviders - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityPartnerProviderId{} - -// SecurityPartnerProviderId is a struct representing the Resource ID for a Security Partner Provider -type SecurityPartnerProviderId struct { - SubscriptionId string - ResourceGroupName string - SecurityPartnerProviderName string -} - -// NewSecurityPartnerProviderID returns a new SecurityPartnerProviderId struct -func NewSecurityPartnerProviderID(subscriptionId string, resourceGroupName string, securityPartnerProviderName string) SecurityPartnerProviderId { - return SecurityPartnerProviderId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - SecurityPartnerProviderName: securityPartnerProviderName, - } -} - -// ParseSecurityPartnerProviderID parses 'input' into a SecurityPartnerProviderId -func ParseSecurityPartnerProviderID(input string) (*SecurityPartnerProviderId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityPartnerProviderId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityPartnerProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SecurityPartnerProviderName, ok = parsed.Parsed["securityPartnerProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityPartnerProviderName", *parsed) - } - - return &id, nil -} - -// ParseSecurityPartnerProviderIDInsensitively parses 'input' case-insensitively into a SecurityPartnerProviderId -// note: this method should only be used for API response data and not user input -func ParseSecurityPartnerProviderIDInsensitively(input string) (*SecurityPartnerProviderId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityPartnerProviderId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityPartnerProviderId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.SecurityPartnerProviderName, ok = parsed.Parsed["securityPartnerProviderName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityPartnerProviderName", *parsed) - } - - return &id, nil -} - -// ValidateSecurityPartnerProviderID checks that 'input' can be parsed as a Security Partner Provider ID -func ValidateSecurityPartnerProviderID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseSecurityPartnerProviderID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Security Partner Provider ID -func (id SecurityPartnerProviderId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/securityPartnerProviders/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.SecurityPartnerProviderName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Security Partner Provider ID -func (id SecurityPartnerProviderId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticSecurityPartnerProviders", "securityPartnerProviders", "securityPartnerProviders"), - resourceids.UserSpecifiedSegment("securityPartnerProviderName", "securityPartnerProviderValue"), - } -} - -// String returns a human-readable description of this Security Partner Provider ID -func (id SecurityPartnerProviderId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Security Partner Provider Name: %q", id.SecurityPartnerProviderName), - } - return fmt.Sprintf("Security Partner Provider (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/id_securitypartnerprovider_test.go b/resource-manager/network/2022-11-01/securitypartnerproviders/id_securitypartnerprovider_test.go deleted file mode 100644 index 4913b91b19a..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/id_securitypartnerprovider_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package securitypartnerproviders - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityPartnerProviderId{} - -func TestNewSecurityPartnerProviderID(t *testing.T) { - id := NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.SecurityPartnerProviderName != "securityPartnerProviderValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityPartnerProviderName'", id.SecurityPartnerProviderName, "securityPartnerProviderValue") - } -} - -func TestFormatSecurityPartnerProviderID(t *testing.T) { - actual := NewSecurityPartnerProviderID("12345678-1234-9876-4563-123456789012", "example-resource-group", "securityPartnerProviderValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseSecurityPartnerProviderID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityPartnerProviderId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue", - Expected: &SecurityPartnerProviderId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - SecurityPartnerProviderName: "securityPartnerProviderValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityPartnerProviderID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.SecurityPartnerProviderName != v.Expected.SecurityPartnerProviderName { - t.Fatalf("Expected %q but got %q for SecurityPartnerProviderName", v.Expected.SecurityPartnerProviderName, actual.SecurityPartnerProviderName) - } - - } -} - -func TestParseSecurityPartnerProviderIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityPartnerProviderId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sEcUrItYpArTnErPrOvIdErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue", - Expected: &SecurityPartnerProviderId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - SecurityPartnerProviderName: "securityPartnerProviderValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProviderValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sEcUrItYpArTnErPrOvIdErS/sEcUrItYpArTnErPrOvIdErVaLuE", - Expected: &SecurityPartnerProviderId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - SecurityPartnerProviderName: "sEcUrItYpArTnErPrOvIdErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sEcUrItYpArTnErPrOvIdErS/sEcUrItYpArTnErPrOvIdErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityPartnerProviderIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.SecurityPartnerProviderName != v.Expected.SecurityPartnerProviderName { - t.Fatalf("Expected %q but got %q for SecurityPartnerProviderName", v.Expected.SecurityPartnerProviderName, actual.SecurityPartnerProviderName) - } - - } -} - -func TestSegmentsForSecurityPartnerProviderId(t *testing.T) { - segments := SecurityPartnerProviderId{}.Segments() - if len(segments) == 0 { - t.Fatalf("SecurityPartnerProviderId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/method_createorupdate.go b/resource-manager/network/2022-11-01/securitypartnerproviders/method_createorupdate.go deleted file mode 100644 index 2dc29af24df..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c SecurityPartnerProvidersClient) CreateOrUpdate(ctx context.Context, id SecurityPartnerProviderId, input SecurityPartnerProvider) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c SecurityPartnerProvidersClient) CreateOrUpdateThenPoll(ctx context.Context, id SecurityPartnerProviderId, input SecurityPartnerProvider) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/method_delete.go b/resource-manager/network/2022-11-01/securitypartnerproviders/method_delete.go deleted file mode 100644 index 9494188070d..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c SecurityPartnerProvidersClient) Delete(ctx context.Context, id SecurityPartnerProviderId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c SecurityPartnerProvidersClient) DeleteThenPoll(ctx context.Context, id SecurityPartnerProviderId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/method_get.go b/resource-manager/network/2022-11-01/securitypartnerproviders/method_get.go deleted file mode 100644 index ddc2a48c971..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityPartnerProvider -} - -// Get ... -func (c SecurityPartnerProvidersClient) Get(ctx context.Context, id SecurityPartnerProviderId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/method_list.go b/resource-manager/network/2022-11-01/securitypartnerproviders/method_list.go deleted file mode 100644 index a7c1b9d58d8..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityPartnerProvider -} - -type ListCompleteResult struct { - Items []SecurityPartnerProvider -} - -// List ... -func (c SecurityPartnerProvidersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/securityPartnerProviders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityPartnerProvider `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c SecurityPartnerProvidersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, SecurityPartnerProviderOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityPartnerProvidersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SecurityPartnerProviderOperationPredicate) (result ListCompleteResult, err error) { - items := make([]SecurityPartnerProvider, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/securitypartnerproviders/method_listbyresourcegroup.go deleted file mode 100644 index 0db7ed7c03e..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityPartnerProvider -} - -type ListByResourceGroupCompleteResult struct { - Items []SecurityPartnerProvider -} - -// ListByResourceGroup ... -func (c SecurityPartnerProvidersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/securityPartnerProviders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityPartnerProvider `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c SecurityPartnerProvidersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, SecurityPartnerProviderOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityPartnerProvidersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SecurityPartnerProviderOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]SecurityPartnerProvider, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/method_updatetags.go b/resource-manager/network/2022-11-01/securitypartnerproviders/method_updatetags.go deleted file mode 100644 index a3c2a4211b8..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package securitypartnerproviders - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityPartnerProvider -} - -// UpdateTags ... -func (c SecurityPartnerProvidersClient) UpdateTags(ctx context.Context, id SecurityPartnerProviderId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/model_securitypartnerprovider.go b/resource-manager/network/2022-11-01/securitypartnerproviders/model_securitypartnerprovider.go deleted file mode 100644 index 059710a7ff6..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/model_securitypartnerprovider.go +++ /dev/null @@ -1,14 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityPartnerProvider struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityPartnerProviderPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/model_securitypartnerproviderpropertiesformat.go b/resource-manager/network/2022-11-01/securitypartnerproviders/model_securitypartnerproviderpropertiesformat.go deleted file mode 100644 index 100f4648a9e..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/model_securitypartnerproviderpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityPartnerProviderPropertiesFormat struct { - ConnectionStatus *SecurityPartnerProviderConnectionStatus `json:"connectionStatus,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SecurityProviderName *SecurityProviderName `json:"securityProviderName,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/model_subresource.go b/resource-manager/network/2022-11-01/securitypartnerproviders/model_subresource.go deleted file mode 100644 index 0d259c7609a..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/model_tagsobject.go b/resource-manager/network/2022-11-01/securitypartnerproviders/model_tagsobject.go deleted file mode 100644 index 64020cc08ef..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/predicates.go b/resource-manager/network/2022-11-01/securitypartnerproviders/predicates.go deleted file mode 100644 index ef826d6c55f..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package securitypartnerproviders - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityPartnerProviderOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p SecurityPartnerProviderOperationPredicate) Matches(input SecurityPartnerProvider) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/securitypartnerproviders/version.go b/resource-manager/network/2022-11-01/securitypartnerproviders/version.go deleted file mode 100644 index 4d5087bc0e1..00000000000 --- a/resource-manager/network/2022-11-01/securitypartnerproviders/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package securitypartnerproviders - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securitypartnerproviders/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/securityrules/README.md b/resource-manager/network/2022-11-01/securityrules/README.md deleted file mode 100644 index 969762c56ed..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/README.md +++ /dev/null @@ -1,115 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/securityrules` Documentation - -The `securityrules` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/securityrules" -``` - - -### Client Initialization - -```go -client := securityrules.NewSecurityRulesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SecurityRulesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := securityrules.NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue") - -payload := securityrules.SecurityRule{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityRulesClient.DefaultSecurityRulesGet` - -```go -ctx := context.TODO() -id := securityrules.NewDefaultSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "defaultSecurityRuleValue") - -read, err := client.DefaultSecurityRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityRulesClient.DefaultSecurityRulesList` - -```go -ctx := context.TODO() -id := securityrules.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -// alternatively `client.DefaultSecurityRulesList(ctx, id)` can be used to do batched pagination -items, err := client.DefaultSecurityRulesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `SecurityRulesClient.Delete` - -```go -ctx := context.TODO() -id := securityrules.NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `SecurityRulesClient.Get` - -```go -ctx := context.TODO() -id := securityrules.NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SecurityRulesClient.List` - -```go -ctx := context.TODO() -id := securityrules.NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/securityrules/client.go b/resource-manager/network/2022-11-01/securityrules/client.go deleted file mode 100644 index a386b6c0dec..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package securityrules - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulesClient struct { - Client *resourcemanager.Client -} - -func NewSecurityRulesClientWithBaseURI(api environments.Api) (*SecurityRulesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "securityrules", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating SecurityRulesClient: %+v", err) - } - - return &SecurityRulesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/securityrules/constants.go b/resource-manager/network/2022-11-01/securityrules/constants.go deleted file mode 100644 index 41396358614..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/constants.go +++ /dev/null @@ -1,192 +0,0 @@ -package securityrules - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/securityrules/id_defaultsecurityrule.go b/resource-manager/network/2022-11-01/securityrules/id_defaultsecurityrule.go deleted file mode 100644 index e4a89e02f98..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/id_defaultsecurityrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package securityrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DefaultSecurityRuleId{} - -// DefaultSecurityRuleId is a struct representing the Resource ID for a Default Security Rule -type DefaultSecurityRuleId struct { - SubscriptionId string - ResourceGroupName string - NetworkSecurityGroupName string - DefaultSecurityRuleName string -} - -// NewDefaultSecurityRuleID returns a new DefaultSecurityRuleId struct -func NewDefaultSecurityRuleID(subscriptionId string, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) DefaultSecurityRuleId { - return DefaultSecurityRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkSecurityGroupName: networkSecurityGroupName, - DefaultSecurityRuleName: defaultSecurityRuleName, - } -} - -// ParseDefaultSecurityRuleID parses 'input' into a DefaultSecurityRuleId -func ParseDefaultSecurityRuleID(input string) (*DefaultSecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(DefaultSecurityRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DefaultSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.DefaultSecurityRuleName, ok = parsed.Parsed["defaultSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "defaultSecurityRuleName", *parsed) - } - - return &id, nil -} - -// ParseDefaultSecurityRuleIDInsensitively parses 'input' case-insensitively into a DefaultSecurityRuleId -// note: this method should only be used for API response data and not user input -func ParseDefaultSecurityRuleIDInsensitively(input string) (*DefaultSecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(DefaultSecurityRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := DefaultSecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.DefaultSecurityRuleName, ok = parsed.Parsed["defaultSecurityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "defaultSecurityRuleName", *parsed) - } - - return &id, nil -} - -// ValidateDefaultSecurityRuleID checks that 'input' can be parsed as a Default Security Rule ID -func ValidateDefaultSecurityRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseDefaultSecurityRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Default Security Rule ID -func (id DefaultSecurityRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/defaultSecurityRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkSecurityGroupName, id.DefaultSecurityRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Default Security Rule ID -func (id DefaultSecurityRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkSecurityGroups", "networkSecurityGroups", "networkSecurityGroups"), - resourceids.UserSpecifiedSegment("networkSecurityGroupName", "networkSecurityGroupValue"), - resourceids.StaticSegment("staticDefaultSecurityRules", "defaultSecurityRules", "defaultSecurityRules"), - resourceids.UserSpecifiedSegment("defaultSecurityRuleName", "defaultSecurityRuleValue"), - } -} - -// String returns a human-readable description of this Default Security Rule ID -func (id DefaultSecurityRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Security Group Name: %q", id.NetworkSecurityGroupName), - fmt.Sprintf("Default Security Rule Name: %q", id.DefaultSecurityRuleName), - } - return fmt.Sprintf("Default Security Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/securityrules/id_defaultsecurityrule_test.go b/resource-manager/network/2022-11-01/securityrules/id_defaultsecurityrule_test.go deleted file mode 100644 index de944c4f40e..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/id_defaultsecurityrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package securityrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = DefaultSecurityRuleId{} - -func TestNewDefaultSecurityRuleID(t *testing.T) { - id := NewDefaultSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "defaultSecurityRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkSecurityGroupName != "networkSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkSecurityGroupName'", id.NetworkSecurityGroupName, "networkSecurityGroupValue") - } - - if id.DefaultSecurityRuleName != "defaultSecurityRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'DefaultSecurityRuleName'", id.DefaultSecurityRuleName, "defaultSecurityRuleValue") - } -} - -func TestFormatDefaultSecurityRuleID(t *testing.T) { - actual := NewDefaultSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "defaultSecurityRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseDefaultSecurityRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DefaultSecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue", - Expected: &DefaultSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - DefaultSecurityRuleName: "defaultSecurityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDefaultSecurityRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - if actual.DefaultSecurityRuleName != v.Expected.DefaultSecurityRuleName { - t.Fatalf("Expected %q but got %q for DefaultSecurityRuleName", v.Expected.DefaultSecurityRuleName, actual.DefaultSecurityRuleName) - } - - } -} - -func TestParseDefaultSecurityRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *DefaultSecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/dEfAuLtSeCuRiTyRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue", - Expected: &DefaultSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - DefaultSecurityRuleName: "defaultSecurityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/defaultSecurityRules/defaultSecurityRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/dEfAuLtSeCuRiTyRuLeS/dEfAuLtSeCuRiTyRuLeVaLuE", - Expected: &DefaultSecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkSecurityGroupName: "nEtWoRkSeCuRiTyGrOuPvAlUe", - DefaultSecurityRuleName: "dEfAuLtSeCuRiTyRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/dEfAuLtSeCuRiTyRuLeS/dEfAuLtSeCuRiTyRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseDefaultSecurityRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - if actual.DefaultSecurityRuleName != v.Expected.DefaultSecurityRuleName { - t.Fatalf("Expected %q but got %q for DefaultSecurityRuleName", v.Expected.DefaultSecurityRuleName, actual.DefaultSecurityRuleName) - } - - } -} - -func TestSegmentsForDefaultSecurityRuleId(t *testing.T) { - segments := DefaultSecurityRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("DefaultSecurityRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/securityrules/id_networksecuritygroup.go b/resource-manager/network/2022-11-01/securityrules/id_networksecuritygroup.go deleted file mode 100644 index 07dda76386b..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/id_networksecuritygroup.go +++ /dev/null @@ -1,127 +0,0 @@ -package securityrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkSecurityGroupId{} - -// NetworkSecurityGroupId is a struct representing the Resource ID for a Network Security Group -type NetworkSecurityGroupId struct { - SubscriptionId string - ResourceGroupName string - NetworkSecurityGroupName string -} - -// NewNetworkSecurityGroupID returns a new NetworkSecurityGroupId struct -func NewNetworkSecurityGroupID(subscriptionId string, resourceGroupName string, networkSecurityGroupName string) NetworkSecurityGroupId { - return NetworkSecurityGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkSecurityGroupName: networkSecurityGroupName, - } -} - -// ParseNetworkSecurityGroupID parses 'input' into a NetworkSecurityGroupId -func ParseNetworkSecurityGroupID(input string) (*NetworkSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkSecurityGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ParseNetworkSecurityGroupIDInsensitively parses 'input' case-insensitively into a NetworkSecurityGroupId -// note: this method should only be used for API response data and not user input -func ParseNetworkSecurityGroupIDInsensitively(input string) (*NetworkSecurityGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkSecurityGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkSecurityGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkSecurityGroupID checks that 'input' can be parsed as a Network Security Group ID -func ValidateNetworkSecurityGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkSecurityGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Security Group ID -func (id NetworkSecurityGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkSecurityGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Security Group ID -func (id NetworkSecurityGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkSecurityGroups", "networkSecurityGroups", "networkSecurityGroups"), - resourceids.UserSpecifiedSegment("networkSecurityGroupName", "networkSecurityGroupValue"), - } -} - -// String returns a human-readable description of this Network Security Group ID -func (id NetworkSecurityGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Security Group Name: %q", id.NetworkSecurityGroupName), - } - return fmt.Sprintf("Network Security Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/securityrules/id_networksecuritygroup_test.go b/resource-manager/network/2022-11-01/securityrules/id_networksecuritygroup_test.go deleted file mode 100644 index 6ebeb384028..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/id_networksecuritygroup_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package securityrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkSecurityGroupId{} - -func TestNewNetworkSecurityGroupID(t *testing.T) { - id := NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkSecurityGroupName != "networkSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkSecurityGroupName'", id.NetworkSecurityGroupName, "networkSecurityGroupValue") - } -} - -func TestFormatNetworkSecurityGroupID(t *testing.T) { - actual := NewNetworkSecurityGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkSecurityGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkSecurityGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - } -} - -func TestParseNetworkSecurityGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkSecurityGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe", - Expected: &NetworkSecurityGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkSecurityGroupName: "nEtWoRkSeCuRiTyGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkSecurityGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - } -} - -func TestSegmentsForNetworkSecurityGroupId(t *testing.T) { - segments := NetworkSecurityGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkSecurityGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/securityrules/id_securityrule.go b/resource-manager/network/2022-11-01/securityrules/id_securityrule.go deleted file mode 100644 index 32ca98be479..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/id_securityrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package securityrules - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityRuleId{} - -// SecurityRuleId is a struct representing the Resource ID for a Security Rule -type SecurityRuleId struct { - SubscriptionId string - ResourceGroupName string - NetworkSecurityGroupName string - SecurityRuleName string -} - -// NewSecurityRuleID returns a new SecurityRuleId struct -func NewSecurityRuleID(subscriptionId string, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) SecurityRuleId { - return SecurityRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkSecurityGroupName: networkSecurityGroupName, - SecurityRuleName: securityRuleName, - } -} - -// ParseSecurityRuleID parses 'input' into a SecurityRuleId -func ParseSecurityRuleID(input string) (*SecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.SecurityRuleName, ok = parsed.Parsed["securityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityRuleName", *parsed) - } - - return &id, nil -} - -// ParseSecurityRuleIDInsensitively parses 'input' case-insensitively into a SecurityRuleId -// note: this method should only be used for API response data and not user input -func ParseSecurityRuleIDInsensitively(input string) (*SecurityRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(SecurityRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := SecurityRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkSecurityGroupName, ok = parsed.Parsed["networkSecurityGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkSecurityGroupName", *parsed) - } - - if id.SecurityRuleName, ok = parsed.Parsed["securityRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "securityRuleName", *parsed) - } - - return &id, nil -} - -// ValidateSecurityRuleID checks that 'input' can be parsed as a Security Rule ID -func ValidateSecurityRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseSecurityRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Security Rule ID -func (id SecurityRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkSecurityGroups/%s/securityRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkSecurityGroupName, id.SecurityRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Security Rule ID -func (id SecurityRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkSecurityGroups", "networkSecurityGroups", "networkSecurityGroups"), - resourceids.UserSpecifiedSegment("networkSecurityGroupName", "networkSecurityGroupValue"), - resourceids.StaticSegment("staticSecurityRules", "securityRules", "securityRules"), - resourceids.UserSpecifiedSegment("securityRuleName", "securityRuleValue"), - } -} - -// String returns a human-readable description of this Security Rule ID -func (id SecurityRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Security Group Name: %q", id.NetworkSecurityGroupName), - fmt.Sprintf("Security Rule Name: %q", id.SecurityRuleName), - } - return fmt.Sprintf("Security Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/securityrules/id_securityrule_test.go b/resource-manager/network/2022-11-01/securityrules/id_securityrule_test.go deleted file mode 100644 index 8f87597f680..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/id_securityrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package securityrules - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = SecurityRuleId{} - -func TestNewSecurityRuleID(t *testing.T) { - id := NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkSecurityGroupName != "networkSecurityGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkSecurityGroupName'", id.NetworkSecurityGroupName, "networkSecurityGroupValue") - } - - if id.SecurityRuleName != "securityRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'SecurityRuleName'", id.SecurityRuleName, "securityRuleValue") - } -} - -func TestFormatSecurityRuleID(t *testing.T) { - actual := NewSecurityRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkSecurityGroupValue", "securityRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseSecurityRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue", - Expected: &SecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - SecurityRuleName: "securityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - if actual.SecurityRuleName != v.Expected.SecurityRuleName { - t.Fatalf("Expected %q but got %q for SecurityRuleName", v.Expected.SecurityRuleName, actual.SecurityRuleName) - } - - } -} - -func TestParseSecurityRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *SecurityRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/sEcUrItYrUlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue", - Expected: &SecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkSecurityGroupName: "networkSecurityGroupValue", - SecurityRuleName: "securityRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkSecurityGroups/networkSecurityGroupValue/securityRules/securityRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/sEcUrItYrUlEs/sEcUrItYrUlEvAlUe", - Expected: &SecurityRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkSecurityGroupName: "nEtWoRkSeCuRiTyGrOuPvAlUe", - SecurityRuleName: "sEcUrItYrUlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkSeCuRiTyGrOuPs/nEtWoRkSeCuRiTyGrOuPvAlUe/sEcUrItYrUlEs/sEcUrItYrUlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseSecurityRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkSecurityGroupName != v.Expected.NetworkSecurityGroupName { - t.Fatalf("Expected %q but got %q for NetworkSecurityGroupName", v.Expected.NetworkSecurityGroupName, actual.NetworkSecurityGroupName) - } - - if actual.SecurityRuleName != v.Expected.SecurityRuleName { - t.Fatalf("Expected %q but got %q for SecurityRuleName", v.Expected.SecurityRuleName, actual.SecurityRuleName) - } - - } -} - -func TestSegmentsForSecurityRuleId(t *testing.T) { - segments := SecurityRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("SecurityRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/securityrules/method_createorupdate.go b/resource-manager/network/2022-11-01/securityrules/method_createorupdate.go deleted file mode 100644 index e3daab4f05d..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package securityrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c SecurityRulesClient) CreateOrUpdate(ctx context.Context, id SecurityRuleId, input SecurityRule) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c SecurityRulesClient) CreateOrUpdateThenPoll(ctx context.Context, id SecurityRuleId, input SecurityRule) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/securityrules/method_defaultsecurityrulesget.go b/resource-manager/network/2022-11-01/securityrules/method_defaultsecurityrulesget.go deleted file mode 100644 index 23be623d279..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/method_defaultsecurityrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package securityrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultSecurityRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityRule -} - -// DefaultSecurityRulesGet ... -func (c SecurityRulesClient) DefaultSecurityRulesGet(ctx context.Context, id DefaultSecurityRuleId) (result DefaultSecurityRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/securityrules/method_defaultsecurityruleslist.go b/resource-manager/network/2022-11-01/securityrules/method_defaultsecurityruleslist.go deleted file mode 100644 index 54e0598e000..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/method_defaultsecurityruleslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package securityrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DefaultSecurityRulesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityRule -} - -type DefaultSecurityRulesListCompleteResult struct { - Items []SecurityRule -} - -// DefaultSecurityRulesList ... -func (c SecurityRulesClient) DefaultSecurityRulesList(ctx context.Context, id NetworkSecurityGroupId) (result DefaultSecurityRulesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/defaultSecurityRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// DefaultSecurityRulesListComplete retrieves all the results into a single object -func (c SecurityRulesClient) DefaultSecurityRulesListComplete(ctx context.Context, id NetworkSecurityGroupId) (DefaultSecurityRulesListCompleteResult, error) { - return c.DefaultSecurityRulesListCompleteMatchingPredicate(ctx, id, SecurityRuleOperationPredicate{}) -} - -// DefaultSecurityRulesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityRulesClient) DefaultSecurityRulesListCompleteMatchingPredicate(ctx context.Context, id NetworkSecurityGroupId, predicate SecurityRuleOperationPredicate) (result DefaultSecurityRulesListCompleteResult, err error) { - items := make([]SecurityRule, 0) - - resp, err := c.DefaultSecurityRulesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = DefaultSecurityRulesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/securityrules/method_delete.go b/resource-manager/network/2022-11-01/securityrules/method_delete.go deleted file mode 100644 index 769b4866b0d..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package securityrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c SecurityRulesClient) Delete(ctx context.Context, id SecurityRuleId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c SecurityRulesClient) DeleteThenPoll(ctx context.Context, id SecurityRuleId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/securityrules/method_get.go b/resource-manager/network/2022-11-01/securityrules/method_get.go deleted file mode 100644 index 42d48fb8083..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package securityrules - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SecurityRule -} - -// Get ... -func (c SecurityRulesClient) Get(ctx context.Context, id SecurityRuleId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/securityrules/method_list.go b/resource-manager/network/2022-11-01/securityrules/method_list.go deleted file mode 100644 index 0040a4b383b..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package securityrules - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]SecurityRule -} - -type ListCompleteResult struct { - Items []SecurityRule -} - -// List ... -func (c SecurityRulesClient) List(ctx context.Context, id NetworkSecurityGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/securityRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]SecurityRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c SecurityRulesClient) ListComplete(ctx context.Context, id NetworkSecurityGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, SecurityRuleOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SecurityRulesClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkSecurityGroupId, predicate SecurityRuleOperationPredicate) (result ListCompleteResult, err error) { - items := make([]SecurityRule, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/securityrules/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/securityrules/model_applicationsecuritygroup.go deleted file mode 100644 index 7a6b77fa92a..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securityrules/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/securityrules/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index b73ae024539..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securityrules/model_securityrule.go b/resource-manager/network/2022-11-01/securityrules/model_securityrule.go deleted file mode 100644 index e96cb57aa16..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securityrules/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/securityrules/model_securityrulepropertiesformat.go deleted file mode 100644 index a7e44555d95..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/securityrules/predicates.go b/resource-manager/network/2022-11-01/securityrules/predicates.go deleted file mode 100644 index adf918c9ac4..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package securityrules - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p SecurityRuleOperationPredicate) Matches(input SecurityRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/securityrules/version.go b/resource-manager/network/2022-11-01/securityrules/version.go deleted file mode 100644 index f6a4b642de2..00000000000 --- a/resource-manager/network/2022-11-01/securityrules/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package securityrules - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/securityrules/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/README.md b/resource-manager/network/2022-11-01/serviceendpointpolicies/README.md deleted file mode 100644 index ecbbdf6853b..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/README.md +++ /dev/null @@ -1,120 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/serviceendpointpolicies` Documentation - -The `serviceendpointpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/serviceendpointpolicies" -``` - - -### Client Initialization - -```go -client := serviceendpointpolicies.NewServiceEndpointPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -payload := serviceendpointpolicies.ServiceEndpointPolicy{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.Get` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -read, err := client.Get(ctx, id, serviceendpointpolicies.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.List` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ServiceEndpointPoliciesClient.UpdateTags` - -```go -ctx := context.TODO() -id := serviceendpointpolicies.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -payload := serviceendpointpolicies.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/client.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/client.go deleted file mode 100644 index aa0cce53c77..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package serviceendpointpolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewServiceEndpointPoliciesClientWithBaseURI(api environments.Api) (*ServiceEndpointPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "serviceendpointpolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ServiceEndpointPoliciesClient: %+v", err) - } - - return &ServiceEndpointPoliciesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/constants.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/constants.go deleted file mode 100644 index 22da68ce499..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package serviceendpointpolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/id_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/id_serviceendpointpolicy.go deleted file mode 100644 index 1df0f6e4676..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/id_serviceendpointpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package serviceendpointpolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyId{} - -// ServiceEndpointPolicyId is a struct representing the Resource ID for a Service Endpoint Policy -type ServiceEndpointPolicyId struct { - SubscriptionId string - ResourceGroupName string - ServiceEndpointPolicyName string -} - -// NewServiceEndpointPolicyID returns a new ServiceEndpointPolicyId struct -func NewServiceEndpointPolicyID(subscriptionId string, resourceGroupName string, serviceEndpointPolicyName string) ServiceEndpointPolicyId { - return ServiceEndpointPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServiceEndpointPolicyName: serviceEndpointPolicyName, - } -} - -// ParseServiceEndpointPolicyID parses 'input' into a ServiceEndpointPolicyId -func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - return &id, nil -} - -// ParseServiceEndpointPolicyIDInsensitively parses 'input' case-insensitively into a ServiceEndpointPolicyId -// note: this method should only be used for API response data and not user input -func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateServiceEndpointPolicyID checks that 'input' can be parsed as a Service Endpoint Policy ID -func ValidateServiceEndpointPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServiceEndpointPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/serviceEndpointPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServiceEndpointPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticServiceEndpointPolicies", "serviceEndpointPolicies", "serviceEndpointPolicies"), - resourceids.UserSpecifiedSegment("serviceEndpointPolicyName", "serviceEndpointPolicyValue"), - } -} - -// String returns a human-readable description of this Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Service Endpoint Policy Name: %q", id.ServiceEndpointPolicyName), - } - return fmt.Sprintf("Service Endpoint Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/id_serviceendpointpolicy_test.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/id_serviceendpointpolicy_test.go deleted file mode 100644 index 35673e3699e..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/id_serviceendpointpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package serviceendpointpolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyId{} - -func TestNewServiceEndpointPolicyID(t *testing.T) { - id := NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ServiceEndpointPolicyName != "serviceEndpointPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'ServiceEndpointPolicyName'", id.ServiceEndpointPolicyName, "serviceEndpointPolicyValue") - } -} - -func TestFormatServiceEndpointPolicyID(t *testing.T) { - actual := NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseServiceEndpointPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - } -} - -func TestParseServiceEndpointPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ServiceEndpointPolicyName: "sErViCeEnDpOiNtPoLiCyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - } -} - -func TestSegmentsForServiceEndpointPolicyId(t *testing.T) { - segments := ServiceEndpointPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ServiceEndpointPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_createorupdate.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/method_createorupdate.go deleted file mode 100644 index 9dec5a538a4..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context, id ServiceEndpointPolicyId, input ServiceEndpointPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ServiceEndpointPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id ServiceEndpointPolicyId, input ServiceEndpointPolicy) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_delete.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/method_delete.go deleted file mode 100644 index fbffd77bf76..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ServiceEndpointPoliciesClient) Delete(ctx context.Context, id ServiceEndpointPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ServiceEndpointPoliciesClient) DeleteThenPoll(ctx context.Context, id ServiceEndpointPolicyId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_get.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/method_get.go deleted file mode 100644 index d67e8405ee3..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceEndpointPolicy -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c ServiceEndpointPoliciesClient) Get(ctx context.Context, id ServiceEndpointPolicyId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_list.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/method_list.go deleted file mode 100644 index a066f03166d..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ServiceEndpointPolicy -} - -type ListCompleteResult struct { - Items []ServiceEndpointPolicy -} - -// List ... -func (c ServiceEndpointPoliciesClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/serviceEndpointPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ServiceEndpointPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c ServiceEndpointPoliciesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, ServiceEndpointPolicyOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ServiceEndpointPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ServiceEndpointPolicyOperationPredicate) (result ListCompleteResult, err error) { - items := make([]ServiceEndpointPolicy, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/method_listbyresourcegroup.go deleted file mode 100644 index 9ac4b41e723..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ServiceEndpointPolicy -} - -type ListByResourceGroupCompleteResult struct { - Items []ServiceEndpointPolicy -} - -// ListByResourceGroup ... -func (c ServiceEndpointPoliciesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/serviceEndpointPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ServiceEndpointPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c ServiceEndpointPoliciesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ServiceEndpointPolicyOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ServiceEndpointPoliciesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ServiceEndpointPolicyOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]ServiceEndpointPolicy, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_updatetags.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/method_updatetags.go deleted file mode 100644 index 212145e5f2b..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package serviceendpointpolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceEndpointPolicy -} - -// UpdateTags ... -func (c ServiceEndpointPoliciesClient) UpdateTags(ctx context.Context, id ServiceEndpointPolicyId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 7a1f5258bb4..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 76bca3269ac..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 1e70d427a94..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 7f6bd42e1cc..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 15556d9d646..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationsecuritygroup.go deleted file mode 100644 index 6e7d684d6ab..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 2f704e37983..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_backendaddresspool.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_backendaddresspool.go deleted file mode 100644 index feb93ad5475..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index bcc53963c2f..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 9f6fb9fe6e7..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ddossettings.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ddossettings.go deleted file mode 100644 index de52c73833f..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_delegation.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_delegation.go deleted file mode 100644 index 1e9e6e93b12..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlog.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlog.go deleted file mode 100644 index a657d2ccd92..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlogformatparameters.go deleted file mode 100644 index 64ce02b9b62..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlogpropertiesformat.go deleted file mode 100644 index c83c10c7197..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_frontendipconfiguration.go deleted file mode 100644 index 3460648e174..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 27c417be79d..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 253d53dc1d3..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_inboundnatrule.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_inboundnatrule.go deleted file mode 100644 index 691567f1623..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index bcdf56e4388..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfiguration.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfiguration.go deleted file mode 100644 index 43160da9e2b..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationprofile.go deleted file mode 100644 index cbb4340c474..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index a8340bcc1f3..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index b76d67b91b5..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_iptag.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_iptag.go deleted file mode 100644 index 879d6210923..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_loadbalancerbackendaddress.go deleted file mode 100644 index bcd25a343d4..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 71bfae4fc90..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgateway.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgateway.go deleted file mode 100644 index 4fce3c97a62..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgatewaypropertiesformat.go deleted file mode 100644 index 0eae8e55e8c..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgatewaysku.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgatewaysku.go deleted file mode 100644 index d7c06ad6950..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natruleportmapping.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natruleportmapping.go deleted file mode 100644 index af408670c2d..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterface.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterface.go deleted file mode 100644 index 4576b3d0a24..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacednssettings.go deleted file mode 100644 index f2f63e673ce..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfiguration.go deleted file mode 100644 index efba2a7575d..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index fee33255b2f..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index c09e2754047..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacepropertiesformat.go deleted file mode 100644 index bdbb3dec753..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 373ac218872..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 1a2c2bc8774..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networksecuritygroup.go deleted file mode 100644 index 7babf5dcba3..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 9e417934d4e..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpoint.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpoint.go deleted file mode 100644 index b9c2640063f..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointconnection.go deleted file mode 100644 index 0c67a94b069..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointconnectionproperties.go deleted file mode 100644 index 9468576ebfd..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointipconfiguration.go deleted file mode 100644 index 25ab508cf68..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index b2b9cd17391..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointproperties.go deleted file mode 100644 index b74aa311c14..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkservice.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkservice.go deleted file mode 100644 index f69adbd0b19..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnection.go deleted file mode 100644 index f163cad59d9..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index e9560116ef6..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 9accc19fd8b..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index e2a71cb7416..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 6cc9d81d85e..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceproperties.go deleted file mode 100644 index 972989defcd..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddress.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddress.go deleted file mode 100644 index b3722e1f191..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package serviceendpointpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddressdnssettings.go deleted file mode 100644 index d28111e34e8..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddresspropertiesformat.go deleted file mode 100644 index fe9e93dc57e..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddresssku.go deleted file mode 100644 index 5d6c2dd1535..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourcenavigationlink.go deleted file mode 100644 index 3a125f5d30e..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourcenavigationlinkformat.go deleted file mode 100644 index 004d9d501d7..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourceset.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourceset.go deleted file mode 100644 index 33f79b6dd7f..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_retentionpolicyparameters.go deleted file mode 100644 index 98b48093fe5..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_route.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_route.go deleted file mode 100644 index a08219146cf..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_routepropertiesformat.go deleted file mode 100644 index a2d74c7e24a..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_routetable.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_routetable.go deleted file mode 100644 index fabb0fc336d..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_routetablepropertiesformat.go deleted file mode 100644 index fbf628f66f3..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_securityrule.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_securityrule.go deleted file mode 100644 index 3f50e5ddac6..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_securityrulepropertiesformat.go deleted file mode 100644 index 8d5f321605a..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceassociationlink.go deleted file mode 100644 index a22d8f42829..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 5b81f28e88b..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 0903abfa70e..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicy.go deleted file mode 100644 index 796d7019b02..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 75928dae7f1..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 31efd2eb7eb..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index fdb4ecd0a7f..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 2927331856d..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_subnet.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_subnet.go deleted file mode 100644 index 50005077792..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_subnetpropertiesformat.go deleted file mode 100644 index 78947f02f56..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_subresource.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_subresource.go deleted file mode 100644 index 61370085ffc..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_tagsobject.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_tagsobject.go deleted file mode 100644 index 7c5d750fc90..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index da94c72fe29..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_trafficanalyticsproperties.go deleted file mode 100644 index 58889a80476..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_virtualnetworktap.go deleted file mode 100644 index 1d191ff67f0..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 2660ce6a382..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/predicates.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/predicates.go deleted file mode 100644 index ddd972a1d9d..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/predicates.go +++ /dev/null @@ -1,42 +0,0 @@ -package serviceendpointpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyOperationPredicate struct { - Etag *string - Id *string - Kind *string - Location *string - Name *string - Type *string -} - -func (p ServiceEndpointPolicyOperationPredicate) Matches(input ServiceEndpointPolicy) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicies/version.go b/resource-manager/network/2022-11-01/serviceendpointpolicies/version.go deleted file mode 100644 index ed6245d17de..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicies/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/README.md b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/README.md deleted file mode 100644 index 17146511c99..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions` Documentation - -The `serviceendpointpolicydefinitions` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions" -``` - - -### Client Initialization - -```go -client := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue") - -payload := serviceendpointpolicydefinitions.ServiceEndpointPolicyDefinition{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServiceEndpointPolicyDefinitionsClient.Delete` - -```go -ctx := context.TODO() -id := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `ServiceEndpointPolicyDefinitionsClient.Get` - -```go -ctx := context.TODO() -id := serviceendpointpolicydefinitions.NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := serviceendpointpolicydefinitions.NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/client.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/client.go deleted file mode 100644 index 255a599b606..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionsClient struct { - Client *resourcemanager.Client -} - -func NewServiceEndpointPolicyDefinitionsClientWithBaseURI(api environments.Api) (*ServiceEndpointPolicyDefinitionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "serviceendpointpolicydefinitions", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ServiceEndpointPolicyDefinitionsClient: %+v", err) - } - - return &ServiceEndpointPolicyDefinitionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/constants.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/constants.go deleted file mode 100644 index 3e91dc60d4b..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go deleted file mode 100644 index 979cf4f022e..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyId{} - -// ServiceEndpointPolicyId is a struct representing the Resource ID for a Service Endpoint Policy -type ServiceEndpointPolicyId struct { - SubscriptionId string - ResourceGroupName string - ServiceEndpointPolicyName string -} - -// NewServiceEndpointPolicyID returns a new ServiceEndpointPolicyId struct -func NewServiceEndpointPolicyID(subscriptionId string, resourceGroupName string, serviceEndpointPolicyName string) ServiceEndpointPolicyId { - return ServiceEndpointPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServiceEndpointPolicyName: serviceEndpointPolicyName, - } -} - -// ParseServiceEndpointPolicyID parses 'input' into a ServiceEndpointPolicyId -func ParseServiceEndpointPolicyID(input string) (*ServiceEndpointPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - return &id, nil -} - -// ParseServiceEndpointPolicyIDInsensitively parses 'input' case-insensitively into a ServiceEndpointPolicyId -// note: this method should only be used for API response data and not user input -func ParseServiceEndpointPolicyIDInsensitively(input string) (*ServiceEndpointPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateServiceEndpointPolicyID checks that 'input' can be parsed as a Service Endpoint Policy ID -func ValidateServiceEndpointPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServiceEndpointPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/serviceEndpointPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServiceEndpointPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticServiceEndpointPolicies", "serviceEndpointPolicies", "serviceEndpointPolicies"), - resourceids.UserSpecifiedSegment("serviceEndpointPolicyName", "serviceEndpointPolicyValue"), - } -} - -// String returns a human-readable description of this Service Endpoint Policy ID -func (id ServiceEndpointPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Service Endpoint Policy Name: %q", id.ServiceEndpointPolicyName), - } - return fmt.Sprintf("Service Endpoint Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy_test.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy_test.go deleted file mode 100644 index 784f2c6a9f5..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyId{} - -func TestNewServiceEndpointPolicyID(t *testing.T) { - id := NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ServiceEndpointPolicyName != "serviceEndpointPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'ServiceEndpointPolicyName'", id.ServiceEndpointPolicyName, "serviceEndpointPolicyValue") - } -} - -func TestFormatServiceEndpointPolicyID(t *testing.T) { - actual := NewServiceEndpointPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseServiceEndpointPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - } -} - -func TestParseServiceEndpointPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE", - Expected: &ServiceEndpointPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ServiceEndpointPolicyName: "sErViCeEnDpOiNtPoLiCyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - } -} - -func TestSegmentsForServiceEndpointPolicyId(t *testing.T) { - segments := ServiceEndpointPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ServiceEndpointPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go deleted file mode 100644 index f8fabb5925a..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,140 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyDefinitionId{} - -// ServiceEndpointPolicyDefinitionId is a struct representing the Resource ID for a Service Endpoint Policy Definition -type ServiceEndpointPolicyDefinitionId struct { - SubscriptionId string - ResourceGroupName string - ServiceEndpointPolicyName string - ServiceEndpointPolicyDefinitionName string -} - -// NewServiceEndpointPolicyDefinitionID returns a new ServiceEndpointPolicyDefinitionId struct -func NewServiceEndpointPolicyDefinitionID(subscriptionId string, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) ServiceEndpointPolicyDefinitionId { - return ServiceEndpointPolicyDefinitionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ServiceEndpointPolicyName: serviceEndpointPolicyName, - ServiceEndpointPolicyDefinitionName: serviceEndpointPolicyDefinitionName, - } -} - -// ParseServiceEndpointPolicyDefinitionID parses 'input' into a ServiceEndpointPolicyDefinitionId -func ParseServiceEndpointPolicyDefinitionID(input string) (*ServiceEndpointPolicyDefinitionId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyDefinitionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - if id.ServiceEndpointPolicyDefinitionName, ok = parsed.Parsed["serviceEndpointPolicyDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyDefinitionName", *parsed) - } - - return &id, nil -} - -// ParseServiceEndpointPolicyDefinitionIDInsensitively parses 'input' case-insensitively into a ServiceEndpointPolicyDefinitionId -// note: this method should only be used for API response data and not user input -func ParseServiceEndpointPolicyDefinitionIDInsensitively(input string) (*ServiceEndpointPolicyDefinitionId, error) { - parser := resourceids.NewParserFromResourceIdType(ServiceEndpointPolicyDefinitionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ServiceEndpointPolicyDefinitionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ServiceEndpointPolicyName, ok = parsed.Parsed["serviceEndpointPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyName", *parsed) - } - - if id.ServiceEndpointPolicyDefinitionName, ok = parsed.Parsed["serviceEndpointPolicyDefinitionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "serviceEndpointPolicyDefinitionName", *parsed) - } - - return &id, nil -} - -// ValidateServiceEndpointPolicyDefinitionID checks that 'input' can be parsed as a Service Endpoint Policy Definition ID -func ValidateServiceEndpointPolicyDefinitionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseServiceEndpointPolicyDefinitionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Service Endpoint Policy Definition ID -func (id ServiceEndpointPolicyDefinitionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/serviceEndpointPolicies/%s/serviceEndpointPolicyDefinitions/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ServiceEndpointPolicyName, id.ServiceEndpointPolicyDefinitionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Service Endpoint Policy Definition ID -func (id ServiceEndpointPolicyDefinitionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticServiceEndpointPolicies", "serviceEndpointPolicies", "serviceEndpointPolicies"), - resourceids.UserSpecifiedSegment("serviceEndpointPolicyName", "serviceEndpointPolicyValue"), - resourceids.StaticSegment("staticServiceEndpointPolicyDefinitions", "serviceEndpointPolicyDefinitions", "serviceEndpointPolicyDefinitions"), - resourceids.UserSpecifiedSegment("serviceEndpointPolicyDefinitionName", "serviceEndpointPolicyDefinitionValue"), - } -} - -// String returns a human-readable description of this Service Endpoint Policy Definition ID -func (id ServiceEndpointPolicyDefinitionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Service Endpoint Policy Name: %q", id.ServiceEndpointPolicyName), - fmt.Sprintf("Service Endpoint Policy Definition Name: %q", id.ServiceEndpointPolicyDefinitionName), - } - return fmt.Sprintf("Service Endpoint Policy Definition (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition_test.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition_test.go deleted file mode 100644 index ee51207e4e8..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/id_serviceendpointpolicydefinition_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ServiceEndpointPolicyDefinitionId{} - -func TestNewServiceEndpointPolicyDefinitionID(t *testing.T) { - id := NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ServiceEndpointPolicyName != "serviceEndpointPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'ServiceEndpointPolicyName'", id.ServiceEndpointPolicyName, "serviceEndpointPolicyValue") - } - - if id.ServiceEndpointPolicyDefinitionName != "serviceEndpointPolicyDefinitionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ServiceEndpointPolicyDefinitionName'", id.ServiceEndpointPolicyDefinitionName, "serviceEndpointPolicyDefinitionValue") - } -} - -func TestFormatServiceEndpointPolicyDefinitionID(t *testing.T) { - actual := NewServiceEndpointPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceEndpointPolicyValue", "serviceEndpointPolicyDefinitionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseServiceEndpointPolicyDefinitionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyDefinitionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue", - Expected: &ServiceEndpointPolicyDefinitionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - ServiceEndpointPolicyDefinitionName: "serviceEndpointPolicyDefinitionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyDefinitionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - if actual.ServiceEndpointPolicyDefinitionName != v.Expected.ServiceEndpointPolicyDefinitionName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyDefinitionName", v.Expected.ServiceEndpointPolicyDefinitionName, actual.ServiceEndpointPolicyDefinitionName) - } - - } -} - -func TestParseServiceEndpointPolicyDefinitionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ServiceEndpointPolicyDefinitionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue", - Expected: &ServiceEndpointPolicyDefinitionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ServiceEndpointPolicyName: "serviceEndpointPolicyValue", - ServiceEndpointPolicyDefinitionName: "serviceEndpointPolicyDefinitionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyValue/serviceEndpointPolicyDefinitions/serviceEndpointPolicyDefinitionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnS/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnVaLuE", - Expected: &ServiceEndpointPolicyDefinitionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ServiceEndpointPolicyName: "sErViCeEnDpOiNtPoLiCyVaLuE", - ServiceEndpointPolicyDefinitionName: "sErViCeEnDpOiNtPoLiCyDeFiNiTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/sErViCeEnDpOiNtPoLiCiEs/sErViCeEnDpOiNtPoLiCyVaLuE/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnS/sErViCeEnDpOiNtPoLiCyDeFiNiTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseServiceEndpointPolicyDefinitionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ServiceEndpointPolicyName != v.Expected.ServiceEndpointPolicyName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyName", v.Expected.ServiceEndpointPolicyName, actual.ServiceEndpointPolicyName) - } - - if actual.ServiceEndpointPolicyDefinitionName != v.Expected.ServiceEndpointPolicyDefinitionName { - t.Fatalf("Expected %q but got %q for ServiceEndpointPolicyDefinitionName", v.Expected.ServiceEndpointPolicyDefinitionName, actual.ServiceEndpointPolicyDefinitionName) - } - - } -} - -func TestSegmentsForServiceEndpointPolicyDefinitionId(t *testing.T) { - segments := ServiceEndpointPolicyDefinitionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ServiceEndpointPolicyDefinitionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_createorupdate.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_createorupdate.go deleted file mode 100644 index 5c2f9dec299..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.Context, id ServiceEndpointPolicyDefinitionId, input ServiceEndpointPolicyDefinition) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ServiceEndpointPolicyDefinitionId, input ServiceEndpointPolicyDefinition) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_delete.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_delete.go deleted file mode 100644 index 81989f95364..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context, id ServiceEndpointPolicyDefinitionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c ServiceEndpointPolicyDefinitionsClient) DeleteThenPoll(ctx context.Context, id ServiceEndpointPolicyDefinitionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_get.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_get.go deleted file mode 100644 index fb9581ea3c7..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceEndpointPolicyDefinition -} - -// Get ... -func (c ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, id ServiceEndpointPolicyDefinitionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_listbyresourcegroup.go deleted file mode 100644 index 2968a1c6fa3..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/method_listbyresourcegroup.go +++ /dev/null @@ -1,89 +0,0 @@ -package serviceendpointpolicydefinitions - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ServiceEndpointPolicyDefinition -} - -type ListByResourceGroupCompleteResult struct { - Items []ServiceEndpointPolicyDefinition -} - -// ListByResourceGroup ... -func (c ServiceEndpointPolicyDefinitionsClient) ListByResourceGroup(ctx context.Context, id ServiceEndpointPolicyId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/serviceEndpointPolicyDefinitions", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ServiceEndpointPolicyDefinition `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupComplete(ctx context.Context, id ServiceEndpointPolicyId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, ServiceEndpointPolicyDefinitionOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id ServiceEndpointPolicyId, predicate ServiceEndpointPolicyDefinitionOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]ServiceEndpointPolicyDefinition, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 012ba37fe47..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicydefinitions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index ff7d49d8a5b..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package serviceendpointpolicydefinitions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/predicates.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/predicates.go deleted file mode 100644 index a7a08fa9deb..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package serviceendpointpolicydefinitions - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p ServiceEndpointPolicyDefinitionOperationPredicate) Matches(input ServiceEndpointPolicyDefinition) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/version.go b/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/version.go deleted file mode 100644 index 64bc0b88fd0..00000000000 --- a/resource-manager/network/2022-11-01/serviceendpointpolicydefinitions/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package serviceendpointpolicydefinitions - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/serviceendpointpolicydefinitions/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/servicetags/README.md b/resource-manager/network/2022-11-01/servicetags/README.md deleted file mode 100644 index dedbf90f92c..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/servicetags` Documentation - -The `servicetags` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/servicetags" -``` - - -### Client Initialization - -```go -client := servicetags.NewServiceTagsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `ServiceTagsClient.ServiceTagInformationList` - -```go -ctx := context.TODO() -id := servicetags.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.ServiceTagInformationList(ctx, id, servicetags.DefaultServiceTagInformationListOperationOptions())` can be used to do batched pagination -items, err := client.ServiceTagInformationListComplete(ctx, id, servicetags.DefaultServiceTagInformationListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `ServiceTagsClient.ServiceTagsList` - -```go -ctx := context.TODO() -id := servicetags.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -read, err := client.ServiceTagsList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/servicetags/client.go b/resource-manager/network/2022-11-01/servicetags/client.go deleted file mode 100644 index 6ce184db9bc..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package servicetags - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagsClient struct { - Client *resourcemanager.Client -} - -func NewServiceTagsClientWithBaseURI(api environments.Api) (*ServiceTagsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "servicetags", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating ServiceTagsClient: %+v", err) - } - - return &ServiceTagsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/servicetags/id_location.go b/resource-manager/network/2022-11-01/servicetags/id_location.go deleted file mode 100644 index 2d8a29c22d9..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package servicetags - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/servicetags/id_location_test.go b/resource-manager/network/2022-11-01/servicetags/id_location_test.go deleted file mode 100644 index 809e7f8e19a..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package servicetags - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/servicetags/method_servicetaginformationlist.go b/resource-manager/network/2022-11-01/servicetags/method_servicetaginformationlist.go deleted file mode 100644 index c413c9f490a..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/method_servicetaginformationlist.go +++ /dev/null @@ -1,121 +0,0 @@ -package servicetags - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagInformationListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]ServiceTagInformation -} - -type ServiceTagInformationListCompleteResult struct { - Items []ServiceTagInformation -} - -type ServiceTagInformationListOperationOptions struct { - NoAddressPrefixes *bool - TagName *string -} - -func DefaultServiceTagInformationListOperationOptions() ServiceTagInformationListOperationOptions { - return ServiceTagInformationListOperationOptions{} -} - -func (o ServiceTagInformationListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ServiceTagInformationListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ServiceTagInformationListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.NoAddressPrefixes != nil { - out.Append("noAddressPrefixes", fmt.Sprintf("%v", *o.NoAddressPrefixes)) - } - if o.TagName != nil { - out.Append("tagName", fmt.Sprintf("%v", *o.TagName)) - } - return &out -} - -// ServiceTagInformationList ... -func (c ServiceTagsClient) ServiceTagInformationList(ctx context.Context, id LocationId, options ServiceTagInformationListOperationOptions) (result ServiceTagInformationListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/serviceTagDetails", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]ServiceTagInformation `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ServiceTagInformationListComplete retrieves all the results into a single object -func (c ServiceTagsClient) ServiceTagInformationListComplete(ctx context.Context, id LocationId, options ServiceTagInformationListOperationOptions) (ServiceTagInformationListCompleteResult, error) { - return c.ServiceTagInformationListCompleteMatchingPredicate(ctx, id, options, ServiceTagInformationOperationPredicate{}) -} - -// ServiceTagInformationListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c ServiceTagsClient) ServiceTagInformationListCompleteMatchingPredicate(ctx context.Context, id LocationId, options ServiceTagInformationListOperationOptions, predicate ServiceTagInformationOperationPredicate) (result ServiceTagInformationListCompleteResult, err error) { - items := make([]ServiceTagInformation, 0) - - resp, err := c.ServiceTagInformationList(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ServiceTagInformationListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/servicetags/method_servicetagslist.go b/resource-manager/network/2022-11-01/servicetags/method_servicetagslist.go deleted file mode 100644 index b9acb9e9472..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/method_servicetagslist.go +++ /dev/null @@ -1,52 +0,0 @@ -package servicetags - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceTagsListResult -} - -// ServiceTagsList ... -func (c ServiceTagsClient) ServiceTagsList(ctx context.Context, id LocationId) (result ServiceTagsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/serviceTags", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/servicetags/model_servicetaginformation.go b/resource-manager/network/2022-11-01/servicetags/model_servicetaginformation.go deleted file mode 100644 index 705268a5bb9..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/model_servicetaginformation.go +++ /dev/null @@ -1,11 +0,0 @@ -package servicetags - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagInformation struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceTagInformationPropertiesFormat `json:"properties,omitempty"` - ServiceTagChangeNumber *string `json:"serviceTagChangeNumber,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/servicetags/model_servicetaginformationpropertiesformat.go b/resource-manager/network/2022-11-01/servicetags/model_servicetaginformationpropertiesformat.go deleted file mode 100644 index 0d51bfcd8b2..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/model_servicetaginformationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package servicetags - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagInformationPropertiesFormat struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ChangeNumber *string `json:"changeNumber,omitempty"` - Region *string `json:"region,omitempty"` - State *string `json:"state,omitempty"` - SystemService *string `json:"systemService,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/servicetags/model_servicetagslistresult.go b/resource-manager/network/2022-11-01/servicetags/model_servicetagslistresult.go deleted file mode 100644 index 9cfb2fb2afb..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/model_servicetagslistresult.go +++ /dev/null @@ -1,14 +0,0 @@ -package servicetags - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagsListResult struct { - ChangeNumber *string `json:"changeNumber,omitempty"` - Cloud *string `json:"cloud,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - NextLink *string `json:"nextLink,omitempty"` - Type *string `json:"type,omitempty"` - Values *[]ServiceTagInformation `json:"values,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/servicetags/predicates.go b/resource-manager/network/2022-11-01/servicetags/predicates.go deleted file mode 100644 index e10bffe6a4f..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package servicetags - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceTagInformationOperationPredicate struct { - Id *string - Name *string - ServiceTagChangeNumber *string -} - -func (p ServiceTagInformationOperationPredicate) Matches(input ServiceTagInformation) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.ServiceTagChangeNumber != nil && (input.ServiceTagChangeNumber == nil || *p.ServiceTagChangeNumber != *input.ServiceTagChangeNumber) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/servicetags/version.go b/resource-manager/network/2022-11-01/servicetags/version.go deleted file mode 100644 index 87ab937f394..00000000000 --- a/resource-manager/network/2022-11-01/servicetags/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package servicetags - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/servicetags/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/staticmembers/README.md b/resource-manager/network/2022-11-01/staticmembers/README.md deleted file mode 100644 index 94cf99ae2ab..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/README.md +++ /dev/null @@ -1,90 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/staticmembers` Documentation - -The `staticmembers` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/staticmembers" -``` - - -### Client Initialization - -```go -client := staticmembers.NewStaticMembersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `StaticMembersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := staticmembers.NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue") - -payload := staticmembers.StaticMember{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StaticMembersClient.Delete` - -```go -ctx := context.TODO() -id := staticmembers.NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue") - -read, err := client.Delete(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StaticMembersClient.Get` - -```go -ctx := context.TODO() -id := staticmembers.NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `StaticMembersClient.List` - -```go -ctx := context.TODO() -id := staticmembers.NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - -// alternatively `client.List(ctx, id, staticmembers.DefaultListOperationOptions())` can be used to do batched pagination -items, err := client.ListComplete(ctx, id, staticmembers.DefaultListOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/staticmembers/client.go b/resource-manager/network/2022-11-01/staticmembers/client.go deleted file mode 100644 index bc0383f9c3c..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package staticmembers - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticMembersClient struct { - Client *resourcemanager.Client -} - -func NewStaticMembersClientWithBaseURI(api environments.Api) (*StaticMembersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "staticmembers", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating StaticMembersClient: %+v", err) - } - - return &StaticMembersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/staticmembers/constants.go b/resource-manager/network/2022-11-01/staticmembers/constants.go deleted file mode 100644 index 3ccbd94262b..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package staticmembers - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/staticmembers/id_networkgroup.go b/resource-manager/network/2022-11-01/staticmembers/id_networkgroup.go deleted file mode 100644 index 67b3fd5daf1..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/id_networkgroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package staticmembers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkGroupId{} - -// NetworkGroupId is a struct representing the Resource ID for a Network Group -type NetworkGroupId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - NetworkGroupName string -} - -// NewNetworkGroupID returns a new NetworkGroupId struct -func NewNetworkGroupID(subscriptionId string, resourceGroupName string, networkManagerName string, networkGroupName string) NetworkGroupId { - return NetworkGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - NetworkGroupName: networkGroupName, - } -} - -// ParseNetworkGroupID parses 'input' into a NetworkGroupId -func ParseNetworkGroupID(input string) (*NetworkGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - return &id, nil -} - -// ParseNetworkGroupIDInsensitively parses 'input' case-insensitively into a NetworkGroupId -// note: this method should only be used for API response data and not user input -func ParseNetworkGroupIDInsensitively(input string) (*NetworkGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkGroupID checks that 'input' can be parsed as a Network Group ID -func ValidateNetworkGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Group ID -func (id NetworkGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/networkGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.NetworkGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Group ID -func (id NetworkGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticNetworkGroups", "networkGroups", "networkGroups"), - resourceids.UserSpecifiedSegment("networkGroupName", "networkGroupValue"), - } -} - -// String returns a human-readable description of this Network Group ID -func (id NetworkGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Network Group Name: %q", id.NetworkGroupName), - } - return fmt.Sprintf("Network Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/staticmembers/id_networkgroup_test.go b/resource-manager/network/2022-11-01/staticmembers/id_networkgroup_test.go deleted file mode 100644 index 2f0e7a131b1..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/id_networkgroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package staticmembers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkGroupId{} - -func TestNewNetworkGroupID(t *testing.T) { - id := NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.NetworkGroupName != "networkGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkGroupName'", id.NetworkGroupName, "networkGroupValue") - } -} - -func TestFormatNetworkGroupID(t *testing.T) { - actual := NewNetworkGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - } -} - -func TestParseNetworkGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe", - Expected: &NetworkGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - NetworkGroupName: "nEtWoRkGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - } -} - -func TestSegmentsForNetworkGroupId(t *testing.T) { - segments := NetworkGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/staticmembers/id_staticmember.go b/resource-manager/network/2022-11-01/staticmembers/id_staticmember.go deleted file mode 100644 index c42f4e8bd27..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/id_staticmember.go +++ /dev/null @@ -1,153 +0,0 @@ -package staticmembers - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = StaticMemberId{} - -// StaticMemberId is a struct representing the Resource ID for a Static Member -type StaticMemberId struct { - SubscriptionId string - ResourceGroupName string - NetworkManagerName string - NetworkGroupName string - StaticMemberName string -} - -// NewStaticMemberID returns a new StaticMemberId struct -func NewStaticMemberID(subscriptionId string, resourceGroupName string, networkManagerName string, networkGroupName string, staticMemberName string) StaticMemberId { - return StaticMemberId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkManagerName: networkManagerName, - NetworkGroupName: networkGroupName, - StaticMemberName: staticMemberName, - } -} - -// ParseStaticMemberID parses 'input' into a StaticMemberId -func ParseStaticMemberID(input string) (*StaticMemberId, error) { - parser := resourceids.NewParserFromResourceIdType(StaticMemberId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StaticMemberId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - if id.StaticMemberName, ok = parsed.Parsed["staticMemberName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "staticMemberName", *parsed) - } - - return &id, nil -} - -// ParseStaticMemberIDInsensitively parses 'input' case-insensitively into a StaticMemberId -// note: this method should only be used for API response data and not user input -func ParseStaticMemberIDInsensitively(input string) (*StaticMemberId, error) { - parser := resourceids.NewParserFromResourceIdType(StaticMemberId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := StaticMemberId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkManagerName, ok = parsed.Parsed["networkManagerName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkManagerName", *parsed) - } - - if id.NetworkGroupName, ok = parsed.Parsed["networkGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkGroupName", *parsed) - } - - if id.StaticMemberName, ok = parsed.Parsed["staticMemberName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "staticMemberName", *parsed) - } - - return &id, nil -} - -// ValidateStaticMemberID checks that 'input' can be parsed as a Static Member ID -func ValidateStaticMemberID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseStaticMemberID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Static Member ID -func (id StaticMemberId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkManagers/%s/networkGroups/%s/staticMembers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkManagerName, id.NetworkGroupName, id.StaticMemberName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Static Member ID -func (id StaticMemberId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkManagers", "networkManagers", "networkManagers"), - resourceids.UserSpecifiedSegment("networkManagerName", "networkManagerValue"), - resourceids.StaticSegment("staticNetworkGroups", "networkGroups", "networkGroups"), - resourceids.UserSpecifiedSegment("networkGroupName", "networkGroupValue"), - resourceids.StaticSegment("staticStaticMembers", "staticMembers", "staticMembers"), - resourceids.UserSpecifiedSegment("staticMemberName", "staticMemberValue"), - } -} - -// String returns a human-readable description of this Static Member ID -func (id StaticMemberId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Manager Name: %q", id.NetworkManagerName), - fmt.Sprintf("Network Group Name: %q", id.NetworkGroupName), - fmt.Sprintf("Static Member Name: %q", id.StaticMemberName), - } - return fmt.Sprintf("Static Member (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/staticmembers/id_staticmember_test.go b/resource-manager/network/2022-11-01/staticmembers/id_staticmember_test.go deleted file mode 100644 index 2291e76f553..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/id_staticmember_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package staticmembers - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = StaticMemberId{} - -func TestNewStaticMemberID(t *testing.T) { - id := NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkManagerName != "networkManagerValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkManagerName'", id.NetworkManagerName, "networkManagerValue") - } - - if id.NetworkGroupName != "networkGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkGroupName'", id.NetworkGroupName, "networkGroupValue") - } - - if id.StaticMemberName != "staticMemberValue" { - t.Fatalf("Expected %q but got %q for Segment 'StaticMemberName'", id.StaticMemberName, "staticMemberValue") - } -} - -func TestFormatStaticMemberID(t *testing.T) { - actual := NewStaticMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkManagerValue", "networkGroupValue", "staticMemberValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseStaticMemberID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *StaticMemberId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue", - Expected: &StaticMemberId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - StaticMemberName: "staticMemberValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseStaticMemberID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - if actual.StaticMemberName != v.Expected.StaticMemberName { - t.Fatalf("Expected %q but got %q for StaticMemberName", v.Expected.StaticMemberName, actual.StaticMemberName) - } - - } -} - -func TestParseStaticMemberIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *StaticMemberId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/sTaTiCmEmBeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue", - Expected: &StaticMemberId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkManagerName: "networkManagerValue", - NetworkGroupName: "networkGroupValue", - StaticMemberName: "staticMemberValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkManagers/networkManagerValue/networkGroups/networkGroupValue/staticMembers/staticMemberValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/sTaTiCmEmBeRs/sTaTiCmEmBeRvAlUe", - Expected: &StaticMemberId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkManagerName: "nEtWoRkMaNaGeRvAlUe", - NetworkGroupName: "nEtWoRkGrOuPvAlUe", - StaticMemberName: "sTaTiCmEmBeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkMaNaGeRs/nEtWoRkMaNaGeRvAlUe/nEtWoRkGrOuPs/nEtWoRkGrOuPvAlUe/sTaTiCmEmBeRs/sTaTiCmEmBeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseStaticMemberIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkManagerName != v.Expected.NetworkManagerName { - t.Fatalf("Expected %q but got %q for NetworkManagerName", v.Expected.NetworkManagerName, actual.NetworkManagerName) - } - - if actual.NetworkGroupName != v.Expected.NetworkGroupName { - t.Fatalf("Expected %q but got %q for NetworkGroupName", v.Expected.NetworkGroupName, actual.NetworkGroupName) - } - - if actual.StaticMemberName != v.Expected.StaticMemberName { - t.Fatalf("Expected %q but got %q for StaticMemberName", v.Expected.StaticMemberName, actual.StaticMemberName) - } - - } -} - -func TestSegmentsForStaticMemberId(t *testing.T) { - segments := StaticMemberId{}.Segments() - if len(segments) == 0 { - t.Fatalf("StaticMemberId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/staticmembers/method_createorupdate.go b/resource-manager/network/2022-11-01/staticmembers/method_createorupdate.go deleted file mode 100644 index ed6f5c34d52..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package staticmembers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StaticMember -} - -// CreateOrUpdate ... -func (c StaticMembersClient) CreateOrUpdate(ctx context.Context, id StaticMemberId, input StaticMember) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/staticmembers/method_delete.go b/resource-manager/network/2022-11-01/staticmembers/method_delete.go deleted file mode 100644 index 5709eca59ec..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/method_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package staticmembers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c StaticMembersClient) Delete(ctx context.Context, id StaticMemberId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/staticmembers/method_get.go b/resource-manager/network/2022-11-01/staticmembers/method_get.go deleted file mode 100644 index 742da5445a8..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package staticmembers - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *StaticMember -} - -// Get ... -func (c StaticMembersClient) Get(ctx context.Context, id StaticMemberId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/staticmembers/method_list.go b/resource-manager/network/2022-11-01/staticmembers/method_list.go deleted file mode 100644 index ef049ac1a6a..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/method_list.go +++ /dev/null @@ -1,117 +0,0 @@ -package staticmembers - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]StaticMember -} - -type ListCompleteResult struct { - Items []StaticMember -} - -type ListOperationOptions struct { - Top *int64 -} - -func DefaultListOperationOptions() ListOperationOptions { - return ListOperationOptions{} -} - -func (o ListOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ListOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ListOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Top != nil { - out.Append("$top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// List ... -func (c StaticMembersClient) List(ctx context.Context, id NetworkGroupId, options ListOperationOptions) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/staticMembers", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]StaticMember `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c StaticMembersClient) ListComplete(ctx context.Context, id NetworkGroupId, options ListOperationOptions) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, options, StaticMemberOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c StaticMembersClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkGroupId, options ListOperationOptions, predicate StaticMemberOperationPredicate) (result ListCompleteResult, err error) { - items := make([]StaticMember, 0) - - resp, err := c.List(ctx, id, options) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/staticmembers/model_staticmember.go b/resource-manager/network/2022-11-01/staticmembers/model_staticmember.go deleted file mode 100644 index b0d518168ea..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/model_staticmember.go +++ /dev/null @@ -1,17 +0,0 @@ -package staticmembers - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/systemdata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticMember struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *StaticMemberProperties `json:"properties,omitempty"` - SystemData *systemdata.SystemData `json:"systemData,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/staticmembers/model_staticmemberproperties.go b/resource-manager/network/2022-11-01/staticmembers/model_staticmemberproperties.go deleted file mode 100644 index 513dd3e5b9b..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/model_staticmemberproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package staticmembers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticMemberProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Region *string `json:"region,omitempty"` - ResourceId *string `json:"resourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/staticmembers/predicates.go b/resource-manager/network/2022-11-01/staticmembers/predicates.go deleted file mode 100644 index 0fb08a96da7..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package staticmembers - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticMemberOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p StaticMemberOperationPredicate) Matches(input StaticMember) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/staticmembers/version.go b/resource-manager/network/2022-11-01/staticmembers/version.go deleted file mode 100644 index 29bd508b2cb..00000000000 --- a/resource-manager/network/2022-11-01/staticmembers/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package staticmembers - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/staticmembers/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/subnets/README.md b/resource-manager/network/2022-11-01/subnets/README.md deleted file mode 100644 index 5dc41217d05..00000000000 --- a/resource-manager/network/2022-11-01/subnets/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/subnets` Documentation - -The `subnets` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/subnets" -``` - - -### Client Initialization - -```go -client := subnets.NewSubnetsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `SubnetsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := subnets.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -payload := subnets.Subnet{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `SubnetsClient.Delete` - -```go -ctx := context.TODO() -id := subnets.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `SubnetsClient.Get` - -```go -ctx := context.TODO() -id := subnets.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -read, err := client.Get(ctx, id, subnets.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `SubnetsClient.List` - -```go -ctx := context.TODO() -id := subnets.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/subnets/client.go b/resource-manager/network/2022-11-01/subnets/client.go deleted file mode 100644 index 3efe55fa485..00000000000 --- a/resource-manager/network/2022-11-01/subnets/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package subnets - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetsClient struct { - Client *resourcemanager.Client -} - -func NewSubnetsClientWithBaseURI(api environments.Api) (*SubnetsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "subnets", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating SubnetsClient: %+v", err) - } - - return &SubnetsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/subnets/constants.go b/resource-manager/network/2022-11-01/subnets/constants.go deleted file mode 100644 index b0c24e8c125..00000000000 --- a/resource-manager/network/2022-11-01/subnets/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package subnets - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/subnets/method_createorupdate.go b/resource-manager/network/2022-11-01/subnets/method_createorupdate.go deleted file mode 100644 index 03bb34707c9..00000000000 --- a/resource-manager/network/2022-11-01/subnets/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package subnets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c SubnetsClient) CreateOrUpdate(ctx context.Context, id commonids.SubnetId, input Subnet) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c SubnetsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.SubnetId, input Subnet) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/subnets/method_delete.go b/resource-manager/network/2022-11-01/subnets/method_delete.go deleted file mode 100644 index 8be424289f0..00000000000 --- a/resource-manager/network/2022-11-01/subnets/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package subnets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c SubnetsClient) Delete(ctx context.Context, id commonids.SubnetId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c SubnetsClient) DeleteThenPoll(ctx context.Context, id commonids.SubnetId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/subnets/method_get.go b/resource-manager/network/2022-11-01/subnets/method_get.go deleted file mode 100644 index 97bd6dda326..00000000000 --- a/resource-manager/network/2022-11-01/subnets/method_get.go +++ /dev/null @@ -1,81 +0,0 @@ -package subnets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *Subnet -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c SubnetsClient) Get(ctx context.Context, id commonids.SubnetId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/subnets/method_list.go b/resource-manager/network/2022-11-01/subnets/method_list.go deleted file mode 100644 index 6912c6ff2c3..00000000000 --- a/resource-manager/network/2022-11-01/subnets/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package subnets - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Subnet -} - -type ListCompleteResult struct { - Items []Subnet -} - -// List ... -func (c SubnetsClient) List(ctx context.Context, id commonids.VirtualNetworkId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/subnets", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Subnet `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c SubnetsClient) ListComplete(ctx context.Context, id commonids.VirtualNetworkId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, SubnetOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c SubnetsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, predicate SubnetOperationPredicate) (result ListCompleteResult, err error) { - items := make([]Subnet, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 3788306fb6c..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 916f79f9c4c..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 5cb3ab5e50f..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/subnets/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 2064f06b67c..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index ba5d67b2ce4..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/subnets/model_applicationsecuritygroup.go deleted file mode 100644 index 2b7038a9661..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 0444d465786..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_backendaddresspool.go b/resource-manager/network/2022-11-01/subnets/model_backendaddresspool.go deleted file mode 100644 index 8549e5db3a8..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 9e59212a304..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index b8332f10ecf..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_ddossettings.go b/resource-manager/network/2022-11-01/subnets/model_ddossettings.go deleted file mode 100644 index d48851a6ba1..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_delegation.go b/resource-manager/network/2022-11-01/subnets/model_delegation.go deleted file mode 100644 index 541d9d1d34b..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_flowlog.go b/resource-manager/network/2022-11-01/subnets/model_flowlog.go deleted file mode 100644 index d350c16ef43..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/subnets/model_flowlogformatparameters.go deleted file mode 100644 index 492844afa0c..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_flowlogpropertiesformat.go deleted file mode 100644 index a2a70e0c856..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/subnets/model_frontendipconfiguration.go deleted file mode 100644 index f24121e7c39..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 3c86535825a..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/subnets/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 3d2ff9b3010..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_inboundnatrule.go b/resource-manager/network/2022-11-01/subnets/model_inboundnatrule.go deleted file mode 100644 index dd23aa7a490..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index ac29e9fd37d..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_ipconfiguration.go b/resource-manager/network/2022-11-01/subnets/model_ipconfiguration.go deleted file mode 100644 index 3e2e5516ea9..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/subnets/model_ipconfigurationprofile.go deleted file mode 100644 index a4d5be3c038..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index bfb28994f14..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 4814acb3e8e..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_iptag.go b/resource-manager/network/2022-11-01/subnets/model_iptag.go deleted file mode 100644 index 8ccc055cb31..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/subnets/model_loadbalancerbackendaddress.go deleted file mode 100644 index e3b148912e3..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index ee7815f178d..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_natgateway.go b/resource-manager/network/2022-11-01/subnets/model_natgateway.go deleted file mode 100644 index 9a8fad20def..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_natgatewaypropertiesformat.go deleted file mode 100644 index e9043897c52..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_natgatewaysku.go b/resource-manager/network/2022-11-01/subnets/model_natgatewaysku.go deleted file mode 100644 index 617e7c19ff3..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_natruleportmapping.go b/resource-manager/network/2022-11-01/subnets/model_natruleportmapping.go deleted file mode 100644 index 1e546cf811d..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networkinterface.go b/resource-manager/network/2022-11-01/subnets/model_networkinterface.go deleted file mode 100644 index 06d849fad90..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/subnets/model_networkinterfacednssettings.go deleted file mode 100644 index 67fcb29afe7..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfiguration.go deleted file mode 100644 index dea0691831d..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 51e7195920f..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index bc6e9588ae5..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_networkinterfacepropertiesformat.go deleted file mode 100644 index dadc9421016..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/subnets/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 2cd16be245c..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 1bc23cee100..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/subnets/model_networksecuritygroup.go deleted file mode 100644 index fa06f5f24cc..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index da7b074dbbf..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privateendpoint.go b/resource-manager/network/2022-11-01/subnets/model_privateendpoint.go deleted file mode 100644 index 4fa549c3b13..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/subnets/model_privateendpointconnection.go deleted file mode 100644 index 1e354419cca..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/subnets/model_privateendpointconnectionproperties.go deleted file mode 100644 index ff12b5a54fc..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/subnets/model_privateendpointipconfiguration.go deleted file mode 100644 index 20625cb09d3..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/subnets/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 5d90f3c61bf..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/subnets/model_privateendpointproperties.go deleted file mode 100644 index 4913ece3049..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privatelinkservice.go b/resource-manager/network/2022-11-01/subnets/model_privatelinkservice.go deleted file mode 100644 index 34c00e7cffb..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnection.go deleted file mode 100644 index af937a19eda..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index d6ad965c136..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 4072e649f7a..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index c48e1e87c65..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index eccb8844155..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceproperties.go deleted file mode 100644 index 0f4d213769b..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_publicipaddress.go b/resource-manager/network/2022-11-01/subnets/model_publicipaddress.go deleted file mode 100644 index 9931f78d236..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package subnets - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/subnets/model_publicipaddressdnssettings.go deleted file mode 100644 index d002238e788..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_publicipaddresspropertiesformat.go deleted file mode 100644 index c8c5eb4251a..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/subnets/model_publicipaddresssku.go deleted file mode 100644 index 21dd8f7d664..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/subnets/model_resourcenavigationlink.go deleted file mode 100644 index fcd37a760e6..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/subnets/model_resourcenavigationlinkformat.go deleted file mode 100644 index 103426fc9c3..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_resourceset.go b/resource-manager/network/2022-11-01/subnets/model_resourceset.go deleted file mode 100644 index 5daeebab425..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/subnets/model_retentionpolicyparameters.go deleted file mode 100644 index 8ea922b85fe..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_route.go b/resource-manager/network/2022-11-01/subnets/model_route.go deleted file mode 100644 index e40ded16b00..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_routepropertiesformat.go deleted file mode 100644 index c87b62acaed..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_routetable.go b/resource-manager/network/2022-11-01/subnets/model_routetable.go deleted file mode 100644 index 6bb137b8242..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_routetablepropertiesformat.go deleted file mode 100644 index 07d88ea8a30..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_securityrule.go b/resource-manager/network/2022-11-01/subnets/model_securityrule.go deleted file mode 100644 index 70772203f7b..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_securityrulepropertiesformat.go deleted file mode 100644 index cad2dbd820c..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/subnets/model_serviceassociationlink.go deleted file mode 100644 index c82eae5ac15..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index f1a92b71485..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 1680e52b8a1..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicy.go deleted file mode 100644 index 68813a7b3e8..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 8fa72c305ed..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index b7b56f401a8..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 5e0804aa438..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 7011fc209c0..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_subnet.go b/resource-manager/network/2022-11-01/subnets/model_subnet.go deleted file mode 100644 index 820673d7c16..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_subnetpropertiesformat.go deleted file mode 100644 index 5094062f846..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_subresource.go b/resource-manager/network/2022-11-01/subnets/model_subresource.go deleted file mode 100644 index d986a303819..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/subnets/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index e93599e3f9c..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/subnets/model_trafficanalyticsproperties.go deleted file mode 100644 index fa6abc84aef..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/subnets/model_virtualnetworktap.go deleted file mode 100644 index f9e8be401f9..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/subnets/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index c8b60852b33..00000000000 --- a/resource-manager/network/2022-11-01/subnets/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/subnets/predicates.go b/resource-manager/network/2022-11-01/subnets/predicates.go deleted file mode 100644 index 33b8979e3cc..00000000000 --- a/resource-manager/network/2022-11-01/subnets/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package subnets - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p SubnetOperationPredicate) Matches(input Subnet) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/subnets/version.go b/resource-manager/network/2022-11-01/subnets/version.go deleted file mode 100644 index ae408d2e093..00000000000 --- a/resource-manager/network/2022-11-01/subnets/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package subnets - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/subnets/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/README.md b/resource-manager/network/2022-11-01/trafficanalytics/README.md deleted file mode 100644 index b2dac2b59c0..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/trafficanalytics` Documentation - -The `trafficanalytics` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/trafficanalytics" -``` - - -### Client Initialization - -```go -client := trafficanalytics.NewTrafficAnalyticsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `TrafficAnalyticsClient.NetworkWatchersGetFlowLogStatus` - -```go -ctx := context.TODO() -id := trafficanalytics.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := trafficanalytics.FlowLogStatusParameters{ - // ... -} - - -if err := client.NetworkWatchersGetFlowLogStatusThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `TrafficAnalyticsClient.NetworkWatchersSetFlowLogConfiguration` - -```go -ctx := context.TODO() -id := trafficanalytics.NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - -payload := trafficanalytics.FlowLogInformation{ - // ... -} - - -if err := client.NetworkWatchersSetFlowLogConfigurationThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/trafficanalytics/client.go b/resource-manager/network/2022-11-01/trafficanalytics/client.go deleted file mode 100644 index 3dd5fd4cf96..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package trafficanalytics - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsClient struct { - Client *resourcemanager.Client -} - -func NewTrafficAnalyticsClientWithBaseURI(api environments.Api) (*TrafficAnalyticsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "trafficanalytics", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating TrafficAnalyticsClient: %+v", err) - } - - return &TrafficAnalyticsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/constants.go b/resource-manager/network/2022-11-01/trafficanalytics/constants.go deleted file mode 100644 index 54031e636e9..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/constants.go +++ /dev/null @@ -1,48 +0,0 @@ -package trafficanalytics - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/id_networkwatcher.go b/resource-manager/network/2022-11-01/trafficanalytics/id_networkwatcher.go deleted file mode 100644 index 28df98e2c49..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/id_networkwatcher.go +++ /dev/null @@ -1,127 +0,0 @@ -package trafficanalytics - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -// NetworkWatcherId is a struct representing the Resource ID for a Network Watcher -type NetworkWatcherId struct { - SubscriptionId string - ResourceGroupName string - NetworkWatcherName string -} - -// NewNetworkWatcherID returns a new NetworkWatcherId struct -func NewNetworkWatcherID(subscriptionId string, resourceGroupName string, networkWatcherName string) NetworkWatcherId { - return NetworkWatcherId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkWatcherName: networkWatcherName, - } -} - -// ParseNetworkWatcherID parses 'input' into a NetworkWatcherId -func ParseNetworkWatcherID(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ParseNetworkWatcherIDInsensitively parses 'input' case-insensitively into a NetworkWatcherId -// note: this method should only be used for API response data and not user input -func ParseNetworkWatcherIDInsensitively(input string) (*NetworkWatcherId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkWatcherId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkWatcherId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkWatcherName, ok = parsed.Parsed["networkWatcherName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkWatcherName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkWatcherID checks that 'input' can be parsed as a Network Watcher ID -func ValidateNetworkWatcherID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkWatcherID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Watcher ID -func (id NetworkWatcherId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkWatchers/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkWatcherName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Watcher ID -func (id NetworkWatcherId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkWatchers", "networkWatchers", "networkWatchers"), - resourceids.UserSpecifiedSegment("networkWatcherName", "networkWatcherValue"), - } -} - -// String returns a human-readable description of this Network Watcher ID -func (id NetworkWatcherId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Watcher Name: %q", id.NetworkWatcherName), - } - return fmt.Sprintf("Network Watcher (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/id_networkwatcher_test.go b/resource-manager/network/2022-11-01/trafficanalytics/id_networkwatcher_test.go deleted file mode 100644 index 73301e9064d..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/id_networkwatcher_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package trafficanalytics - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkWatcherId{} - -func TestNewNetworkWatcherID(t *testing.T) { - id := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkWatcherName != "networkWatcherValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkWatcherName'", id.NetworkWatcherName, "networkWatcherValue") - } -} - -func TestFormatNetworkWatcherID(t *testing.T) { - actual := NewNetworkWatcherID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkWatcherValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkWatcherID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestParseNetworkWatcherIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkWatcherId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkWatcherName: "networkWatcherValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkWatchers/networkWatcherValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe", - Expected: &NetworkWatcherId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkWatcherName: "nEtWoRkWaTcHeRvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkWaTcHeRs/nEtWoRkWaTcHeRvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkWatcherIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkWatcherName != v.Expected.NetworkWatcherName { - t.Fatalf("Expected %q but got %q for NetworkWatcherName", v.Expected.NetworkWatcherName, actual.NetworkWatcherName) - } - - } -} - -func TestSegmentsForNetworkWatcherId(t *testing.T) { - segments := NetworkWatcherId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkWatcherId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/method_networkwatchersgetflowlogstatus.go b/resource-manager/network/2022-11-01/trafficanalytics/method_networkwatchersgetflowlogstatus.go deleted file mode 100644 index 62301dc57e3..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/method_networkwatchersgetflowlogstatus.go +++ /dev/null @@ -1,74 +0,0 @@ -package trafficanalytics - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatchersGetFlowLogStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NetworkWatchersGetFlowLogStatus ... -func (c TrafficAnalyticsClient) NetworkWatchersGetFlowLogStatus(ctx context.Context, id NetworkWatcherId, input FlowLogStatusParameters) (result NetworkWatchersGetFlowLogStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/queryFlowLogStatus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NetworkWatchersGetFlowLogStatusThenPoll performs NetworkWatchersGetFlowLogStatus then polls until it's completed -func (c TrafficAnalyticsClient) NetworkWatchersGetFlowLogStatusThenPoll(ctx context.Context, id NetworkWatcherId, input FlowLogStatusParameters) error { - result, err := c.NetworkWatchersGetFlowLogStatus(ctx, id, input) - if err != nil { - return fmt.Errorf("performing NetworkWatchersGetFlowLogStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NetworkWatchersGetFlowLogStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/method_networkwatcherssetflowlogconfiguration.go b/resource-manager/network/2022-11-01/trafficanalytics/method_networkwatcherssetflowlogconfiguration.go deleted file mode 100644 index 6c64f19fd99..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/method_networkwatcherssetflowlogconfiguration.go +++ /dev/null @@ -1,74 +0,0 @@ -package trafficanalytics - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkWatchersSetFlowLogConfigurationOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NetworkWatchersSetFlowLogConfiguration ... -func (c TrafficAnalyticsClient) NetworkWatchersSetFlowLogConfiguration(ctx context.Context, id NetworkWatcherId, input FlowLogInformation) (result NetworkWatchersSetFlowLogConfigurationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/configureFlowLog", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NetworkWatchersSetFlowLogConfigurationThenPoll performs NetworkWatchersSetFlowLogConfiguration then polls until it's completed -func (c TrafficAnalyticsClient) NetworkWatchersSetFlowLogConfigurationThenPoll(ctx context.Context, id NetworkWatcherId, input FlowLogInformation) error { - result, err := c.NetworkWatchersSetFlowLogConfiguration(ctx, id, input) - if err != nil { - return fmt.Errorf("performing NetworkWatchersSetFlowLogConfiguration: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NetworkWatchersSetFlowLogConfiguration: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/trafficanalytics/model_flowlogformatparameters.go deleted file mode 100644 index 87ffe400a44..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/model_flowloginformation.go b/resource-manager/network/2022-11-01/trafficanalytics/model_flowloginformation.go deleted file mode 100644 index 15a1cc0029d..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/model_flowloginformation.go +++ /dev/null @@ -1,10 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogInformation struct { - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Properties FlowLogProperties `json:"properties"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/model_flowlogproperties.go b/resource-manager/network/2022-11-01/trafficanalytics/model_flowlogproperties.go deleted file mode 100644 index b26bd4b572a..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/model_flowlogproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogProperties struct { - Enabled bool `json:"enabled"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/model_flowlogstatusparameters.go b/resource-manager/network/2022-11-01/trafficanalytics/model_flowlogstatusparameters.go deleted file mode 100644 index a066e2ad70a..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/model_flowlogstatusparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogStatusParameters struct { - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/trafficanalytics/model_retentionpolicyparameters.go deleted file mode 100644 index b432d3a27f0..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/trafficanalytics/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 01350bb98c2..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/trafficanalytics/model_trafficanalyticsproperties.go deleted file mode 100644 index 94df925e175..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package trafficanalytics - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/trafficanalytics/version.go b/resource-manager/network/2022-11-01/trafficanalytics/version.go deleted file mode 100644 index 2b0cf6adf5f..00000000000 --- a/resource-manager/network/2022-11-01/trafficanalytics/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package trafficanalytics - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/trafficanalytics/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/usages/README.md b/resource-manager/network/2022-11-01/usages/README.md deleted file mode 100644 index 82ef91e2f91..00000000000 --- a/resource-manager/network/2022-11-01/usages/README.md +++ /dev/null @@ -1,37 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/usages` Documentation - -The `usages` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/usages" -``` - - -### Client Initialization - -```go -client := usages.NewUsagesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `UsagesClient.List` - -```go -ctx := context.TODO() -id := usages.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/usages/client.go b/resource-manager/network/2022-11-01/usages/client.go deleted file mode 100644 index 99b2625224d..00000000000 --- a/resource-manager/network/2022-11-01/usages/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package usages - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UsagesClient struct { - Client *resourcemanager.Client -} - -func NewUsagesClientWithBaseURI(api environments.Api) (*UsagesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "usages", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating UsagesClient: %+v", err) - } - - return &UsagesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/usages/constants.go b/resource-manager/network/2022-11-01/usages/constants.go deleted file mode 100644 index 0d8916ba5aa..00000000000 --- a/resource-manager/network/2022-11-01/usages/constants.go +++ /dev/null @@ -1,48 +0,0 @@ -package usages - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UsageUnit string - -const ( - UsageUnitCount UsageUnit = "Count" -) - -func PossibleValuesForUsageUnit() []string { - return []string{ - string(UsageUnitCount), - } -} - -func (s *UsageUnit) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseUsageUnit(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseUsageUnit(input string) (*UsageUnit, error) { - vals := map[string]UsageUnit{ - "count": UsageUnitCount, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := UsageUnit(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/usages/id_location.go b/resource-manager/network/2022-11-01/usages/id_location.go deleted file mode 100644 index ef70b32225b..00000000000 --- a/resource-manager/network/2022-11-01/usages/id_location.go +++ /dev/null @@ -1,114 +0,0 @@ -package usages - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -// LocationId is a struct representing the Resource ID for a Location -type LocationId struct { - SubscriptionId string - LocationName string -} - -// NewLocationID returns a new LocationId struct -func NewLocationID(subscriptionId string, locationName string) LocationId { - return LocationId{ - SubscriptionId: subscriptionId, - LocationName: locationName, - } -} - -// ParseLocationID parses 'input' into a LocationId -func ParseLocationID(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId -// note: this method should only be used for API response data and not user input -func ParseLocationIDInsensitively(input string) (*LocationId, error) { - parser := resourceids.NewParserFromResourceIdType(LocationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := LocationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.LocationName, ok = parsed.Parsed["locationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "locationName", *parsed) - } - - return &id, nil -} - -// ValidateLocationID checks that 'input' can be parsed as a Location ID -func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseLocationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Location ID -func (id LocationId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/locations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.LocationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Location ID -func (id LocationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticLocations", "locations", "locations"), - resourceids.UserSpecifiedSegment("locationName", "locationValue"), - } -} - -// String returns a human-readable description of this Location ID -func (id LocationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Location Name: %q", id.LocationName), - } - return fmt.Sprintf("Location (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/usages/id_location_test.go b/resource-manager/network/2022-11-01/usages/id_location_test.go deleted file mode 100644 index abdfdf42b49..00000000000 --- a/resource-manager/network/2022-11-01/usages/id_location_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package usages - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = LocationId{} - -func TestNewLocationID(t *testing.T) { - id := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.LocationName != "locationValue" { - t.Fatalf("Expected %q but got %q for Segment 'LocationName'", id.LocationName, "locationValue") - } -} - -func TestFormatLocationID(t *testing.T) { - actual := NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseLocationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestParseLocationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *LocationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "locationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/locations/locationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe", - Expected: &LocationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - LocationName: "lOcAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/lOcAtIoNs/lOcAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseLocationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.LocationName != v.Expected.LocationName { - t.Fatalf("Expected %q but got %q for LocationName", v.Expected.LocationName, actual.LocationName) - } - - } -} - -func TestSegmentsForLocationId(t *testing.T) { - segments := LocationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("LocationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/usages/method_list.go b/resource-manager/network/2022-11-01/usages/method_list.go deleted file mode 100644 index af7b3fe5c9c..00000000000 --- a/resource-manager/network/2022-11-01/usages/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package usages - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]Usage -} - -type ListCompleteResult struct { - Items []Usage -} - -// List ... -func (c UsagesClient) List(ctx context.Context, id LocationId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/usages", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]Usage `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c UsagesClient) ListComplete(ctx context.Context, id LocationId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, UsageOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c UsagesClient) ListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate UsageOperationPredicate) (result ListCompleteResult, err error) { - items := make([]Usage, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/usages/model_usage.go b/resource-manager/network/2022-11-01/usages/model_usage.go deleted file mode 100644 index 2a734980b2c..00000000000 --- a/resource-manager/network/2022-11-01/usages/model_usage.go +++ /dev/null @@ -1,12 +0,0 @@ -package usages - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Usage struct { - CurrentValue int64 `json:"currentValue"` - Id *string `json:"id,omitempty"` - Limit int64 `json:"limit"` - Name UsageName `json:"name"` - Unit UsageUnit `json:"unit"` -} diff --git a/resource-manager/network/2022-11-01/usages/model_usagename.go b/resource-manager/network/2022-11-01/usages/model_usagename.go deleted file mode 100644 index ff2d9cbdd3e..00000000000 --- a/resource-manager/network/2022-11-01/usages/model_usagename.go +++ /dev/null @@ -1,9 +0,0 @@ -package usages - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UsageName struct { - LocalizedValue *string `json:"localizedValue,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/usages/predicates.go b/resource-manager/network/2022-11-01/usages/predicates.go deleted file mode 100644 index ad3b401c1ce..00000000000 --- a/resource-manager/network/2022-11-01/usages/predicates.go +++ /dev/null @@ -1,27 +0,0 @@ -package usages - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UsageOperationPredicate struct { - CurrentValue *int64 - Id *string - Limit *int64 -} - -func (p UsageOperationPredicate) Matches(input Usage) bool { - - if p.CurrentValue != nil && *p.CurrentValue != input.CurrentValue { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Limit != nil && *p.Limit != input.Limit { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/usages/version.go b/resource-manager/network/2022-11-01/usages/version.go deleted file mode 100644 index 24778844ea2..00000000000 --- a/resource-manager/network/2022-11-01/usages/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package usages - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/usages/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/vipswap/README.md b/resource-manager/network/2022-11-01/vipswap/README.md deleted file mode 100644 index b520ef6af8c..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/README.md +++ /dev/null @@ -1,69 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vipswap` Documentation - -The `vipswap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vipswap" -``` - - -### Client Initialization - -```go -client := vipswap.NewVipSwapClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VipSwapClient.Create` - -```go -ctx := context.TODO() -id := vipswap.NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue") - -payload := vipswap.SwapResource{ - // ... -} - - -if err := client.CreateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VipSwapClient.Get` - -```go -ctx := context.TODO() -id := vipswap.NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VipSwapClient.List` - -```go -ctx := context.TODO() -id := vipswap.NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue") - -read, err := client.List(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/vipswap/client.go b/resource-manager/network/2022-11-01/vipswap/client.go deleted file mode 100644 index 1f634dd13c3..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vipswap - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VipSwapClient struct { - Client *resourcemanager.Client -} - -func NewVipSwapClientWithBaseURI(api environments.Api) (*VipSwapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vipswap", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VipSwapClient: %+v", err) - } - - return &VipSwapClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/vipswap/constants.go b/resource-manager/network/2022-11-01/vipswap/constants.go deleted file mode 100644 index c6cf7234532..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/constants.go +++ /dev/null @@ -1,51 +0,0 @@ -package vipswap - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SlotType string - -const ( - SlotTypeProduction SlotType = "Production" - SlotTypeStaging SlotType = "Staging" -) - -func PossibleValuesForSlotType() []string { - return []string{ - string(SlotTypeProduction), - string(SlotTypeStaging), - } -} - -func (s *SlotType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSlotType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSlotType(input string) (*SlotType, error) { - vals := map[string]SlotType{ - "production": SlotTypeProduction, - "staging": SlotTypeStaging, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SlotType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/vipswap/id_cloudservice.go b/resource-manager/network/2022-11-01/vipswap/id_cloudservice.go deleted file mode 100644 index 9544661fbc5..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/id_cloudservice.go +++ /dev/null @@ -1,127 +0,0 @@ -package vipswap - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = CloudServiceId{} - -// CloudServiceId is a struct representing the Resource ID for a Cloud Service -type CloudServiceId struct { - SubscriptionId string - ResourceGroupName string - CloudServiceName string -} - -// NewCloudServiceID returns a new CloudServiceId struct -func NewCloudServiceID(subscriptionId string, resourceGroupName string, cloudServiceName string) CloudServiceId { - return CloudServiceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - CloudServiceName: cloudServiceName, - } -} - -// ParseCloudServiceID parses 'input' into a CloudServiceId -func ParseCloudServiceID(input string) (*CloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(CloudServiceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ParseCloudServiceIDInsensitively parses 'input' case-insensitively into a CloudServiceId -// note: this method should only be used for API response data and not user input -func ParseCloudServiceIDInsensitively(input string) (*CloudServiceId, error) { - parser := resourceids.NewParserFromResourceIdType(CloudServiceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := CloudServiceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.CloudServiceName, ok = parsed.Parsed["cloudServiceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "cloudServiceName", *parsed) - } - - return &id, nil -} - -// ValidateCloudServiceID checks that 'input' can be parsed as a Cloud Service ID -func ValidateCloudServiceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseCloudServiceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Cloud Service ID -func (id CloudServiceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/cloudServices/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.CloudServiceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Cloud Service ID -func (id CloudServiceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.UserSpecifiedSegment("resourceGroupName", "resourceGroupValue"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticCloudServices", "cloudServices", "cloudServices"), - resourceids.UserSpecifiedSegment("cloudServiceName", "cloudServiceValue"), - } -} - -// String returns a human-readable description of this Cloud Service ID -func (id CloudServiceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Cloud Service Name: %q", id.CloudServiceName), - } - return fmt.Sprintf("Cloud Service (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/vipswap/id_cloudservice_test.go b/resource-manager/network/2022-11-01/vipswap/id_cloudservice_test.go deleted file mode 100644 index 378cc82cf7d..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/id_cloudservice_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vipswap - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = CloudServiceId{} - -func TestNewCloudServiceID(t *testing.T) { - id := NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "resourceGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "resourceGroupValue") - } - - if id.CloudServiceName != "cloudServiceValue" { - t.Fatalf("Expected %q but got %q for Segment 'CloudServiceName'", id.CloudServiceName, "cloudServiceValue") - } -} - -func TestFormatCloudServiceID(t *testing.T) { - actual := NewCloudServiceID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "cloudServiceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseCloudServiceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *CloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &CloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "resourceGroupValue", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseCloudServiceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestParseCloudServiceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *CloudServiceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue", - Expected: &CloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "resourceGroupValue", - CloudServiceName: "cloudServiceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroupValue/providers/Microsoft.Compute/cloudServices/cloudServiceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe", - Expected: &CloudServiceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "rEsOuRcEgRoUpVaLuE", - CloudServiceName: "cLoUdSeRvIcEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/rEsOuRcEgRoUpVaLuE/pRoViDeRs/mIcRoSoFt.cOmPuTe/cLoUdSeRvIcEs/cLoUdSeRvIcEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseCloudServiceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.CloudServiceName != v.Expected.CloudServiceName { - t.Fatalf("Expected %q but got %q for CloudServiceName", v.Expected.CloudServiceName, actual.CloudServiceName) - } - - } -} - -func TestSegmentsForCloudServiceId(t *testing.T) { - segments := CloudServiceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("CloudServiceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/vipswap/method_create.go b/resource-manager/network/2022-11-01/vipswap/method_create.go deleted file mode 100644 index c7db22cb3af..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/method_create.go +++ /dev/null @@ -1,74 +0,0 @@ -package vipswap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Create ... -func (c VipSwapClient) Create(ctx context.Context, id CloudServiceId, input SwapResource) (result CreateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/cloudServiceSlots/swap", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateThenPoll performs Create then polls until it's completed -func (c VipSwapClient) CreateThenPoll(ctx context.Context, id CloudServiceId, input SwapResource) error { - result, err := c.Create(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Create: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Create: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/vipswap/method_get.go b/resource-manager/network/2022-11-01/vipswap/method_get.go deleted file mode 100644 index 539b4bf0171..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/method_get.go +++ /dev/null @@ -1,52 +0,0 @@ -package vipswap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SwapResource -} - -// Get ... -func (c VipSwapClient) Get(ctx context.Context, id CloudServiceId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/cloudServiceSlots/swap", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/vipswap/method_list.go b/resource-manager/network/2022-11-01/vipswap/method_list.go deleted file mode 100644 index 65fbb81b8e0..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/method_list.go +++ /dev/null @@ -1,52 +0,0 @@ -package vipswap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *SwapResourceListResult -} - -// List ... -func (c VipSwapClient) List(ctx context.Context, id CloudServiceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/cloudServiceSlots", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/vipswap/model_swapresource.go b/resource-manager/network/2022-11-01/vipswap/model_swapresource.go deleted file mode 100644 index cd135639ade..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/model_swapresource.go +++ /dev/null @@ -1,11 +0,0 @@ -package vipswap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SwapResource struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SwapResourceProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vipswap/model_swapresourcelistresult.go b/resource-manager/network/2022-11-01/vipswap/model_swapresourcelistresult.go deleted file mode 100644 index d4cb9490d3a..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/model_swapresourcelistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package vipswap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SwapResourceListResult struct { - Value *[]SwapResource `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vipswap/model_swapresourceproperties.go b/resource-manager/network/2022-11-01/vipswap/model_swapresourceproperties.go deleted file mode 100644 index 8254763b326..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/model_swapresourceproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package vipswap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SwapResourceProperties struct { - SlotType *SlotType `json:"slotType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vipswap/version.go b/resource-manager/network/2022-11-01/vipswap/version.go deleted file mode 100644 index 95e5e6957b7..00000000000 --- a/resource-manager/network/2022-11-01/vipswap/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vipswap - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vipswap/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/README.md b/resource-manager/network/2022-11-01/virtualappliancesites/README.md deleted file mode 100644 index 61d7e5f9958..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualappliancesites` Documentation - -The `virtualappliancesites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualappliancesites" -``` - - -### Client Initialization - -```go -client := virtualappliancesites.NewVirtualApplianceSitesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualApplianceSitesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualappliancesites.NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue") - -payload := virtualappliancesites.VirtualApplianceSite{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualApplianceSitesClient.Delete` - -```go -ctx := context.TODO() -id := virtualappliancesites.NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualApplianceSitesClient.Get` - -```go -ctx := context.TODO() -id := virtualappliancesites.NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualApplianceSitesClient.List` - -```go -ctx := context.TODO() -id := virtualappliancesites.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/client.go b/resource-manager/network/2022-11-01/virtualappliancesites/client.go deleted file mode 100644 index 32de5368a81..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualappliancesites - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSitesClient struct { - Client *resourcemanager.Client -} - -func NewVirtualApplianceSitesClientWithBaseURI(api environments.Api) (*VirtualApplianceSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualappliancesites", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualApplianceSitesClient: %+v", err) - } - - return &VirtualApplianceSitesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/constants.go b/resource-manager/network/2022-11-01/virtualappliancesites/constants.go deleted file mode 100644 index bd413f43290..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package virtualappliancesites - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/id_networkvirtualappliance.go b/resource-manager/network/2022-11-01/virtualappliancesites/id_networkvirtualappliance.go deleted file mode 100644 index 2ae3ddeb528..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/id_networkvirtualappliance.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualappliancesites - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -// NetworkVirtualApplianceId is a struct representing the Resource ID for a Network Virtual Appliance -type NetworkVirtualApplianceId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string -} - -// NewNetworkVirtualApplianceID returns a new NetworkVirtualApplianceId struct -func NewNetworkVirtualApplianceID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string) NetworkVirtualApplianceId { - return NetworkVirtualApplianceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - } -} - -// ParseNetworkVirtualApplianceID parses 'input' into a NetworkVirtualApplianceId -func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ParseNetworkVirtualApplianceIDInsensitively parses 'input' case-insensitively into a NetworkVirtualApplianceId -// note: this method should only be used for API response data and not user input -func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkVirtualApplianceID checks that 'input' can be parsed as a Network Virtual Appliance ID -func ValidateNetworkVirtualApplianceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkVirtualApplianceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - } -} - -// String returns a human-readable description of this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - } - return fmt.Sprintf("Network Virtual Appliance (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/id_networkvirtualappliance_test.go b/resource-manager/network/2022-11-01/virtualappliancesites/id_networkvirtualappliance_test.go deleted file mode 100644 index d5bd4698714..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/id_networkvirtualappliance_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualappliancesites - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -func TestNewNetworkVirtualApplianceID(t *testing.T) { - id := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } -} - -func TestFormatNetworkVirtualApplianceID(t *testing.T) { - actual := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkVirtualApplianceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestParseNetworkVirtualApplianceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestSegmentsForNetworkVirtualApplianceId(t *testing.T) { - segments := NetworkVirtualApplianceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkVirtualApplianceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/id_virtualappliancesite.go b/resource-manager/network/2022-11-01/virtualappliancesites/id_virtualappliancesite.go deleted file mode 100644 index 62bcc9817bf..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/id_virtualappliancesite.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualappliancesites - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualApplianceSiteId{} - -// VirtualApplianceSiteId is a struct representing the Resource ID for a Virtual Appliance Site -type VirtualApplianceSiteId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string - VirtualApplianceSiteName string -} - -// NewVirtualApplianceSiteID returns a new VirtualApplianceSiteId struct -func NewVirtualApplianceSiteID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string, virtualApplianceSiteName string) VirtualApplianceSiteId { - return VirtualApplianceSiteId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - VirtualApplianceSiteName: virtualApplianceSiteName, - } -} - -// ParseVirtualApplianceSiteID parses 'input' into a VirtualApplianceSiteId -func ParseVirtualApplianceSiteID(input string) (*VirtualApplianceSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualApplianceSiteId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualApplianceSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.VirtualApplianceSiteName, ok = parsed.Parsed["virtualApplianceSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualApplianceSiteName", *parsed) - } - - return &id, nil -} - -// ParseVirtualApplianceSiteIDInsensitively parses 'input' case-insensitively into a VirtualApplianceSiteId -// note: this method should only be used for API response data and not user input -func ParseVirtualApplianceSiteIDInsensitively(input string) (*VirtualApplianceSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualApplianceSiteId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualApplianceSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.VirtualApplianceSiteName, ok = parsed.Parsed["virtualApplianceSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualApplianceSiteName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualApplianceSiteID checks that 'input' can be parsed as a Virtual Appliance Site ID -func ValidateVirtualApplianceSiteID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualApplianceSiteID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Appliance Site ID -func (id VirtualApplianceSiteId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s/virtualApplianceSites/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName, id.VirtualApplianceSiteName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Appliance Site ID -func (id VirtualApplianceSiteId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - resourceids.StaticSegment("staticVirtualApplianceSites", "virtualApplianceSites", "virtualApplianceSites"), - resourceids.UserSpecifiedSegment("virtualApplianceSiteName", "virtualApplianceSiteValue"), - } -} - -// String returns a human-readable description of this Virtual Appliance Site ID -func (id VirtualApplianceSiteId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - fmt.Sprintf("Virtual Appliance Site Name: %q", id.VirtualApplianceSiteName), - } - return fmt.Sprintf("Virtual Appliance Site (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/id_virtualappliancesite_test.go b/resource-manager/network/2022-11-01/virtualappliancesites/id_virtualappliancesite_test.go deleted file mode 100644 index e02782570f5..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/id_virtualappliancesite_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualappliancesites - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualApplianceSiteId{} - -func TestNewVirtualApplianceSiteID(t *testing.T) { - id := NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } - - if id.VirtualApplianceSiteName != "virtualApplianceSiteValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualApplianceSiteName'", id.VirtualApplianceSiteName, "virtualApplianceSiteValue") - } -} - -func TestFormatVirtualApplianceSiteID(t *testing.T) { - actual := NewVirtualApplianceSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "virtualApplianceSiteValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualApplianceSiteID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualApplianceSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue", - Expected: &VirtualApplianceSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - VirtualApplianceSiteName: "virtualApplianceSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualApplianceSiteID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.VirtualApplianceSiteName != v.Expected.VirtualApplianceSiteName { - t.Fatalf("Expected %q but got %q for VirtualApplianceSiteName", v.Expected.VirtualApplianceSiteName, actual.VirtualApplianceSiteName) - } - - } -} - -func TestParseVirtualApplianceSiteIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualApplianceSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/vIrTuAlApPlIaNcEsItEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue", - Expected: &VirtualApplianceSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - VirtualApplianceSiteName: "virtualApplianceSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/virtualApplianceSites/virtualApplianceSiteValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/vIrTuAlApPlIaNcEsItEs/vIrTuAlApPlIaNcEsItEvAlUe", - Expected: &VirtualApplianceSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - VirtualApplianceSiteName: "vIrTuAlApPlIaNcEsItEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/vIrTuAlApPlIaNcEsItEs/vIrTuAlApPlIaNcEsItEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualApplianceSiteIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.VirtualApplianceSiteName != v.Expected.VirtualApplianceSiteName { - t.Fatalf("Expected %q but got %q for VirtualApplianceSiteName", v.Expected.VirtualApplianceSiteName, actual.VirtualApplianceSiteName) - } - - } -} - -func TestSegmentsForVirtualApplianceSiteId(t *testing.T) { - segments := VirtualApplianceSiteId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualApplianceSiteId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/method_createorupdate.go b/resource-manager/network/2022-11-01/virtualappliancesites/method_createorupdate.go deleted file mode 100644 index 151a0833e1f..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualappliancesites - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualApplianceSitesClient) CreateOrUpdate(ctx context.Context, id VirtualApplianceSiteId, input VirtualApplianceSite) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualApplianceSitesClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualApplianceSiteId, input VirtualApplianceSite) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/method_delete.go b/resource-manager/network/2022-11-01/virtualappliancesites/method_delete.go deleted file mode 100644 index 50e7f186f39..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualappliancesites - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualApplianceSitesClient) Delete(ctx context.Context, id VirtualApplianceSiteId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualApplianceSitesClient) DeleteThenPoll(ctx context.Context, id VirtualApplianceSiteId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/method_get.go b/resource-manager/network/2022-11-01/virtualappliancesites/method_get.go deleted file mode 100644 index c20537dd870..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualappliancesites - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualApplianceSite -} - -// Get ... -func (c VirtualApplianceSitesClient) Get(ctx context.Context, id VirtualApplianceSiteId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/method_list.go b/resource-manager/network/2022-11-01/virtualappliancesites/method_list.go deleted file mode 100644 index ef7c699926f..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualappliancesites - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualApplianceSite -} - -type ListCompleteResult struct { - Items []VirtualApplianceSite -} - -// List ... -func (c VirtualApplianceSitesClient) List(ctx context.Context, id NetworkVirtualApplianceId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/virtualApplianceSites", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualApplianceSite `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualApplianceSitesClient) ListComplete(ctx context.Context, id NetworkVirtualApplianceId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualApplianceSiteOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualApplianceSitesClient) ListCompleteMatchingPredicate(ctx context.Context, id NetworkVirtualApplianceId, predicate VirtualApplianceSiteOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualApplianceSite, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/model_breakoutcategorypolicies.go b/resource-manager/network/2022-11-01/virtualappliancesites/model_breakoutcategorypolicies.go deleted file mode 100644 index 6a2b15ecb1d..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/model_breakoutcategorypolicies.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BreakOutCategoryPolicies struct { - Allow *bool `json:"allow,omitempty"` - Default *bool `json:"default,omitempty"` - Optimize *bool `json:"optimize,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/model_office365policyproperties.go b/resource-manager/network/2022-11-01/virtualappliancesites/model_office365policyproperties.go deleted file mode 100644 index b891141a5ba..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/model_office365policyproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Office365PolicyProperties struct { - BreakOutCategories *BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/model_virtualappliancesite.go b/resource-manager/network/2022-11-01/virtualappliancesites/model_virtualappliancesite.go deleted file mode 100644 index 1b84d25c56d..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/model_virtualappliancesite.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSite struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualApplianceSiteProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/model_virtualappliancesiteproperties.go b/resource-manager/network/2022-11-01/virtualappliancesites/model_virtualappliancesiteproperties.go deleted file mode 100644 index 5d01b6ab8f8..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/model_virtualappliancesiteproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSiteProperties struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - O365Policy *Office365PolicyProperties `json:"o365Policy,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/predicates.go b/resource-manager/network/2022-11-01/virtualappliancesites/predicates.go deleted file mode 100644 index af31f940d24..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package virtualappliancesites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSiteOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VirtualApplianceSiteOperationPredicate) Matches(input VirtualApplianceSite) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualappliancesites/version.go b/resource-manager/network/2022-11-01/virtualappliancesites/version.go deleted file mode 100644 index 9cd7e6804a2..00000000000 --- a/resource-manager/network/2022-11-01/virtualappliancesites/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualappliancesites - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualappliancesites/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/README.md b/resource-manager/network/2022-11-01/virtualapplianceskus/README.md deleted file mode 100644 index 79d1185fcee..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualapplianceskus` Documentation - -The `virtualapplianceskus` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualapplianceskus" -``` - - -### Client Initialization - -```go -client := virtualapplianceskus.NewVirtualApplianceSkusClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualApplianceSkusClient.Get` - -```go -ctx := context.TODO() -id := virtualapplianceskus.NewNetworkVirtualApplianceSkuID("12345678-1234-9876-4563-123456789012", "networkVirtualApplianceSkuValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualApplianceSkusClient.List` - -```go -ctx := context.TODO() -id := virtualapplianceskus.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/client.go b/resource-manager/network/2022-11-01/virtualapplianceskus/client.go deleted file mode 100644 index 63ec1eff1ea..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualapplianceskus - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualApplianceSkusClient struct { - Client *resourcemanager.Client -} - -func NewVirtualApplianceSkusClientWithBaseURI(api environments.Api) (*VirtualApplianceSkusClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualapplianceskus", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualApplianceSkusClient: %+v", err) - } - - return &VirtualApplianceSkusClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/id_networkvirtualappliancesku.go b/resource-manager/network/2022-11-01/virtualapplianceskus/id_networkvirtualappliancesku.go deleted file mode 100644 index 7558f22904e..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/id_networkvirtualappliancesku.go +++ /dev/null @@ -1,114 +0,0 @@ -package virtualapplianceskus - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceSkuId{} - -// NetworkVirtualApplianceSkuId is a struct representing the Resource ID for a Network Virtual Appliance Sku -type NetworkVirtualApplianceSkuId struct { - SubscriptionId string - NetworkVirtualApplianceSkuName string -} - -// NewNetworkVirtualApplianceSkuID returns a new NetworkVirtualApplianceSkuId struct -func NewNetworkVirtualApplianceSkuID(subscriptionId string, networkVirtualApplianceSkuName string) NetworkVirtualApplianceSkuId { - return NetworkVirtualApplianceSkuId{ - SubscriptionId: subscriptionId, - NetworkVirtualApplianceSkuName: networkVirtualApplianceSkuName, - } -} - -// ParseNetworkVirtualApplianceSkuID parses 'input' into a NetworkVirtualApplianceSkuId -func ParseNetworkVirtualApplianceSkuID(input string) (*NetworkVirtualApplianceSkuId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceSkuId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceSkuId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkVirtualApplianceSkuName, ok = parsed.Parsed["networkVirtualApplianceSkuName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceSkuName", *parsed) - } - - return &id, nil -} - -// ParseNetworkVirtualApplianceSkuIDInsensitively parses 'input' case-insensitively into a NetworkVirtualApplianceSkuId -// note: this method should only be used for API response data and not user input -func ParseNetworkVirtualApplianceSkuIDInsensitively(input string) (*NetworkVirtualApplianceSkuId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceSkuId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceSkuId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.NetworkVirtualApplianceSkuName, ok = parsed.Parsed["networkVirtualApplianceSkuName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceSkuName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkVirtualApplianceSkuID checks that 'input' can be parsed as a Network Virtual Appliance Sku ID -func ValidateNetworkVirtualApplianceSkuID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkVirtualApplianceSkuID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Virtual Appliance Sku ID -func (id NetworkVirtualApplianceSkuId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/networkVirtualApplianceSkus/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.NetworkVirtualApplianceSkuName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Virtual Appliance Sku ID -func (id NetworkVirtualApplianceSkuId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualApplianceSkus", "networkVirtualApplianceSkus", "networkVirtualApplianceSkus"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceSkuName", "networkVirtualApplianceSkuValue"), - } -} - -// String returns a human-readable description of this Network Virtual Appliance Sku ID -func (id NetworkVirtualApplianceSkuId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Network Virtual Appliance Sku Name: %q", id.NetworkVirtualApplianceSkuName), - } - return fmt.Sprintf("Network Virtual Appliance Sku (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/id_networkvirtualappliancesku_test.go b/resource-manager/network/2022-11-01/virtualapplianceskus/id_networkvirtualappliancesku_test.go deleted file mode 100644 index 78093111504..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/id_networkvirtualappliancesku_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package virtualapplianceskus - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceSkuId{} - -func TestNewNetworkVirtualApplianceSkuID(t *testing.T) { - id := NewNetworkVirtualApplianceSkuID("12345678-1234-9876-4563-123456789012", "networkVirtualApplianceSkuValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.NetworkVirtualApplianceSkuName != "networkVirtualApplianceSkuValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceSkuName'", id.NetworkVirtualApplianceSkuName, "networkVirtualApplianceSkuValue") - } -} - -func TestFormatNetworkVirtualApplianceSkuID(t *testing.T) { - actual := NewNetworkVirtualApplianceSkuID("12345678-1234-9876-4563-123456789012", "networkVirtualApplianceSkuValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkVirtualApplianceSkuID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceSkuId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue", - Expected: &NetworkVirtualApplianceSkuId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkVirtualApplianceSkuName: "networkVirtualApplianceSkuValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceSkuID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.NetworkVirtualApplianceSkuName != v.Expected.NetworkVirtualApplianceSkuName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceSkuName", v.Expected.NetworkVirtualApplianceSkuName, actual.NetworkVirtualApplianceSkuName) - } - - } -} - -func TestParseNetworkVirtualApplianceSkuIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceSkuId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeSkUs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue", - Expected: &NetworkVirtualApplianceSkuId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkVirtualApplianceSkuName: "networkVirtualApplianceSkuValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/networkVirtualApplianceSkus/networkVirtualApplianceSkuValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeSkUs/nEtWoRkViRtUaLaPpLiAnCeSkUvAlUe", - Expected: &NetworkVirtualApplianceSkuId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - NetworkVirtualApplianceSkuName: "nEtWoRkViRtUaLaPpLiAnCeSkUvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeSkUs/nEtWoRkViRtUaLaPpLiAnCeSkUvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceSkuIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.NetworkVirtualApplianceSkuName != v.Expected.NetworkVirtualApplianceSkuName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceSkuName", v.Expected.NetworkVirtualApplianceSkuName, actual.NetworkVirtualApplianceSkuName) - } - - } -} - -func TestSegmentsForNetworkVirtualApplianceSkuId(t *testing.T) { - segments := NetworkVirtualApplianceSkuId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkVirtualApplianceSkuId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/method_get.go b/resource-manager/network/2022-11-01/virtualapplianceskus/method_get.go deleted file mode 100644 index 8c4c8cc7e35..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualapplianceskus - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkVirtualApplianceSku -} - -// Get ... -func (c VirtualApplianceSkusClient) Get(ctx context.Context, id NetworkVirtualApplianceSkuId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/method_list.go b/resource-manager/network/2022-11-01/virtualapplianceskus/method_list.go deleted file mode 100644 index d1a8acbd5e2..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualapplianceskus - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkVirtualApplianceSku -} - -type ListCompleteResult struct { - Items []NetworkVirtualApplianceSku -} - -// List ... -func (c VirtualApplianceSkusClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/networkVirtualApplianceSkus", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkVirtualApplianceSku `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualApplianceSkusClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, NetworkVirtualApplianceSkuOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualApplianceSkusClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NetworkVirtualApplianceSkuOperationPredicate) (result ListCompleteResult, err error) { - items := make([]NetworkVirtualApplianceSku, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualappliancesku.go b/resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualappliancesku.go deleted file mode 100644 index 93719c4daa2..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualappliancesku.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualapplianceskus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceSku struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkVirtualApplianceSkuPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualapplianceskuinstances.go b/resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualapplianceskuinstances.go deleted file mode 100644 index 99b52442ed2..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualapplianceskuinstances.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualapplianceskus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceSkuInstances struct { - InstanceCount *int64 `json:"instanceCount,omitempty"` - ScaleUnit *string `json:"scaleUnit,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualapplianceskupropertiesformat.go b/resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualapplianceskupropertiesformat.go deleted file mode 100644 index 5df8c3c3b00..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/model_networkvirtualapplianceskupropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualapplianceskus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceSkuPropertiesFormat struct { - AvailableScaleUnits *[]NetworkVirtualApplianceSkuInstances `json:"availableScaleUnits,omitempty"` - AvailableVersions *[]string `json:"availableVersions,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/predicates.go b/resource-manager/network/2022-11-01/virtualapplianceskus/predicates.go deleted file mode 100644 index 758bba40370..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package virtualapplianceskus - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceSkuOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p NetworkVirtualApplianceSkuOperationPredicate) Matches(input NetworkVirtualApplianceSku) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualapplianceskus/version.go b/resource-manager/network/2022-11-01/virtualapplianceskus/version.go deleted file mode 100644 index 9947feab821..00000000000 --- a/resource-manager/network/2022-11-01/virtualapplianceskus/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualapplianceskus - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualapplianceskus/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/README.md b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/README.md deleted file mode 100644 index fcd7f58bac5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/README.md +++ /dev/null @@ -1,207 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections` Documentation - -The `virtualnetworkgatewayconnections` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections" -``` - - -### Client Initialization - -```go -client := virtualnetworkgatewayconnections.NewVirtualNetworkGatewayConnectionsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.VirtualNetworkGatewayConnection{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.GetIkeSas` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -if err := client.GetIkeSasThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.GetSharedKey` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -read, err := client.GetSharedKey(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.List` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.ResetConnection` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -if err := client.ResetConnectionThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.ResetSharedKey` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.ConnectionResetSharedKey{ - // ... -} - - -if err := client.ResetSharedKeyThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.SetSharedKey` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.ConnectionSharedKey{ - // ... -} - - -if err := client.SetSharedKeyThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.StartPacketCapture` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.VpnPacketCaptureStartParameters{ - // ... -} - - -if err := client.StartPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.StopPacketCapture` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.VpnPacketCaptureStopParameters{ - // ... -} - - -if err := client.StopPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewayConnectionsClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualnetworkgatewayconnections.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgatewayconnections.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/client.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/client.go deleted file mode 100644 index a2b5610883b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(api environments.Api) (*VirtualNetworkGatewayConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworkgatewayconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkGatewayConnectionsClient: %+v", err) - } - - return &VirtualNetworkGatewayConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/constants.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/constants.go deleted file mode 100644 index 4223454aad8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/constants.go +++ /dev/null @@ -1,1137 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionMode string - -const ( - VirtualNetworkGatewayConnectionModeDefault VirtualNetworkGatewayConnectionMode = "Default" - VirtualNetworkGatewayConnectionModeInitiatorOnly VirtualNetworkGatewayConnectionMode = "InitiatorOnly" - VirtualNetworkGatewayConnectionModeResponderOnly VirtualNetworkGatewayConnectionMode = "ResponderOnly" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionMode() []string { - return []string{ - string(VirtualNetworkGatewayConnectionModeDefault), - string(VirtualNetworkGatewayConnectionModeInitiatorOnly), - string(VirtualNetworkGatewayConnectionModeResponderOnly), - } -} - -func (s *VirtualNetworkGatewayConnectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionMode(input string) (*VirtualNetworkGatewayConnectionMode, error) { - vals := map[string]VirtualNetworkGatewayConnectionMode{ - "default": VirtualNetworkGatewayConnectionModeDefault, - "initiatoronly": VirtualNetworkGatewayConnectionModeInitiatorOnly, - "responderonly": VirtualNetworkGatewayConnectionModeResponderOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionMode(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionProtocol string - -const ( - VirtualNetworkGatewayConnectionProtocolIKEvOne VirtualNetworkGatewayConnectionProtocol = "IKEv1" - VirtualNetworkGatewayConnectionProtocolIKEvTwo VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionProtocol() []string { - return []string{ - string(VirtualNetworkGatewayConnectionProtocolIKEvOne), - string(VirtualNetworkGatewayConnectionProtocolIKEvTwo), - } -} - -func (s *VirtualNetworkGatewayConnectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionProtocol(input string) (*VirtualNetworkGatewayConnectionProtocol, error) { - vals := map[string]VirtualNetworkGatewayConnectionProtocol{ - "ikev1": VirtualNetworkGatewayConnectionProtocolIKEvOne, - "ikev2": VirtualNetworkGatewayConnectionProtocolIKEvTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionProtocol(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionStatus string - -const ( - VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" - VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" - VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" - VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionStatus() []string { - return []string{ - string(VirtualNetworkGatewayConnectionStatusConnected), - string(VirtualNetworkGatewayConnectionStatusConnecting), - string(VirtualNetworkGatewayConnectionStatusNotConnected), - string(VirtualNetworkGatewayConnectionStatusUnknown), - } -} - -func (s *VirtualNetworkGatewayConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionStatus(input string) (*VirtualNetworkGatewayConnectionStatus, error) { - vals := map[string]VirtualNetworkGatewayConnectionStatus{ - "connected": VirtualNetworkGatewayConnectionStatusConnected, - "connecting": VirtualNetworkGatewayConnectionStatusConnecting, - "notconnected": VirtualNetworkGatewayConnectionStatusNotConnected, - "unknown": VirtualNetworkGatewayConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionStatus(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionType string - -const ( - VirtualNetworkGatewayConnectionTypeExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" - VirtualNetworkGatewayConnectionTypeIPsec VirtualNetworkGatewayConnectionType = "IPsec" - VirtualNetworkGatewayConnectionTypeVPNClient VirtualNetworkGatewayConnectionType = "VPNClient" - VirtualNetworkGatewayConnectionTypeVnetTwoVnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionType() []string { - return []string{ - string(VirtualNetworkGatewayConnectionTypeExpressRoute), - string(VirtualNetworkGatewayConnectionTypeIPsec), - string(VirtualNetworkGatewayConnectionTypeVPNClient), - string(VirtualNetworkGatewayConnectionTypeVnetTwoVnet), - } -} - -func (s *VirtualNetworkGatewayConnectionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionType(input string) (*VirtualNetworkGatewayConnectionType, error) { - vals := map[string]VirtualNetworkGatewayConnectionType{ - "expressroute": VirtualNetworkGatewayConnectionTypeExpressRoute, - "ipsec": VirtualNetworkGatewayConnectionTypeIPsec, - "vpnclient": VirtualNetworkGatewayConnectionTypeVPNClient, - "vnet2vnet": VirtualNetworkGatewayConnectionTypeVnetTwoVnet, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionType(input) - return &out, nil -} - -type VirtualNetworkGatewaySkuName string - -const ( - VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" - VirtualNetworkGatewaySkuNameErGwOneAZ VirtualNetworkGatewaySkuName = "ErGw1AZ" - VirtualNetworkGatewaySkuNameErGwThreeAZ VirtualNetworkGatewaySkuName = "ErGw3AZ" - VirtualNetworkGatewaySkuNameErGwTwoAZ VirtualNetworkGatewaySkuName = "ErGw2AZ" - VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" - VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" - VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" - VirtualNetworkGatewaySkuNameVpnGwFive VirtualNetworkGatewaySkuName = "VpnGw5" - VirtualNetworkGatewaySkuNameVpnGwFiveAZ VirtualNetworkGatewaySkuName = "VpnGw5AZ" - VirtualNetworkGatewaySkuNameVpnGwFour VirtualNetworkGatewaySkuName = "VpnGw4" - VirtualNetworkGatewaySkuNameVpnGwFourAZ VirtualNetworkGatewaySkuName = "VpnGw4AZ" - VirtualNetworkGatewaySkuNameVpnGwOne VirtualNetworkGatewaySkuName = "VpnGw1" - VirtualNetworkGatewaySkuNameVpnGwOneAZ VirtualNetworkGatewaySkuName = "VpnGw1AZ" - VirtualNetworkGatewaySkuNameVpnGwThree VirtualNetworkGatewaySkuName = "VpnGw3" - VirtualNetworkGatewaySkuNameVpnGwThreeAZ VirtualNetworkGatewaySkuName = "VpnGw3AZ" - VirtualNetworkGatewaySkuNameVpnGwTwo VirtualNetworkGatewaySkuName = "VpnGw2" - VirtualNetworkGatewaySkuNameVpnGwTwoAZ VirtualNetworkGatewaySkuName = "VpnGw2AZ" -) - -func PossibleValuesForVirtualNetworkGatewaySkuName() []string { - return []string{ - string(VirtualNetworkGatewaySkuNameBasic), - string(VirtualNetworkGatewaySkuNameErGwOneAZ), - string(VirtualNetworkGatewaySkuNameErGwThreeAZ), - string(VirtualNetworkGatewaySkuNameErGwTwoAZ), - string(VirtualNetworkGatewaySkuNameHighPerformance), - string(VirtualNetworkGatewaySkuNameStandard), - string(VirtualNetworkGatewaySkuNameUltraPerformance), - string(VirtualNetworkGatewaySkuNameVpnGwFive), - string(VirtualNetworkGatewaySkuNameVpnGwFiveAZ), - string(VirtualNetworkGatewaySkuNameVpnGwFour), - string(VirtualNetworkGatewaySkuNameVpnGwFourAZ), - string(VirtualNetworkGatewaySkuNameVpnGwOne), - string(VirtualNetworkGatewaySkuNameVpnGwOneAZ), - string(VirtualNetworkGatewaySkuNameVpnGwThree), - string(VirtualNetworkGatewaySkuNameVpnGwThreeAZ), - string(VirtualNetworkGatewaySkuNameVpnGwTwo), - string(VirtualNetworkGatewaySkuNameVpnGwTwoAZ), - } -} - -func (s *VirtualNetworkGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewaySkuName(input string) (*VirtualNetworkGatewaySkuName, error) { - vals := map[string]VirtualNetworkGatewaySkuName{ - "basic": VirtualNetworkGatewaySkuNameBasic, - "ergw1az": VirtualNetworkGatewaySkuNameErGwOneAZ, - "ergw3az": VirtualNetworkGatewaySkuNameErGwThreeAZ, - "ergw2az": VirtualNetworkGatewaySkuNameErGwTwoAZ, - "highperformance": VirtualNetworkGatewaySkuNameHighPerformance, - "standard": VirtualNetworkGatewaySkuNameStandard, - "ultraperformance": VirtualNetworkGatewaySkuNameUltraPerformance, - "vpngw5": VirtualNetworkGatewaySkuNameVpnGwFive, - "vpngw5az": VirtualNetworkGatewaySkuNameVpnGwFiveAZ, - "vpngw4": VirtualNetworkGatewaySkuNameVpnGwFour, - "vpngw4az": VirtualNetworkGatewaySkuNameVpnGwFourAZ, - "vpngw1": VirtualNetworkGatewaySkuNameVpnGwOne, - "vpngw1az": VirtualNetworkGatewaySkuNameVpnGwOneAZ, - "vpngw3": VirtualNetworkGatewaySkuNameVpnGwThree, - "vpngw3az": VirtualNetworkGatewaySkuNameVpnGwThreeAZ, - "vpngw2": VirtualNetworkGatewaySkuNameVpnGwTwo, - "vpngw2az": VirtualNetworkGatewaySkuNameVpnGwTwoAZ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewaySkuName(input) - return &out, nil -} - -type VirtualNetworkGatewaySkuTier string - -const ( - VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" - VirtualNetworkGatewaySkuTierErGwOneAZ VirtualNetworkGatewaySkuTier = "ErGw1AZ" - VirtualNetworkGatewaySkuTierErGwThreeAZ VirtualNetworkGatewaySkuTier = "ErGw3AZ" - VirtualNetworkGatewaySkuTierErGwTwoAZ VirtualNetworkGatewaySkuTier = "ErGw2AZ" - VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" - VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" - VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" - VirtualNetworkGatewaySkuTierVpnGwFive VirtualNetworkGatewaySkuTier = "VpnGw5" - VirtualNetworkGatewaySkuTierVpnGwFiveAZ VirtualNetworkGatewaySkuTier = "VpnGw5AZ" - VirtualNetworkGatewaySkuTierVpnGwFour VirtualNetworkGatewaySkuTier = "VpnGw4" - VirtualNetworkGatewaySkuTierVpnGwFourAZ VirtualNetworkGatewaySkuTier = "VpnGw4AZ" - VirtualNetworkGatewaySkuTierVpnGwOne VirtualNetworkGatewaySkuTier = "VpnGw1" - VirtualNetworkGatewaySkuTierVpnGwOneAZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ" - VirtualNetworkGatewaySkuTierVpnGwThree VirtualNetworkGatewaySkuTier = "VpnGw3" - VirtualNetworkGatewaySkuTierVpnGwThreeAZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ" - VirtualNetworkGatewaySkuTierVpnGwTwo VirtualNetworkGatewaySkuTier = "VpnGw2" - VirtualNetworkGatewaySkuTierVpnGwTwoAZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ" -) - -func PossibleValuesForVirtualNetworkGatewaySkuTier() []string { - return []string{ - string(VirtualNetworkGatewaySkuTierBasic), - string(VirtualNetworkGatewaySkuTierErGwOneAZ), - string(VirtualNetworkGatewaySkuTierErGwThreeAZ), - string(VirtualNetworkGatewaySkuTierErGwTwoAZ), - string(VirtualNetworkGatewaySkuTierHighPerformance), - string(VirtualNetworkGatewaySkuTierStandard), - string(VirtualNetworkGatewaySkuTierUltraPerformance), - string(VirtualNetworkGatewaySkuTierVpnGwFive), - string(VirtualNetworkGatewaySkuTierVpnGwFiveAZ), - string(VirtualNetworkGatewaySkuTierVpnGwFour), - string(VirtualNetworkGatewaySkuTierVpnGwFourAZ), - string(VirtualNetworkGatewaySkuTierVpnGwOne), - string(VirtualNetworkGatewaySkuTierVpnGwOneAZ), - string(VirtualNetworkGatewaySkuTierVpnGwThree), - string(VirtualNetworkGatewaySkuTierVpnGwThreeAZ), - string(VirtualNetworkGatewaySkuTierVpnGwTwo), - string(VirtualNetworkGatewaySkuTierVpnGwTwoAZ), - } -} - -func (s *VirtualNetworkGatewaySkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewaySkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewaySkuTier(input string) (*VirtualNetworkGatewaySkuTier, error) { - vals := map[string]VirtualNetworkGatewaySkuTier{ - "basic": VirtualNetworkGatewaySkuTierBasic, - "ergw1az": VirtualNetworkGatewaySkuTierErGwOneAZ, - "ergw3az": VirtualNetworkGatewaySkuTierErGwThreeAZ, - "ergw2az": VirtualNetworkGatewaySkuTierErGwTwoAZ, - "highperformance": VirtualNetworkGatewaySkuTierHighPerformance, - "standard": VirtualNetworkGatewaySkuTierStandard, - "ultraperformance": VirtualNetworkGatewaySkuTierUltraPerformance, - "vpngw5": VirtualNetworkGatewaySkuTierVpnGwFive, - "vpngw5az": VirtualNetworkGatewaySkuTierVpnGwFiveAZ, - "vpngw4": VirtualNetworkGatewaySkuTierVpnGwFour, - "vpngw4az": VirtualNetworkGatewaySkuTierVpnGwFourAZ, - "vpngw1": VirtualNetworkGatewaySkuTierVpnGwOne, - "vpngw1az": VirtualNetworkGatewaySkuTierVpnGwOneAZ, - "vpngw3": VirtualNetworkGatewaySkuTierVpnGwThree, - "vpngw3az": VirtualNetworkGatewaySkuTierVpnGwThreeAZ, - "vpngw2": VirtualNetworkGatewaySkuTierVpnGwTwo, - "vpngw2az": VirtualNetworkGatewaySkuTierVpnGwTwoAZ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewaySkuTier(input) - return &out, nil -} - -type VirtualNetworkGatewayType string - -const ( - VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" - VirtualNetworkGatewayTypeLocalGateway VirtualNetworkGatewayType = "LocalGateway" - VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" -) - -func PossibleValuesForVirtualNetworkGatewayType() []string { - return []string{ - string(VirtualNetworkGatewayTypeExpressRoute), - string(VirtualNetworkGatewayTypeLocalGateway), - string(VirtualNetworkGatewayTypeVpn), - } -} - -func (s *VirtualNetworkGatewayType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayType(input string) (*VirtualNetworkGatewayType, error) { - vals := map[string]VirtualNetworkGatewayType{ - "expressroute": VirtualNetworkGatewayTypeExpressRoute, - "localgateway": VirtualNetworkGatewayTypeLocalGateway, - "vpn": VirtualNetworkGatewayTypeVpn, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayType(input) - return &out, nil -} - -type VpnAuthenticationType string - -const ( - VpnAuthenticationTypeAAD VpnAuthenticationType = "AAD" - VpnAuthenticationTypeCertificate VpnAuthenticationType = "Certificate" - VpnAuthenticationTypeRadius VpnAuthenticationType = "Radius" -) - -func PossibleValuesForVpnAuthenticationType() []string { - return []string{ - string(VpnAuthenticationTypeAAD), - string(VpnAuthenticationTypeCertificate), - string(VpnAuthenticationTypeRadius), - } -} - -func (s *VpnAuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnAuthenticationType(input string) (*VpnAuthenticationType, error) { - vals := map[string]VpnAuthenticationType{ - "aad": VpnAuthenticationTypeAAD, - "certificate": VpnAuthenticationTypeCertificate, - "radius": VpnAuthenticationTypeRadius, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnAuthenticationType(input) - return &out, nil -} - -type VpnClientProtocol string - -const ( - VpnClientProtocolIkeVTwo VpnClientProtocol = "IkeV2" - VpnClientProtocolOpenVPN VpnClientProtocol = "OpenVPN" - VpnClientProtocolSSTP VpnClientProtocol = "SSTP" -) - -func PossibleValuesForVpnClientProtocol() []string { - return []string{ - string(VpnClientProtocolIkeVTwo), - string(VpnClientProtocolOpenVPN), - string(VpnClientProtocolSSTP), - } -} - -func (s *VpnClientProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnClientProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnClientProtocol(input string) (*VpnClientProtocol, error) { - vals := map[string]VpnClientProtocol{ - "ikev2": VpnClientProtocolIkeVTwo, - "openvpn": VpnClientProtocolOpenVPN, - "sstp": VpnClientProtocolSSTP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnClientProtocol(input) - return &out, nil -} - -type VpnGatewayGeneration string - -const ( - VpnGatewayGenerationGenerationOne VpnGatewayGeneration = "Generation1" - VpnGatewayGenerationGenerationTwo VpnGatewayGeneration = "Generation2" - VpnGatewayGenerationNone VpnGatewayGeneration = "None" -) - -func PossibleValuesForVpnGatewayGeneration() []string { - return []string{ - string(VpnGatewayGenerationGenerationOne), - string(VpnGatewayGenerationGenerationTwo), - string(VpnGatewayGenerationNone), - } -} - -func (s *VpnGatewayGeneration) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnGatewayGeneration(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnGatewayGeneration(input string) (*VpnGatewayGeneration, error) { - vals := map[string]VpnGatewayGeneration{ - "generation1": VpnGatewayGenerationGenerationOne, - "generation2": VpnGatewayGenerationGenerationTwo, - "none": VpnGatewayGenerationNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnGatewayGeneration(input) - return &out, nil -} - -type VpnNatRuleMode string - -const ( - VpnNatRuleModeEgressSnat VpnNatRuleMode = "EgressSnat" - VpnNatRuleModeIngressSnat VpnNatRuleMode = "IngressSnat" -) - -func PossibleValuesForVpnNatRuleMode() []string { - return []string{ - string(VpnNatRuleModeEgressSnat), - string(VpnNatRuleModeIngressSnat), - } -} - -func (s *VpnNatRuleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleMode(input string) (*VpnNatRuleMode, error) { - vals := map[string]VpnNatRuleMode{ - "egresssnat": VpnNatRuleModeEgressSnat, - "ingresssnat": VpnNatRuleModeIngressSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleMode(input) - return &out, nil -} - -type VpnNatRuleType string - -const ( - VpnNatRuleTypeDynamic VpnNatRuleType = "Dynamic" - VpnNatRuleTypeStatic VpnNatRuleType = "Static" -) - -func PossibleValuesForVpnNatRuleType() []string { - return []string{ - string(VpnNatRuleTypeDynamic), - string(VpnNatRuleTypeStatic), - } -} - -func (s *VpnNatRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleType(input string) (*VpnNatRuleType, error) { - vals := map[string]VpnNatRuleType{ - "dynamic": VpnNatRuleTypeDynamic, - "static": VpnNatRuleTypeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleType(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} - -type VpnType string - -const ( - VpnTypePolicyBased VpnType = "PolicyBased" - VpnTypeRouteBased VpnType = "RouteBased" -) - -func PossibleValuesForVpnType() []string { - return []string{ - string(VpnTypePolicyBased), - string(VpnTypeRouteBased), - } -} - -func (s *VpnType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnType(input string) (*VpnType, error) { - vals := map[string]VpnType{ - "policybased": VpnTypePolicyBased, - "routebased": VpnTypeRouteBased, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/id_connection.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/id_connection.go deleted file mode 100644 index 20cd2e94077..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/id_connection.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionId{} - -// ConnectionId is a struct representing the Resource ID for a Connection -type ConnectionId struct { - SubscriptionId string - ResourceGroupName string - ConnectionName string -} - -// NewConnectionID returns a new ConnectionId struct -func NewConnectionID(subscriptionId string, resourceGroupName string, connectionName string) ConnectionId { - return ConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ConnectionName: connectionName, - } -} - -// ParseConnectionID parses 'input' into a ConnectionId -func ParseConnectionID(input string) (*ConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ParseConnectionIDInsensitively parses 'input' case-insensitively into a ConnectionId -// note: this method should only be used for API response data and not user input -func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ValidateConnectionID checks that 'input' can be parsed as a Connection ID -func ValidateConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Connection ID -func (id ConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/connections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Connection ID -func (id ConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticConnections", "connections", "connections"), - resourceids.UserSpecifiedSegment("connectionName", "connectionValue"), - } -} - -// String returns a human-readable description of this Connection ID -func (id ConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Connection Name: %q", id.ConnectionName), - } - return fmt.Sprintf("Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/id_connection_test.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/id_connection_test.go deleted file mode 100644 index 0807de5b933..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/id_connection_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionId{} - -func TestNewConnectionID(t *testing.T) { - id := NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ConnectionName != "connectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectionName'", id.ConnectionName, "connectionValue") - } -} - -func TestFormatConnectionID(t *testing.T) { - actual := NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestParseConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs/cOnNeCtIoNvAlUe", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ConnectionName: "cOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs/cOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestSegmentsForConnectionId(t *testing.T) { - segments := ConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_createorupdate.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_createorupdate.go deleted file mode 100644 index 9f2ef5c63e1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.Context, id ConnectionId, input VirtualNetworkGatewayConnection) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ConnectionId, input VirtualNetworkGatewayConnection) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_delete.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_delete.go deleted file mode 100644 index 4d46161ff40..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context, id ConnectionId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) DeleteThenPoll(ctx context.Context, id ConnectionId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_get.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_get.go deleted file mode 100644 index b9ef8773c42..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkGatewayConnection -} - -// Get ... -func (c VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, id ConnectionId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_getikesas.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_getikesas.go deleted file mode 100644 index 71376515c3f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_getikesas.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetIkeSasOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetIkeSas ... -func (c VirtualNetworkGatewayConnectionsClient) GetIkeSas(ctx context.Context, id ConnectionId) (result GetIkeSasOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getikesas", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetIkeSasThenPoll performs GetIkeSas then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) GetIkeSasThenPoll(ctx context.Context, id ConnectionId) error { - result, err := c.GetIkeSas(ctx, id) - if err != nil { - return fmt.Errorf("performing GetIkeSas: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetIkeSas: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_getsharedkey.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_getsharedkey.go deleted file mode 100644 index 7b140c7a771..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_getsharedkey.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetSharedKeyOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ConnectionSharedKey -} - -// GetSharedKey ... -func (c VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, id ConnectionId) (result GetSharedKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/sharedkey", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_list.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_list.go deleted file mode 100644 index e83b3fcee8c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkGatewayConnection -} - -type ListCompleteResult struct { - Items []VirtualNetworkGatewayConnection -} - -// List ... -func (c VirtualNetworkGatewayConnectionsClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/connections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkGatewayConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualNetworkGatewayConnectionsClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualNetworkGatewayConnectionOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkGatewayConnectionsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualNetworkGatewayConnectionOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualNetworkGatewayConnection, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_resetconnection.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_resetconnection.go deleted file mode 100644 index 7898a434030..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_resetconnection.go +++ /dev/null @@ -1,69 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetConnectionOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ResetConnection ... -func (c VirtualNetworkGatewayConnectionsClient) ResetConnection(ctx context.Context, id ConnectionId) (result ResetConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/resetconnection", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetConnectionThenPoll performs ResetConnection then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) ResetConnectionThenPoll(ctx context.Context, id ConnectionId) error { - result, err := c.ResetConnection(ctx, id) - if err != nil { - return fmt.Errorf("performing ResetConnection: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ResetConnection: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_resetsharedkey.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_resetsharedkey.go deleted file mode 100644 index b72c1fc8c36..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_resetsharedkey.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetSharedKeyOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ResetSharedKey ... -func (c VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.Context, id ConnectionId, input ConnectionResetSharedKey) (result ResetSharedKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/sharedkey/reset", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetSharedKeyThenPoll performs ResetSharedKey then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) ResetSharedKeyThenPoll(ctx context.Context, id ConnectionId, input ConnectionResetSharedKey) error { - result, err := c.ResetSharedKey(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ResetSharedKey: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ResetSharedKey: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_setsharedkey.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_setsharedkey.go deleted file mode 100644 index 62d9390ea06..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_setsharedkey.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SetSharedKeyOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SetSharedKey ... -func (c VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Context, id ConnectionId, input ConnectionSharedKey) (result SetSharedKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: fmt.Sprintf("%s/sharedkey", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SetSharedKeyThenPoll performs SetSharedKey then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) SetSharedKeyThenPoll(ctx context.Context, id ConnectionId, input ConnectionSharedKey) error { - result, err := c.SetSharedKey(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SetSharedKey: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SetSharedKey: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_startpacketcapture.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_startpacketcapture.go deleted file mode 100644 index 561ec18d395..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_startpacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StartPacketCapture ... -func (c VirtualNetworkGatewayConnectionsClient) StartPacketCapture(ctx context.Context, id ConnectionId, input VpnPacketCaptureStartParameters) (result StartPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/startPacketCapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartPacketCaptureThenPoll performs StartPacketCapture then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) StartPacketCaptureThenPoll(ctx context.Context, id ConnectionId, input VpnPacketCaptureStartParameters) error { - result, err := c.StartPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StartPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StartPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_stoppacketcapture.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_stoppacketcapture.go deleted file mode 100644 index 56c241761af..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_stoppacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StopPacketCapture ... -func (c VirtualNetworkGatewayConnectionsClient) StopPacketCapture(ctx context.Context, id ConnectionId, input VpnPacketCaptureStopParameters) (result StopPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stopPacketCapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopPacketCaptureThenPoll performs StopPacketCapture then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) StopPacketCaptureThenPoll(ctx context.Context, id ConnectionId, input VpnPacketCaptureStopParameters) error { - result, err := c.StopPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StopPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StopPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_updatetags.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_updatetags.go deleted file mode 100644 index e67d778ee91..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Context, id ConnectionId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c VirtualNetworkGatewayConnectionsClient) UpdateTagsThenPoll(ctx context.Context, id ConnectionId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_addressspace.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_addressspace.go deleted file mode 100644 index e94b1820056..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_bgpsettings.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_bgpsettings.go deleted file mode 100644 index e03680282e6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_connectionresetsharedkey.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_connectionresetsharedkey.go deleted file mode 100644 index 3e1887b9d36..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_connectionresetsharedkey.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionResetSharedKey struct { - KeyLength int64 `json:"keyLength"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_connectionsharedkey.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_connectionsharedkey.go deleted file mode 100644 index 069812d03a4..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_connectionsharedkey.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConnectionSharedKey struct { - Id *string `json:"id,omitempty"` - Value string `json:"value"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_gatewaycustombgpipaddressipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_gatewaycustombgpipaddressipconfiguration.go deleted file mode 100644 index 7fda76a8317..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_gatewaycustombgpipaddressipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayCustomBgpIPAddressIPConfiguration struct { - CustomBgpIPAddress string `json:"customBgpIpAddress"` - IPConfigurationId string `json:"ipConfigurationId"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index dd6001591ee..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_ipsecpolicy.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_ipsecpolicy.go deleted file mode 100644 index e36e053ac75..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_localnetworkgateway.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_localnetworkgateway.go deleted file mode 100644 index 9ddafdd0d6e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_localnetworkgateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties LocalNetworkGatewayPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_localnetworkgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_localnetworkgatewaypropertiesformat.go deleted file mode 100644 index bf0176c3023..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_localnetworkgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LocalNetworkGatewayPropertiesFormat struct { - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` - LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_radiusserver.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_radiusserver.go deleted file mode 100644 index ffc93e64965..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_radiusserver.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RadiusServer struct { - RadiusServerAddress string `json:"radiusServerAddress"` - RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_subresource.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_subresource.go deleted file mode 100644 index 25e6382622d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_tagsobject.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_tagsobject.go deleted file mode 100644 index 5f1bce5d03d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_trafficselectorpolicy.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_trafficselectorpolicy.go deleted file mode 100644 index 7d824402850..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_trafficselectorpolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficSelectorPolicy struct { - LocalAddressRanges []string `json:"localAddressRanges"` - RemoteAddressRanges []string `json:"remoteAddressRanges"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_tunnelconnectionhealth.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_tunnelconnectionhealth.go deleted file mode 100644 index 71722a9b5e7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_tunnelconnectionhealth.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TunnelConnectionHealth struct { - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` - Tunnel *string `json:"tunnel,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgateway.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgateway.go deleted file mode 100644 index 7a95498040e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgateway.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworkgatewayconnections - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGateway struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties VirtualNetworkGatewayPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnection.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnection.go deleted file mode 100644 index 05a6ea7eb90..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnection.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties VirtualNetworkGatewayConnectionPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnectionpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnectionpropertiesformat.go deleted file mode 100644 index ef9af43f207..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayconnectionpropertiesformat.go +++ /dev/null @@ -1,34 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - ConnectionMode *VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"` - ConnectionProtocol *VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType"` - DpdTimeoutSeconds *int64 `json:"dpdTimeoutSeconds,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnablePrivateLinkFastPath *bool `json:"enablePrivateLinkFastPath,omitempty"` - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - GatewayCustomBgpIPAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"gatewayCustomBgpIpAddresses,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"` - LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` - Peer *SubResource `json:"peer,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VirtualNetworkGateway1 VirtualNetworkGateway `json:"virtualNetworkGateway1"` - VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfiguration.go deleted file mode 100644 index 30467eb2ed1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 863c3769296..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatrule.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatrule.go deleted file mode 100644 index ff6c91b0d66..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayNatRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatruleproperties.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatruleproperties.go deleted file mode 100644 index 75185bb4a84..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaynatruleproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRuleProperties struct { - ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` - IPConfigurationId *string `json:"ipConfigurationId,omitempty"` - InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` - Mode *VpnNatRuleMode `json:"mode,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *VpnNatRuleType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroup.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroup.go deleted file mode 100644 index cd507b1d533..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayPolicyGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupmember.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupmember.go deleted file mode 100644 index 632e3bda52f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupproperties.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupproperties.go deleted file mode 100644 index 6b20992105c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroupProperties struct { - IsDefault bool `json:"isDefault"` - PolicyMembers []VirtualNetworkGatewayPolicyGroupMember `json:"policyMembers"` - Priority int64 `json:"priority"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VngClientConnectionConfigurations *[]SubResource `json:"vngClientConnectionConfigurations,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypropertiesformat.go deleted file mode 100644 index 52ff615e5c7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaypropertiesformat.go +++ /dev/null @@ -1,30 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPropertiesFormat struct { - ActiveActive *bool `json:"activeActive,omitempty"` - AllowRemoteVnetTraffic *bool `json:"allowRemoteVnetTraffic,omitempty"` - AllowVirtualWanTraffic *bool `json:"allowVirtualWanTraffic,omitempty"` - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` - DisableIPSecReplayProtection *bool `json:"disableIPSecReplayProtection,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - EnableDnsForwarding *bool `json:"enableDnsForwarding,omitempty"` - EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"` - GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` - GatewayType *VirtualNetworkGatewayType `json:"gatewayType,omitempty"` - IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - InboundDnsForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"` - NatRules *[]VirtualNetworkGatewayNatRule `json:"natRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` - VNetExtendedLocationResourceId *string `json:"vNetExtendedLocationResourceId,omitempty"` - VirtualNetworkGatewayPolicyGroups *[]VirtualNetworkGatewayPolicyGroup `json:"virtualNetworkGatewayPolicyGroups,omitempty"` - VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` - VpnGatewayGeneration *VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"` - VpnType *VpnType `json:"vpnType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaysku.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaysku.go deleted file mode 100644 index 301f66896ac..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_virtualnetworkgatewaysku.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewaySku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *VirtualNetworkGatewaySkuName `json:"name,omitempty"` - Tier *VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfiguration.go deleted file mode 100644 index 744d5505a17..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VngClientConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VngClientConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfigurationproperties.go deleted file mode 100644 index 531c18a0419..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vngclientconnectionconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VngClientConnectionConfigurationProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkGatewayPolicyGroups []SubResource `json:"virtualNetworkGatewayPolicyGroups"` - VpnClientAddressPool AddressSpace `json:"vpnClientAddressPool"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientconfiguration.go deleted file mode 100644 index f7da3943c5a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientconfiguration.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConfiguration struct { - AadAudience *string `json:"aadAudience,omitempty"` - AadIssuer *string `json:"aadIssuer,omitempty"` - AadTenant *string `json:"aadTenant,omitempty"` - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` - VngClientConnectionConfigurations *[]VngClientConnectionConfiguration `json:"vngClientConnectionConfigurations,omitempty"` - VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - VpnClientIPsecPolicies *[]IPsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` - VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificate.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificate.go deleted file mode 100644 index 7f83a9053a4..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificate.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRevokedCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificatepropertiesformat.go deleted file mode 100644 index 0155228d4d1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrevokedcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRevokedCertificatePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificate.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificate.go deleted file mode 100644 index 6eb8d073f4f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificate.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRootCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties VpnClientRootCertificatePropertiesFormat `json:"properties"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificatepropertiesformat.go deleted file mode 100644 index f5048e1ed78..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnclientrootcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRootCertificatePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicCertData string `json:"publicCertData"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnnatrulemapping.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnnatrulemapping.go deleted file mode 100644 index 394cabc619d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnnatrulemapping.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnNatRuleMapping struct { - AddressSpace *string `json:"addressSpace,omitempty"` - PortRange *string `json:"portRange,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestartparameters.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestartparameters.go deleted file mode 100644 index 52273329f1d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestartparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnPacketCaptureStartParameters struct { - FilterData *string `json:"filterData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestopparameters.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestopparameters.go deleted file mode 100644 index e7481a70176..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/model_vpnpacketcapturestopparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnPacketCaptureStopParameters struct { - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/predicates.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/predicates.go deleted file mode 100644 index c1fe558dd66..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package virtualnetworkgatewayconnections - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkGatewayConnectionOperationPredicate) Matches(input VirtualNetworkGatewayConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/version.go b/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/version.go deleted file mode 100644 index cee7425d3a6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgatewayconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgatewayconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgatewayconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/README.md b/resource-manager/network/2022-11-01/virtualnetworkgateways/README.md deleted file mode 100644 index 52e84a0fc34..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/README.md +++ /dev/null @@ -1,413 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworkgateways` Documentation - -The `virtualnetworkgateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworkgateways" -``` - - -### Client Initialization - -```go -client := virtualnetworkgateways.NewVirtualNetworkGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VirtualNetworkGateway{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVpnConnections` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.P2SVpnConnectionRequest{ - // ... -} - - -if err := client.DisconnectVirtualNetworkGatewayVpnConnectionsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GenerateVpnProfile` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnClientParameters{ - // ... -} - - -if err := client.GenerateVpnProfileThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.Generatevpnclientpackage` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnClientParameters{ - // ... -} - - -if err := client.GeneratevpnclientpackageThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetAdvertisedRoutes` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetAdvertisedRoutesThenPoll(ctx, id, virtualnetworkgateways.DefaultGetAdvertisedRoutesOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetBgpPeerStatus` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetBgpPeerStatusThenPoll(ctx, id, virtualnetworkgateways.DefaultGetBgpPeerStatusOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetLearnedRoutes` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetLearnedRoutesThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetVpnProfilePackageUrl` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetVpnProfilePackageUrlThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetVpnclientConnectionHealthThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.GetVpnclientIPsecParameters` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.GetVpnclientIPsecParametersThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.List` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.ListConnections` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -// alternatively `client.ListConnections(ctx, id)` can be used to do batched pagination -items, err := client.ListConnectionsComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.Reset` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.ResetThenPoll(ctx, id, virtualnetworkgateways.DefaultResetOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.ResetVpnClientSharedKey` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -if err := client.ResetVpnClientSharedKeyThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.SetVpnclientIPsecParameters` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnClientIPsecParameters{ - // ... -} - - -if err := client.SetVpnclientIPsecParametersThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.StartPacketCapture` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnPacketCaptureStartParameters{ - // ... -} - - -if err := client.StartPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.StopPacketCapture` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.VpnPacketCaptureStopParameters{ - // ... -} - - -if err := client.StopPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.SupportedVpnDevices` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -read, err := client.SupportedVpnDevices(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -payload := virtualnetworkgateways.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue") - -payload := virtualnetworkgateways.VirtualNetworkGatewayNatRule{ - // ... -} - - -if err := client.VirtualNetworkGatewayNatRulesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesDelete` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue") - -if err := client.VirtualNetworkGatewayNatRulesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesGet` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue") - -read, err := client.VirtualNetworkGatewayNatRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - -// alternatively `client.VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway(ctx, id)` can be used to do batched pagination -items, err := client.VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkGatewaysClient.VpnDeviceConfigurationScript` - -```go -ctx := context.TODO() -id := virtualnetworkgateways.NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - -payload := virtualnetworkgateways.VpnDeviceScriptParameters{ - // ... -} - - -read, err := client.VpnDeviceConfigurationScript(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/client.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/client.go deleted file mode 100644 index c99ea430c0a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworkgateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkGatewaysClientWithBaseURI(api environments.Api) (*VirtualNetworkGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworkgateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkGatewaysClient: %+v", err) - } - - return &VirtualNetworkGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/constants.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/constants.go deleted file mode 100644 index ae27a0a432f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/constants.go +++ /dev/null @@ -1,1269 +0,0 @@ -package virtualnetworkgateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationMethod string - -const ( - AuthenticationMethodEAPMSCHAPvTwo AuthenticationMethod = "EAPMSCHAPv2" - AuthenticationMethodEAPTLS AuthenticationMethod = "EAPTLS" -) - -func PossibleValuesForAuthenticationMethod() []string { - return []string{ - string(AuthenticationMethodEAPMSCHAPvTwo), - string(AuthenticationMethodEAPTLS), - } -} - -func (s *AuthenticationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationMethod(input string) (*AuthenticationMethod, error) { - vals := map[string]AuthenticationMethod{ - "eapmschapv2": AuthenticationMethodEAPMSCHAPvTwo, - "eaptls": AuthenticationMethodEAPTLS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationMethod(input) - return &out, nil -} - -type BgpPeerState string - -const ( - BgpPeerStateConnected BgpPeerState = "Connected" - BgpPeerStateConnecting BgpPeerState = "Connecting" - BgpPeerStateIdle BgpPeerState = "Idle" - BgpPeerStateStopped BgpPeerState = "Stopped" - BgpPeerStateUnknown BgpPeerState = "Unknown" -) - -func PossibleValuesForBgpPeerState() []string { - return []string{ - string(BgpPeerStateConnected), - string(BgpPeerStateConnecting), - string(BgpPeerStateIdle), - string(BgpPeerStateStopped), - string(BgpPeerStateUnknown), - } -} - -func (s *BgpPeerState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseBgpPeerState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseBgpPeerState(input string) (*BgpPeerState, error) { - vals := map[string]BgpPeerState{ - "connected": BgpPeerStateConnected, - "connecting": BgpPeerStateConnecting, - "idle": BgpPeerStateIdle, - "stopped": BgpPeerStateStopped, - "unknown": BgpPeerStateUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := BgpPeerState(input) - return &out, nil -} - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type ProcessorArchitecture string - -const ( - ProcessorArchitectureAmdSixFour ProcessorArchitecture = "Amd64" - ProcessorArchitectureXEightSix ProcessorArchitecture = "X86" -) - -func PossibleValuesForProcessorArchitecture() []string { - return []string{ - string(ProcessorArchitectureAmdSixFour), - string(ProcessorArchitectureXEightSix), - } -} - -func (s *ProcessorArchitecture) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProcessorArchitecture(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProcessorArchitecture(input string) (*ProcessorArchitecture, error) { - vals := map[string]ProcessorArchitecture{ - "amd64": ProcessorArchitectureAmdSixFour, - "x86": ProcessorArchitectureXEightSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProcessorArchitecture(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionMode string - -const ( - VirtualNetworkGatewayConnectionModeDefault VirtualNetworkGatewayConnectionMode = "Default" - VirtualNetworkGatewayConnectionModeInitiatorOnly VirtualNetworkGatewayConnectionMode = "InitiatorOnly" - VirtualNetworkGatewayConnectionModeResponderOnly VirtualNetworkGatewayConnectionMode = "ResponderOnly" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionMode() []string { - return []string{ - string(VirtualNetworkGatewayConnectionModeDefault), - string(VirtualNetworkGatewayConnectionModeInitiatorOnly), - string(VirtualNetworkGatewayConnectionModeResponderOnly), - } -} - -func (s *VirtualNetworkGatewayConnectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionMode(input string) (*VirtualNetworkGatewayConnectionMode, error) { - vals := map[string]VirtualNetworkGatewayConnectionMode{ - "default": VirtualNetworkGatewayConnectionModeDefault, - "initiatoronly": VirtualNetworkGatewayConnectionModeInitiatorOnly, - "responderonly": VirtualNetworkGatewayConnectionModeResponderOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionMode(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionProtocol string - -const ( - VirtualNetworkGatewayConnectionProtocolIKEvOne VirtualNetworkGatewayConnectionProtocol = "IKEv1" - VirtualNetworkGatewayConnectionProtocolIKEvTwo VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionProtocol() []string { - return []string{ - string(VirtualNetworkGatewayConnectionProtocolIKEvOne), - string(VirtualNetworkGatewayConnectionProtocolIKEvTwo), - } -} - -func (s *VirtualNetworkGatewayConnectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionProtocol(input string) (*VirtualNetworkGatewayConnectionProtocol, error) { - vals := map[string]VirtualNetworkGatewayConnectionProtocol{ - "ikev1": VirtualNetworkGatewayConnectionProtocolIKEvOne, - "ikev2": VirtualNetworkGatewayConnectionProtocolIKEvTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionProtocol(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionStatus string - -const ( - VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" - VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" - VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" - VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionStatus() []string { - return []string{ - string(VirtualNetworkGatewayConnectionStatusConnected), - string(VirtualNetworkGatewayConnectionStatusConnecting), - string(VirtualNetworkGatewayConnectionStatusNotConnected), - string(VirtualNetworkGatewayConnectionStatusUnknown), - } -} - -func (s *VirtualNetworkGatewayConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionStatus(input string) (*VirtualNetworkGatewayConnectionStatus, error) { - vals := map[string]VirtualNetworkGatewayConnectionStatus{ - "connected": VirtualNetworkGatewayConnectionStatusConnected, - "connecting": VirtualNetworkGatewayConnectionStatusConnecting, - "notconnected": VirtualNetworkGatewayConnectionStatusNotConnected, - "unknown": VirtualNetworkGatewayConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionStatus(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionType string - -const ( - VirtualNetworkGatewayConnectionTypeExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" - VirtualNetworkGatewayConnectionTypeIPsec VirtualNetworkGatewayConnectionType = "IPsec" - VirtualNetworkGatewayConnectionTypeVPNClient VirtualNetworkGatewayConnectionType = "VPNClient" - VirtualNetworkGatewayConnectionTypeVnetTwoVnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionType() []string { - return []string{ - string(VirtualNetworkGatewayConnectionTypeExpressRoute), - string(VirtualNetworkGatewayConnectionTypeIPsec), - string(VirtualNetworkGatewayConnectionTypeVPNClient), - string(VirtualNetworkGatewayConnectionTypeVnetTwoVnet), - } -} - -func (s *VirtualNetworkGatewayConnectionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionType(input string) (*VirtualNetworkGatewayConnectionType, error) { - vals := map[string]VirtualNetworkGatewayConnectionType{ - "expressroute": VirtualNetworkGatewayConnectionTypeExpressRoute, - "ipsec": VirtualNetworkGatewayConnectionTypeIPsec, - "vpnclient": VirtualNetworkGatewayConnectionTypeVPNClient, - "vnet2vnet": VirtualNetworkGatewayConnectionTypeVnetTwoVnet, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionType(input) - return &out, nil -} - -type VirtualNetworkGatewaySkuName string - -const ( - VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" - VirtualNetworkGatewaySkuNameErGwOneAZ VirtualNetworkGatewaySkuName = "ErGw1AZ" - VirtualNetworkGatewaySkuNameErGwThreeAZ VirtualNetworkGatewaySkuName = "ErGw3AZ" - VirtualNetworkGatewaySkuNameErGwTwoAZ VirtualNetworkGatewaySkuName = "ErGw2AZ" - VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" - VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" - VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" - VirtualNetworkGatewaySkuNameVpnGwFive VirtualNetworkGatewaySkuName = "VpnGw5" - VirtualNetworkGatewaySkuNameVpnGwFiveAZ VirtualNetworkGatewaySkuName = "VpnGw5AZ" - VirtualNetworkGatewaySkuNameVpnGwFour VirtualNetworkGatewaySkuName = "VpnGw4" - VirtualNetworkGatewaySkuNameVpnGwFourAZ VirtualNetworkGatewaySkuName = "VpnGw4AZ" - VirtualNetworkGatewaySkuNameVpnGwOne VirtualNetworkGatewaySkuName = "VpnGw1" - VirtualNetworkGatewaySkuNameVpnGwOneAZ VirtualNetworkGatewaySkuName = "VpnGw1AZ" - VirtualNetworkGatewaySkuNameVpnGwThree VirtualNetworkGatewaySkuName = "VpnGw3" - VirtualNetworkGatewaySkuNameVpnGwThreeAZ VirtualNetworkGatewaySkuName = "VpnGw3AZ" - VirtualNetworkGatewaySkuNameVpnGwTwo VirtualNetworkGatewaySkuName = "VpnGw2" - VirtualNetworkGatewaySkuNameVpnGwTwoAZ VirtualNetworkGatewaySkuName = "VpnGw2AZ" -) - -func PossibleValuesForVirtualNetworkGatewaySkuName() []string { - return []string{ - string(VirtualNetworkGatewaySkuNameBasic), - string(VirtualNetworkGatewaySkuNameErGwOneAZ), - string(VirtualNetworkGatewaySkuNameErGwThreeAZ), - string(VirtualNetworkGatewaySkuNameErGwTwoAZ), - string(VirtualNetworkGatewaySkuNameHighPerformance), - string(VirtualNetworkGatewaySkuNameStandard), - string(VirtualNetworkGatewaySkuNameUltraPerformance), - string(VirtualNetworkGatewaySkuNameVpnGwFive), - string(VirtualNetworkGatewaySkuNameVpnGwFiveAZ), - string(VirtualNetworkGatewaySkuNameVpnGwFour), - string(VirtualNetworkGatewaySkuNameVpnGwFourAZ), - string(VirtualNetworkGatewaySkuNameVpnGwOne), - string(VirtualNetworkGatewaySkuNameVpnGwOneAZ), - string(VirtualNetworkGatewaySkuNameVpnGwThree), - string(VirtualNetworkGatewaySkuNameVpnGwThreeAZ), - string(VirtualNetworkGatewaySkuNameVpnGwTwo), - string(VirtualNetworkGatewaySkuNameVpnGwTwoAZ), - } -} - -func (s *VirtualNetworkGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewaySkuName(input string) (*VirtualNetworkGatewaySkuName, error) { - vals := map[string]VirtualNetworkGatewaySkuName{ - "basic": VirtualNetworkGatewaySkuNameBasic, - "ergw1az": VirtualNetworkGatewaySkuNameErGwOneAZ, - "ergw3az": VirtualNetworkGatewaySkuNameErGwThreeAZ, - "ergw2az": VirtualNetworkGatewaySkuNameErGwTwoAZ, - "highperformance": VirtualNetworkGatewaySkuNameHighPerformance, - "standard": VirtualNetworkGatewaySkuNameStandard, - "ultraperformance": VirtualNetworkGatewaySkuNameUltraPerformance, - "vpngw5": VirtualNetworkGatewaySkuNameVpnGwFive, - "vpngw5az": VirtualNetworkGatewaySkuNameVpnGwFiveAZ, - "vpngw4": VirtualNetworkGatewaySkuNameVpnGwFour, - "vpngw4az": VirtualNetworkGatewaySkuNameVpnGwFourAZ, - "vpngw1": VirtualNetworkGatewaySkuNameVpnGwOne, - "vpngw1az": VirtualNetworkGatewaySkuNameVpnGwOneAZ, - "vpngw3": VirtualNetworkGatewaySkuNameVpnGwThree, - "vpngw3az": VirtualNetworkGatewaySkuNameVpnGwThreeAZ, - "vpngw2": VirtualNetworkGatewaySkuNameVpnGwTwo, - "vpngw2az": VirtualNetworkGatewaySkuNameVpnGwTwoAZ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewaySkuName(input) - return &out, nil -} - -type VirtualNetworkGatewaySkuTier string - -const ( - VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" - VirtualNetworkGatewaySkuTierErGwOneAZ VirtualNetworkGatewaySkuTier = "ErGw1AZ" - VirtualNetworkGatewaySkuTierErGwThreeAZ VirtualNetworkGatewaySkuTier = "ErGw3AZ" - VirtualNetworkGatewaySkuTierErGwTwoAZ VirtualNetworkGatewaySkuTier = "ErGw2AZ" - VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" - VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" - VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" - VirtualNetworkGatewaySkuTierVpnGwFive VirtualNetworkGatewaySkuTier = "VpnGw5" - VirtualNetworkGatewaySkuTierVpnGwFiveAZ VirtualNetworkGatewaySkuTier = "VpnGw5AZ" - VirtualNetworkGatewaySkuTierVpnGwFour VirtualNetworkGatewaySkuTier = "VpnGw4" - VirtualNetworkGatewaySkuTierVpnGwFourAZ VirtualNetworkGatewaySkuTier = "VpnGw4AZ" - VirtualNetworkGatewaySkuTierVpnGwOne VirtualNetworkGatewaySkuTier = "VpnGw1" - VirtualNetworkGatewaySkuTierVpnGwOneAZ VirtualNetworkGatewaySkuTier = "VpnGw1AZ" - VirtualNetworkGatewaySkuTierVpnGwThree VirtualNetworkGatewaySkuTier = "VpnGw3" - VirtualNetworkGatewaySkuTierVpnGwThreeAZ VirtualNetworkGatewaySkuTier = "VpnGw3AZ" - VirtualNetworkGatewaySkuTierVpnGwTwo VirtualNetworkGatewaySkuTier = "VpnGw2" - VirtualNetworkGatewaySkuTierVpnGwTwoAZ VirtualNetworkGatewaySkuTier = "VpnGw2AZ" -) - -func PossibleValuesForVirtualNetworkGatewaySkuTier() []string { - return []string{ - string(VirtualNetworkGatewaySkuTierBasic), - string(VirtualNetworkGatewaySkuTierErGwOneAZ), - string(VirtualNetworkGatewaySkuTierErGwThreeAZ), - string(VirtualNetworkGatewaySkuTierErGwTwoAZ), - string(VirtualNetworkGatewaySkuTierHighPerformance), - string(VirtualNetworkGatewaySkuTierStandard), - string(VirtualNetworkGatewaySkuTierUltraPerformance), - string(VirtualNetworkGatewaySkuTierVpnGwFive), - string(VirtualNetworkGatewaySkuTierVpnGwFiveAZ), - string(VirtualNetworkGatewaySkuTierVpnGwFour), - string(VirtualNetworkGatewaySkuTierVpnGwFourAZ), - string(VirtualNetworkGatewaySkuTierVpnGwOne), - string(VirtualNetworkGatewaySkuTierVpnGwOneAZ), - string(VirtualNetworkGatewaySkuTierVpnGwThree), - string(VirtualNetworkGatewaySkuTierVpnGwThreeAZ), - string(VirtualNetworkGatewaySkuTierVpnGwTwo), - string(VirtualNetworkGatewaySkuTierVpnGwTwoAZ), - } -} - -func (s *VirtualNetworkGatewaySkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewaySkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewaySkuTier(input string) (*VirtualNetworkGatewaySkuTier, error) { - vals := map[string]VirtualNetworkGatewaySkuTier{ - "basic": VirtualNetworkGatewaySkuTierBasic, - "ergw1az": VirtualNetworkGatewaySkuTierErGwOneAZ, - "ergw3az": VirtualNetworkGatewaySkuTierErGwThreeAZ, - "ergw2az": VirtualNetworkGatewaySkuTierErGwTwoAZ, - "highperformance": VirtualNetworkGatewaySkuTierHighPerformance, - "standard": VirtualNetworkGatewaySkuTierStandard, - "ultraperformance": VirtualNetworkGatewaySkuTierUltraPerformance, - "vpngw5": VirtualNetworkGatewaySkuTierVpnGwFive, - "vpngw5az": VirtualNetworkGatewaySkuTierVpnGwFiveAZ, - "vpngw4": VirtualNetworkGatewaySkuTierVpnGwFour, - "vpngw4az": VirtualNetworkGatewaySkuTierVpnGwFourAZ, - "vpngw1": VirtualNetworkGatewaySkuTierVpnGwOne, - "vpngw1az": VirtualNetworkGatewaySkuTierVpnGwOneAZ, - "vpngw3": VirtualNetworkGatewaySkuTierVpnGwThree, - "vpngw3az": VirtualNetworkGatewaySkuTierVpnGwThreeAZ, - "vpngw2": VirtualNetworkGatewaySkuTierVpnGwTwo, - "vpngw2az": VirtualNetworkGatewaySkuTierVpnGwTwoAZ, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewaySkuTier(input) - return &out, nil -} - -type VirtualNetworkGatewayType string - -const ( - VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" - VirtualNetworkGatewayTypeLocalGateway VirtualNetworkGatewayType = "LocalGateway" - VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" -) - -func PossibleValuesForVirtualNetworkGatewayType() []string { - return []string{ - string(VirtualNetworkGatewayTypeExpressRoute), - string(VirtualNetworkGatewayTypeLocalGateway), - string(VirtualNetworkGatewayTypeVpn), - } -} - -func (s *VirtualNetworkGatewayType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayType(input string) (*VirtualNetworkGatewayType, error) { - vals := map[string]VirtualNetworkGatewayType{ - "expressroute": VirtualNetworkGatewayTypeExpressRoute, - "localgateway": VirtualNetworkGatewayTypeLocalGateway, - "vpn": VirtualNetworkGatewayTypeVpn, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayType(input) - return &out, nil -} - -type VpnAuthenticationType string - -const ( - VpnAuthenticationTypeAAD VpnAuthenticationType = "AAD" - VpnAuthenticationTypeCertificate VpnAuthenticationType = "Certificate" - VpnAuthenticationTypeRadius VpnAuthenticationType = "Radius" -) - -func PossibleValuesForVpnAuthenticationType() []string { - return []string{ - string(VpnAuthenticationTypeAAD), - string(VpnAuthenticationTypeCertificate), - string(VpnAuthenticationTypeRadius), - } -} - -func (s *VpnAuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnAuthenticationType(input string) (*VpnAuthenticationType, error) { - vals := map[string]VpnAuthenticationType{ - "aad": VpnAuthenticationTypeAAD, - "certificate": VpnAuthenticationTypeCertificate, - "radius": VpnAuthenticationTypeRadius, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnAuthenticationType(input) - return &out, nil -} - -type VpnClientProtocol string - -const ( - VpnClientProtocolIkeVTwo VpnClientProtocol = "IkeV2" - VpnClientProtocolOpenVPN VpnClientProtocol = "OpenVPN" - VpnClientProtocolSSTP VpnClientProtocol = "SSTP" -) - -func PossibleValuesForVpnClientProtocol() []string { - return []string{ - string(VpnClientProtocolIkeVTwo), - string(VpnClientProtocolOpenVPN), - string(VpnClientProtocolSSTP), - } -} - -func (s *VpnClientProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnClientProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnClientProtocol(input string) (*VpnClientProtocol, error) { - vals := map[string]VpnClientProtocol{ - "ikev2": VpnClientProtocolIkeVTwo, - "openvpn": VpnClientProtocolOpenVPN, - "sstp": VpnClientProtocolSSTP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnClientProtocol(input) - return &out, nil -} - -type VpnGatewayGeneration string - -const ( - VpnGatewayGenerationGenerationOne VpnGatewayGeneration = "Generation1" - VpnGatewayGenerationGenerationTwo VpnGatewayGeneration = "Generation2" - VpnGatewayGenerationNone VpnGatewayGeneration = "None" -) - -func PossibleValuesForVpnGatewayGeneration() []string { - return []string{ - string(VpnGatewayGenerationGenerationOne), - string(VpnGatewayGenerationGenerationTwo), - string(VpnGatewayGenerationNone), - } -} - -func (s *VpnGatewayGeneration) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnGatewayGeneration(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnGatewayGeneration(input string) (*VpnGatewayGeneration, error) { - vals := map[string]VpnGatewayGeneration{ - "generation1": VpnGatewayGenerationGenerationOne, - "generation2": VpnGatewayGenerationGenerationTwo, - "none": VpnGatewayGenerationNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnGatewayGeneration(input) - return &out, nil -} - -type VpnNatRuleMode string - -const ( - VpnNatRuleModeEgressSnat VpnNatRuleMode = "EgressSnat" - VpnNatRuleModeIngressSnat VpnNatRuleMode = "IngressSnat" -) - -func PossibleValuesForVpnNatRuleMode() []string { - return []string{ - string(VpnNatRuleModeEgressSnat), - string(VpnNatRuleModeIngressSnat), - } -} - -func (s *VpnNatRuleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleMode(input string) (*VpnNatRuleMode, error) { - vals := map[string]VpnNatRuleMode{ - "egresssnat": VpnNatRuleModeEgressSnat, - "ingresssnat": VpnNatRuleModeIngressSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleMode(input) - return &out, nil -} - -type VpnNatRuleType string - -const ( - VpnNatRuleTypeDynamic VpnNatRuleType = "Dynamic" - VpnNatRuleTypeStatic VpnNatRuleType = "Static" -) - -func PossibleValuesForVpnNatRuleType() []string { - return []string{ - string(VpnNatRuleTypeDynamic), - string(VpnNatRuleTypeStatic), - } -} - -func (s *VpnNatRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleType(input string) (*VpnNatRuleType, error) { - vals := map[string]VpnNatRuleType{ - "dynamic": VpnNatRuleTypeDynamic, - "static": VpnNatRuleTypeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleType(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} - -type VpnType string - -const ( - VpnTypePolicyBased VpnType = "PolicyBased" - VpnTypeRouteBased VpnType = "RouteBased" -) - -func PossibleValuesForVpnType() []string { - return []string{ - string(VpnTypePolicyBased), - string(VpnTypeRouteBased), - } -} - -func (s *VpnType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnType(input string) (*VpnType, error) { - vals := map[string]VpnType{ - "policybased": VpnTypePolicyBased, - "routebased": VpnTypeRouteBased, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_connection.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/id_connection.go deleted file mode 100644 index 0474f12724b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_connection.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualnetworkgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionId{} - -// ConnectionId is a struct representing the Resource ID for a Connection -type ConnectionId struct { - SubscriptionId string - ResourceGroupName string - ConnectionName string -} - -// NewConnectionID returns a new ConnectionId struct -func NewConnectionID(subscriptionId string, resourceGroupName string, connectionName string) ConnectionId { - return ConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ConnectionName: connectionName, - } -} - -// ParseConnectionID parses 'input' into a ConnectionId -func ParseConnectionID(input string) (*ConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ParseConnectionIDInsensitively parses 'input' case-insensitively into a ConnectionId -// note: this method should only be used for API response data and not user input -func ParseConnectionIDInsensitively(input string) (*ConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(ConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ConnectionName, ok = parsed.Parsed["connectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "connectionName", *parsed) - } - - return &id, nil -} - -// ValidateConnectionID checks that 'input' can be parsed as a Connection ID -func ValidateConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Connection ID -func (id ConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/connections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Connection ID -func (id ConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticConnections", "connections", "connections"), - resourceids.UserSpecifiedSegment("connectionName", "connectionValue"), - } -} - -// String returns a human-readable description of this Connection ID -func (id ConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Connection Name: %q", id.ConnectionName), - } - return fmt.Sprintf("Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_connection_test.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/id_connection_test.go deleted file mode 100644 index b3024a9a004..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_connection_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualnetworkgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConnectionId{} - -func TestNewConnectionID(t *testing.T) { - id := NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ConnectionName != "connectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConnectionName'", id.ConnectionName, "connectionValue") - } -} - -func TestFormatConnectionID(t *testing.T) { - actual := NewConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "connectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestParseConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ConnectionName: "connectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/connections/connectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs/cOnNeCtIoNvAlUe", - Expected: &ConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ConnectionName: "cOnNeCtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/cOnNeCtIoNs/cOnNeCtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ConnectionName != v.Expected.ConnectionName { - t.Fatalf("Expected %q but got %q for ConnectionName", v.Expected.ConnectionName, actual.ConnectionName) - } - - } -} - -func TestSegmentsForConnectionId(t *testing.T) { - segments := ConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgateway.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgateway.go deleted file mode 100644 index f405ee0a07d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualnetworkgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkGatewayId{} - -// VirtualNetworkGatewayId is a struct representing the Resource ID for a Virtual Network Gateway -type VirtualNetworkGatewayId struct { - SubscriptionId string - ResourceGroupName string - VirtualNetworkGatewayName string -} - -// NewVirtualNetworkGatewayID returns a new VirtualNetworkGatewayId struct -func NewVirtualNetworkGatewayID(subscriptionId string, resourceGroupName string, virtualNetworkGatewayName string) VirtualNetworkGatewayId { - return VirtualNetworkGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualNetworkGatewayName: virtualNetworkGatewayName, - } -} - -// ParseVirtualNetworkGatewayID parses 'input' into a VirtualNetworkGatewayId -func ParseVirtualNetworkGatewayID(input string) (*VirtualNetworkGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) - } - - return &id, nil -} - -// ParseVirtualNetworkGatewayIDInsensitively parses 'input' case-insensitively into a VirtualNetworkGatewayId -// note: this method should only be used for API response data and not user input -func ParseVirtualNetworkGatewayIDInsensitively(input string) (*VirtualNetworkGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualNetworkGatewayID checks that 'input' can be parsed as a Virtual Network Gateway ID -func ValidateVirtualNetworkGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualNetworkGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Network Gateway ID -func (id VirtualNetworkGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworkGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualNetworkGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Network Gateway ID -func (id VirtualNetworkGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualNetworkGateways", "virtualNetworkGateways", "virtualNetworkGateways"), - resourceids.UserSpecifiedSegment("virtualNetworkGatewayName", "virtualNetworkGatewayValue"), - } -} - -// String returns a human-readable description of this Virtual Network Gateway ID -func (id VirtualNetworkGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Network Gateway Name: %q", id.VirtualNetworkGatewayName), - } - return fmt.Sprintf("Virtual Network Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgateway_test.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgateway_test.go deleted file mode 100644 index 5371e4ecd6f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualnetworkgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkGatewayId{} - -func TestNewVirtualNetworkGatewayID(t *testing.T) { - id := NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualNetworkGatewayName != "virtualNetworkGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkGatewayName'", id.VirtualNetworkGatewayName, "virtualNetworkGatewayValue") - } -} - -func TestFormatVirtualNetworkGatewayID(t *testing.T) { - actual := NewVirtualNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualNetworkGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue", - Expected: &VirtualNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkGatewayName: "virtualNetworkGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkGatewayName != v.Expected.VirtualNetworkGatewayName { - t.Fatalf("Expected %q but got %q for VirtualNetworkGatewayName", v.Expected.VirtualNetworkGatewayName, actual.VirtualNetworkGatewayName) - } - - } -} - -func TestParseVirtualNetworkGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue", - Expected: &VirtualNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkGatewayName: "virtualNetworkGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE", - Expected: &VirtualNetworkGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualNetworkGatewayName: "vIrTuAlNeTwOrKgAtEwAyVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkGatewayName != v.Expected.VirtualNetworkGatewayName { - t.Fatalf("Expected %q but got %q for VirtualNetworkGatewayName", v.Expected.VirtualNetworkGatewayName, actual.VirtualNetworkGatewayName) - } - - } -} - -func TestSegmentsForVirtualNetworkGatewayId(t *testing.T) { - segments := VirtualNetworkGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualNetworkGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go deleted file mode 100644 index 76631d94563..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualnetworkgateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkGatewayNatRuleId{} - -// VirtualNetworkGatewayNatRuleId is a struct representing the Resource ID for a Virtual Network Gateway Nat Rule -type VirtualNetworkGatewayNatRuleId struct { - SubscriptionId string - ResourceGroupName string - VirtualNetworkGatewayName string - NatRuleName string -} - -// NewVirtualNetworkGatewayNatRuleID returns a new VirtualNetworkGatewayNatRuleId struct -func NewVirtualNetworkGatewayNatRuleID(subscriptionId string, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) VirtualNetworkGatewayNatRuleId { - return VirtualNetworkGatewayNatRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualNetworkGatewayName: virtualNetworkGatewayName, - NatRuleName: natRuleName, - } -} - -// ParseVirtualNetworkGatewayNatRuleID parses 'input' into a VirtualNetworkGatewayNatRuleId -func ParseVirtualNetworkGatewayNatRuleID(input string) (*VirtualNetworkGatewayNatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkGatewayNatRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkGatewayNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) - } - - return &id, nil -} - -// ParseVirtualNetworkGatewayNatRuleIDInsensitively parses 'input' case-insensitively into a VirtualNetworkGatewayNatRuleId -// note: this method should only be used for API response data and not user input -func ParseVirtualNetworkGatewayNatRuleIDInsensitively(input string) (*VirtualNetworkGatewayNatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkGatewayNatRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkGatewayNatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkGatewayName, ok = parsed.Parsed["virtualNetworkGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualNetworkGatewayNatRuleID checks that 'input' can be parsed as a Virtual Network Gateway Nat Rule ID -func ValidateVirtualNetworkGatewayNatRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualNetworkGatewayNatRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Network Gateway Nat Rule ID -func (id VirtualNetworkGatewayNatRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworkGateways/%s/natRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualNetworkGatewayName, id.NatRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Network Gateway Nat Rule ID -func (id VirtualNetworkGatewayNatRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualNetworkGateways", "virtualNetworkGateways", "virtualNetworkGateways"), - resourceids.UserSpecifiedSegment("virtualNetworkGatewayName", "virtualNetworkGatewayValue"), - resourceids.StaticSegment("staticNatRules", "natRules", "natRules"), - resourceids.UserSpecifiedSegment("natRuleName", "natRuleValue"), - } -} - -// String returns a human-readable description of this Virtual Network Gateway Nat Rule ID -func (id VirtualNetworkGatewayNatRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Network Gateway Name: %q", id.VirtualNetworkGatewayName), - fmt.Sprintf("Nat Rule Name: %q", id.NatRuleName), - } - return fmt.Sprintf("Virtual Network Gateway Nat Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule_test.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule_test.go deleted file mode 100644 index 1a042f5ce76..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/id_virtualnetworkgatewaynatrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualnetworkgateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkGatewayNatRuleId{} - -func TestNewVirtualNetworkGatewayNatRuleID(t *testing.T) { - id := NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualNetworkGatewayName != "virtualNetworkGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkGatewayName'", id.VirtualNetworkGatewayName, "virtualNetworkGatewayValue") - } - - if id.NatRuleName != "natRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'NatRuleName'", id.NatRuleName, "natRuleValue") - } -} - -func TestFormatVirtualNetworkGatewayNatRuleID(t *testing.T) { - actual := NewVirtualNetworkGatewayNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkGatewayValue", "natRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualNetworkGatewayNatRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkGatewayNatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue", - Expected: &VirtualNetworkGatewayNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkGatewayName: "virtualNetworkGatewayValue", - NatRuleName: "natRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkGatewayNatRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkGatewayName != v.Expected.VirtualNetworkGatewayName { - t.Fatalf("Expected %q but got %q for VirtualNetworkGatewayName", v.Expected.VirtualNetworkGatewayName, actual.VirtualNetworkGatewayName) - } - - if actual.NatRuleName != v.Expected.NatRuleName { - t.Fatalf("Expected %q but got %q for NatRuleName", v.Expected.NatRuleName, actual.NatRuleName) - } - - } -} - -func TestParseVirtualNetworkGatewayNatRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkGatewayNatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE/nAtRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue", - Expected: &VirtualNetworkGatewayNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkGatewayName: "virtualNetworkGatewayValue", - NatRuleName: "natRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkGateways/virtualNetworkGatewayValue/natRules/natRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE/nAtRuLeS/nAtRuLeVaLuE", - Expected: &VirtualNetworkGatewayNatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualNetworkGatewayName: "vIrTuAlNeTwOrKgAtEwAyVaLuE", - NatRuleName: "nAtRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKgAtEwAyS/vIrTuAlNeTwOrKgAtEwAyVaLuE/nAtRuLeS/nAtRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkGatewayNatRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkGatewayName != v.Expected.VirtualNetworkGatewayName { - t.Fatalf("Expected %q but got %q for VirtualNetworkGatewayName", v.Expected.VirtualNetworkGatewayName, actual.VirtualNetworkGatewayName) - } - - if actual.NatRuleName != v.Expected.NatRuleName { - t.Fatalf("Expected %q but got %q for NatRuleName", v.Expected.NatRuleName, actual.NatRuleName) - } - - } -} - -func TestSegmentsForVirtualNetworkGatewayNatRuleId(t *testing.T) { - segments := VirtualNetworkGatewayNatRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualNetworkGatewayNatRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_createorupdate.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_createorupdate.go deleted file mode 100644 index 12eaeda1be7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, id VirtualNetworkGatewayId, input VirtualNetworkGateway) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworkGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VirtualNetworkGateway) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_delete.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_delete.go deleted file mode 100644 index 06878f245a4..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworkGatewaysClient) Delete(ctx context.Context, id VirtualNetworkGatewayId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworkGatewaysClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_disconnectvirtualnetworkgatewayvpnconnections.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_disconnectvirtualnetworkgatewayvpnconnections.go deleted file mode 100644 index 6a0589d67d6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_disconnectvirtualnetworkgatewayvpnconnections.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DisconnectVirtualNetworkGatewayVpnConnectionsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// DisconnectVirtualNetworkGatewayVpnConnections ... -func (c VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnConnections(ctx context.Context, id VirtualNetworkGatewayId, input P2SVpnConnectionRequest) (result DisconnectVirtualNetworkGatewayVpnConnectionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/disconnectVirtualNetworkGatewayVpnConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DisconnectVirtualNetworkGatewayVpnConnectionsThenPoll performs DisconnectVirtualNetworkGatewayVpnConnections then polls until it's completed -func (c VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnConnectionsThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input P2SVpnConnectionRequest) error { - result, err := c.DisconnectVirtualNetworkGatewayVpnConnections(ctx, id, input) - if err != nil { - return fmt.Errorf("performing DisconnectVirtualNetworkGatewayVpnConnections: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after DisconnectVirtualNetworkGatewayVpnConnections: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_generatevpnclientpackage.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_generatevpnclientpackage.go deleted file mode 100644 index e9ed69b2443..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_generatevpnclientpackage.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GeneratevpnclientpackageOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Generatevpnclientpackage ... -func (c VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientParameters) (result GeneratevpnclientpackageOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generatevpnclientpackage", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GeneratevpnclientpackageThenPoll performs Generatevpnclientpackage then polls until it's completed -func (c VirtualNetworkGatewaysClient) GeneratevpnclientpackageThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientParameters) error { - result, err := c.Generatevpnclientpackage(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Generatevpnclientpackage: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Generatevpnclientpackage: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_generatevpnprofile.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_generatevpnprofile.go deleted file mode 100644 index d812edf3be9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_generatevpnprofile.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GenerateVpnProfileOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GenerateVpnProfile ... -func (c VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientParameters) (result GenerateVpnProfileOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generatevpnprofile", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GenerateVpnProfileThenPoll performs GenerateVpnProfile then polls until it's completed -func (c VirtualNetworkGatewaysClient) GenerateVpnProfileThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientParameters) error { - result, err := c.GenerateVpnProfile(ctx, id, input) - if err != nil { - return fmt.Errorf("performing GenerateVpnProfile: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GenerateVpnProfile: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_get.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_get.go deleted file mode 100644 index d57ac7b4996..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkGateway -} - -// Get ... -func (c VirtualNetworkGatewaysClient) Get(ctx context.Context, id VirtualNetworkGatewayId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getadvertisedroutes.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getadvertisedroutes.go deleted file mode 100644 index add8f59a43e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getadvertisedroutes.go +++ /dev/null @@ -1,98 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetAdvertisedRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type GetAdvertisedRoutesOperationOptions struct { - Peer *string -} - -func DefaultGetAdvertisedRoutesOperationOptions() GetAdvertisedRoutesOperationOptions { - return GetAdvertisedRoutesOperationOptions{} -} - -func (o GetAdvertisedRoutesOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetAdvertisedRoutesOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetAdvertisedRoutesOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Peer != nil { - out.Append("peer", fmt.Sprintf("%v", *o.Peer)) - } - return &out -} - -// GetAdvertisedRoutes ... -func (c VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Context, id VirtualNetworkGatewayId, options GetAdvertisedRoutesOperationOptions) (result GetAdvertisedRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getAdvertisedRoutes", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetAdvertisedRoutesThenPoll performs GetAdvertisedRoutes then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetAdvertisedRoutesThenPoll(ctx context.Context, id VirtualNetworkGatewayId, options GetAdvertisedRoutesOperationOptions) error { - result, err := c.GetAdvertisedRoutes(ctx, id, options) - if err != nil { - return fmt.Errorf("performing GetAdvertisedRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetAdvertisedRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getbgppeerstatus.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getbgppeerstatus.go deleted file mode 100644 index b4c390104d0..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getbgppeerstatus.go +++ /dev/null @@ -1,98 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetBgpPeerStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type GetBgpPeerStatusOperationOptions struct { - Peer *string -} - -func DefaultGetBgpPeerStatusOperationOptions() GetBgpPeerStatusOperationOptions { - return GetBgpPeerStatusOperationOptions{} -} - -func (o GetBgpPeerStatusOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetBgpPeerStatusOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetBgpPeerStatusOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Peer != nil { - out.Append("peer", fmt.Sprintf("%v", *o.Peer)) - } - return &out -} - -// GetBgpPeerStatus ... -func (c VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context, id VirtualNetworkGatewayId, options GetBgpPeerStatusOperationOptions) (result GetBgpPeerStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getBgpPeerStatus", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetBgpPeerStatusThenPoll performs GetBgpPeerStatus then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetBgpPeerStatusThenPoll(ctx context.Context, id VirtualNetworkGatewayId, options GetBgpPeerStatusOperationOptions) error { - result, err := c.GetBgpPeerStatus(ctx, id, options) - if err != nil { - return fmt.Errorf("performing GetBgpPeerStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetBgpPeerStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getlearnedroutes.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getlearnedroutes.go deleted file mode 100644 index 34e547bb191..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getlearnedroutes.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetLearnedRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetLearnedRoutes ... -func (c VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context, id VirtualNetworkGatewayId) (result GetLearnedRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getLearnedRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetLearnedRoutesThenPoll performs GetLearnedRoutes then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetLearnedRoutesThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.GetLearnedRoutes(ctx, id) - if err != nil { - return fmt.Errorf("performing GetLearnedRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetLearnedRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnclientconnectionhealth.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnclientconnectionhealth.go deleted file mode 100644 index 8700c4fe48a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnclientconnectionhealth.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVpnclientConnectionHealthOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetVpnclientConnectionHealth ... -func (c VirtualNetworkGatewaysClient) GetVpnclientConnectionHealth(ctx context.Context, id VirtualNetworkGatewayId) (result GetVpnclientConnectionHealthOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getVpnClientConnectionHealth", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetVpnclientConnectionHealthThenPoll performs GetVpnclientConnectionHealth then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.GetVpnclientConnectionHealth(ctx, id) - if err != nil { - return fmt.Errorf("performing GetVpnclientConnectionHealth: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetVpnclientConnectionHealth: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnclientipsecparameters.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnclientipsecparameters.go deleted file mode 100644 index a610eb0afcc..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnclientipsecparameters.go +++ /dev/null @@ -1,69 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVpnclientIPsecParametersOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetVpnclientIPsecParameters ... -func (c VirtualNetworkGatewaysClient) GetVpnclientIPsecParameters(ctx context.Context, id VirtualNetworkGatewayId) (result GetVpnclientIPsecParametersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getvpnclientipsecparameters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetVpnclientIPsecParametersThenPoll performs GetVpnclientIPsecParameters then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetVpnclientIPsecParametersThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.GetVpnclientIPsecParameters(ctx, id) - if err != nil { - return fmt.Errorf("performing GetVpnclientIPsecParameters: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetVpnclientIPsecParameters: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnprofilepackageurl.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnprofilepackageurl.go deleted file mode 100644 index 6e1e4ee9495..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_getvpnprofilepackageurl.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVpnProfilePackageUrlOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// GetVpnProfilePackageUrl ... -func (c VirtualNetworkGatewaysClient) GetVpnProfilePackageUrl(ctx context.Context, id VirtualNetworkGatewayId) (result GetVpnProfilePackageUrlOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getvpnprofilepackageurl", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GetVpnProfilePackageUrlThenPoll performs GetVpnProfilePackageUrl then polls until it's completed -func (c VirtualNetworkGatewaysClient) GetVpnProfilePackageUrlThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.GetVpnProfilePackageUrl(ctx, id) - if err != nil { - return fmt.Errorf("performing GetVpnProfilePackageUrl: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after GetVpnProfilePackageUrl: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_list.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_list.go deleted file mode 100644 index a70840c0b9e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkGateway -} - -type ListCompleteResult struct { - Items []VirtualNetworkGateway -} - -// List ... -func (c VirtualNetworkGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworkGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualNetworkGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualNetworkGatewayOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualNetworkGatewayOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualNetworkGateway, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_listconnections.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_listconnections.go deleted file mode 100644 index fa1d66370c8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_listconnections.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListConnectionsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkGatewayConnectionListEntity -} - -type ListConnectionsCompleteResult struct { - Items []VirtualNetworkGatewayConnectionListEntity -} - -// ListConnections ... -func (c VirtualNetworkGatewaysClient) ListConnections(ctx context.Context, id VirtualNetworkGatewayId) (result ListConnectionsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/connections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkGatewayConnectionListEntity `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListConnectionsComplete retrieves all the results into a single object -func (c VirtualNetworkGatewaysClient) ListConnectionsComplete(ctx context.Context, id VirtualNetworkGatewayId) (ListConnectionsCompleteResult, error) { - return c.ListConnectionsCompleteMatchingPredicate(ctx, id, VirtualNetworkGatewayConnectionListEntityOperationPredicate{}) -} - -// ListConnectionsCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkGatewaysClient) ListConnectionsCompleteMatchingPredicate(ctx context.Context, id VirtualNetworkGatewayId, predicate VirtualNetworkGatewayConnectionListEntityOperationPredicate) (result ListConnectionsCompleteResult, err error) { - items := make([]VirtualNetworkGatewayConnectionListEntity, 0) - - resp, err := c.ListConnections(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListConnectionsCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_reset.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_reset.go deleted file mode 100644 index b5d66af7067..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_reset.go +++ /dev/null @@ -1,98 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type ResetOperationOptions struct { - GatewayVip *string -} - -func DefaultResetOperationOptions() ResetOperationOptions { - return ResetOperationOptions{} -} - -func (o ResetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ResetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ResetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.GatewayVip != nil { - out.Append("gatewayVip", fmt.Sprintf("%v", *o.GatewayVip)) - } - return &out -} - -// Reset ... -func (c VirtualNetworkGatewaysClient) Reset(ctx context.Context, id VirtualNetworkGatewayId, options ResetOperationOptions) (result ResetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/reset", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetThenPoll performs Reset then polls until it's completed -func (c VirtualNetworkGatewaysClient) ResetThenPoll(ctx context.Context, id VirtualNetworkGatewayId, options ResetOperationOptions) error { - result, err := c.Reset(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Reset: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Reset: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_resetvpnclientsharedkey.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_resetvpnclientsharedkey.go deleted file mode 100644 index 3e10b92aa05..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_resetvpnclientsharedkey.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetVpnClientSharedKeyOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ResetVpnClientSharedKey ... -func (c VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.Context, id VirtualNetworkGatewayId) (result ResetVpnClientSharedKeyOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/resetvpnclientsharedkey", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetVpnClientSharedKeyThenPoll performs ResetVpnClientSharedKey then polls until it's completed -func (c VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyThenPoll(ctx context.Context, id VirtualNetworkGatewayId) error { - result, err := c.ResetVpnClientSharedKey(ctx, id) - if err != nil { - return fmt.Errorf("performing ResetVpnClientSharedKey: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ResetVpnClientSharedKey: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_setvpnclientipsecparameters.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_setvpnclientipsecparameters.go deleted file mode 100644 index 22f9a0a8516..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_setvpnclientipsecparameters.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SetVpnclientIPsecParametersOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SetVpnclientIPsecParameters ... -func (c VirtualNetworkGatewaysClient) SetVpnclientIPsecParameters(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientIPsecParameters) (result SetVpnclientIPsecParametersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/setvpnclientipsecparameters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SetVpnclientIPsecParametersThenPoll performs SetVpnclientIPsecParameters then polls until it's completed -func (c VirtualNetworkGatewaysClient) SetVpnclientIPsecParametersThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnClientIPsecParameters) error { - result, err := c.SetVpnclientIPsecParameters(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SetVpnclientIPsecParameters: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SetVpnclientIPsecParameters: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_startpacketcapture.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_startpacketcapture.go deleted file mode 100644 index 14dcd2d1645..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_startpacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StartPacketCapture ... -func (c VirtualNetworkGatewaysClient) StartPacketCapture(ctx context.Context, id VirtualNetworkGatewayId, input VpnPacketCaptureStartParameters) (result StartPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/startPacketCapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartPacketCaptureThenPoll performs StartPacketCapture then polls until it's completed -func (c VirtualNetworkGatewaysClient) StartPacketCaptureThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnPacketCaptureStartParameters) error { - result, err := c.StartPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StartPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StartPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_stoppacketcapture.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_stoppacketcapture.go deleted file mode 100644 index 63960993e8a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_stoppacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StopPacketCapture ... -func (c VirtualNetworkGatewaysClient) StopPacketCapture(ctx context.Context, id VirtualNetworkGatewayId, input VpnPacketCaptureStopParameters) (result StopPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stopPacketCapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopPacketCaptureThenPoll performs StopPacketCapture then polls until it's completed -func (c VirtualNetworkGatewaysClient) StopPacketCaptureThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input VpnPacketCaptureStopParameters) error { - result, err := c.StopPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StopPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StopPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_supportedvpndevices.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_supportedvpndevices.go deleted file mode 100644 index 7f62811c3ef..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_supportedvpndevices.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SupportedVpnDevicesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *string -} - -// SupportedVpnDevices ... -func (c VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, id VirtualNetworkGatewayId) (result SupportedVpnDevicesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/supportedvpndevices", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_updatetags.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_updatetags.go deleted file mode 100644 index 698f272d3e7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, id VirtualNetworkGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c VirtualNetworkGatewaysClient) UpdateTagsThenPoll(ctx context.Context, id VirtualNetworkGatewayId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulescreateorupdate.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulescreateorupdate.go deleted file mode 100644 index 5fdd09e6178..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRulesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualNetworkGatewayNatRulesCreateOrUpdate ... -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesCreateOrUpdate(ctx context.Context, id VirtualNetworkGatewayNatRuleId, input VirtualNetworkGatewayNatRule) (result VirtualNetworkGatewayNatRulesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualNetworkGatewayNatRulesCreateOrUpdateThenPoll performs VirtualNetworkGatewayNatRulesCreateOrUpdate then polls until it's completed -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesCreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkGatewayNatRuleId, input VirtualNetworkGatewayNatRule) error { - result, err := c.VirtualNetworkGatewayNatRulesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualNetworkGatewayNatRulesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualNetworkGatewayNatRulesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesdelete.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesdelete.go deleted file mode 100644 index 4d041050bd2..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRulesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualNetworkGatewayNatRulesDelete ... -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesDelete(ctx context.Context, id VirtualNetworkGatewayNatRuleId) (result VirtualNetworkGatewayNatRulesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualNetworkGatewayNatRulesDeleteThenPoll performs VirtualNetworkGatewayNatRulesDelete then polls until it's completed -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesDeleteThenPoll(ctx context.Context, id VirtualNetworkGatewayNatRuleId) error { - result, err := c.VirtualNetworkGatewayNatRulesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualNetworkGatewayNatRulesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualNetworkGatewayNatRulesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go deleted file mode 100644 index ddb145f9aed..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkGatewayNatRule -} - -// VirtualNetworkGatewayNatRulesGet ... -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesGet(ctx context.Context, id VirtualNetworkGatewayNatRuleId) (result VirtualNetworkGatewayNatRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatruleslistbyvirtualnetworkgateway.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatruleslistbyvirtualnetworkgateway.go deleted file mode 100644 index d390dc1a8e0..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_virtualnetworkgatewaynatruleslistbyvirtualnetworkgateway.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkGatewayNatRule -} - -type VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteResult struct { - Items []VirtualNetworkGatewayNatRule -} - -// VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway ... -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway(ctx context.Context, id VirtualNetworkGatewayId) (result VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/natRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkGatewayNatRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayComplete retrieves all the results into a single object -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayComplete(ctx context.Context, id VirtualNetworkGatewayId) (VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteResult, error) { - return c.VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteMatchingPredicate(ctx, id, VirtualNetworkGatewayNatRuleOperationPredicate{}) -} - -// VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkGatewaysClient) VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteMatchingPredicate(ctx context.Context, id VirtualNetworkGatewayId, predicate VirtualNetworkGatewayNatRuleOperationPredicate) (result VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteResult, err error) { - items := make([]VirtualNetworkGatewayNatRule, 0) - - resp, err := c.VirtualNetworkGatewayNatRulesListByVirtualNetworkGateway(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualNetworkGatewayNatRulesListByVirtualNetworkGatewayCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go deleted file mode 100644 index 8629f901a70..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/method_vpndeviceconfigurationscript.go +++ /dev/null @@ -1,56 +0,0 @@ -package virtualnetworkgateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnDeviceConfigurationScriptOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *string -} - -// VpnDeviceConfigurationScript ... -func (c VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.Context, id ConnectionId, input VpnDeviceScriptParameters) (result VpnDeviceConfigurationScriptOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/vpndeviceconfigurationscript", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_addressspace.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_addressspace.go deleted file mode 100644 index 8ec4b3f0b7d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgppeerstatus.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgppeerstatus.go deleted file mode 100644 index 8b54be7d7ae..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgppeerstatus.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpPeerStatus struct { - Asn *int64 `json:"asn,omitempty"` - ConnectedDuration *string `json:"connectedDuration,omitempty"` - LocalAddress *string `json:"localAddress,omitempty"` - MessagesReceived *int64 `json:"messagesReceived,omitempty"` - MessagesSent *int64 `json:"messagesSent,omitempty"` - Neighbor *string `json:"neighbor,omitempty"` - RoutesReceived *int64 `json:"routesReceived,omitempty"` - State *BgpPeerState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgppeerstatuslistresult.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgppeerstatuslistresult.go deleted file mode 100644 index 4affff1a309..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgppeerstatuslistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpPeerStatusListResult struct { - Value *[]BgpPeerStatus `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgpsettings.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgpsettings.go deleted file mode 100644 index 38b1165bfa1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewaycustombgpipaddressipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewaycustombgpipaddressipconfiguration.go deleted file mode 100644 index 6bb7f5aa055..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewaycustombgpipaddressipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayCustomBgpIPAddressIPConfiguration struct { - CustomBgpIPAddress string `json:"customBgpIpAddress"` - IPConfigurationId string `json:"ipConfigurationId"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewayroute.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewayroute.go deleted file mode 100644 index 038e61f22d3..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewayroute.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayRoute struct { - AsPath *string `json:"asPath,omitempty"` - LocalAddress *string `json:"localAddress,omitempty"` - Network *string `json:"network,omitempty"` - NextHop *string `json:"nextHop,omitempty"` - Origin *string `json:"origin,omitempty"` - SourcePeer *string `json:"sourcePeer,omitempty"` - Weight *int64 `json:"weight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewayroutelistresult.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewayroutelistresult.go deleted file mode 100644 index d0ab95ca8fb..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_gatewayroutelistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayRouteListResult struct { - Value *[]GatewayRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index bfda111f40f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_ipsecpolicy.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_ipsecpolicy.go deleted file mode 100644 index 6db4ac44425..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_p2svpnconnectionrequest.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_p2svpnconnectionrequest.go deleted file mode 100644 index dafc643bcef..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_p2svpnconnectionrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnConnectionRequest struct { - VpnConnectionIds *[]string `json:"vpnConnectionIds,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_radiusserver.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_radiusserver.go deleted file mode 100644 index eb891246991..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_radiusserver.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RadiusServer struct { - RadiusServerAddress string `json:"radiusServerAddress"` - RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_subresource.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_subresource.go deleted file mode 100644 index 5e20a09efb4..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_tagsobject.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_tagsobject.go deleted file mode 100644 index 1208ffee7eb..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_trafficselectorpolicy.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_trafficselectorpolicy.go deleted file mode 100644 index 6dbeefcf439..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_trafficselectorpolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficSelectorPolicy struct { - LocalAddressRanges []string `json:"localAddressRanges"` - RemoteAddressRanges []string `json:"remoteAddressRanges"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_tunnelconnectionhealth.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_tunnelconnectionhealth.go deleted file mode 100644 index 786b8730363..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_tunnelconnectionhealth.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TunnelConnectionHealth struct { - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - LastConnectionEstablishedUtcTime *string `json:"lastConnectionEstablishedUtcTime,omitempty"` - Tunnel *string `json:"tunnel,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkconnectiongatewayreference.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkconnectiongatewayreference.go deleted file mode 100644 index f9ddd43a0b5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkconnectiongatewayreference.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkConnectionGatewayReference struct { - Id string `json:"id"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgateway.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgateway.go deleted file mode 100644 index 0bd39843684..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgateway.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworkgateways - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGateway struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties VirtualNetworkGatewayPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentity.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentity.go deleted file mode 100644 index fc88052ded9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentity.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionListEntity struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentitypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentitypropertiesformat.go deleted file mode 100644 index ad063d3db47..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayconnectionlistentitypropertiesformat.go +++ /dev/null @@ -1,30 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { - AuthorizationKey *string `json:"authorizationKey,omitempty"` - ConnectionMode *VirtualNetworkGatewayConnectionMode `json:"connectionMode,omitempty"` - ConnectionProtocol *VirtualNetworkGatewayConnectionProtocol `json:"connectionProtocol,omitempty"` - ConnectionStatus *VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` - ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnablePrivateLinkFastPath *bool `json:"enablePrivateLinkFastPath,omitempty"` - ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"` - GatewayCustomBgpIPAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"gatewayCustomBgpIpAddresses,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` - Peer *SubResource `json:"peer,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VirtualNetworkGateway1 VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1"` - VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfiguration.go deleted file mode 100644 index b0f988e9a2c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index f4396964e0a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaynatrule.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaynatrule.go deleted file mode 100644 index f8d6791d170..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaynatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayNatRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaynatruleproperties.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaynatruleproperties.go deleted file mode 100644 index 6227a89e253..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaynatruleproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayNatRuleProperties struct { - ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` - IPConfigurationId *string `json:"ipConfigurationId,omitempty"` - InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` - Mode *VpnNatRuleMode `json:"mode,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *VpnNatRuleType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroup.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroup.go deleted file mode 100644 index ebd198d261e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroup.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkGatewayPolicyGroupProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupmember.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupmember.go deleted file mode 100644 index 466e643ddd8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupproperties.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupproperties.go deleted file mode 100644 index ab108714ff3..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPolicyGroupProperties struct { - IsDefault bool `json:"isDefault"` - PolicyMembers []VirtualNetworkGatewayPolicyGroupMember `json:"policyMembers"` - Priority int64 `json:"priority"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VngClientConnectionConfigurations *[]SubResource `json:"vngClientConnectionConfigurations,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypropertiesformat.go deleted file mode 100644 index 99f3368d17e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaypropertiesformat.go +++ /dev/null @@ -1,30 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayPropertiesFormat struct { - ActiveActive *bool `json:"activeActive,omitempty"` - AllowRemoteVnetTraffic *bool `json:"allowRemoteVnetTraffic,omitempty"` - AllowVirtualWanTraffic *bool `json:"allowVirtualWanTraffic,omitempty"` - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - CustomRoutes *AddressSpace `json:"customRoutes,omitempty"` - DisableIPSecReplayProtection *bool `json:"disableIPSecReplayProtection,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - EnableDnsForwarding *bool `json:"enableDnsForwarding,omitempty"` - EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"` - GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` - GatewayType *VirtualNetworkGatewayType `json:"gatewayType,omitempty"` - IPConfigurations *[]VirtualNetworkGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - InboundDnsForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"` - NatRules *[]VirtualNetworkGatewayNatRule `json:"natRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Sku *VirtualNetworkGatewaySku `json:"sku,omitempty"` - VNetExtendedLocationResourceId *string `json:"vNetExtendedLocationResourceId,omitempty"` - VirtualNetworkGatewayPolicyGroups *[]VirtualNetworkGatewayPolicyGroup `json:"virtualNetworkGatewayPolicyGroups,omitempty"` - VpnClientConfiguration *VpnClientConfiguration `json:"vpnClientConfiguration,omitempty"` - VpnGatewayGeneration *VpnGatewayGeneration `json:"vpnGatewayGeneration,omitempty"` - VpnType *VpnType `json:"vpnType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaysku.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaysku.go deleted file mode 100644 index b96386d7651..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_virtualnetworkgatewaysku.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewaySku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *VirtualNetworkGatewaySkuName `json:"name,omitempty"` - Tier *VirtualNetworkGatewaySkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vngclientconnectionconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vngclientconnectionconfiguration.go deleted file mode 100644 index 44c61c02167..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vngclientconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VngClientConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VngClientConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vngclientconnectionconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vngclientconnectionconfigurationproperties.go deleted file mode 100644 index 8bf37c29734..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vngclientconnectionconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VngClientConnectionConfigurationProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkGatewayPolicyGroups []SubResource `json:"virtualNetworkGatewayPolicyGroups"` - VpnClientAddressPool AddressSpace `json:"vpnClientAddressPool"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconfiguration.go deleted file mode 100644 index 947582e3da9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconfiguration.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConfiguration struct { - AadAudience *string `json:"aadAudience,omitempty"` - AadIssuer *string `json:"aadIssuer,omitempty"` - AadTenant *string `json:"aadTenant,omitempty"` - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` - VngClientConnectionConfigurations *[]VngClientConnectionConfiguration `json:"vngClientConnectionConfigurations,omitempty"` - VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` - VpnClientIPsecPolicies *[]IPsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` - VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetail.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetail.go deleted file mode 100644 index c1bd5bd01b8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetail.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealthDetail struct { - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EgressPacketsTransferred *int64 `json:"egressPacketsTransferred,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - IngressPacketsTransferred *int64 `json:"ingressPacketsTransferred,omitempty"` - MaxBandwidth *int64 `json:"maxBandwidth,omitempty"` - MaxPacketsPerSecond *int64 `json:"maxPacketsPerSecond,omitempty"` - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` - VpnConnectionDuration *int64 `json:"vpnConnectionDuration,omitempty"` - VpnConnectionId *string `json:"vpnConnectionId,omitempty"` - VpnConnectionTime *string `json:"vpnConnectionTime,omitempty"` - VpnUserName *string `json:"vpnUserName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetaillistresult.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetaillistresult.go deleted file mode 100644 index d0c7c1a3f22..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientconnectionhealthdetaillistresult.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealthDetailListResult struct { - Value *[]VpnClientConnectionHealthDetail `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientipsecparameters.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientipsecparameters.go deleted file mode 100644 index d972e45d72e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientipsecparameters.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientIPsecParameters struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientparameters.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientparameters.go deleted file mode 100644 index dbfa84e1c67..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientparameters.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientParameters struct { - AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` - ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"` - ProcessorArchitecture *ProcessorArchitecture `json:"processorArchitecture,omitempty"` - RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrevokedcertificate.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrevokedcertificate.go deleted file mode 100644 index 2151e3bf02b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrevokedcertificate.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRevokedCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrevokedcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrevokedcertificatepropertiesformat.go deleted file mode 100644 index 9a5fb25ca9b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrevokedcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRevokedCertificatePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrootcertificate.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrootcertificate.go deleted file mode 100644 index db4850a95ff..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrootcertificate.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRootCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties VpnClientRootCertificatePropertiesFormat `json:"properties"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrootcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrootcertificatepropertiesformat.go deleted file mode 100644 index 4a44a811b2a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnclientrootcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientRootCertificatePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicCertData string `json:"publicCertData"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpndevicescriptparameters.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpndevicescriptparameters.go deleted file mode 100644 index 61ec4f46b54..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpndevicescriptparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnDeviceScriptParameters struct { - DeviceFamily *string `json:"deviceFamily,omitempty"` - FirmwareVersion *string `json:"firmwareVersion,omitempty"` - Vendor *string `json:"vendor,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnnatrulemapping.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnnatrulemapping.go deleted file mode 100644 index d903f625a58..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnnatrulemapping.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnNatRuleMapping struct { - AddressSpace *string `json:"addressSpace,omitempty"` - PortRange *string `json:"portRange,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnpacketcapturestartparameters.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnpacketcapturestartparameters.go deleted file mode 100644 index 014f699e436..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnpacketcapturestartparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnPacketCaptureStartParameters struct { - FilterData *string `json:"filterData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnpacketcapturestopparameters.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnpacketcapturestopparameters.go deleted file mode 100644 index 091426a3451..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/model_vpnpacketcapturestopparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnPacketCaptureStopParameters struct { - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/predicates.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/predicates.go deleted file mode 100644 index e03cad8f7b6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/predicates.go +++ /dev/null @@ -1,98 +0,0 @@ -package virtualnetworkgateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkGatewayOperationPredicate) Matches(input VirtualNetworkGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualNetworkGatewayConnectionListEntityOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkGatewayConnectionListEntityOperationPredicate) Matches(input VirtualNetworkGatewayConnectionListEntity) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualNetworkGatewayNatRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VirtualNetworkGatewayNatRuleOperationPredicate) Matches(input VirtualNetworkGatewayNatRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkgateways/version.go b/resource-manager/network/2022-11-01/virtualnetworkgateways/version.go deleted file mode 100644 index be09f61f6bc..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkgateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkgateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkgateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/README.md b/resource-manager/network/2022-11-01/virtualnetworkpeerings/README.md deleted file mode 100644 index d464a13bc21..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworkpeerings` Documentation - -The `virtualnetworkpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworkpeerings" -``` - - -### Client Initialization - -```go -client := virtualnetworkpeerings.NewVirtualNetworkPeeringsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkPeeringsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworkpeerings.NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue") - -payload := virtualnetworkpeerings.VirtualNetworkPeering{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload, virtualnetworkpeerings.DefaultCreateOrUpdateOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkPeeringsClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworkpeerings.NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkPeeringsClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworkpeerings.NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkPeeringsClient.List` - -```go -ctx := context.TODO() -id := virtualnetworkpeerings.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/client.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/client.go deleted file mode 100644 index becd896b345..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworkpeerings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeeringsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkPeeringsClientWithBaseURI(api environments.Api) (*VirtualNetworkPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworkpeerings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkPeeringsClient: %+v", err) - } - - return &VirtualNetworkPeeringsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/constants.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/constants.go deleted file mode 100644 index 0cb41da70fc..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/constants.go +++ /dev/null @@ -1,227 +0,0 @@ -package virtualnetworkpeerings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type SyncRemoteAddressSpace string - -const ( - SyncRemoteAddressSpaceTrue SyncRemoteAddressSpace = "true" -) - -func PossibleValuesForSyncRemoteAddressSpace() []string { - return []string{ - string(SyncRemoteAddressSpaceTrue), - } -} - -func (s *SyncRemoteAddressSpace) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSyncRemoteAddressSpace(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSyncRemoteAddressSpace(input string) (*SyncRemoteAddressSpace, error) { - vals := map[string]SyncRemoteAddressSpace{ - "true": SyncRemoteAddressSpaceTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SyncRemoteAddressSpace(input) - return &out, nil -} - -type VirtualNetworkEncryptionEnforcement string - -const ( - VirtualNetworkEncryptionEnforcementAllowUnencrypted VirtualNetworkEncryptionEnforcement = "AllowUnencrypted" - VirtualNetworkEncryptionEnforcementDropUnencrypted VirtualNetworkEncryptionEnforcement = "DropUnencrypted" -) - -func PossibleValuesForVirtualNetworkEncryptionEnforcement() []string { - return []string{ - string(VirtualNetworkEncryptionEnforcementAllowUnencrypted), - string(VirtualNetworkEncryptionEnforcementDropUnencrypted), - } -} - -func (s *VirtualNetworkEncryptionEnforcement) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkEncryptionEnforcement(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkEncryptionEnforcement(input string) (*VirtualNetworkEncryptionEnforcement, error) { - vals := map[string]VirtualNetworkEncryptionEnforcement{ - "allowunencrypted": VirtualNetworkEncryptionEnforcementAllowUnencrypted, - "dropunencrypted": VirtualNetworkEncryptionEnforcementDropUnencrypted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkEncryptionEnforcement(input) - return &out, nil -} - -type VirtualNetworkPeeringLevel string - -const ( - VirtualNetworkPeeringLevelFullyInSync VirtualNetworkPeeringLevel = "FullyInSync" - VirtualNetworkPeeringLevelLocalAndRemoteNotInSync VirtualNetworkPeeringLevel = "LocalAndRemoteNotInSync" - VirtualNetworkPeeringLevelLocalNotInSync VirtualNetworkPeeringLevel = "LocalNotInSync" - VirtualNetworkPeeringLevelRemoteNotInSync VirtualNetworkPeeringLevel = "RemoteNotInSync" -) - -func PossibleValuesForVirtualNetworkPeeringLevel() []string { - return []string{ - string(VirtualNetworkPeeringLevelFullyInSync), - string(VirtualNetworkPeeringLevelLocalAndRemoteNotInSync), - string(VirtualNetworkPeeringLevelLocalNotInSync), - string(VirtualNetworkPeeringLevelRemoteNotInSync), - } -} - -func (s *VirtualNetworkPeeringLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPeeringLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPeeringLevel(input string) (*VirtualNetworkPeeringLevel, error) { - vals := map[string]VirtualNetworkPeeringLevel{ - "fullyinsync": VirtualNetworkPeeringLevelFullyInSync, - "localandremotenotinsync": VirtualNetworkPeeringLevelLocalAndRemoteNotInSync, - "localnotinsync": VirtualNetworkPeeringLevelLocalNotInSync, - "remotenotinsync": VirtualNetworkPeeringLevelRemoteNotInSync, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPeeringLevel(input) - return &out, nil -} - -type VirtualNetworkPeeringState string - -const ( - VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" - VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" - VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" -) - -func PossibleValuesForVirtualNetworkPeeringState() []string { - return []string{ - string(VirtualNetworkPeeringStateConnected), - string(VirtualNetworkPeeringStateDisconnected), - string(VirtualNetworkPeeringStateInitiated), - } -} - -func (s *VirtualNetworkPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPeeringState(input string) (*VirtualNetworkPeeringState, error) { - vals := map[string]VirtualNetworkPeeringState{ - "connected": VirtualNetworkPeeringStateConnected, - "disconnected": VirtualNetworkPeeringStateDisconnected, - "initiated": VirtualNetworkPeeringStateInitiated, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPeeringState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/id_virtualnetworkpeering.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/id_virtualnetworkpeering.go deleted file mode 100644 index aaaf017cf07..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/id_virtualnetworkpeering.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualnetworkpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkPeeringId{} - -// VirtualNetworkPeeringId is a struct representing the Resource ID for a Virtual Network Peering -type VirtualNetworkPeeringId struct { - SubscriptionId string - ResourceGroupName string - VirtualNetworkName string - VirtualNetworkPeeringName string -} - -// NewVirtualNetworkPeeringID returns a new VirtualNetworkPeeringId struct -func NewVirtualNetworkPeeringID(subscriptionId string, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) VirtualNetworkPeeringId { - return VirtualNetworkPeeringId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualNetworkName: virtualNetworkName, - VirtualNetworkPeeringName: virtualNetworkPeeringName, - } -} - -// ParseVirtualNetworkPeeringID parses 'input' into a VirtualNetworkPeeringId -func ParseVirtualNetworkPeeringID(input string) (*VirtualNetworkPeeringId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkPeeringId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkPeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkName, ok = parsed.Parsed["virtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", *parsed) - } - - if id.VirtualNetworkPeeringName, ok = parsed.Parsed["virtualNetworkPeeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", *parsed) - } - - return &id, nil -} - -// ParseVirtualNetworkPeeringIDInsensitively parses 'input' case-insensitively into a VirtualNetworkPeeringId -// note: this method should only be used for API response data and not user input -func ParseVirtualNetworkPeeringIDInsensitively(input string) (*VirtualNetworkPeeringId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkPeeringId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkPeeringId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkName, ok = parsed.Parsed["virtualNetworkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkName", *parsed) - } - - if id.VirtualNetworkPeeringName, ok = parsed.Parsed["virtualNetworkPeeringName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkPeeringName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualNetworkPeeringID checks that 'input' can be parsed as a Virtual Network Peering ID -func ValidateVirtualNetworkPeeringID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualNetworkPeeringID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Network Peering ID -func (id VirtualNetworkPeeringId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s/virtualNetworkPeerings/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualNetworkName, id.VirtualNetworkPeeringName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Network Peering ID -func (id VirtualNetworkPeeringId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualNetworks", "virtualNetworks", "virtualNetworks"), - resourceids.UserSpecifiedSegment("virtualNetworkName", "virtualNetworkValue"), - resourceids.StaticSegment("staticVirtualNetworkPeerings", "virtualNetworkPeerings", "virtualNetworkPeerings"), - resourceids.UserSpecifiedSegment("virtualNetworkPeeringName", "virtualNetworkPeeringValue"), - } -} - -// String returns a human-readable description of this Virtual Network Peering ID -func (id VirtualNetworkPeeringId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Network Name: %q", id.VirtualNetworkName), - fmt.Sprintf("Virtual Network Peering Name: %q", id.VirtualNetworkPeeringName), - } - return fmt.Sprintf("Virtual Network Peering (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/id_virtualnetworkpeering_test.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/id_virtualnetworkpeering_test.go deleted file mode 100644 index 3b574d37ed3..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/id_virtualnetworkpeering_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualnetworkpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkPeeringId{} - -func TestNewVirtualNetworkPeeringID(t *testing.T) { - id := NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualNetworkName != "virtualNetworkValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkName'", id.VirtualNetworkName, "virtualNetworkValue") - } - - if id.VirtualNetworkPeeringName != "virtualNetworkPeeringValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkPeeringName'", id.VirtualNetworkPeeringName, "virtualNetworkPeeringValue") - } -} - -func TestFormatVirtualNetworkPeeringID(t *testing.T) { - actual := NewVirtualNetworkPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "virtualNetworkPeeringValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualNetworkPeeringID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkPeeringId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue", - Expected: &VirtualNetworkPeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkName: "virtualNetworkValue", - VirtualNetworkPeeringName: "virtualNetworkPeeringValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkPeeringID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkName != v.Expected.VirtualNetworkName { - t.Fatalf("Expected %q but got %q for VirtualNetworkName", v.Expected.VirtualNetworkName, actual.VirtualNetworkName) - } - - if actual.VirtualNetworkPeeringName != v.Expected.VirtualNetworkPeeringName { - t.Fatalf("Expected %q but got %q for VirtualNetworkPeeringName", v.Expected.VirtualNetworkPeeringName, actual.VirtualNetworkPeeringName) - } - - } -} - -func TestParseVirtualNetworkPeeringIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkPeeringId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs/vIrTuAlNeTwOrKvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs/vIrTuAlNeTwOrKvAlUe/vIrTuAlNeTwOrKpEeRiNgS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue", - Expected: &VirtualNetworkPeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkName: "virtualNetworkValue", - VirtualNetworkPeeringName: "virtualNetworkPeeringValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworks/virtualNetworkValue/virtualNetworkPeerings/virtualNetworkPeeringValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs/vIrTuAlNeTwOrKvAlUe/vIrTuAlNeTwOrKpEeRiNgS/vIrTuAlNeTwOrKpEeRiNgVaLuE", - Expected: &VirtualNetworkPeeringId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualNetworkName: "vIrTuAlNeTwOrKvAlUe", - VirtualNetworkPeeringName: "vIrTuAlNeTwOrKpEeRiNgVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKs/vIrTuAlNeTwOrKvAlUe/vIrTuAlNeTwOrKpEeRiNgS/vIrTuAlNeTwOrKpEeRiNgVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkPeeringIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkName != v.Expected.VirtualNetworkName { - t.Fatalf("Expected %q but got %q for VirtualNetworkName", v.Expected.VirtualNetworkName, actual.VirtualNetworkName) - } - - if actual.VirtualNetworkPeeringName != v.Expected.VirtualNetworkPeeringName { - t.Fatalf("Expected %q but got %q for VirtualNetworkPeeringName", v.Expected.VirtualNetworkPeeringName, actual.VirtualNetworkPeeringName) - } - - } -} - -func TestSegmentsForVirtualNetworkPeeringId(t *testing.T) { - segments := VirtualNetworkPeeringId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualNetworkPeeringId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_createorupdate.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_createorupdate.go deleted file mode 100644 index 705f6d3f092..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_createorupdate.go +++ /dev/null @@ -1,102 +0,0 @@ -package virtualnetworkpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type CreateOrUpdateOperationOptions struct { - SyncRemoteAddressSpace *SyncRemoteAddressSpace -} - -func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions { - return CreateOrUpdateOperationOptions{} -} - -func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.SyncRemoteAddressSpace != nil { - out.Append("syncRemoteAddressSpace", fmt.Sprintf("%v", *o.SyncRemoteAddressSpace)) - } - return &out -} - -// CreateOrUpdate ... -func (c VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, id VirtualNetworkPeeringId, input VirtualNetworkPeering, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworkPeeringsClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkPeeringId, input VirtualNetworkPeering, options CreateOrUpdateOperationOptions) error { - result, err := c.CreateOrUpdate(ctx, id, input, options) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_delete.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_delete.go deleted file mode 100644 index 0d0ded252a4..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworkpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworkPeeringsClient) Delete(ctx context.Context, id VirtualNetworkPeeringId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworkPeeringsClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkPeeringId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_get.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_get.go deleted file mode 100644 index bd83fb76d79..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworkpeerings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkPeering -} - -// Get ... -func (c VirtualNetworkPeeringsClient) Get(ctx context.Context, id VirtualNetworkPeeringId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_list.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_list.go deleted file mode 100644 index ad8e9a444c7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworkpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkPeering -} - -type ListCompleteResult struct { - Items []VirtualNetworkPeering -} - -// List ... -func (c VirtualNetworkPeeringsClient) List(ctx context.Context, id commonids.VirtualNetworkId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/virtualNetworkPeerings", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkPeering `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualNetworkPeeringsClient) ListComplete(ctx context.Context, id commonids.VirtualNetworkId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualNetworkPeeringOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkPeeringsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, predicate VirtualNetworkPeeringOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualNetworkPeering, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_addressspace.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_addressspace.go deleted file mode 100644 index dadfe5be0b5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_subresource.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_subresource.go deleted file mode 100644 index 07cc63aadbb..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkbgpcommunities.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkbgpcommunities.go deleted file mode 100644 index a1302f81779..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkbgpcommunities.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkBgpCommunities struct { - RegionalCommunity *string `json:"regionalCommunity,omitempty"` - VirtualNetworkCommunity string `json:"virtualNetworkCommunity"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkencryption.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkencryption.go deleted file mode 100644 index 82989ac5992..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkencryption.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkEncryption struct { - Enabled bool `json:"enabled"` - Enforcement *VirtualNetworkEncryptionEnforcement `json:"enforcement,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkpeering.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkpeering.go deleted file mode 100644 index 4b0c5a50abf..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkpeeringpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkpeeringpropertiesformat.go deleted file mode 100644 index c7f9534bb15..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/model_virtualnetworkpeeringpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeeringPropertiesFormat struct { - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` - DoNotVerifyRemoteGateways *bool `json:"doNotVerifyRemoteGateways,omitempty"` - PeeringState *VirtualNetworkPeeringState `json:"peeringState,omitempty"` - PeeringSyncLevel *VirtualNetworkPeeringLevel `json:"peeringSyncLevel,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` - RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"` - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - RemoteVirtualNetworkAddressSpace *AddressSpace `json:"remoteVirtualNetworkAddressSpace,omitempty"` - RemoteVirtualNetworkEncryption *VirtualNetworkEncryption `json:"remoteVirtualNetworkEncryption,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/predicates.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/predicates.go deleted file mode 100644 index a945839e0b2..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package virtualnetworkpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeeringOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VirtualNetworkPeeringOperationPredicate) Matches(input VirtualNetworkPeering) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualnetworkpeerings/version.go b/resource-manager/network/2022-11-01/virtualnetworkpeerings/version.go deleted file mode 100644 index c8856fc33a7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworkpeerings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworkpeerings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworkpeerings/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/README.md b/resource-manager/network/2022-11-01/virtualnetworks/README.md deleted file mode 100644 index 7bc4375672b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/README.md +++ /dev/null @@ -1,236 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworks` Documentation - -The `virtualnetworks` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworks" -``` - - -### Client Initialization - -```go -client := virtualnetworks.NewVirtualNetworksClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworksClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -payload := virtualnetworks.VirtualNetwork{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworksClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworksClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -read, err := client.Get(ctx, id, virtualnetworks.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.List` - -```go -ctx := context.TODO() -id := virtualnetworks.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworksClient.ListAll` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworksClient.ResourceNavigationLinksList` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -read, err := client.ResourceNavigationLinksList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.ServiceAssociationLinksList` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -read, err := client.ServiceAssociationLinksList(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.SubnetsPrepareNetworkPolicies` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -payload := virtualnetworks.PrepareNetworkPoliciesRequest{ - // ... -} - - -if err := client.SubnetsPrepareNetworkPoliciesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworksClient.SubnetsUnprepareNetworkPolicies` - -```go -ctx := context.TODO() -id := virtualnetworks.NewSubnetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue", "subnetValue") - -payload := virtualnetworks.UnprepareNetworkPoliciesRequest{ - // ... -} - - -if err := client.SubnetsUnprepareNetworkPoliciesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworksClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -payload := virtualnetworks.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.VirtualNetworksCheckIPAddressAvailability` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -read, err := client.VirtualNetworksCheckIPAddressAvailability(ctx, id, virtualnetworks.DefaultVirtualNetworksCheckIPAddressAvailabilityOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworksClient.VirtualNetworksListDdosProtectionStatus` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -// alternatively `client.VirtualNetworksListDdosProtectionStatus(ctx, id, virtualnetworks.DefaultVirtualNetworksListDdosProtectionStatusOperationOptions())` can be used to do batched pagination -items, err := client.VirtualNetworksListDdosProtectionStatusComplete(ctx, id, virtualnetworks.DefaultVirtualNetworksListDdosProtectionStatusOperationOptions()) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworksClient.VirtualNetworksListUsage` - -```go -ctx := context.TODO() -id := virtualnetworks.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue") - -// alternatively `client.VirtualNetworksListUsage(ctx, id)` can be used to do batched pagination -items, err := client.VirtualNetworksListUsageComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/virtualnetworks/client.go b/resource-manager/network/2022-11-01/virtualnetworks/client.go deleted file mode 100644 index c274c9c87de..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworks - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworksClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworksClientWithBaseURI(api environments.Api) (*VirtualNetworksClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworks", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworksClient: %+v", err) - } - - return &VirtualNetworksClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/constants.go b/resource-manager/network/2022-11-01/virtualnetworks/constants.go deleted file mode 100644 index d350f66d24a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/constants.go +++ /dev/null @@ -1,1283 +0,0 @@ -package virtualnetworks - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type IsWorkloadProtected string - -const ( - IsWorkloadProtectedFalse IsWorkloadProtected = "False" - IsWorkloadProtectedTrue IsWorkloadProtected = "True" -) - -func PossibleValuesForIsWorkloadProtected() []string { - return []string{ - string(IsWorkloadProtectedFalse), - string(IsWorkloadProtectedTrue), - } -} - -func (s *IsWorkloadProtected) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIsWorkloadProtected(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIsWorkloadProtected(input string) (*IsWorkloadProtected, error) { - vals := map[string]IsWorkloadProtected{ - "false": IsWorkloadProtectedFalse, - "true": IsWorkloadProtectedTrue, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IsWorkloadProtected(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkEncryptionEnforcement string - -const ( - VirtualNetworkEncryptionEnforcementAllowUnencrypted VirtualNetworkEncryptionEnforcement = "AllowUnencrypted" - VirtualNetworkEncryptionEnforcementDropUnencrypted VirtualNetworkEncryptionEnforcement = "DropUnencrypted" -) - -func PossibleValuesForVirtualNetworkEncryptionEnforcement() []string { - return []string{ - string(VirtualNetworkEncryptionEnforcementAllowUnencrypted), - string(VirtualNetworkEncryptionEnforcementDropUnencrypted), - } -} - -func (s *VirtualNetworkEncryptionEnforcement) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkEncryptionEnforcement(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkEncryptionEnforcement(input string) (*VirtualNetworkEncryptionEnforcement, error) { - vals := map[string]VirtualNetworkEncryptionEnforcement{ - "allowunencrypted": VirtualNetworkEncryptionEnforcementAllowUnencrypted, - "dropunencrypted": VirtualNetworkEncryptionEnforcementDropUnencrypted, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkEncryptionEnforcement(input) - return &out, nil -} - -type VirtualNetworkPeeringLevel string - -const ( - VirtualNetworkPeeringLevelFullyInSync VirtualNetworkPeeringLevel = "FullyInSync" - VirtualNetworkPeeringLevelLocalAndRemoteNotInSync VirtualNetworkPeeringLevel = "LocalAndRemoteNotInSync" - VirtualNetworkPeeringLevelLocalNotInSync VirtualNetworkPeeringLevel = "LocalNotInSync" - VirtualNetworkPeeringLevelRemoteNotInSync VirtualNetworkPeeringLevel = "RemoteNotInSync" -) - -func PossibleValuesForVirtualNetworkPeeringLevel() []string { - return []string{ - string(VirtualNetworkPeeringLevelFullyInSync), - string(VirtualNetworkPeeringLevelLocalAndRemoteNotInSync), - string(VirtualNetworkPeeringLevelLocalNotInSync), - string(VirtualNetworkPeeringLevelRemoteNotInSync), - } -} - -func (s *VirtualNetworkPeeringLevel) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPeeringLevel(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPeeringLevel(input string) (*VirtualNetworkPeeringLevel, error) { - vals := map[string]VirtualNetworkPeeringLevel{ - "fullyinsync": VirtualNetworkPeeringLevelFullyInSync, - "localandremotenotinsync": VirtualNetworkPeeringLevelLocalAndRemoteNotInSync, - "localnotinsync": VirtualNetworkPeeringLevelLocalNotInSync, - "remotenotinsync": VirtualNetworkPeeringLevelRemoteNotInSync, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPeeringLevel(input) - return &out, nil -} - -type VirtualNetworkPeeringState string - -const ( - VirtualNetworkPeeringStateConnected VirtualNetworkPeeringState = "Connected" - VirtualNetworkPeeringStateDisconnected VirtualNetworkPeeringState = "Disconnected" - VirtualNetworkPeeringStateInitiated VirtualNetworkPeeringState = "Initiated" -) - -func PossibleValuesForVirtualNetworkPeeringState() []string { - return []string{ - string(VirtualNetworkPeeringStateConnected), - string(VirtualNetworkPeeringStateDisconnected), - string(VirtualNetworkPeeringStateInitiated), - } -} - -func (s *VirtualNetworkPeeringState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPeeringState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPeeringState(input string) (*VirtualNetworkPeeringState, error) { - vals := map[string]VirtualNetworkPeeringState{ - "connected": VirtualNetworkPeeringStateConnected, - "disconnected": VirtualNetworkPeeringStateDisconnected, - "initiated": VirtualNetworkPeeringStateInitiated, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPeeringState(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_createorupdate.go b/resource-manager/network/2022-11-01/virtualnetworks/method_createorupdate.go deleted file mode 100644 index 4b2992b2c9c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualNetworksClient) CreateOrUpdate(ctx context.Context, id commonids.VirtualNetworkId, input VirtualNetwork) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworksClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualNetworkId, input VirtualNetwork) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_delete.go b/resource-manager/network/2022-11-01/virtualnetworks/method_delete.go deleted file mode 100644 index 53212cd5aba..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworksClient) Delete(ctx context.Context, id commonids.VirtualNetworkId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworksClient) DeleteThenPoll(ctx context.Context, id commonids.VirtualNetworkId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_get.go b/resource-manager/network/2022-11-01/virtualnetworks/method_get.go deleted file mode 100644 index 3c63f6e1f3e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_get.go +++ /dev/null @@ -1,81 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetwork -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c VirtualNetworksClient) Get(ctx context.Context, id commonids.VirtualNetworkId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_list.go b/resource-manager/network/2022-11-01/virtualnetworks/method_list.go deleted file mode 100644 index 61ed068daaf..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetwork -} - -type ListCompleteResult struct { - Items []VirtualNetwork -} - -// List ... -func (c VirtualNetworksClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetwork `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualNetworksClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualNetworkOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworksClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualNetworkOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualNetwork, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_listall.go b/resource-manager/network/2022-11-01/virtualnetworks/method_listall.go deleted file mode 100644 index 449dbc671f9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetwork -} - -type ListAllCompleteResult struct { - Items []VirtualNetwork -} - -// ListAll ... -func (c VirtualNetworksClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetwork `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c VirtualNetworksClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, VirtualNetworkOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworksClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualNetworkOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]VirtualNetwork, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_resourcenavigationlinkslist.go b/resource-manager/network/2022-11-01/virtualnetworks/method_resourcenavigationlinkslist.go deleted file mode 100644 index 985a51cbc4a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_resourcenavigationlinkslist.go +++ /dev/null @@ -1,53 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinksListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ResourceNavigationLinksListResult -} - -// ResourceNavigationLinksList ... -func (c VirtualNetworksClient) ResourceNavigationLinksList(ctx context.Context, id commonids.SubnetId) (result ResourceNavigationLinksListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/resourceNavigationLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_serviceassociationlinkslist.go b/resource-manager/network/2022-11-01/virtualnetworks/method_serviceassociationlinkslist.go deleted file mode 100644 index c80b23963bf..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_serviceassociationlinkslist.go +++ /dev/null @@ -1,53 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinksListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *ServiceAssociationLinksListResult -} - -// ServiceAssociationLinksList ... -func (c VirtualNetworksClient) ServiceAssociationLinksList(ctx context.Context, id commonids.SubnetId) (result ServiceAssociationLinksListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/serviceAssociationLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_subnetspreparenetworkpolicies.go b/resource-manager/network/2022-11-01/virtualnetworks/method_subnetspreparenetworkpolicies.go deleted file mode 100644 index b42b121f904..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_subnetspreparenetworkpolicies.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetsPrepareNetworkPoliciesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SubnetsPrepareNetworkPolicies ... -func (c VirtualNetworksClient) SubnetsPrepareNetworkPolicies(ctx context.Context, id commonids.SubnetId, input PrepareNetworkPoliciesRequest) (result SubnetsPrepareNetworkPoliciesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/prepareNetworkPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SubnetsPrepareNetworkPoliciesThenPoll performs SubnetsPrepareNetworkPolicies then polls until it's completed -func (c VirtualNetworksClient) SubnetsPrepareNetworkPoliciesThenPoll(ctx context.Context, id commonids.SubnetId, input PrepareNetworkPoliciesRequest) error { - result, err := c.SubnetsPrepareNetworkPolicies(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SubnetsPrepareNetworkPolicies: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SubnetsPrepareNetworkPolicies: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_subnetsunpreparenetworkpolicies.go b/resource-manager/network/2022-11-01/virtualnetworks/method_subnetsunpreparenetworkpolicies.go deleted file mode 100644 index 69a0e33a2c8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_subnetsunpreparenetworkpolicies.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetsUnprepareNetworkPoliciesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// SubnetsUnprepareNetworkPolicies ... -func (c VirtualNetworksClient) SubnetsUnprepareNetworkPolicies(ctx context.Context, id commonids.SubnetId, input UnprepareNetworkPoliciesRequest) (result SubnetsUnprepareNetworkPoliciesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/unprepareNetworkPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// SubnetsUnprepareNetworkPoliciesThenPoll performs SubnetsUnprepareNetworkPolicies then polls until it's completed -func (c VirtualNetworksClient) SubnetsUnprepareNetworkPoliciesThenPoll(ctx context.Context, id commonids.SubnetId, input UnprepareNetworkPoliciesRequest) error { - result, err := c.SubnetsUnprepareNetworkPolicies(ctx, id, input) - if err != nil { - return fmt.Errorf("performing SubnetsUnprepareNetworkPolicies: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after SubnetsUnprepareNetworkPolicies: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_updatetags.go b/resource-manager/network/2022-11-01/virtualnetworks/method_updatetags.go deleted file mode 100644 index 717bb61aa72..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_updatetags.go +++ /dev/null @@ -1,56 +0,0 @@ -package virtualnetworks - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetwork -} - -// UpdateTags ... -func (c VirtualNetworksClient) UpdateTags(ctx context.Context, id commonids.VirtualNetworkId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go b/resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go deleted file mode 100644 index 0567355dd14..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkscheckipaddressavailability.go +++ /dev/null @@ -1,81 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworksCheckIPAddressAvailabilityOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *IPAddressAvailabilityResult -} - -type VirtualNetworksCheckIPAddressAvailabilityOperationOptions struct { - IPAddress *string -} - -func DefaultVirtualNetworksCheckIPAddressAvailabilityOperationOptions() VirtualNetworksCheckIPAddressAvailabilityOperationOptions { - return VirtualNetworksCheckIPAddressAvailabilityOperationOptions{} -} - -func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o VirtualNetworksCheckIPAddressAvailabilityOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.IPAddress != nil { - out.Append("ipAddress", fmt.Sprintf("%v", *o.IPAddress)) - } - return &out -} - -// VirtualNetworksCheckIPAddressAvailability ... -func (c VirtualNetworksClient) VirtualNetworksCheckIPAddressAvailability(ctx context.Context, id commonids.VirtualNetworkId, options VirtualNetworksCheckIPAddressAvailabilityOperationOptions) (result VirtualNetworksCheckIPAddressAvailabilityOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/checkIPAddressAvailability", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go b/resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go deleted file mode 100644 index 9bc1ee99d76..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkslistddosprotectionstatus.go +++ /dev/null @@ -1,117 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworksListDdosProtectionStatusOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPDdosProtectionStatusResult -} - -type VirtualNetworksListDdosProtectionStatusCompleteResult struct { - Items []PublicIPDdosProtectionStatusResult -} - -type VirtualNetworksListDdosProtectionStatusOperationOptions struct { - SkipToken *string - Top *int64 -} - -func DefaultVirtualNetworksListDdosProtectionStatusOperationOptions() VirtualNetworksListDdosProtectionStatusOperationOptions { - return VirtualNetworksListDdosProtectionStatusOperationOptions{} -} - -func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o VirtualNetworksListDdosProtectionStatusOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.SkipToken != nil { - out.Append("skipToken", fmt.Sprintf("%v", *o.SkipToken)) - } - if o.Top != nil { - out.Append("top", fmt.Sprintf("%v", *o.Top)) - } - return &out -} - -// VirtualNetworksListDdosProtectionStatus ... -func (c VirtualNetworksClient) VirtualNetworksListDdosProtectionStatus(ctx context.Context, id commonids.VirtualNetworkId, options VirtualNetworksListDdosProtectionStatusOperationOptions) (result VirtualNetworksListDdosProtectionStatusOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/ddosProtectionStatus", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPDdosProtectionStatusResult `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualNetworksListDdosProtectionStatusThenPoll performs VirtualNetworksListDdosProtectionStatus then polls until it's completed -func (c VirtualNetworksClient) VirtualNetworksListDdosProtectionStatusThenPoll(ctx context.Context, id commonids.VirtualNetworkId, options VirtualNetworksListDdosProtectionStatusOperationOptions) error { - result, err := c.VirtualNetworksListDdosProtectionStatus(ctx, id, options) - if err != nil { - return fmt.Errorf("performing VirtualNetworksListDdosProtectionStatus: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualNetworksListDdosProtectionStatus: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkslistusage.go b/resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkslistusage.go deleted file mode 100644 index 19ece360ae9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/method_virtualnetworkslistusage.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworks - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworksListUsageOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkUsage -} - -type VirtualNetworksListUsageCompleteResult struct { - Items []VirtualNetworkUsage -} - -// VirtualNetworksListUsage ... -func (c VirtualNetworksClient) VirtualNetworksListUsage(ctx context.Context, id commonids.VirtualNetworkId) (result VirtualNetworksListUsageOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/usages", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkUsage `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualNetworksListUsageComplete retrieves all the results into a single object -func (c VirtualNetworksClient) VirtualNetworksListUsageComplete(ctx context.Context, id commonids.VirtualNetworkId) (VirtualNetworksListUsageCompleteResult, error) { - return c.VirtualNetworksListUsageCompleteMatchingPredicate(ctx, id, VirtualNetworkUsageOperationPredicate{}) -} - -// VirtualNetworksListUsageCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworksClient) VirtualNetworksListUsageCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, predicate VirtualNetworkUsageOperationPredicate) (result VirtualNetworksListUsageCompleteResult, err error) { - items := make([]VirtualNetworkUsage, 0) - - resp, err := c.VirtualNetworksListUsage(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualNetworksListUsageCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_addressspace.go b/resource-manager/network/2022-11-01/virtualnetworks/model_addressspace.go deleted file mode 100644 index 9e0e23e9145..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 3f9607979a8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 6f399a7bf5d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 953789d1f3e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 3da3cb7d9c8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index d9d39242c2b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/virtualnetworks/model_applicationsecuritygroup.go deleted file mode 100644 index 8069aeaaf35..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 29a50229369..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_backendaddresspool.go b/resource-manager/network/2022-11-01/virtualnetworks/model_backendaddresspool.go deleted file mode 100644 index dca54b5ff44..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index af9dbefab27..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 4608979dcd2..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_ddossettings.go b/resource-manager/network/2022-11-01/virtualnetworks/model_ddossettings.go deleted file mode 100644 index 1a0ce5cf3aa..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_delegation.go b/resource-manager/network/2022-11-01/virtualnetworks/model_delegation.go deleted file mode 100644 index a8d0d243017..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_dhcpoptions.go b/resource-manager/network/2022-11-01/virtualnetworks/model_dhcpoptions.go deleted file mode 100644 index 2e389bf9503..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_dhcpoptions.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DhcpOptions struct { - DnsServers *[]string `json:"dnsServers,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_flowlog.go b/resource-manager/network/2022-11-01/virtualnetworks/model_flowlog.go deleted file mode 100644 index b920c2a5d05..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/virtualnetworks/model_flowlogformatparameters.go deleted file mode 100644 index 62b8c967d59..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_flowlogpropertiesformat.go deleted file mode 100644 index 46ad7cc1502..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworks/model_frontendipconfiguration.go deleted file mode 100644 index 4b7f7549a8a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 7f51afc745f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/virtualnetworks/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index ef3318f49d4..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_inboundnatrule.go b/resource-manager/network/2022-11-01/virtualnetworks/model_inboundnatrule.go deleted file mode 100644 index 20f0e56c966..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 8ca3d3cee59..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_ipaddressavailabilityresult.go b/resource-manager/network/2022-11-01/virtualnetworks/model_ipaddressavailabilityresult.go deleted file mode 100644 index 2db5fbd90fa..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_ipaddressavailabilityresult.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPAddressAvailabilityResult struct { - Available *bool `json:"available,omitempty"` - AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` - IsPlatformReserved *bool `json:"isPlatformReserved,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfiguration.go deleted file mode 100644 index 7fc81013c87..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationprofile.go deleted file mode 100644 index 246a7d2784a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1c15860eaa4..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 5f7e978b372..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_iptag.go b/resource-manager/network/2022-11-01/virtualnetworks/model_iptag.go deleted file mode 100644 index 5f312015c16..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/virtualnetworks/model_loadbalancerbackendaddress.go deleted file mode 100644 index f84e6394098..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 5b16669363a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_natgateway.go b/resource-manager/network/2022-11-01/virtualnetworks/model_natgateway.go deleted file mode 100644 index e2a2c9ea1aa..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_natgatewaypropertiesformat.go deleted file mode 100644 index 11bdb034e9d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_natgatewaysku.go b/resource-manager/network/2022-11-01/virtualnetworks/model_natgatewaysku.go deleted file mode 100644 index 3375ec20625..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_natruleportmapping.go b/resource-manager/network/2022-11-01/virtualnetworks/model_natruleportmapping.go deleted file mode 100644 index c1f6eb9d264..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkintentpolicy.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkintentpolicy.go deleted file mode 100644 index 565f4c702ee..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkintentpolicy.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkIntentPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkintentpolicyconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkintentpolicyconfiguration.go deleted file mode 100644 index 3f3080bf421..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkintentpolicyconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkIntentPolicyConfiguration struct { - NetworkIntentPolicyName *string `json:"networkIntentPolicyName,omitempty"` - SourceNetworkIntentPolicy *NetworkIntentPolicy `json:"sourceNetworkIntentPolicy,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterface.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterface.go deleted file mode 100644 index 51266c314db..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacednssettings.go deleted file mode 100644 index 35b796d58ea..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfiguration.go deleted file mode 100644 index e4fe127f68f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 0cf1411b04e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index d36857278bf..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacepropertiesformat.go deleted file mode 100644 index f38dee01e75..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 7ee2c196852..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index f37548acc09..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networksecuritygroup.go deleted file mode 100644 index c6ffd2de200..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index bdaff37d6ec..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_preparenetworkpoliciesrequest.go b/resource-manager/network/2022-11-01/virtualnetworks/model_preparenetworkpoliciesrequest.go deleted file mode 100644 index af5d6a6061c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_preparenetworkpoliciesrequest.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrepareNetworkPoliciesRequest struct { - NetworkIntentPolicyConfigurations *[]NetworkIntentPolicyConfiguration `json:"networkIntentPolicyConfigurations,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpoint.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpoint.go deleted file mode 100644 index a21e2003c7b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointconnection.go deleted file mode 100644 index 03c0943acbe..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointconnectionproperties.go deleted file mode 100644 index badbc227dee..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointipconfiguration.go deleted file mode 100644 index b8c8c0e51e2..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 0e1ea69495c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointproperties.go deleted file mode 100644 index c204c6f06f5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkservice.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkservice.go deleted file mode 100644 index ea60905675d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnection.go deleted file mode 100644 index 45640ebd97e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index ece1141c4d0..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 498d4f92f9a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index b637ed217b5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 7c3080b30c1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceproperties.go deleted file mode 100644 index e187bf8454c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddress.go b/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddress.go deleted file mode 100644 index 5eef47c77e3..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddressdnssettings.go deleted file mode 100644 index 1e10d9bb32a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddresspropertiesformat.go deleted file mode 100644 index f38386b9fd0..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddresssku.go deleted file mode 100644 index f080c20b33e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipddosprotectionstatusresult.go b/resource-manager/network/2022-11-01/virtualnetworks/model_publicipddosprotectionstatusresult.go deleted file mode 100644 index ca0f8cc894f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_publicipddosprotectionstatusresult.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPDdosProtectionStatusResult struct { - DdosProtectionPlanId *string `json:"ddosProtectionPlanId,omitempty"` - IsWorkloadProtected *IsWorkloadProtected `json:"isWorkloadProtected,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` - PublicIPAddressId *string `json:"publicIpAddressId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlink.go deleted file mode 100644 index e26d27c7784..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlinkformat.go deleted file mode 100644 index 5c0bb30457e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlinkslistresult.go b/resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlinkslistresult.go deleted file mode 100644 index 2aea67db63f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_resourcenavigationlinkslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinksListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ResourceNavigationLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_resourceset.go b/resource-manager/network/2022-11-01/virtualnetworks/model_resourceset.go deleted file mode 100644 index 3f176c096e6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/virtualnetworks/model_retentionpolicyparameters.go deleted file mode 100644 index b8a74239a26..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_route.go b/resource-manager/network/2022-11-01/virtualnetworks/model_route.go deleted file mode 100644 index d76eb9ceeec..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_routepropertiesformat.go deleted file mode 100644 index e52a5de8ca6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_routetable.go b/resource-manager/network/2022-11-01/virtualnetworks/model_routetable.go deleted file mode 100644 index 2e233c020e3..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_routetablepropertiesformat.go deleted file mode 100644 index 69015d57403..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_securityrule.go b/resource-manager/network/2022-11-01/virtualnetworks/model_securityrule.go deleted file mode 100644 index f7ed0f51115..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_securityrulepropertiesformat.go deleted file mode 100644 index af160e60e64..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlink.go deleted file mode 100644 index 77039ca3b73..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index d6ef1f15de1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlinkslistresult.go b/resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlinkslistresult.go deleted file mode 100644 index 92970f6011f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceassociationlinkslistresult.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinksListResult struct { - NextLink *string `json:"nextLink,omitempty"` - Value *[]ServiceAssociationLink `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 82eb0f31d43..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicy.go deleted file mode 100644 index d50c20ce576..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 4d2ebe5ac46..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index b221dd2c319..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 00a9c1e5662..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 03a937b7d65..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_subnet.go b/resource-manager/network/2022-11-01/virtualnetworks/model_subnet.go deleted file mode 100644 index 7b3d4ff10c8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_subnetpropertiesformat.go deleted file mode 100644 index 599b6927d9c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_subresource.go b/resource-manager/network/2022-11-01/virtualnetworks/model_subresource.go deleted file mode 100644 index ecd84dace18..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_tagsobject.go b/resource-manager/network/2022-11-01/virtualnetworks/model_tagsobject.go deleted file mode 100644 index 9ac4400ec75..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworks/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index ce47549e2b9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/virtualnetworks/model_trafficanalyticsproperties.go deleted file mode 100644 index 26812782cc8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_unpreparenetworkpoliciesrequest.go b/resource-manager/network/2022-11-01/virtualnetworks/model_unpreparenetworkpoliciesrequest.go deleted file mode 100644 index 84b1fedbc2b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_unpreparenetworkpoliciesrequest.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UnprepareNetworkPoliciesRequest struct { - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetwork.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetwork.go deleted file mode 100644 index 01f2a07994e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetwork.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworks - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetwork struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkbgpcommunities.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkbgpcommunities.go deleted file mode 100644 index ecb655fd234..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkbgpcommunities.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkBgpCommunities struct { - RegionalCommunity *string `json:"regionalCommunity,omitempty"` - VirtualNetworkCommunity string `json:"virtualNetworkCommunity"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkencryption.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkencryption.go deleted file mode 100644 index a0d8e13fe3a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkencryption.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkEncryption struct { - Enabled bool `json:"enabled"` - Enforcement *VirtualNetworkEncryptionEnforcement `json:"enforcement,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpeering.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpeering.go deleted file mode 100644 index 85b7fe9183a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkPeeringPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpeeringpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpeeringpropertiesformat.go deleted file mode 100644 index 642e0676b8f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpeeringpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPeeringPropertiesFormat struct { - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty"` - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` - DoNotVerifyRemoteGateways *bool `json:"doNotVerifyRemoteGateways,omitempty"` - PeeringState *VirtualNetworkPeeringState `json:"peeringState,omitempty"` - PeeringSyncLevel *VirtualNetworkPeeringLevel `json:"peeringSyncLevel,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` - RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"` - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - RemoteVirtualNetworkAddressSpace *AddressSpace `json:"remoteVirtualNetworkAddressSpace,omitempty"` - RemoteVirtualNetworkEncryption *VirtualNetworkEncryption `json:"remoteVirtualNetworkEncryption,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpropertiesformat.go deleted file mode 100644 index a6ad3b4e3a0..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkPropertiesFormat struct { - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"` - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` - EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` - EnableVMProtection *bool `json:"enableVmProtection,omitempty"` - Encryption *VirtualNetworkEncryption `json:"encryption,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlowTimeoutInMinutes *int64 `json:"flowTimeoutInMinutes,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` - VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworktap.go deleted file mode 100644 index d1b3faf4100..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 4c2bb1fad6c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkusage.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkusage.go deleted file mode 100644 index 470dd6b34f8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkusage.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkUsage struct { - CurrentValue *float64 `json:"currentValue,omitempty"` - Id *string `json:"id,omitempty"` - Limit *float64 `json:"limit,omitempty"` - Name *VirtualNetworkUsageName `json:"name,omitempty"` - Unit *string `json:"unit,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkusagename.go b/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkusagename.go deleted file mode 100644 index f3156ce6be8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/model_virtualnetworkusagename.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkUsageName struct { - LocalizedValue *string `json:"localizedValue,omitempty"` - Value *string `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/predicates.go b/resource-manager/network/2022-11-01/virtualnetworks/predicates.go deleted file mode 100644 index 32421738de2..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/predicates.go +++ /dev/null @@ -1,88 +0,0 @@ -package virtualnetworks - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPDdosProtectionStatusResultOperationPredicate struct { - DdosProtectionPlanId *string - PublicIPAddress *string - PublicIPAddressId *string -} - -func (p PublicIPDdosProtectionStatusResultOperationPredicate) Matches(input PublicIPDdosProtectionStatusResult) bool { - - if p.DdosProtectionPlanId != nil && (input.DdosProtectionPlanId == nil || *p.DdosProtectionPlanId != *input.DdosProtectionPlanId) { - return false - } - - if p.PublicIPAddress != nil && (input.PublicIPAddress == nil || *p.PublicIPAddress != *input.PublicIPAddress) { - return false - } - - if p.PublicIPAddressId != nil && (input.PublicIPAddressId == nil || *p.PublicIPAddressId != *input.PublicIPAddressId) { - return false - } - - return true -} - -type VirtualNetworkOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkOperationPredicate) Matches(input VirtualNetwork) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualNetworkUsageOperationPredicate struct { - CurrentValue *float64 - Id *string - Limit *float64 - Unit *string -} - -func (p VirtualNetworkUsageOperationPredicate) Matches(input VirtualNetworkUsage) bool { - - if p.CurrentValue != nil && (input.CurrentValue == nil || *p.CurrentValue != *input.CurrentValue) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Limit != nil && (input.Limit == nil || *p.Limit != *input.Limit) { - return false - } - - if p.Unit != nil && (input.Unit == nil || *p.Unit != *input.Unit) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualnetworks/version.go b/resource-manager/network/2022-11-01/virtualnetworks/version.go deleted file mode 100644 index cf1cc7a2050..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworks/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworks - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworks/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/README.md b/resource-manager/network/2022-11-01/virtualnetworktap/README.md deleted file mode 100644 index d533ada95bd..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/README.md +++ /dev/null @@ -1,86 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworktap` Documentation - -The `virtualnetworktap` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworktap" -``` - - -### Client Initialization - -```go -client := virtualnetworktap.NewVirtualNetworkTapClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkTapClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualnetworktap.NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - -payload := virtualnetworktap.VirtualNetworkTap{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkTapClient.Delete` - -```go -ctx := context.TODO() -id := virtualnetworktap.NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualNetworkTapClient.Get` - -```go -ctx := context.TODO() -id := virtualnetworktap.NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualNetworkTapClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualnetworktap.NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - -payload := virtualnetworktap.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/client.go b/resource-manager/network/2022-11-01/virtualnetworktap/client.go deleted file mode 100644 index ed44f57de37..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworktap - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkTapClientWithBaseURI(api environments.Api) (*VirtualNetworkTapClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworktap", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkTapClient: %+v", err) - } - - return &VirtualNetworkTapClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/constants.go b/resource-manager/network/2022-11-01/virtualnetworktap/constants.go deleted file mode 100644 index 2fff454271b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package virtualnetworktap - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/id_virtualnetworktap.go b/resource-manager/network/2022-11-01/virtualnetworktap/id_virtualnetworktap.go deleted file mode 100644 index 7e7e843e4d1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/id_virtualnetworktap.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualnetworktap - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkTapId{} - -// VirtualNetworkTapId is a struct representing the Resource ID for a Virtual Network Tap -type VirtualNetworkTapId struct { - SubscriptionId string - ResourceGroupName string - VirtualNetworkTapName string -} - -// NewVirtualNetworkTapID returns a new VirtualNetworkTapId struct -func NewVirtualNetworkTapID(subscriptionId string, resourceGroupName string, virtualNetworkTapName string) VirtualNetworkTapId { - return VirtualNetworkTapId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualNetworkTapName: virtualNetworkTapName, - } -} - -// ParseVirtualNetworkTapID parses 'input' into a VirtualNetworkTapId -func ParseVirtualNetworkTapID(input string) (*VirtualNetworkTapId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkTapId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkTapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkTapName, ok = parsed.Parsed["virtualNetworkTapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkTapName", *parsed) - } - - return &id, nil -} - -// ParseVirtualNetworkTapIDInsensitively parses 'input' case-insensitively into a VirtualNetworkTapId -// note: this method should only be used for API response data and not user input -func ParseVirtualNetworkTapIDInsensitively(input string) (*VirtualNetworkTapId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualNetworkTapId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualNetworkTapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualNetworkTapName, ok = parsed.Parsed["virtualNetworkTapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualNetworkTapName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualNetworkTapID checks that 'input' can be parsed as a Virtual Network Tap ID -func ValidateVirtualNetworkTapID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualNetworkTapID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Network Tap ID -func (id VirtualNetworkTapId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworkTaps/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualNetworkTapName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Network Tap ID -func (id VirtualNetworkTapId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualNetworkTaps", "virtualNetworkTaps", "virtualNetworkTaps"), - resourceids.UserSpecifiedSegment("virtualNetworkTapName", "virtualNetworkTapValue"), - } -} - -// String returns a human-readable description of this Virtual Network Tap ID -func (id VirtualNetworkTapId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Network Tap Name: %q", id.VirtualNetworkTapName), - } - return fmt.Sprintf("Virtual Network Tap (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/id_virtualnetworktap_test.go b/resource-manager/network/2022-11-01/virtualnetworktap/id_virtualnetworktap_test.go deleted file mode 100644 index 3188c76969e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/id_virtualnetworktap_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualnetworktap - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualNetworkTapId{} - -func TestNewVirtualNetworkTapID(t *testing.T) { - id := NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualNetworkTapName != "virtualNetworkTapValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualNetworkTapName'", id.VirtualNetworkTapName, "virtualNetworkTapValue") - } -} - -func TestFormatVirtualNetworkTapID(t *testing.T) { - actual := NewVirtualNetworkTapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkTapValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualNetworkTapID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkTapId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue", - Expected: &VirtualNetworkTapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkTapName: "virtualNetworkTapValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkTapID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkTapName != v.Expected.VirtualNetworkTapName { - t.Fatalf("Expected %q but got %q for VirtualNetworkTapName", v.Expected.VirtualNetworkTapName, actual.VirtualNetworkTapName) - } - - } -} - -func TestParseVirtualNetworkTapIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualNetworkTapId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKtApS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue", - Expected: &VirtualNetworkTapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualNetworkTapName: "virtualNetworkTapValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualNetworkTaps/virtualNetworkTapValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKtApS/vIrTuAlNeTwOrKtApVaLuE", - Expected: &VirtualNetworkTapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualNetworkTapName: "vIrTuAlNeTwOrKtApVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlNeTwOrKtApS/vIrTuAlNeTwOrKtApVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualNetworkTapIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualNetworkTapName != v.Expected.VirtualNetworkTapName { - t.Fatalf("Expected %q but got %q for VirtualNetworkTapName", v.Expected.VirtualNetworkTapName, actual.VirtualNetworkTapName) - } - - } -} - -func TestSegmentsForVirtualNetworkTapId(t *testing.T) { - segments := VirtualNetworkTapId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualNetworkTapId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/method_createorupdate.go b/resource-manager/network/2022-11-01/virtualnetworktap/method_createorupdate.go deleted file mode 100644 index 4e1df6fbd4e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualnetworktap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualNetworkTapClient) CreateOrUpdate(ctx context.Context, id VirtualNetworkTapId, input VirtualNetworkTap) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualNetworkTapClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualNetworkTapId, input VirtualNetworkTap) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/method_delete.go b/resource-manager/network/2022-11-01/virtualnetworktap/method_delete.go deleted file mode 100644 index 93b4ec0c489..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualnetworktap - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualNetworkTapClient) Delete(ctx context.Context, id VirtualNetworkTapId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualNetworkTapClient) DeleteThenPoll(ctx context.Context, id VirtualNetworkTapId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/method_get.go b/resource-manager/network/2022-11-01/virtualnetworktap/method_get.go deleted file mode 100644 index cb91236143f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualnetworktap - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkTap -} - -// Get ... -func (c VirtualNetworkTapClient) Get(ctx context.Context, id VirtualNetworkTapId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/method_updatetags.go b/resource-manager/network/2022-11-01/virtualnetworktap/method_updatetags.go deleted file mode 100644 index fda5671abd1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package virtualnetworktap - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualNetworkTap -} - -// UpdateTags ... -func (c VirtualNetworkTapClient) UpdateTags(ctx context.Context, id VirtualNetworkTapId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddress.go deleted file mode 100644 index db62a91aeb1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index a220744195a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index f1a5f708c1c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewayipconfiguration.go deleted file mode 100644 index e0dd6f54986..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 05e2cf6e7ff..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationsecuritygroup.go deleted file mode 100644 index 89fac6f865a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index dd34d207344..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_backendaddresspool.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_backendaddresspool.go deleted file mode 100644 index 22fa8953303..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 05a9e141168..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index d263c1b8649..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_ddossettings.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_ddossettings.go deleted file mode 100644 index 934851a560f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_delegation.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_delegation.go deleted file mode 100644 index b98041c6409..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_flowlog.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_flowlog.go deleted file mode 100644 index ddd3757f710..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_flowlogformatparameters.go deleted file mode 100644 index 05c5660bcab..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_flowlogpropertiesformat.go deleted file mode 100644 index 64eb8ac4566..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_frontendipconfiguration.go deleted file mode 100644 index 8e718fbb787..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index df238cbcfd3..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 3301ab1a1c7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_inboundnatrule.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_inboundnatrule.go deleted file mode 100644 index 7c4fefd00fe..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 9562bb00429..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfiguration.go deleted file mode 100644 index 072921c15aa..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationprofile.go deleted file mode 100644 index 319c9ec5ee9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index adf0a28fb73..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 14c8a64a2a2..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_iptag.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_iptag.go deleted file mode 100644 index 85d10556d1c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_loadbalancerbackendaddress.go deleted file mode 100644 index bb0a0c328c1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index b16ba8335ae..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_natgateway.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_natgateway.go deleted file mode 100644 index ff0008c8a9e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_natgatewaypropertiesformat.go deleted file mode 100644 index 314c102eee6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_natgatewaysku.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_natgatewaysku.go deleted file mode 100644 index efd87c92e07..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_natruleportmapping.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_natruleportmapping.go deleted file mode 100644 index 9c675767782..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterface.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterface.go deleted file mode 100644 index 90bd182032d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacednssettings.go deleted file mode 100644 index 8f7f5c9ab69..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 420ea20f4d2..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index e2d0d046dd7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index e8b6558e224..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 0428a2c793c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 1514177f60e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 4d5181920b1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networksecuritygroup.go deleted file mode 100644 index f1f880186f1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index c0a2565b3a0..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpoint.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpoint.go deleted file mode 100644 index 18177d11a3e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointconnection.go deleted file mode 100644 index 3a5764483c9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointconnectionproperties.go deleted file mode 100644 index f6119badaa5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointipconfiguration.go deleted file mode 100644 index 35ffb6cda11..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 8e362a6d1b5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointproperties.go deleted file mode 100644 index 8d42714c80d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkservice.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkservice.go deleted file mode 100644 index 42d87ebbbcb..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnection.go deleted file mode 100644 index 6218ca9e0c5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index bb689f2425d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 4510ba8bea7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 7f7ebc0d7f8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 9e874822a6b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceproperties.go deleted file mode 100644 index cbafd8f4967..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddress.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddress.go deleted file mode 100644 index 5059f6b2c6b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package virtualnetworktap - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddressdnssettings.go deleted file mode 100644 index 5e531cfaa59..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddresspropertiesformat.go deleted file mode 100644 index b1b74de6b82..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddresssku.go deleted file mode 100644 index c719ed93844..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_resourcenavigationlink.go deleted file mode 100644 index e1834b720d7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_resourcenavigationlinkformat.go deleted file mode 100644 index 5100c40bc8d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_resourceset.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_resourceset.go deleted file mode 100644 index fa8408e3374..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_retentionpolicyparameters.go deleted file mode 100644 index 402a95f81e1..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_route.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_route.go deleted file mode 100644 index 5eb14c76d8d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_routepropertiesformat.go deleted file mode 100644 index 1e404b86207..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_routetable.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_routetable.go deleted file mode 100644 index c5bfa2aacc9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_routetablepropertiesformat.go deleted file mode 100644 index 788b58851db..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_securityrule.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_securityrule.go deleted file mode 100644 index 42a4c62093e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_securityrulepropertiesformat.go deleted file mode 100644 index 8b92ef45964..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceassociationlink.go deleted file mode 100644 index 806ced6b5e5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 9a18079edd6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 347761b277f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicy.go deleted file mode 100644 index 6ca8e2d4a35..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 05ee77e2b81..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 537a3df890d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index f2645082640..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 6da43c107d7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_subnet.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_subnet.go deleted file mode 100644 index e7d6771812b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_subnetpropertiesformat.go deleted file mode 100644 index f179399d941..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_subresource.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_subresource.go deleted file mode 100644 index da7e12e526b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_tagsobject.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_tagsobject.go deleted file mode 100644 index 1c98be14a33..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 89aa415edbb..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_trafficanalyticsproperties.go deleted file mode 100644 index 701cc7ae154..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_virtualnetworktap.go deleted file mode 100644 index 209659855b5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktap/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 5c2f9db5892..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktap - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktap/version.go b/resource-manager/network/2022-11-01/virtualnetworktap/version.go deleted file mode 100644 index 7b50df18478..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktap/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktap - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktap/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/README.md b/resource-manager/network/2022-11-01/virtualnetworktaps/README.md deleted file mode 100644 index 21d2f32f49f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/README.md +++ /dev/null @@ -1,54 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworktaps` Documentation - -The `virtualnetworktaps` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualnetworktaps" -``` - - -### Client Initialization - -```go -client := virtualnetworktaps.NewVirtualNetworkTapsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualNetworkTapsClient.ListAll` - -```go -ctx := context.TODO() -id := virtualnetworktaps.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualNetworkTapsClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualnetworktaps.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/client.go b/resource-manager/network/2022-11-01/virtualnetworktaps/client.go deleted file mode 100644 index ef1af892cdc..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworktaps - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualNetworkTapsClientWithBaseURI(api environments.Api) (*VirtualNetworkTapsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualnetworktaps", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualNetworkTapsClient: %+v", err) - } - - return &VirtualNetworkTapsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/constants.go b/resource-manager/network/2022-11-01/virtualnetworktaps/constants.go deleted file mode 100644 index 1f88e664bf5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package virtualnetworktaps - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/method_listall.go b/resource-manager/network/2022-11-01/virtualnetworktaps/method_listall.go deleted file mode 100644 index c2241d9d29a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworktaps - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkTap -} - -type ListAllCompleteResult struct { - Items []VirtualNetworkTap -} - -// ListAll ... -func (c VirtualNetworkTapsClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworkTaps", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkTap `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c VirtualNetworkTapsClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, VirtualNetworkTapOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkTapsClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualNetworkTapOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]VirtualNetworkTap, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/virtualnetworktaps/method_listbyresourcegroup.go deleted file mode 100644 index 2e4d8c6fa90..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualnetworktaps - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualNetworkTap -} - -type ListByResourceGroupCompleteResult struct { - Items []VirtualNetworkTap -} - -// ListByResourceGroup ... -func (c VirtualNetworkTapsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualNetworkTaps", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualNetworkTap `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualNetworkTapsClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, VirtualNetworkTapOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualNetworkTapsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualNetworkTapOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]VirtualNetworkTap, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddress.go deleted file mode 100644 index b76026be6bc..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index b8bc620ea71..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index f6179e4f0e3..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 9e995dbb56d..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 0c3c2c531f3..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationsecuritygroup.go deleted file mode 100644 index 1c38043ef88..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 9102a6b9188..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_backendaddresspool.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_backendaddresspool.go deleted file mode 100644 index 2c478d85562..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index e04619de88e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 36b2063994a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ddossettings.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_ddossettings.go deleted file mode 100644 index cbd6745cb8e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_delegation.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_delegation.go deleted file mode 100644 index 018e0605aee..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlog.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlog.go deleted file mode 100644 index 5a7b0a4647b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlogformatparameters.go deleted file mode 100644 index 3dc25c465d0..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlogpropertiesformat.go deleted file mode 100644 index 6fc887f8010..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_frontendipconfiguration.go deleted file mode 100644 index 35e28c95460..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index c6949a4745a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index a2e82dba72b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_inboundnatrule.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_inboundnatrule.go deleted file mode 100644 index f84bd93f6c7..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 8200337ef35..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfiguration.go deleted file mode 100644 index fcd9033c4a4..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationprofile.go deleted file mode 100644 index 2e7b5cfe5eb..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 1d5ab92dcd5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 4a486230c36..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_iptag.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_iptag.go deleted file mode 100644 index c4127e59d60..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_loadbalancerbackendaddress.go deleted file mode 100644 index 7a8c5cb8b73..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index d3193da6576..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_natgateway.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_natgateway.go deleted file mode 100644 index b2e289b8923..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_natgatewaypropertiesformat.go deleted file mode 100644 index 17859bcb59e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_natgatewaysku.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_natgatewaysku.go deleted file mode 100644 index cab72fef58e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_natruleportmapping.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_natruleportmapping.go deleted file mode 100644 index 2426f4e9182..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterface.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterface.go deleted file mode 100644 index 0959f2effbd..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacednssettings.go deleted file mode 100644 index 63a0e5410a5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 3295f16b481..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 7659a03380a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index dcfd84eac61..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 9cb7ea2624a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 3d883d5678c..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index dd9ef377372..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networksecuritygroup.go deleted file mode 100644 index d3ce4b39ea6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 57de91eafd3..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpoint.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpoint.go deleted file mode 100644 index b58c024b508..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointconnection.go deleted file mode 100644 index 3d314882781..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointconnectionproperties.go deleted file mode 100644 index d6ea54d1367..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointipconfiguration.go deleted file mode 100644 index 40468e7e3ae..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 46faf7b053b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointproperties.go deleted file mode 100644 index 44ca9629906..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkservice.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkservice.go deleted file mode 100644 index 8df5b6ca8e9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnection.go deleted file mode 100644 index 3d9511e926a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 149dad152de..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 5ae16683918..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 830a49d4825..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index b3b914d17a6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceproperties.go deleted file mode 100644 index 9e5885610f5..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddress.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddress.go deleted file mode 100644 index a63d498e9b2..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package virtualnetworktaps - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddressdnssettings.go deleted file mode 100644 index a22c5ccb482..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddresspropertiesformat.go deleted file mode 100644 index f3a6e76f01e..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddresssku.go deleted file mode 100644 index b6d56cb8fcd..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_resourcenavigationlink.go deleted file mode 100644 index b362ba5a95b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_resourcenavigationlinkformat.go deleted file mode 100644 index 83b81bd5755..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_resourceset.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_resourceset.go deleted file mode 100644 index 7e28952a0a0..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_retentionpolicyparameters.go deleted file mode 100644 index 9a09f483b36..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_route.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_route.go deleted file mode 100644 index fe09505f366..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_routepropertiesformat.go deleted file mode 100644 index 3d3840b7cfb..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_routetable.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_routetable.go deleted file mode 100644 index dc456ac5330..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_routetablepropertiesformat.go deleted file mode 100644 index 29d5488b413..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_securityrule.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_securityrule.go deleted file mode 100644 index 2b52f93106a..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_securityrulepropertiesformat.go deleted file mode 100644 index 549b4d495a6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceassociationlink.go deleted file mode 100644 index eff71aa8797..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 72fe6efec6b..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_servicedelegationpropertiesformat.go deleted file mode 100644 index d130c80bc92..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicy.go deleted file mode 100644 index b164c8a3ad8..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicydefinition.go deleted file mode 100644 index a715beb370f..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 6283b834876..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index e39a39b0dc9..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpropertiesformat.go deleted file mode 100644 index c5085da61db..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_subnet.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_subnet.go deleted file mode 100644 index 586828d80aa..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_subnetpropertiesformat.go deleted file mode 100644 index be802f29a97..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_subresource.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_subresource.go deleted file mode 100644 index 64ad7a5e2b6..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 5d2043fba12..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_trafficanalyticsproperties.go deleted file mode 100644 index a673cd2c104..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_virtualnetworktap.go deleted file mode 100644 index d5bf88cf9cb..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/virtualnetworktaps/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index e75a60ff515..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/predicates.go b/resource-manager/network/2022-11-01/virtualnetworktaps/predicates.go deleted file mode 100644 index 0b7fb5985f4..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package virtualnetworktaps - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualNetworkTapOperationPredicate) Matches(input VirtualNetworkTap) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualnetworktaps/version.go b/resource-manager/network/2022-11-01/virtualnetworktaps/version.go deleted file mode 100644 index e5bd29f8913..00000000000 --- a/resource-manager/network/2022-11-01/virtualnetworktaps/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualnetworktaps - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualnetworktaps/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/README.md b/resource-manager/network/2022-11-01/virtualrouterpeerings/README.md deleted file mode 100644 index a18f5bf60c1..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/README.md +++ /dev/null @@ -1,82 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualrouterpeerings` Documentation - -The `virtualrouterpeerings` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualrouterpeerings" -``` - - -### Client Initialization - -```go -client := virtualrouterpeerings.NewVirtualRouterPeeringsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualRouterPeeringsClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualrouterpeerings.NewVirtualRouterPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue", "peeringValue") - -payload := virtualrouterpeerings.VirtualRouterPeering{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualRouterPeeringsClient.Delete` - -```go -ctx := context.TODO() -id := virtualrouterpeerings.NewVirtualRouterPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue", "peeringValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualRouterPeeringsClient.Get` - -```go -ctx := context.TODO() -id := virtualrouterpeerings.NewVirtualRouterPeeringID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue", "peeringValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualRouterPeeringsClient.List` - -```go -ctx := context.TODO() -id := virtualrouterpeerings.NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/client.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/client.go deleted file mode 100644 index 06dbd163078..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualrouterpeerings - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPeeringsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualRouterPeeringsClientWithBaseURI(api environments.Api) (*VirtualRouterPeeringsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualrouterpeerings", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualRouterPeeringsClient: %+v", err) - } - - return &VirtualRouterPeeringsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/constants.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/constants.go deleted file mode 100644 index 464d2b779c9..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package virtualrouterpeerings - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/id_virtualrouter.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/id_virtualrouter.go deleted file mode 100644 index 885ce3a276a..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/id_virtualrouter.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualrouterpeerings - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualRouterId{} - -// VirtualRouterId is a struct representing the Resource ID for a Virtual Router -type VirtualRouterId struct { - SubscriptionId string - ResourceGroupName string - VirtualRouterName string -} - -// NewVirtualRouterID returns a new VirtualRouterId struct -func NewVirtualRouterID(subscriptionId string, resourceGroupName string, virtualRouterName string) VirtualRouterId { - return VirtualRouterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualRouterName: virtualRouterName, - } -} - -// ParseVirtualRouterID parses 'input' into a VirtualRouterId -func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualRouterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) - } - - return &id, nil -} - -// ParseVirtualRouterIDInsensitively parses 'input' case-insensitively into a VirtualRouterId -// note: this method should only be used for API response data and not user input -func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualRouterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualRouterID checks that 'input' can be parsed as a Virtual Router ID -func ValidateVirtualRouterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualRouterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Router ID -func (id VirtualRouterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualRouters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualRouterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Router ID -func (id VirtualRouterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualRouters", "virtualRouters", "virtualRouters"), - resourceids.UserSpecifiedSegment("virtualRouterName", "virtualRouterValue"), - } -} - -// String returns a human-readable description of this Virtual Router ID -func (id VirtualRouterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Router Name: %q", id.VirtualRouterName), - } - return fmt.Sprintf("Virtual Router (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/id_virtualrouter_test.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/id_virtualrouter_test.go deleted file mode 100644 index db1b29df7df..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/id_virtualrouter_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualrouterpeerings - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualRouterId{} - -func TestNewVirtualRouterID(t *testing.T) { - id := NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualRouterName != "virtualRouterValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualRouterName'", id.VirtualRouterName, "virtualRouterValue") - } -} - -func TestFormatVirtualRouterID(t *testing.T) { - actual := NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualRouterID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualRouterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualRouterName: "virtualRouterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualRouterID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualRouterName != v.Expected.VirtualRouterName { - t.Fatalf("Expected %q but got %q for VirtualRouterName", v.Expected.VirtualRouterName, actual.VirtualRouterName) - } - - } -} - -func TestParseVirtualRouterIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualRouterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualRouterName: "virtualRouterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS/vIrTuAlRoUtErVaLuE", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualRouterName: "vIrTuAlRoUtErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS/vIrTuAlRoUtErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualRouterIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualRouterName != v.Expected.VirtualRouterName { - t.Fatalf("Expected %q but got %q for VirtualRouterName", v.Expected.VirtualRouterName, actual.VirtualRouterName) - } - - } -} - -func TestSegmentsForVirtualRouterId(t *testing.T) { - segments := VirtualRouterId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualRouterId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/method_createorupdate.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/method_createorupdate.go deleted file mode 100644 index f6c2be4ebe6..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/method_createorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualrouterpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, id commonids.VirtualRouterPeeringId, input VirtualRouterPeering) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualRouterPeeringsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualRouterPeeringId, input VirtualRouterPeering) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/method_delete.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/method_delete.go deleted file mode 100644 index 0f1d37addbb..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/method_delete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualrouterpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualRouterPeeringsClient) Delete(ctx context.Context, id commonids.VirtualRouterPeeringId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualRouterPeeringsClient) DeleteThenPoll(ctx context.Context, id commonids.VirtualRouterPeeringId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/method_get.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/method_get.go deleted file mode 100644 index 5fb3287863d..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/method_get.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualrouterpeerings - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualRouterPeering -} - -// Get ... -func (c VirtualRouterPeeringsClient) Get(ctx context.Context, id commonids.VirtualRouterPeeringId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/method_list.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/method_list.go deleted file mode 100644 index add4c4c4ed1..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/method_list.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualrouterpeerings - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualRouterPeering -} - -type ListCompleteResult struct { - Items []VirtualRouterPeering -} - -// List ... -func (c VirtualRouterPeeringsClient) List(ctx context.Context, id VirtualRouterId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/peerings", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualRouterPeering `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualRouterPeeringsClient) ListComplete(ctx context.Context, id VirtualRouterId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualRouterPeeringOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualRouterPeeringsClient) ListCompleteMatchingPredicate(ctx context.Context, id VirtualRouterId, predicate VirtualRouterPeeringOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualRouterPeering, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/model_virtualrouterpeering.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/model_virtualrouterpeering.go deleted file mode 100644 index 148137d1d12..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/model_virtualrouterpeering.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualrouterpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPeering struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualRouterPeeringProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/model_virtualrouterpeeringproperties.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/model_virtualrouterpeeringproperties.go deleted file mode 100644 index c205251cdff..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/model_virtualrouterpeeringproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualrouterpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPeeringProperties struct { - PeerAsn *int64 `json:"peerAsn,omitempty"` - PeerIP *string `json:"peerIp,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/predicates.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/predicates.go deleted file mode 100644 index 1e181881675..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package virtualrouterpeerings - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPeeringOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VirtualRouterPeeringOperationPredicate) Matches(input VirtualRouterPeering) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualrouterpeerings/version.go b/resource-manager/network/2022-11-01/virtualrouterpeerings/version.go deleted file mode 100644 index 686d71cb8b2..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouterpeerings/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualrouterpeerings - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouterpeerings/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/README.md b/resource-manager/network/2022-11-01/virtualrouters/README.md deleted file mode 100644 index fd39770d9bc..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/README.md +++ /dev/null @@ -1,99 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualrouters` Documentation - -The `virtualrouters` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualrouters" -``` - - -### Client Initialization - -```go -client := virtualrouters.NewVirtualRoutersClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualRoutersClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualrouters.NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - -payload := virtualrouters.VirtualRouter{ - // ... -} - - -if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualRoutersClient.Delete` - -```go -ctx := context.TODO() -id := virtualrouters.NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualRoutersClient.Get` - -```go -ctx := context.TODO() -id := virtualrouters.NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - -read, err := client.Get(ctx, id, virtualrouters.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualRoutersClient.List` - -```go -ctx := context.TODO() -id := virtualrouters.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualRoutersClient.ListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualrouters.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.ListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/virtualrouters/client.go b/resource-manager/network/2022-11-01/virtualrouters/client.go deleted file mode 100644 index 0c0a8fa4887..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualrouters - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRoutersClient struct { - Client *resourcemanager.Client -} - -func NewVirtualRoutersClientWithBaseURI(api environments.Api) (*VirtualRoutersClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualrouters", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualRoutersClient: %+v", err) - } - - return &VirtualRoutersClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/constants.go b/resource-manager/network/2022-11-01/virtualrouters/constants.go deleted file mode 100644 index 1a43afab5dd..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package virtualrouters - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/id_virtualrouter.go b/resource-manager/network/2022-11-01/virtualrouters/id_virtualrouter.go deleted file mode 100644 index ecb01bd99e5..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/id_virtualrouter.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualrouters - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualRouterId{} - -// VirtualRouterId is a struct representing the Resource ID for a Virtual Router -type VirtualRouterId struct { - SubscriptionId string - ResourceGroupName string - VirtualRouterName string -} - -// NewVirtualRouterID returns a new VirtualRouterId struct -func NewVirtualRouterID(subscriptionId string, resourceGroupName string, virtualRouterName string) VirtualRouterId { - return VirtualRouterId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualRouterName: virtualRouterName, - } -} - -// ParseVirtualRouterID parses 'input' into a VirtualRouterId -func ParseVirtualRouterID(input string) (*VirtualRouterId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualRouterId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) - } - - return &id, nil -} - -// ParseVirtualRouterIDInsensitively parses 'input' case-insensitively into a VirtualRouterId -// note: this method should only be used for API response data and not user input -func ParseVirtualRouterIDInsensitively(input string) (*VirtualRouterId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualRouterId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualRouterId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualRouterName, ok = parsed.Parsed["virtualRouterName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualRouterName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualRouterID checks that 'input' can be parsed as a Virtual Router ID -func ValidateVirtualRouterID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualRouterID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Router ID -func (id VirtualRouterId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualRouters/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualRouterName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Router ID -func (id VirtualRouterId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualRouters", "virtualRouters", "virtualRouters"), - resourceids.UserSpecifiedSegment("virtualRouterName", "virtualRouterValue"), - } -} - -// String returns a human-readable description of this Virtual Router ID -func (id VirtualRouterId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Router Name: %q", id.VirtualRouterName), - } - return fmt.Sprintf("Virtual Router (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/id_virtualrouter_test.go b/resource-manager/network/2022-11-01/virtualrouters/id_virtualrouter_test.go deleted file mode 100644 index 7948e51838c..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/id_virtualrouter_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualrouters - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualRouterId{} - -func TestNewVirtualRouterID(t *testing.T) { - id := NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualRouterName != "virtualRouterValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualRouterName'", id.VirtualRouterName, "virtualRouterValue") - } -} - -func TestFormatVirtualRouterID(t *testing.T) { - actual := NewVirtualRouterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualRouterValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualRouterID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualRouterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualRouterName: "virtualRouterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualRouterID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualRouterName != v.Expected.VirtualRouterName { - t.Fatalf("Expected %q but got %q for VirtualRouterName", v.Expected.VirtualRouterName, actual.VirtualRouterName) - } - - } -} - -func TestParseVirtualRouterIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualRouterId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualRouterName: "virtualRouterValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualRouters/virtualRouterValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS/vIrTuAlRoUtErVaLuE", - Expected: &VirtualRouterId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualRouterName: "vIrTuAlRoUtErVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlRoUtErS/vIrTuAlRoUtErVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualRouterIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualRouterName != v.Expected.VirtualRouterName { - t.Fatalf("Expected %q but got %q for VirtualRouterName", v.Expected.VirtualRouterName, actual.VirtualRouterName) - } - - } -} - -func TestSegmentsForVirtualRouterId(t *testing.T) { - segments := VirtualRouterId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualRouterId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/method_createorupdate.go b/resource-manager/network/2022-11-01/virtualrouters/method_createorupdate.go deleted file mode 100644 index 3c1c2cd2781..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/method_createorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// CreateOrUpdate ... -func (c VirtualRoutersClient) CreateOrUpdate(ctx context.Context, id VirtualRouterId, input VirtualRouter) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed -func (c VirtualRoutersClient) CreateOrUpdateThenPoll(ctx context.Context, id VirtualRouterId, input VirtualRouter) error { - result, err := c.CreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing CreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after CreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/method_delete.go b/resource-manager/network/2022-11-01/virtualrouters/method_delete.go deleted file mode 100644 index 7dcaaf847d3..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c VirtualRoutersClient) Delete(ctx context.Context, id VirtualRouterId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c VirtualRoutersClient) DeleteThenPoll(ctx context.Context, id VirtualRouterId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/method_get.go b/resource-manager/network/2022-11-01/virtualrouters/method_get.go deleted file mode 100644 index c6a0af7c359..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualRouter -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c VirtualRoutersClient) Get(ctx context.Context, id VirtualRouterId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/method_list.go b/resource-manager/network/2022-11-01/virtualrouters/method_list.go deleted file mode 100644 index 633bf710c34..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualRouter -} - -type ListCompleteResult struct { - Items []VirtualRouter -} - -// List ... -func (c VirtualRoutersClient) List(ctx context.Context, id commonids.SubscriptionId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualRouters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualRouter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c VirtualRoutersClient) ListComplete(ctx context.Context, id commonids.SubscriptionId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, VirtualRouterOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualRoutersClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualRouterOperationPredicate) (result ListCompleteResult, err error) { - items := make([]VirtualRouter, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/method_listbyresourcegroup.go b/resource-manager/network/2022-11-01/virtualrouters/method_listbyresourcegroup.go deleted file mode 100644 index 5e702661c15..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/method_listbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualrouters - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualRouter -} - -type ListByResourceGroupCompleteResult struct { - Items []VirtualRouter -} - -// ListByResourceGroup ... -func (c VirtualRoutersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualRouters", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualRouter `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualRoutersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error) { - return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, VirtualRouterOperationPredicate{}) -} - -// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualRoutersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualRouterOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { - items := make([]VirtualRouter, 0) - - resp, err := c.ListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/model_subresource.go b/resource-manager/network/2022-11-01/virtualrouters/model_subresource.go deleted file mode 100644 index f9c28cc090f..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualrouters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/model_virtualrouter.go b/resource-manager/network/2022-11-01/virtualrouters/model_virtualrouter.go deleted file mode 100644 index ac50af509f1..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/model_virtualrouter.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualrouters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouter struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualRouterPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/model_virtualrouterpropertiesformat.go b/resource-manager/network/2022-11-01/virtualrouters/model_virtualrouterpropertiesformat.go deleted file mode 100644 index 24601ff2eb4..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/model_virtualrouterpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualrouters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterPropertiesFormat struct { - HostedGateway *SubResource `json:"hostedGateway,omitempty"` - HostedSubnet *SubResource `json:"hostedSubnet,omitempty"` - Peerings *[]SubResource `json:"peerings,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` - VirtualRouterIPs *[]string `json:"virtualRouterIps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/predicates.go b/resource-manager/network/2022-11-01/virtualrouters/predicates.go deleted file mode 100644 index 676ee423641..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package virtualrouters - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualRouterOperationPredicate) Matches(input VirtualRouter) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualrouters/version.go b/resource-manager/network/2022-11-01/virtualrouters/version.go deleted file mode 100644 index 387eea9abcd..00000000000 --- a/resource-manager/network/2022-11-01/virtualrouters/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualrouters - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualrouters/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/README.md b/resource-manager/network/2022-11-01/virtualwans/README.md deleted file mode 100644 index 8d894c066e5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/README.md +++ /dev/null @@ -1,1467 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualwans` Documentation - -The `virtualwans` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/virtualwans" -``` - - -### Client Initialization - -```go -client := virtualwans.NewVirtualWANsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VirtualWANsClient.ConfigurationPolicyGroupsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue") - -payload := virtualwans.VpnServerConfigurationPolicyGroup{ - // ... -} - - -if err := client.ConfigurationPolicyGroupsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.ConfigurationPolicyGroupsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue") - -if err := client.ConfigurationPolicyGroupsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.ConfigurationPolicyGroupsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue") - -read, err := client.ConfigurationPolicyGroupsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.ConfigurationPolicyGroupsListByVpnServerConfiguration` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -// alternatively `client.ConfigurationPolicyGroupsListByVpnServerConfiguration(ctx, id)` can be used to do batched pagination -items, err := client.ConfigurationPolicyGroupsListByVpnServerConfigurationComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.Generatevirtualwanvpnserverconfigurationvpnprofile` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -payload := virtualwans.VirtualWanVpnProfileParameters{ - // ... -} - - -if err := client.GeneratevirtualwanvpnserverconfigurationvpnprofileThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubRouteTablesCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue") - -payload := virtualwans.HubRouteTable{ - // ... -} - - -if err := client.HubRouteTablesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubRouteTablesDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue") - -if err := client.HubRouteTablesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubRouteTablesGet` - -```go -ctx := context.TODO() -id := virtualwans.NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue") - -read, err := client.HubRouteTablesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.HubRouteTablesList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.HubRouteTablesList(ctx, id)` can be used to do batched pagination -items, err := client.HubRouteTablesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.HubVirtualNetworkConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue") - -payload := virtualwans.HubVirtualNetworkConnection{ - // ... -} - - -if err := client.HubVirtualNetworkConnectionsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubVirtualNetworkConnectionsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue") - -if err := client.HubVirtualNetworkConnectionsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.HubVirtualNetworkConnectionsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue") - -read, err := client.HubVirtualNetworkConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.HubVirtualNetworkConnectionsList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.HubVirtualNetworkConnectionsList(ctx, id)` can be used to do batched pagination -items, err := client.HubVirtualNetworkConnectionsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.NatRulesCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue") - -payload := virtualwans.VpnGatewayNatRule{ - // ... -} - - -if err := client.NatRulesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.NatRulesDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue") - -if err := client.NatRulesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.NatRulesGet` - -```go -ctx := context.TODO() -id := virtualwans.NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue") - -read, err := client.NatRulesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.NatRulesListByVpnGateway` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -// alternatively `client.NatRulesListByVpnGateway(ctx, id)` can be used to do batched pagination -items, err := client.NatRulesListByVpnGatewayComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.NetworkVirtualApplianceConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewNetworkVirtualApplianceConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "networkVirtualApplianceConnectionValue") - -payload := virtualwans.NetworkVirtualApplianceConnection{ - // ... -} - - -if err := client.NetworkVirtualApplianceConnectionsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.NetworkVirtualApplianceConnectionsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewNetworkVirtualApplianceConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "networkVirtualApplianceConnectionValue") - -if err := client.NetworkVirtualApplianceConnectionsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.NetworkVirtualApplianceConnectionsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewNetworkVirtualApplianceConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "networkVirtualApplianceConnectionValue") - -read, err := client.NetworkVirtualApplianceConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.NetworkVirtualApplianceConnectionsList` - -```go -ctx := context.TODO() -id := virtualwans.NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - -// alternatively `client.NetworkVirtualApplianceConnectionsList(ctx, id)` can be used to do batched pagination -items, err := client.NetworkVirtualApplianceConnectionsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -payload := virtualwans.P2SVpnGateway{ - // ... -} - - -if err := client.P2sVpnGatewaysCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -if err := client.P2sVpnGatewaysDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANP2SVPNGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "p2sVpnGatewayValue") - -read, err := client.P2sVpnGatewaysGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.P2sVpnGatewaysList(ctx, id)` can be used to do batched pagination -items, err := client.P2sVpnGatewaysListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.P2sVpnGatewaysListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.P2sVpnGatewaysListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.P2sVpnGatewaysListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.RouteMapsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue") - -payload := virtualwans.RouteMap{ - // ... -} - - -if err := client.RouteMapsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.RouteMapsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue") - -if err := client.RouteMapsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.RouteMapsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue") - -read, err := client.RouteMapsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.RouteMapsList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.RouteMapsList(ctx, id)` can be used to do batched pagination -items, err := client.RouteMapsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.RoutingIntentCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue") - -payload := virtualwans.RoutingIntent{ - // ... -} - - -if err := client.RoutingIntentCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.RoutingIntentDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue") - -if err := client.RoutingIntentDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.RoutingIntentGet` - -```go -ctx := context.TODO() -id := virtualwans.NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue") - -read, err := client.RoutingIntentGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.RoutingIntentList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.RoutingIntentList(ctx, id)` can be used to do batched pagination -items, err := client.RoutingIntentListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.SupportedSecurityProviders` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -read, err := client.SupportedSecurityProviders(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.UpdateTags` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -payload := virtualwans.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -payload := virtualwans.BgpConnection{ - // ... -} - - -if err := client.VirtualHubBgpConnectionCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -if err := client.VirtualHubBgpConnectionDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -read, err := client.VirtualHubBgpConnectionGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionsList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.VirtualHubBgpConnectionsList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubBgpConnectionsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionsListAdvertisedRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -if err := client.VirtualHubBgpConnectionsListAdvertisedRoutesThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubBgpConnectionsListLearnedRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubBGPConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "bgpConnectionValue") - -if err := client.VirtualHubBgpConnectionsListLearnedRoutesThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubIPConfigurationCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "ipConfigurationValue") - -payload := virtualwans.HubIPConfiguration{ - // ... -} - - -if err := client.VirtualHubIPConfigurationCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubIPConfigurationDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "ipConfigurationValue") - -if err := client.VirtualHubIPConfigurationDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubIPConfigurationGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "ipConfigurationValue") - -read, err := client.VirtualHubIPConfigurationGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubIPConfigurationList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.VirtualHubIPConfigurationList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubIPConfigurationListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubRouteTableV2sCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue") - -payload := virtualwans.VirtualHubRouteTableV2{ - // ... -} - - -if err := client.VirtualHubRouteTableV2sCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubRouteTableV2sDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue") - -if err := client.VirtualHubRouteTableV2sDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubRouteTableV2sGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue") - -read, err := client.VirtualHubRouteTableV2sGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubRouteTableV2sList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -// alternatively `client.VirtualHubRouteTableV2sList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubRouteTableV2sListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.VirtualHub{ - // ... -} - - -if err := client.VirtualHubsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -if err := client.VirtualHubsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -read, err := client.VirtualHubsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsGetEffectiveVirtualHubRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.EffectiveRoutesParameters{ - // ... -} - - -if err := client.VirtualHubsGetEffectiveVirtualHubRoutesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsGetInboundRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.GetInboundRoutesParameters{ - // ... -} - - -if err := client.VirtualHubsGetInboundRoutesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsGetOutboundRoutes` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.GetOutboundRoutesParameters{ - // ... -} - - -if err := client.VirtualHubsGetOutboundRoutesThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VirtualHubsList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VirtualHubsListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VirtualHubsListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualHubsUpdateTags` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - -payload := virtualwans.TagsObject{ - // ... -} - - -read, err := client.VirtualHubsUpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -payload := virtualwans.VirtualWAN{ - // ... -} - - -if err := client.VirtualWansCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -if err := client.VirtualWansDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -read, err := client.VirtualWansGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VirtualWansList(ctx, id)` can be used to do batched pagination -items, err := client.VirtualWansListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VirtualWansListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VirtualWansListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VirtualWansListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -payload := virtualwans.VpnConnection{ - // ... -} - - -if err := client.VpnConnectionsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -if err := client.VpnConnectionsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -read, err := client.VpnConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsListByVpnGateway` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -// alternatively `client.VpnConnectionsListByVpnGateway(ctx, id)` can be used to do batched pagination -items, err := client.VpnConnectionsListByVpnGatewayComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsStartPacketCapture` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -payload := virtualwans.VpnConnectionPacketCaptureStartParameters{ - // ... -} - - -if err := client.VpnConnectionsStartPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnConnectionsStopPacketCapture` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -payload := virtualwans.VpnConnectionPacketCaptureStopParameters{ - // ... -} - - -if err := client.VpnConnectionsStopPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -payload := virtualwans.VpnGateway{ - // ... -} - - -if err := client.VpnGatewaysCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -if err := client.VpnGatewaysDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -read, err := client.VpnGatewaysGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VpnGatewaysList(ctx, id)` can be used to do batched pagination -items, err := client.VpnGatewaysListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnGatewaysListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VpnGatewaysListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VpnGatewaysListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnLinkConnectionsGetIkeSas` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue") - -if err := client.VpnLinkConnectionsGetIkeSasThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnLinkConnectionsListByVpnConnection` - -```go -ctx := context.TODO() -id := virtualwans.NewVPNConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue") - -// alternatively `client.VpnLinkConnectionsListByVpnConnection(ctx, id)` can be used to do batched pagination -items, err := client.VpnLinkConnectionsListByVpnConnectionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsAssociatedWithVirtualWanList` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -if err := client.VpnServerConfigurationsAssociatedWithVirtualWanListThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -payload := virtualwans.VpnServerConfiguration{ - // ... -} - - -if err := client.VpnServerConfigurationsCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -if err := client.VpnServerConfigurationsDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -read, err := client.VpnServerConfigurationsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VpnServerConfigurationsList(ctx, id)` can be used to do batched pagination -items, err := client.VpnServerConfigurationsListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnServerConfigurationsListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VpnServerConfigurationsListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VpnServerConfigurationsListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSiteLinkConnectionsGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue") - -read, err := client.VpnSiteLinkConnectionsGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSiteLinksGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue", "vpnSiteLinkValue") - -read, err := client.VpnSiteLinksGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSiteLinksListByVpnSite` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -// alternatively `client.VpnSiteLinksListByVpnSite(ctx, id)` can be used to do batched pagination -items, err := client.VpnSiteLinksListByVpnSiteComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesConfigurationDownload` - -```go -ctx := context.TODO() -id := virtualwans.NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - -payload := virtualwans.GetVpnSitesConfigurationRequest{ - // ... -} - - -if err := client.VpnSitesConfigurationDownloadThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesCreateOrUpdate` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -payload := virtualwans.VpnSite{ - // ... -} - - -if err := client.VpnSitesCreateOrUpdateThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesDelete` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -if err := client.VpnSitesDeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesGet` - -```go -ctx := context.TODO() -id := virtualwans.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -read, err := client.VpnSitesGet(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesList` - -```go -ctx := context.TODO() -id := virtualwans.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.VpnSitesList(ctx, id)` can be used to do batched pagination -items, err := client.VpnSitesListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VirtualWANsClient.VpnSitesListByResourceGroup` - -```go -ctx := context.TODO() -id := virtualwans.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.VpnSitesListByResourceGroup(ctx, id)` can be used to do batched pagination -items, err := client.VpnSitesListByResourceGroupComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/virtualwans/client.go b/resource-manager/network/2022-11-01/virtualwans/client.go deleted file mode 100644 index ae4ecc81d13..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualwans - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWANsClient struct { - Client *resourcemanager.Client -} - -func NewVirtualWANsClientWithBaseURI(api environments.Api) (*VirtualWANsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "virtualwans", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VirtualWANsClient: %+v", err) - } - - return &VirtualWANsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/constants.go b/resource-manager/network/2022-11-01/virtualwans/constants.go deleted file mode 100644 index fe61dd8415e..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/constants.go +++ /dev/null @@ -1,2294 +0,0 @@ -package virtualwans - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AuthenticationMethod string - -const ( - AuthenticationMethodEAPMSCHAPvTwo AuthenticationMethod = "EAPMSCHAPv2" - AuthenticationMethodEAPTLS AuthenticationMethod = "EAPTLS" -) - -func PossibleValuesForAuthenticationMethod() []string { - return []string{ - string(AuthenticationMethodEAPMSCHAPvTwo), - string(AuthenticationMethodEAPTLS), - } -} - -func (s *AuthenticationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseAuthenticationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseAuthenticationMethod(input string) (*AuthenticationMethod, error) { - vals := map[string]AuthenticationMethod{ - "eapmschapv2": AuthenticationMethodEAPMSCHAPvTwo, - "eaptls": AuthenticationMethodEAPTLS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := AuthenticationMethod(input) - return &out, nil -} - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type HubBgpConnectionStatus string - -const ( - HubBgpConnectionStatusConnected HubBgpConnectionStatus = "Connected" - HubBgpConnectionStatusConnecting HubBgpConnectionStatus = "Connecting" - HubBgpConnectionStatusNotConnected HubBgpConnectionStatus = "NotConnected" - HubBgpConnectionStatusUnknown HubBgpConnectionStatus = "Unknown" -) - -func PossibleValuesForHubBgpConnectionStatus() []string { - return []string{ - string(HubBgpConnectionStatusConnected), - string(HubBgpConnectionStatusConnecting), - string(HubBgpConnectionStatusNotConnected), - string(HubBgpConnectionStatusUnknown), - } -} - -func (s *HubBgpConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHubBgpConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHubBgpConnectionStatus(input string) (*HubBgpConnectionStatus, error) { - vals := map[string]HubBgpConnectionStatus{ - "connected": HubBgpConnectionStatusConnected, - "connecting": HubBgpConnectionStatusConnecting, - "notconnected": HubBgpConnectionStatusNotConnected, - "unknown": HubBgpConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HubBgpConnectionStatus(input) - return &out, nil -} - -type HubRoutingPreference string - -const ( - HubRoutingPreferenceASPath HubRoutingPreference = "ASPath" - HubRoutingPreferenceExpressRoute HubRoutingPreference = "ExpressRoute" - HubRoutingPreferenceVpnGateway HubRoutingPreference = "VpnGateway" -) - -func PossibleValuesForHubRoutingPreference() []string { - return []string{ - string(HubRoutingPreferenceASPath), - string(HubRoutingPreferenceExpressRoute), - string(HubRoutingPreferenceVpnGateway), - } -} - -func (s *HubRoutingPreference) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseHubRoutingPreference(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseHubRoutingPreference(input string) (*HubRoutingPreference, error) { - vals := map[string]HubRoutingPreference{ - "aspath": HubRoutingPreferenceASPath, - "expressroute": HubRoutingPreferenceExpressRoute, - "vpngateway": HubRoutingPreferenceVpnGateway, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := HubRoutingPreference(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type NextStep string - -const ( - NextStepContinue NextStep = "Continue" - NextStepTerminate NextStep = "Terminate" - NextStepUnknown NextStep = "Unknown" -) - -func PossibleValuesForNextStep() []string { - return []string{ - string(NextStepContinue), - string(NextStepTerminate), - string(NextStepUnknown), - } -} - -func (s *NextStep) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNextStep(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNextStep(input string) (*NextStep, error) { - vals := map[string]NextStep{ - "continue": NextStepContinue, - "terminate": NextStepTerminate, - "unknown": NextStepUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NextStep(input) - return &out, nil -} - -type OfficeTrafficCategory string - -const ( - OfficeTrafficCategoryAll OfficeTrafficCategory = "All" - OfficeTrafficCategoryNone OfficeTrafficCategory = "None" - OfficeTrafficCategoryOptimize OfficeTrafficCategory = "Optimize" - OfficeTrafficCategoryOptimizeAndAllow OfficeTrafficCategory = "OptimizeAndAllow" -) - -func PossibleValuesForOfficeTrafficCategory() []string { - return []string{ - string(OfficeTrafficCategoryAll), - string(OfficeTrafficCategoryNone), - string(OfficeTrafficCategoryOptimize), - string(OfficeTrafficCategoryOptimizeAndAllow), - } -} - -func (s *OfficeTrafficCategory) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOfficeTrafficCategory(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOfficeTrafficCategory(input string) (*OfficeTrafficCategory, error) { - vals := map[string]OfficeTrafficCategory{ - "all": OfficeTrafficCategoryAll, - "none": OfficeTrafficCategoryNone, - "optimize": OfficeTrafficCategoryOptimize, - "optimizeandallow": OfficeTrafficCategoryOptimizeAndAllow, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OfficeTrafficCategory(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type PreferredRoutingGateway string - -const ( - PreferredRoutingGatewayExpressRoute PreferredRoutingGateway = "ExpressRoute" - PreferredRoutingGatewayNone PreferredRoutingGateway = "None" - PreferredRoutingGatewayVpnGateway PreferredRoutingGateway = "VpnGateway" -) - -func PossibleValuesForPreferredRoutingGateway() []string { - return []string{ - string(PreferredRoutingGatewayExpressRoute), - string(PreferredRoutingGatewayNone), - string(PreferredRoutingGatewayVpnGateway), - } -} - -func (s *PreferredRoutingGateway) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePreferredRoutingGateway(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePreferredRoutingGateway(input string) (*PreferredRoutingGateway, error) { - vals := map[string]PreferredRoutingGateway{ - "expressroute": PreferredRoutingGatewayExpressRoute, - "none": PreferredRoutingGatewayNone, - "vpngateway": PreferredRoutingGatewayVpnGateway, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PreferredRoutingGateway(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteMapActionType string - -const ( - RouteMapActionTypeAdd RouteMapActionType = "Add" - RouteMapActionTypeDrop RouteMapActionType = "Drop" - RouteMapActionTypeRemove RouteMapActionType = "Remove" - RouteMapActionTypeReplace RouteMapActionType = "Replace" - RouteMapActionTypeUnknown RouteMapActionType = "Unknown" -) - -func PossibleValuesForRouteMapActionType() []string { - return []string{ - string(RouteMapActionTypeAdd), - string(RouteMapActionTypeDrop), - string(RouteMapActionTypeRemove), - string(RouteMapActionTypeReplace), - string(RouteMapActionTypeUnknown), - } -} - -func (s *RouteMapActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteMapActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteMapActionType(input string) (*RouteMapActionType, error) { - vals := map[string]RouteMapActionType{ - "add": RouteMapActionTypeAdd, - "drop": RouteMapActionTypeDrop, - "remove": RouteMapActionTypeRemove, - "replace": RouteMapActionTypeReplace, - "unknown": RouteMapActionTypeUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteMapActionType(input) - return &out, nil -} - -type RouteMapMatchCondition string - -const ( - RouteMapMatchConditionContains RouteMapMatchCondition = "Contains" - RouteMapMatchConditionEquals RouteMapMatchCondition = "Equals" - RouteMapMatchConditionNotContains RouteMapMatchCondition = "NotContains" - RouteMapMatchConditionNotEquals RouteMapMatchCondition = "NotEquals" - RouteMapMatchConditionUnknown RouteMapMatchCondition = "Unknown" -) - -func PossibleValuesForRouteMapMatchCondition() []string { - return []string{ - string(RouteMapMatchConditionContains), - string(RouteMapMatchConditionEquals), - string(RouteMapMatchConditionNotContains), - string(RouteMapMatchConditionNotEquals), - string(RouteMapMatchConditionUnknown), - } -} - -func (s *RouteMapMatchCondition) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteMapMatchCondition(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteMapMatchCondition(input string) (*RouteMapMatchCondition, error) { - vals := map[string]RouteMapMatchCondition{ - "contains": RouteMapMatchConditionContains, - "equals": RouteMapMatchConditionEquals, - "notcontains": RouteMapMatchConditionNotContains, - "notequals": RouteMapMatchConditionNotEquals, - "unknown": RouteMapMatchConditionUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteMapMatchCondition(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type RoutingState string - -const ( - RoutingStateFailed RoutingState = "Failed" - RoutingStateNone RoutingState = "None" - RoutingStateProvisioned RoutingState = "Provisioned" - RoutingStateProvisioning RoutingState = "Provisioning" -) - -func PossibleValuesForRoutingState() []string { - return []string{ - string(RoutingStateFailed), - string(RoutingStateNone), - string(RoutingStateProvisioned), - string(RoutingStateProvisioning), - } -} - -func (s *RoutingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRoutingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRoutingState(input string) (*RoutingState, error) { - vals := map[string]RoutingState{ - "failed": RoutingStateFailed, - "none": RoutingStateNone, - "provisioned": RoutingStateProvisioned, - "provisioning": RoutingStateProvisioning, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RoutingState(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionProtocol string - -const ( - VirtualNetworkGatewayConnectionProtocolIKEvOne VirtualNetworkGatewayConnectionProtocol = "IKEv1" - VirtualNetworkGatewayConnectionProtocolIKEvTwo VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionProtocol() []string { - return []string{ - string(VirtualNetworkGatewayConnectionProtocolIKEvOne), - string(VirtualNetworkGatewayConnectionProtocolIKEvTwo), - } -} - -func (s *VirtualNetworkGatewayConnectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionProtocol(input string) (*VirtualNetworkGatewayConnectionProtocol, error) { - vals := map[string]VirtualNetworkGatewayConnectionProtocol{ - "ikev1": VirtualNetworkGatewayConnectionProtocolIKEvOne, - "ikev2": VirtualNetworkGatewayConnectionProtocolIKEvTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} - -type VirtualWanSecurityProviderType string - -const ( - VirtualWanSecurityProviderTypeExternal VirtualWanSecurityProviderType = "External" - VirtualWanSecurityProviderTypeNative VirtualWanSecurityProviderType = "Native" -) - -func PossibleValuesForVirtualWanSecurityProviderType() []string { - return []string{ - string(VirtualWanSecurityProviderTypeExternal), - string(VirtualWanSecurityProviderTypeNative), - } -} - -func (s *VirtualWanSecurityProviderType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualWanSecurityProviderType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualWanSecurityProviderType(input string) (*VirtualWanSecurityProviderType, error) { - vals := map[string]VirtualWanSecurityProviderType{ - "external": VirtualWanSecurityProviderTypeExternal, - "native": VirtualWanSecurityProviderTypeNative, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualWanSecurityProviderType(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} - -type VpnAuthenticationType string - -const ( - VpnAuthenticationTypeAAD VpnAuthenticationType = "AAD" - VpnAuthenticationTypeCertificate VpnAuthenticationType = "Certificate" - VpnAuthenticationTypeRadius VpnAuthenticationType = "Radius" -) - -func PossibleValuesForVpnAuthenticationType() []string { - return []string{ - string(VpnAuthenticationTypeAAD), - string(VpnAuthenticationTypeCertificate), - string(VpnAuthenticationTypeRadius), - } -} - -func (s *VpnAuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnAuthenticationType(input string) (*VpnAuthenticationType, error) { - vals := map[string]VpnAuthenticationType{ - "aad": VpnAuthenticationTypeAAD, - "certificate": VpnAuthenticationTypeCertificate, - "radius": VpnAuthenticationTypeRadius, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnAuthenticationType(input) - return &out, nil -} - -type VpnConnectionStatus string - -const ( - VpnConnectionStatusConnected VpnConnectionStatus = "Connected" - VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting" - VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected" - VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown" -) - -func PossibleValuesForVpnConnectionStatus() []string { - return []string{ - string(VpnConnectionStatusConnected), - string(VpnConnectionStatusConnecting), - string(VpnConnectionStatusNotConnected), - string(VpnConnectionStatusUnknown), - } -} - -func (s *VpnConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnConnectionStatus(input string) (*VpnConnectionStatus, error) { - vals := map[string]VpnConnectionStatus{ - "connected": VpnConnectionStatusConnected, - "connecting": VpnConnectionStatusConnecting, - "notconnected": VpnConnectionStatusNotConnected, - "unknown": VpnConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnConnectionStatus(input) - return &out, nil -} - -type VpnGatewayTunnelingProtocol string - -const ( - VpnGatewayTunnelingProtocolIkeVTwo VpnGatewayTunnelingProtocol = "IkeV2" - VpnGatewayTunnelingProtocolOpenVPN VpnGatewayTunnelingProtocol = "OpenVPN" -) - -func PossibleValuesForVpnGatewayTunnelingProtocol() []string { - return []string{ - string(VpnGatewayTunnelingProtocolIkeVTwo), - string(VpnGatewayTunnelingProtocolOpenVPN), - } -} - -func (s *VpnGatewayTunnelingProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnGatewayTunnelingProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnGatewayTunnelingProtocol(input string) (*VpnGatewayTunnelingProtocol, error) { - vals := map[string]VpnGatewayTunnelingProtocol{ - "ikev2": VpnGatewayTunnelingProtocolIkeVTwo, - "openvpn": VpnGatewayTunnelingProtocolOpenVPN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnGatewayTunnelingProtocol(input) - return &out, nil -} - -type VpnLinkConnectionMode string - -const ( - VpnLinkConnectionModeDefault VpnLinkConnectionMode = "Default" - VpnLinkConnectionModeInitiatorOnly VpnLinkConnectionMode = "InitiatorOnly" - VpnLinkConnectionModeResponderOnly VpnLinkConnectionMode = "ResponderOnly" -) - -func PossibleValuesForVpnLinkConnectionMode() []string { - return []string{ - string(VpnLinkConnectionModeDefault), - string(VpnLinkConnectionModeInitiatorOnly), - string(VpnLinkConnectionModeResponderOnly), - } -} - -func (s *VpnLinkConnectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnLinkConnectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnLinkConnectionMode(input string) (*VpnLinkConnectionMode, error) { - vals := map[string]VpnLinkConnectionMode{ - "default": VpnLinkConnectionModeDefault, - "initiatoronly": VpnLinkConnectionModeInitiatorOnly, - "responderonly": VpnLinkConnectionModeResponderOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnLinkConnectionMode(input) - return &out, nil -} - -type VpnNatRuleMode string - -const ( - VpnNatRuleModeEgressSnat VpnNatRuleMode = "EgressSnat" - VpnNatRuleModeIngressSnat VpnNatRuleMode = "IngressSnat" -) - -func PossibleValuesForVpnNatRuleMode() []string { - return []string{ - string(VpnNatRuleModeEgressSnat), - string(VpnNatRuleModeIngressSnat), - } -} - -func (s *VpnNatRuleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleMode(input string) (*VpnNatRuleMode, error) { - vals := map[string]VpnNatRuleMode{ - "egresssnat": VpnNatRuleModeEgressSnat, - "ingresssnat": VpnNatRuleModeIngressSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleMode(input) - return &out, nil -} - -type VpnNatRuleType string - -const ( - VpnNatRuleTypeDynamic VpnNatRuleType = "Dynamic" - VpnNatRuleTypeStatic VpnNatRuleType = "Static" -) - -func PossibleValuesForVpnNatRuleType() []string { - return []string{ - string(VpnNatRuleTypeDynamic), - string(VpnNatRuleTypeStatic), - } -} - -func (s *VpnNatRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleType(input string) (*VpnNatRuleType, error) { - vals := map[string]VpnNatRuleType{ - "dynamic": VpnNatRuleTypeDynamic, - "static": VpnNatRuleTypeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleType(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_configurationpolicygroup.go b/resource-manager/network/2022-11-01/virtualwans/id_configurationpolicygroup.go deleted file mode 100644 index d6c7f2eaff8..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_configurationpolicygroup.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConfigurationPolicyGroupId{} - -// ConfigurationPolicyGroupId is a struct representing the Resource ID for a Configuration Policy Group -type ConfigurationPolicyGroupId struct { - SubscriptionId string - ResourceGroupName string - VpnServerConfigurationName string - ConfigurationPolicyGroupName string -} - -// NewConfigurationPolicyGroupID returns a new ConfigurationPolicyGroupId struct -func NewConfigurationPolicyGroupID(subscriptionId string, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string) ConfigurationPolicyGroupId { - return ConfigurationPolicyGroupId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnServerConfigurationName: vpnServerConfigurationName, - ConfigurationPolicyGroupName: configurationPolicyGroupName, - } -} - -// ParseConfigurationPolicyGroupID parses 'input' into a ConfigurationPolicyGroupId -func ParseConfigurationPolicyGroupID(input string) (*ConfigurationPolicyGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(ConfigurationPolicyGroupId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConfigurationPolicyGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - if id.ConfigurationPolicyGroupName, ok = parsed.Parsed["configurationPolicyGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationPolicyGroupName", *parsed) - } - - return &id, nil -} - -// ParseConfigurationPolicyGroupIDInsensitively parses 'input' case-insensitively into a ConfigurationPolicyGroupId -// note: this method should only be used for API response data and not user input -func ParseConfigurationPolicyGroupIDInsensitively(input string) (*ConfigurationPolicyGroupId, error) { - parser := resourceids.NewParserFromResourceIdType(ConfigurationPolicyGroupId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ConfigurationPolicyGroupId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - if id.ConfigurationPolicyGroupName, ok = parsed.Parsed["configurationPolicyGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "configurationPolicyGroupName", *parsed) - } - - return &id, nil -} - -// ValidateConfigurationPolicyGroupID checks that 'input' can be parsed as a Configuration Policy Group ID -func ValidateConfigurationPolicyGroupID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseConfigurationPolicyGroupID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Configuration Policy Group ID -func (id ConfigurationPolicyGroupId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnServerConfigurations/%s/configurationPolicyGroups/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnServerConfigurationName, id.ConfigurationPolicyGroupName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Configuration Policy Group ID -func (id ConfigurationPolicyGroupId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnServerConfigurations", "vpnServerConfigurations", "vpnServerConfigurations"), - resourceids.UserSpecifiedSegment("vpnServerConfigurationName", "vpnServerConfigurationValue"), - resourceids.StaticSegment("staticConfigurationPolicyGroups", "configurationPolicyGroups", "configurationPolicyGroups"), - resourceids.UserSpecifiedSegment("configurationPolicyGroupName", "configurationPolicyGroupValue"), - } -} - -// String returns a human-readable description of this Configuration Policy Group ID -func (id ConfigurationPolicyGroupId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Server Configuration Name: %q", id.VpnServerConfigurationName), - fmt.Sprintf("Configuration Policy Group Name: %q", id.ConfigurationPolicyGroupName), - } - return fmt.Sprintf("Configuration Policy Group (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_configurationpolicygroup_test.go b/resource-manager/network/2022-11-01/virtualwans/id_configurationpolicygroup_test.go deleted file mode 100644 index 4622d452f11..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_configurationpolicygroup_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ConfigurationPolicyGroupId{} - -func TestNewConfigurationPolicyGroupID(t *testing.T) { - id := NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnServerConfigurationName != "vpnServerConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnServerConfigurationName'", id.VpnServerConfigurationName, "vpnServerConfigurationValue") - } - - if id.ConfigurationPolicyGroupName != "configurationPolicyGroupValue" { - t.Fatalf("Expected %q but got %q for Segment 'ConfigurationPolicyGroupName'", id.ConfigurationPolicyGroupName, "configurationPolicyGroupValue") - } -} - -func TestFormatConfigurationPolicyGroupID(t *testing.T) { - actual := NewConfigurationPolicyGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue", "configurationPolicyGroupValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseConfigurationPolicyGroupID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConfigurationPolicyGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue", - Expected: &ConfigurationPolicyGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - ConfigurationPolicyGroupName: "configurationPolicyGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConfigurationPolicyGroupID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - if actual.ConfigurationPolicyGroupName != v.Expected.ConfigurationPolicyGroupName { - t.Fatalf("Expected %q but got %q for ConfigurationPolicyGroupName", v.Expected.ConfigurationPolicyGroupName, actual.ConfigurationPolicyGroupName) - } - - } -} - -func TestParseConfigurationPolicyGroupIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ConfigurationPolicyGroupId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/cOnFiGuRaTiOnPoLiCyGrOuPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue", - Expected: &ConfigurationPolicyGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - ConfigurationPolicyGroupName: "configurationPolicyGroupValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/configurationPolicyGroups/configurationPolicyGroupValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/cOnFiGuRaTiOnPoLiCyGrOuPs/cOnFiGuRaTiOnPoLiCyGrOuPvAlUe", - Expected: &ConfigurationPolicyGroupId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnServerConfigurationName: "vPnSeRvErCoNfIgUrAtIoNvAlUe", - ConfigurationPolicyGroupName: "cOnFiGuRaTiOnPoLiCyGrOuPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/cOnFiGuRaTiOnPoLiCyGrOuPs/cOnFiGuRaTiOnPoLiCyGrOuPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseConfigurationPolicyGroupIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - if actual.ConfigurationPolicyGroupName != v.Expected.ConfigurationPolicyGroupName { - t.Fatalf("Expected %q but got %q for ConfigurationPolicyGroupName", v.Expected.ConfigurationPolicyGroupName, actual.ConfigurationPolicyGroupName) - } - - } -} - -func TestSegmentsForConfigurationPolicyGroupId(t *testing.T) { - segments := ConfigurationPolicyGroupId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ConfigurationPolicyGroupId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_hubroutetable.go b/resource-manager/network/2022-11-01/virtualwans/id_hubroutetable.go deleted file mode 100644 index 0297471a681..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_hubroutetable.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = HubRouteTableId{} - -// HubRouteTableId is a struct representing the Resource ID for a Hub Route Table -type HubRouteTableId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - HubRouteTableName string -} - -// NewHubRouteTableID returns a new HubRouteTableId struct -func NewHubRouteTableID(subscriptionId string, resourceGroupName string, virtualHubName string, hubRouteTableName string) HubRouteTableId { - return HubRouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - HubRouteTableName: hubRouteTableName, - } -} - -// ParseHubRouteTableID parses 'input' into a HubRouteTableId -func ParseHubRouteTableID(input string) (*HubRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(HubRouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := HubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubRouteTableName, ok = parsed.Parsed["hubRouteTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubRouteTableName", *parsed) - } - - return &id, nil -} - -// ParseHubRouteTableIDInsensitively parses 'input' case-insensitively into a HubRouteTableId -// note: this method should only be used for API response data and not user input -func ParseHubRouteTableIDInsensitively(input string) (*HubRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(HubRouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := HubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubRouteTableName, ok = parsed.Parsed["hubRouteTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubRouteTableName", *parsed) - } - - return &id, nil -} - -// ValidateHubRouteTableID checks that 'input' can be parsed as a Hub Route Table ID -func ValidateHubRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseHubRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Hub Route Table ID -func (id HubRouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/hubRouteTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.HubRouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Hub Route Table ID -func (id HubRouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticHubRouteTables", "hubRouteTables", "hubRouteTables"), - resourceids.UserSpecifiedSegment("hubRouteTableName", "hubRouteTableValue"), - } -} - -// String returns a human-readable description of this Hub Route Table ID -func (id HubRouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Hub Route Table Name: %q", id.HubRouteTableName), - } - return fmt.Sprintf("Hub Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_hubroutetable_test.go b/resource-manager/network/2022-11-01/virtualwans/id_hubroutetable_test.go deleted file mode 100644 index 88cc32367fc..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_hubroutetable_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = HubRouteTableId{} - -func TestNewHubRouteTableID(t *testing.T) { - id := NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.HubRouteTableName != "hubRouteTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'HubRouteTableName'", id.HubRouteTableName, "hubRouteTableValue") - } -} - -func TestFormatHubRouteTableID(t *testing.T) { - actual := NewHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubRouteTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseHubRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *HubRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue", - Expected: &HubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - HubRouteTableName: "hubRouteTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseHubRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.HubRouteTableName != v.Expected.HubRouteTableName { - t.Fatalf("Expected %q but got %q for HubRouteTableName", v.Expected.HubRouteTableName, actual.HubRouteTableName) - } - - } -} - -func TestParseHubRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *HubRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbRoUtEtAbLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue", - Expected: &HubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - HubRouteTableName: "hubRouteTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubRouteTables/hubRouteTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbRoUtEtAbLeS/hUbRoUtEtAbLeVaLuE", - Expected: &HubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - HubRouteTableName: "hUbRoUtEtAbLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbRoUtEtAbLeS/hUbRoUtEtAbLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseHubRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.HubRouteTableName != v.Expected.HubRouteTableName { - t.Fatalf("Expected %q but got %q for HubRouteTableName", v.Expected.HubRouteTableName, actual.HubRouteTableName) - } - - } -} - -func TestSegmentsForHubRouteTableId(t *testing.T) { - segments := HubRouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("HubRouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_hubvirtualnetworkconnection.go b/resource-manager/network/2022-11-01/virtualwans/id_hubvirtualnetworkconnection.go deleted file mode 100644 index e5bc46da4b4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_hubvirtualnetworkconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = HubVirtualNetworkConnectionId{} - -// HubVirtualNetworkConnectionId is a struct representing the Resource ID for a Hub Virtual Network Connection -type HubVirtualNetworkConnectionId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - HubVirtualNetworkConnectionName string -} - -// NewHubVirtualNetworkConnectionID returns a new HubVirtualNetworkConnectionId struct -func NewHubVirtualNetworkConnectionID(subscriptionId string, resourceGroupName string, virtualHubName string, hubVirtualNetworkConnectionName string) HubVirtualNetworkConnectionId { - return HubVirtualNetworkConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - HubVirtualNetworkConnectionName: hubVirtualNetworkConnectionName, - } -} - -// ParseHubVirtualNetworkConnectionID parses 'input' into a HubVirtualNetworkConnectionId -func ParseHubVirtualNetworkConnectionID(input string) (*HubVirtualNetworkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(HubVirtualNetworkConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := HubVirtualNetworkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubVirtualNetworkConnectionName, ok = parsed.Parsed["hubVirtualNetworkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubVirtualNetworkConnectionName", *parsed) - } - - return &id, nil -} - -// ParseHubVirtualNetworkConnectionIDInsensitively parses 'input' case-insensitively into a HubVirtualNetworkConnectionId -// note: this method should only be used for API response data and not user input -func ParseHubVirtualNetworkConnectionIDInsensitively(input string) (*HubVirtualNetworkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(HubVirtualNetworkConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := HubVirtualNetworkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.HubVirtualNetworkConnectionName, ok = parsed.Parsed["hubVirtualNetworkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "hubVirtualNetworkConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateHubVirtualNetworkConnectionID checks that 'input' can be parsed as a Hub Virtual Network Connection ID -func ValidateHubVirtualNetworkConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseHubVirtualNetworkConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Hub Virtual Network Connection ID -func (id HubVirtualNetworkConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/hubVirtualNetworkConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.HubVirtualNetworkConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Hub Virtual Network Connection ID -func (id HubVirtualNetworkConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticHubVirtualNetworkConnections", "hubVirtualNetworkConnections", "hubVirtualNetworkConnections"), - resourceids.UserSpecifiedSegment("hubVirtualNetworkConnectionName", "hubVirtualNetworkConnectionValue"), - } -} - -// String returns a human-readable description of this Hub Virtual Network Connection ID -func (id HubVirtualNetworkConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Hub Virtual Network Connection Name: %q", id.HubVirtualNetworkConnectionName), - } - return fmt.Sprintf("Hub Virtual Network Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_hubvirtualnetworkconnection_test.go b/resource-manager/network/2022-11-01/virtualwans/id_hubvirtualnetworkconnection_test.go deleted file mode 100644 index c5a35b5c496..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_hubvirtualnetworkconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = HubVirtualNetworkConnectionId{} - -func TestNewHubVirtualNetworkConnectionID(t *testing.T) { - id := NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.HubVirtualNetworkConnectionName != "hubVirtualNetworkConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'HubVirtualNetworkConnectionName'", id.HubVirtualNetworkConnectionName, "hubVirtualNetworkConnectionValue") - } -} - -func TestFormatHubVirtualNetworkConnectionID(t *testing.T) { - actual := NewHubVirtualNetworkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "hubVirtualNetworkConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseHubVirtualNetworkConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *HubVirtualNetworkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue", - Expected: &HubVirtualNetworkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - HubVirtualNetworkConnectionName: "hubVirtualNetworkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseHubVirtualNetworkConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.HubVirtualNetworkConnectionName != v.Expected.HubVirtualNetworkConnectionName { - t.Fatalf("Expected %q but got %q for HubVirtualNetworkConnectionName", v.Expected.HubVirtualNetworkConnectionName, actual.HubVirtualNetworkConnectionName) - } - - } -} - -func TestParseHubVirtualNetworkConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *HubVirtualNetworkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbViRtUaLnEtWoRkCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue", - Expected: &HubVirtualNetworkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - HubVirtualNetworkConnectionName: "hubVirtualNetworkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/hubVirtualNetworkConnections/hubVirtualNetworkConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbViRtUaLnEtWoRkCoNnEcTiOnS/hUbViRtUaLnEtWoRkCoNnEcTiOnVaLuE", - Expected: &HubVirtualNetworkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - HubVirtualNetworkConnectionName: "hUbViRtUaLnEtWoRkCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/hUbViRtUaLnEtWoRkCoNnEcTiOnS/hUbViRtUaLnEtWoRkCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseHubVirtualNetworkConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.HubVirtualNetworkConnectionName != v.Expected.HubVirtualNetworkConnectionName { - t.Fatalf("Expected %q but got %q for HubVirtualNetworkConnectionName", v.Expected.HubVirtualNetworkConnectionName, actual.HubVirtualNetworkConnectionName) - } - - } -} - -func TestSegmentsForHubVirtualNetworkConnectionId(t *testing.T) { - segments := HubVirtualNetworkConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("HubVirtualNetworkConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_natrule.go b/resource-manager/network/2022-11-01/virtualwans/id_natrule.go deleted file mode 100644 index 2563c42130d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_natrule.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NatRuleId{} - -// NatRuleId is a struct representing the Resource ID for a Nat Rule -type NatRuleId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string - NatRuleName string -} - -// NewNatRuleID returns a new NatRuleId struct -func NewNatRuleID(subscriptionId string, resourceGroupName string, vpnGatewayName string, natRuleName string) NatRuleId { - return NatRuleId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - NatRuleName: natRuleName, - } -} - -// ParseNatRuleID parses 'input' into a NatRuleId -func ParseNatRuleID(input string) (*NatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(NatRuleId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) - } - - return &id, nil -} - -// ParseNatRuleIDInsensitively parses 'input' case-insensitively into a NatRuleId -// note: this method should only be used for API response data and not user input -func ParseNatRuleIDInsensitively(input string) (*NatRuleId, error) { - parser := resourceids.NewParserFromResourceIdType(NatRuleId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NatRuleId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.NatRuleName, ok = parsed.Parsed["natRuleName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "natRuleName", *parsed) - } - - return &id, nil -} - -// ValidateNatRuleID checks that 'input' can be parsed as a Nat Rule ID -func ValidateNatRuleID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNatRuleID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Nat Rule ID -func (id NatRuleId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s/natRules/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName, id.NatRuleName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Nat Rule ID -func (id NatRuleId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - resourceids.StaticSegment("staticNatRules", "natRules", "natRules"), - resourceids.UserSpecifiedSegment("natRuleName", "natRuleValue"), - } -} - -// String returns a human-readable description of this Nat Rule ID -func (id NatRuleId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - fmt.Sprintf("Nat Rule Name: %q", id.NatRuleName), - } - return fmt.Sprintf("Nat Rule (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_natrule_test.go b/resource-manager/network/2022-11-01/virtualwans/id_natrule_test.go deleted file mode 100644 index 1c0f6c6a7c0..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_natrule_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NatRuleId{} - -func TestNewNatRuleID(t *testing.T) { - id := NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } - - if id.NatRuleName != "natRuleValue" { - t.Fatalf("Expected %q but got %q for Segment 'NatRuleName'", id.NatRuleName, "natRuleValue") - } -} - -func TestFormatNatRuleID(t *testing.T) { - actual := NewNatRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "natRuleValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNatRuleID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue", - Expected: &NatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - NatRuleName: "natRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNatRuleID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.NatRuleName != v.Expected.NatRuleName { - t.Fatalf("Expected %q but got %q for NatRuleName", v.Expected.NatRuleName, actual.NatRuleName) - } - - } -} - -func TestParseNatRuleIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NatRuleId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/nAtRuLeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue", - Expected: &NatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - NatRuleName: "natRuleValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/natRules/natRuleValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/nAtRuLeS/nAtRuLeVaLuE", - Expected: &NatRuleId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - NatRuleName: "nAtRuLeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/nAtRuLeS/nAtRuLeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNatRuleIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.NatRuleName != v.Expected.NatRuleName { - t.Fatalf("Expected %q but got %q for NatRuleName", v.Expected.NatRuleName, actual.NatRuleName) - } - - } -} - -func TestSegmentsForNatRuleId(t *testing.T) { - segments := NatRuleId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NatRuleId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualappliance.go b/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualappliance.go deleted file mode 100644 index 4f44479d9b9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualappliance.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -// NetworkVirtualApplianceId is a struct representing the Resource ID for a Network Virtual Appliance -type NetworkVirtualApplianceId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string -} - -// NewNetworkVirtualApplianceID returns a new NetworkVirtualApplianceId struct -func NewNetworkVirtualApplianceID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string) NetworkVirtualApplianceId { - return NetworkVirtualApplianceId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - } -} - -// ParseNetworkVirtualApplianceID parses 'input' into a NetworkVirtualApplianceId -func ParseNetworkVirtualApplianceID(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ParseNetworkVirtualApplianceIDInsensitively parses 'input' case-insensitively into a NetworkVirtualApplianceId -// note: this method should only be used for API response data and not user input -func ParseNetworkVirtualApplianceIDInsensitively(input string) (*NetworkVirtualApplianceId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkVirtualApplianceID checks that 'input' can be parsed as a Network Virtual Appliance ID -func ValidateNetworkVirtualApplianceID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkVirtualApplianceID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - } -} - -// String returns a human-readable description of this Network Virtual Appliance ID -func (id NetworkVirtualApplianceId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - } - return fmt.Sprintf("Network Virtual Appliance (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualappliance_test.go b/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualappliance_test.go deleted file mode 100644 index f4bd8b2518b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualappliance_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceId{} - -func TestNewNetworkVirtualApplianceID(t *testing.T) { - id := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } -} - -func TestFormatNetworkVirtualApplianceID(t *testing.T) { - actual := NewNetworkVirtualApplianceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkVirtualApplianceID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestParseNetworkVirtualApplianceIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Expected: &NetworkVirtualApplianceId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - } -} - -func TestSegmentsForNetworkVirtualApplianceId(t *testing.T) { - segments := NetworkVirtualApplianceId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkVirtualApplianceId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualapplianceconnection.go b/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualapplianceconnection.go deleted file mode 100644 index 13800d99e63..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualapplianceconnection.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceConnectionId{} - -// NetworkVirtualApplianceConnectionId is a struct representing the Resource ID for a Network Virtual Appliance Connection -type NetworkVirtualApplianceConnectionId struct { - SubscriptionId string - ResourceGroupName string - NetworkVirtualApplianceName string - NetworkVirtualApplianceConnectionName string -} - -// NewNetworkVirtualApplianceConnectionID returns a new NetworkVirtualApplianceConnectionId struct -func NewNetworkVirtualApplianceConnectionID(subscriptionId string, resourceGroupName string, networkVirtualApplianceName string, networkVirtualApplianceConnectionName string) NetworkVirtualApplianceConnectionId { - return NetworkVirtualApplianceConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - NetworkVirtualApplianceName: networkVirtualApplianceName, - NetworkVirtualApplianceConnectionName: networkVirtualApplianceConnectionName, - } -} - -// ParseNetworkVirtualApplianceConnectionID parses 'input' into a NetworkVirtualApplianceConnectionId -func ParseNetworkVirtualApplianceConnectionID(input string) (*NetworkVirtualApplianceConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.NetworkVirtualApplianceConnectionName, ok = parsed.Parsed["networkVirtualApplianceConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceConnectionName", *parsed) - } - - return &id, nil -} - -// ParseNetworkVirtualApplianceConnectionIDInsensitively parses 'input' case-insensitively into a NetworkVirtualApplianceConnectionId -// note: this method should only be used for API response data and not user input -func ParseNetworkVirtualApplianceConnectionIDInsensitively(input string) (*NetworkVirtualApplianceConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(NetworkVirtualApplianceConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := NetworkVirtualApplianceConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.NetworkVirtualApplianceName, ok = parsed.Parsed["networkVirtualApplianceName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceName", *parsed) - } - - if id.NetworkVirtualApplianceConnectionName, ok = parsed.Parsed["networkVirtualApplianceConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "networkVirtualApplianceConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateNetworkVirtualApplianceConnectionID checks that 'input' can be parsed as a Network Virtual Appliance Connection ID -func ValidateNetworkVirtualApplianceConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseNetworkVirtualApplianceConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Network Virtual Appliance Connection ID -func (id NetworkVirtualApplianceConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/networkVirtualAppliances/%s/networkVirtualApplianceConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.NetworkVirtualApplianceName, id.NetworkVirtualApplianceConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Network Virtual Appliance Connection ID -func (id NetworkVirtualApplianceConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticNetworkVirtualAppliances", "networkVirtualAppliances", "networkVirtualAppliances"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceName", "networkVirtualApplianceValue"), - resourceids.StaticSegment("staticNetworkVirtualApplianceConnections", "networkVirtualApplianceConnections", "networkVirtualApplianceConnections"), - resourceids.UserSpecifiedSegment("networkVirtualApplianceConnectionName", "networkVirtualApplianceConnectionValue"), - } -} - -// String returns a human-readable description of this Network Virtual Appliance Connection ID -func (id NetworkVirtualApplianceConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Network Virtual Appliance Name: %q", id.NetworkVirtualApplianceName), - fmt.Sprintf("Network Virtual Appliance Connection Name: %q", id.NetworkVirtualApplianceConnectionName), - } - return fmt.Sprintf("Network Virtual Appliance Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualapplianceconnection_test.go b/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualapplianceconnection_test.go deleted file mode 100644 index c0b0e0be2cd..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_networkvirtualapplianceconnection_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = NetworkVirtualApplianceConnectionId{} - -func TestNewNetworkVirtualApplianceConnectionID(t *testing.T) { - id := NewNetworkVirtualApplianceConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "networkVirtualApplianceConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.NetworkVirtualApplianceName != "networkVirtualApplianceValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceName'", id.NetworkVirtualApplianceName, "networkVirtualApplianceValue") - } - - if id.NetworkVirtualApplianceConnectionName != "networkVirtualApplianceConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'NetworkVirtualApplianceConnectionName'", id.NetworkVirtualApplianceConnectionName, "networkVirtualApplianceConnectionValue") - } -} - -func TestFormatNetworkVirtualApplianceConnectionID(t *testing.T) { - actual := NewNetworkVirtualApplianceConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "networkVirtualApplianceValue", "networkVirtualApplianceConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/networkVirtualApplianceConnections/networkVirtualApplianceConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseNetworkVirtualApplianceConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/networkVirtualApplianceConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/networkVirtualApplianceConnections/networkVirtualApplianceConnectionValue", - Expected: &NetworkVirtualApplianceConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - NetworkVirtualApplianceConnectionName: "networkVirtualApplianceConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/networkVirtualApplianceConnections/networkVirtualApplianceConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.NetworkVirtualApplianceConnectionName != v.Expected.NetworkVirtualApplianceConnectionName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceConnectionName", v.Expected.NetworkVirtualApplianceConnectionName, actual.NetworkVirtualApplianceConnectionName) - } - - } -} - -func TestParseNetworkVirtualApplianceConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *NetworkVirtualApplianceConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/networkVirtualApplianceConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/nEtWoRkViRtUaLaPpLiAnCeCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/networkVirtualApplianceConnections/networkVirtualApplianceConnectionValue", - Expected: &NetworkVirtualApplianceConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - NetworkVirtualApplianceName: "networkVirtualApplianceValue", - NetworkVirtualApplianceConnectionName: "networkVirtualApplianceConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/networkVirtualAppliances/networkVirtualApplianceValue/networkVirtualApplianceConnections/networkVirtualApplianceConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/nEtWoRkViRtUaLaPpLiAnCeCoNnEcTiOnS/nEtWoRkViRtUaLaPpLiAnCeCoNnEcTiOnVaLuE", - Expected: &NetworkVirtualApplianceConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - NetworkVirtualApplianceName: "nEtWoRkViRtUaLaPpLiAnCeVaLuE", - NetworkVirtualApplianceConnectionName: "nEtWoRkViRtUaLaPpLiAnCeCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/nEtWoRkViRtUaLaPpLiAnCeS/nEtWoRkViRtUaLaPpLiAnCeVaLuE/nEtWoRkViRtUaLaPpLiAnCeCoNnEcTiOnS/nEtWoRkViRtUaLaPpLiAnCeCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseNetworkVirtualApplianceConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.NetworkVirtualApplianceName != v.Expected.NetworkVirtualApplianceName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceName", v.Expected.NetworkVirtualApplianceName, actual.NetworkVirtualApplianceName) - } - - if actual.NetworkVirtualApplianceConnectionName != v.Expected.NetworkVirtualApplianceConnectionName { - t.Fatalf("Expected %q but got %q for NetworkVirtualApplianceConnectionName", v.Expected.NetworkVirtualApplianceConnectionName, actual.NetworkVirtualApplianceConnectionName) - } - - } -} - -func TestSegmentsForNetworkVirtualApplianceConnectionId(t *testing.T) { - segments := NetworkVirtualApplianceConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("NetworkVirtualApplianceConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_routemap.go b/resource-manager/network/2022-11-01/virtualwans/id_routemap.go deleted file mode 100644 index a7eb1850cb8..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_routemap.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteMapId{} - -// RouteMapId is a struct representing the Resource ID for a Route Map -type RouteMapId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - RouteMapName string -} - -// NewRouteMapID returns a new RouteMapId struct -func NewRouteMapID(subscriptionId string, resourceGroupName string, virtualHubName string, routeMapName string) RouteMapId { - return RouteMapId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - RouteMapName: routeMapName, - } -} - -// ParseRouteMapID parses 'input' into a RouteMapId -func ParseRouteMapID(input string) (*RouteMapId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteMapId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteMapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteMapName, ok = parsed.Parsed["routeMapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeMapName", *parsed) - } - - return &id, nil -} - -// ParseRouteMapIDInsensitively parses 'input' case-insensitively into a RouteMapId -// note: this method should only be used for API response data and not user input -func ParseRouteMapIDInsensitively(input string) (*RouteMapId, error) { - parser := resourceids.NewParserFromResourceIdType(RouteMapId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RouteMapId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteMapName, ok = parsed.Parsed["routeMapName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeMapName", *parsed) - } - - return &id, nil -} - -// ValidateRouteMapID checks that 'input' can be parsed as a Route Map ID -func ValidateRouteMapID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRouteMapID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Route Map ID -func (id RouteMapId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/routeMaps/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.RouteMapName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Route Map ID -func (id RouteMapId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticRouteMaps", "routeMaps", "routeMaps"), - resourceids.UserSpecifiedSegment("routeMapName", "routeMapValue"), - } -} - -// String returns a human-readable description of this Route Map ID -func (id RouteMapId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Route Map Name: %q", id.RouteMapName), - } - return fmt.Sprintf("Route Map (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_routemap_test.go b/resource-manager/network/2022-11-01/virtualwans/id_routemap_test.go deleted file mode 100644 index 51ae2459655..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_routemap_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RouteMapId{} - -func TestNewRouteMapID(t *testing.T) { - id := NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.RouteMapName != "routeMapValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteMapName'", id.RouteMapName, "routeMapValue") - } -} - -func TestFormatRouteMapID(t *testing.T) { - actual := NewRouteMapID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeMapValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRouteMapID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteMapId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue", - Expected: &RouteMapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RouteMapName: "routeMapValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteMapID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RouteMapName != v.Expected.RouteMapName { - t.Fatalf("Expected %q but got %q for RouteMapName", v.Expected.RouteMapName, actual.RouteMapName) - } - - } -} - -func TestParseRouteMapIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RouteMapId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeMaPs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue", - Expected: &RouteMapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RouteMapName: "routeMapValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeMaps/routeMapValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeMaPs/rOuTeMaPvAlUe", - Expected: &RouteMapId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - RouteMapName: "rOuTeMaPvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeMaPs/rOuTeMaPvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRouteMapIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RouteMapName != v.Expected.RouteMapName { - t.Fatalf("Expected %q but got %q for RouteMapName", v.Expected.RouteMapName, actual.RouteMapName) - } - - } -} - -func TestSegmentsForRouteMapId(t *testing.T) { - segments := RouteMapId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RouteMapId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_routingintent.go b/resource-manager/network/2022-11-01/virtualwans/id_routingintent.go deleted file mode 100644 index 9a8b1a5cc31..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_routingintent.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoutingIntentId{} - -// RoutingIntentId is a struct representing the Resource ID for a Routing Intent -type RoutingIntentId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - RoutingIntentName string -} - -// NewRoutingIntentID returns a new RoutingIntentId struct -func NewRoutingIntentID(subscriptionId string, resourceGroupName string, virtualHubName string, routingIntentName string) RoutingIntentId { - return RoutingIntentId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - RoutingIntentName: routingIntentName, - } -} - -// ParseRoutingIntentID parses 'input' into a RoutingIntentId -func ParseRoutingIntentID(input string) (*RoutingIntentId, error) { - parser := resourceids.NewParserFromResourceIdType(RoutingIntentId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoutingIntentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RoutingIntentName, ok = parsed.Parsed["routingIntentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routingIntentName", *parsed) - } - - return &id, nil -} - -// ParseRoutingIntentIDInsensitively parses 'input' case-insensitively into a RoutingIntentId -// note: this method should only be used for API response data and not user input -func ParseRoutingIntentIDInsensitively(input string) (*RoutingIntentId, error) { - parser := resourceids.NewParserFromResourceIdType(RoutingIntentId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := RoutingIntentId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RoutingIntentName, ok = parsed.Parsed["routingIntentName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routingIntentName", *parsed) - } - - return &id, nil -} - -// ValidateRoutingIntentID checks that 'input' can be parsed as a Routing Intent ID -func ValidateRoutingIntentID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseRoutingIntentID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Routing Intent ID -func (id RoutingIntentId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/routingIntent/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.RoutingIntentName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Routing Intent ID -func (id RoutingIntentId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticRoutingIntent", "routingIntent", "routingIntent"), - resourceids.UserSpecifiedSegment("routingIntentName", "routingIntentValue"), - } -} - -// String returns a human-readable description of this Routing Intent ID -func (id RoutingIntentId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Routing Intent Name: %q", id.RoutingIntentName), - } - return fmt.Sprintf("Routing Intent (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_routingintent_test.go b/resource-manager/network/2022-11-01/virtualwans/id_routingintent_test.go deleted file mode 100644 index 9ad0fc82170..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_routingintent_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = RoutingIntentId{} - -func TestNewRoutingIntentID(t *testing.T) { - id := NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.RoutingIntentName != "routingIntentValue" { - t.Fatalf("Expected %q but got %q for Segment 'RoutingIntentName'", id.RoutingIntentName, "routingIntentValue") - } -} - -func TestFormatRoutingIntentID(t *testing.T) { - actual := NewRoutingIntentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routingIntentValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseRoutingIntentID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoutingIntentId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue", - Expected: &RoutingIntentId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RoutingIntentName: "routingIntentValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoutingIntentID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RoutingIntentName != v.Expected.RoutingIntentName { - t.Fatalf("Expected %q but got %q for RoutingIntentName", v.Expected.RoutingIntentName, actual.RoutingIntentName) - } - - } -} - -func TestParseRoutingIntentIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *RoutingIntentId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTiNgInTeNt", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue", - Expected: &RoutingIntentId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RoutingIntentName: "routingIntentValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routingIntent/routingIntentValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTiNgInTeNt/rOuTiNgInTeNtVaLuE", - Expected: &RoutingIntentId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - RoutingIntentName: "rOuTiNgInTeNtVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTiNgInTeNt/rOuTiNgInTeNtVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseRoutingIntentIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RoutingIntentName != v.Expected.RoutingIntentName { - t.Fatalf("Expected %q but got %q for RoutingIntentName", v.Expected.RoutingIntentName, actual.RoutingIntentName) - } - - } -} - -func TestSegmentsForRoutingIntentId(t *testing.T) { - segments := RoutingIntentId{}.Segments() - if len(segments) == 0 { - t.Fatalf("RoutingIntentId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_virtualhub.go b/resource-manager/network/2022-11-01/virtualwans/id_virtualhub.go deleted file mode 100644 index 3f42afd7fc5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_virtualhub.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualHubId{} - -// VirtualHubId is a struct representing the Resource ID for a Virtual Hub -type VirtualHubId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string -} - -// NewVirtualHubID returns a new VirtualHubId struct -func NewVirtualHubID(subscriptionId string, resourceGroupName string, virtualHubName string) VirtualHubId { - return VirtualHubId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - } -} - -// ParseVirtualHubID parses 'input' into a VirtualHubId -func ParseVirtualHubID(input string) (*VirtualHubId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualHubId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualHubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - return &id, nil -} - -// ParseVirtualHubIDInsensitively parses 'input' case-insensitively into a VirtualHubId -// note: this method should only be used for API response data and not user input -func ParseVirtualHubIDInsensitively(input string) (*VirtualHubId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualHubId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualHubId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualHubID checks that 'input' can be parsed as a Virtual Hub ID -func ValidateVirtualHubID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualHubID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Hub ID -func (id VirtualHubId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Hub ID -func (id VirtualHubId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - } -} - -// String returns a human-readable description of this Virtual Hub ID -func (id VirtualHubId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - } - return fmt.Sprintf("Virtual Hub (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_virtualhub_test.go b/resource-manager/network/2022-11-01/virtualwans/id_virtualhub_test.go deleted file mode 100644 index 46ce2e94a0f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_virtualhub_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualHubId{} - -func TestNewVirtualHubID(t *testing.T) { - id := NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } -} - -func TestFormatVirtualHubID(t *testing.T) { - actual := NewVirtualHubID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualHubID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualHubId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Expected: &VirtualHubId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualHubID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - } -} - -func TestParseVirtualHubIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualHubId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Expected: &VirtualHubId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Expected: &VirtualHubId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualHubIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - } -} - -func TestSegmentsForVirtualHubId(t *testing.T) { - segments := VirtualHubId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualHubId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_virtualhubroutetable.go b/resource-manager/network/2022-11-01/virtualwans/id_virtualhubroutetable.go deleted file mode 100644 index ccb706e1460..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_virtualhubroutetable.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualHubRouteTableId{} - -// VirtualHubRouteTableId is a struct representing the Resource ID for a Virtual Hub Route Table -type VirtualHubRouteTableId struct { - SubscriptionId string - ResourceGroupName string - VirtualHubName string - RouteTableName string -} - -// NewVirtualHubRouteTableID returns a new VirtualHubRouteTableId struct -func NewVirtualHubRouteTableID(subscriptionId string, resourceGroupName string, virtualHubName string, routeTableName string) VirtualHubRouteTableId { - return VirtualHubRouteTableId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualHubName: virtualHubName, - RouteTableName: routeTableName, - } -} - -// ParseVirtualHubRouteTableID parses 'input' into a VirtualHubRouteTableId -func ParseVirtualHubRouteTableID(input string) (*VirtualHubRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualHubRouteTableId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualHubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ParseVirtualHubRouteTableIDInsensitively parses 'input' case-insensitively into a VirtualHubRouteTableId -// note: this method should only be used for API response data and not user input -func ParseVirtualHubRouteTableIDInsensitively(input string) (*VirtualHubRouteTableId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualHubRouteTableId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualHubRouteTableId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualHubName, ok = parsed.Parsed["virtualHubName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualHubName", *parsed) - } - - if id.RouteTableName, ok = parsed.Parsed["routeTableName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "routeTableName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualHubRouteTableID checks that 'input' can be parsed as a Virtual Hub Route Table ID -func ValidateVirtualHubRouteTableID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualHubRouteTableID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Hub Route Table ID -func (id VirtualHubRouteTableId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualHubs/%s/routeTables/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualHubName, id.RouteTableName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Hub Route Table ID -func (id VirtualHubRouteTableId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualHubs", "virtualHubs", "virtualHubs"), - resourceids.UserSpecifiedSegment("virtualHubName", "virtualHubValue"), - resourceids.StaticSegment("staticRouteTables", "routeTables", "routeTables"), - resourceids.UserSpecifiedSegment("routeTableName", "routeTableValue"), - } -} - -// String returns a human-readable description of this Virtual Hub Route Table ID -func (id VirtualHubRouteTableId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Hub Name: %q", id.VirtualHubName), - fmt.Sprintf("Route Table Name: %q", id.RouteTableName), - } - return fmt.Sprintf("Virtual Hub Route Table (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_virtualhubroutetable_test.go b/resource-manager/network/2022-11-01/virtualwans/id_virtualhubroutetable_test.go deleted file mode 100644 index 16254eae0ca..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_virtualhubroutetable_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualHubRouteTableId{} - -func TestNewVirtualHubRouteTableID(t *testing.T) { - id := NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualHubName != "virtualHubValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualHubName'", id.VirtualHubName, "virtualHubValue") - } - - if id.RouteTableName != "routeTableValue" { - t.Fatalf("Expected %q but got %q for Segment 'RouteTableName'", id.RouteTableName, "routeTableValue") - } -} - -func TestFormatVirtualHubRouteTableID(t *testing.T) { - actual := NewVirtualHubRouteTableID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualHubValue", "routeTableValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualHubRouteTableID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualHubRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue", - Expected: &VirtualHubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualHubRouteTableID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestParseVirtualHubRouteTableIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualHubRouteTableId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeTaBlEs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue", - Expected: &VirtualHubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualHubName: "virtualHubValue", - RouteTableName: "routeTableValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualHubs/virtualHubValue/routeTables/routeTableValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeTaBlEs/rOuTeTaBlEvAlUe", - Expected: &VirtualHubRouteTableId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualHubName: "vIrTuAlHuBvAlUe", - RouteTableName: "rOuTeTaBlEvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlHuBs/vIrTuAlHuBvAlUe/rOuTeTaBlEs/rOuTeTaBlEvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualHubRouteTableIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualHubName != v.Expected.VirtualHubName { - t.Fatalf("Expected %q but got %q for VirtualHubName", v.Expected.VirtualHubName, actual.VirtualHubName) - } - - if actual.RouteTableName != v.Expected.RouteTableName { - t.Fatalf("Expected %q but got %q for RouteTableName", v.Expected.RouteTableName, actual.RouteTableName) - } - - } -} - -func TestSegmentsForVirtualHubRouteTableId(t *testing.T) { - segments := VirtualHubRouteTableId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualHubRouteTableId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_virtualwan.go b/resource-manager/network/2022-11-01/virtualwans/id_virtualwan.go deleted file mode 100644 index 590264a9ee1..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_virtualwan.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualWANId{} - -// VirtualWANId is a struct representing the Resource ID for a Virtual W A N -type VirtualWANId struct { - SubscriptionId string - ResourceGroupName string - VirtualWanName string -} - -// NewVirtualWANID returns a new VirtualWANId struct -func NewVirtualWANID(subscriptionId string, resourceGroupName string, virtualWanName string) VirtualWANId { - return VirtualWANId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualWanName: virtualWanName, - } -} - -// ParseVirtualWANID parses 'input' into a VirtualWANId -func ParseVirtualWANID(input string) (*VirtualWANId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualWANId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualWANId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualWanName, ok = parsed.Parsed["virtualWanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualWanName", *parsed) - } - - return &id, nil -} - -// ParseVirtualWANIDInsensitively parses 'input' case-insensitively into a VirtualWANId -// note: this method should only be used for API response data and not user input -func ParseVirtualWANIDInsensitively(input string) (*VirtualWANId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualWANId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualWANId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualWanName, ok = parsed.Parsed["virtualWanName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualWanName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualWANID checks that 'input' can be parsed as a Virtual W A N ID -func ValidateVirtualWANID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualWANID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual W A N ID -func (id VirtualWANId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualWans/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualWanName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual W A N ID -func (id VirtualWANId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVirtualWans", "virtualWans", "virtualWans"), - resourceids.UserSpecifiedSegment("virtualWanName", "virtualWanValue"), - } -} - -// String returns a human-readable description of this Virtual W A N ID -func (id VirtualWANId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Wan Name: %q", id.VirtualWanName), - } - return fmt.Sprintf("Virtual W A N (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_virtualwan_test.go b/resource-manager/network/2022-11-01/virtualwans/id_virtualwan_test.go deleted file mode 100644 index 05101eb168a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_virtualwan_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualWANId{} - -func TestNewVirtualWANID(t *testing.T) { - id := NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualWanName != "virtualWanValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualWanName'", id.VirtualWanName, "virtualWanValue") - } -} - -func TestFormatVirtualWANID(t *testing.T) { - actual := NewVirtualWANID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualWanValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualWANID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualWANId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue", - Expected: &VirtualWANId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualWanName: "virtualWanValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualWANID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualWanName != v.Expected.VirtualWanName { - t.Fatalf("Expected %q but got %q for VirtualWanName", v.Expected.VirtualWanName, actual.VirtualWanName) - } - - } -} - -func TestParseVirtualWANIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualWANId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlWaNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue", - Expected: &VirtualWANId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualWanName: "virtualWanValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/virtualWans/virtualWanValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlWaNs/vIrTuAlWaNvAlUe", - Expected: &VirtualWANId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualWanName: "vIrTuAlWaNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vIrTuAlWaNs/vIrTuAlWaNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualWANIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualWanName != v.Expected.VirtualWanName { - t.Fatalf("Expected %q but got %q for VirtualWanName", v.Expected.VirtualWanName, actual.VirtualWanName) - } - - } -} - -func TestSegmentsForVirtualWANId(t *testing.T) { - segments := VirtualWANId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualWANId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpngateway.go b/resource-manager/network/2022-11-01/virtualwans/id_vpngateway.go deleted file mode 100644 index a438d896289..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpngateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnGatewayId{} - -// VpnGatewayId is a struct representing the Resource ID for a Vpn Gateway -type VpnGatewayId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string -} - -// NewVpnGatewayID returns a new VpnGatewayId struct -func NewVpnGatewayID(subscriptionId string, resourceGroupName string, vpnGatewayName string) VpnGatewayId { - return VpnGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - } -} - -// ParseVpnGatewayID parses 'input' into a VpnGatewayId -func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - return &id, nil -} - -// ParseVpnGatewayIDInsensitively parses 'input' case-insensitively into a VpnGatewayId -// note: this method should only be used for API response data and not user input -func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateVpnGatewayID checks that 'input' can be parsed as a Vpn Gateway ID -func ValidateVpnGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Gateway ID -func (id VpnGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Gateway ID -func (id VpnGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - } -} - -// String returns a human-readable description of this Vpn Gateway ID -func (id VpnGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - } - return fmt.Sprintf("Vpn Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpngateway_test.go b/resource-manager/network/2022-11-01/virtualwans/id_vpngateway_test.go deleted file mode 100644 index d3d0e4c51f3..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpngateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnGatewayId{} - -func TestNewVpnGatewayID(t *testing.T) { - id := NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } -} - -func TestFormatVpnGatewayID(t *testing.T) { - actual := NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - } -} - -func TestParseVpnGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - } -} - -func TestSegmentsForVpnGatewayId(t *testing.T) { - segments := VpnGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpnlinkconnection.go b/resource-manager/network/2022-11-01/virtualwans/id_vpnlinkconnection.go deleted file mode 100644 index f8c398dc7ac..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpnlinkconnection.go +++ /dev/null @@ -1,153 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnLinkConnectionId{} - -// VpnLinkConnectionId is a struct representing the Resource ID for a Vpn Link Connection -type VpnLinkConnectionId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string - VpnConnectionName string - VpnLinkConnectionName string -} - -// NewVpnLinkConnectionID returns a new VpnLinkConnectionId struct -func NewVpnLinkConnectionID(subscriptionId string, resourceGroupName string, vpnGatewayName string, vpnConnectionName string, vpnLinkConnectionName string) VpnLinkConnectionId { - return VpnLinkConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - VpnConnectionName: vpnConnectionName, - VpnLinkConnectionName: vpnLinkConnectionName, - } -} - -// ParseVpnLinkConnectionID parses 'input' into a VpnLinkConnectionId -func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnLinkConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) - } - - return &id, nil -} - -// ParseVpnLinkConnectionIDInsensitively parses 'input' case-insensitively into a VpnLinkConnectionId -// note: this method should only be used for API response data and not user input -func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnLinkConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateVpnLinkConnectionID checks that 'input' can be parsed as a Vpn Link Connection ID -func ValidateVpnLinkConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnLinkConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Link Connection ID -func (id VpnLinkConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s/vpnConnections/%s/vpnLinkConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName, id.VpnConnectionName, id.VpnLinkConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Link Connection ID -func (id VpnLinkConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - resourceids.StaticSegment("staticVpnConnections", "vpnConnections", "vpnConnections"), - resourceids.UserSpecifiedSegment("vpnConnectionName", "vpnConnectionValue"), - resourceids.StaticSegment("staticVpnLinkConnections", "vpnLinkConnections", "vpnLinkConnections"), - resourceids.UserSpecifiedSegment("vpnLinkConnectionName", "vpnLinkConnectionValue"), - } -} - -// String returns a human-readable description of this Vpn Link Connection ID -func (id VpnLinkConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - fmt.Sprintf("Vpn Connection Name: %q", id.VpnConnectionName), - fmt.Sprintf("Vpn Link Connection Name: %q", id.VpnLinkConnectionName), - } - return fmt.Sprintf("Vpn Link Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpnlinkconnection_test.go b/resource-manager/network/2022-11-01/virtualwans/id_vpnlinkconnection_test.go deleted file mode 100644 index f712871cd7d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpnlinkconnection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnLinkConnectionId{} - -func TestNewVpnLinkConnectionID(t *testing.T) { - id := NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } - - if id.VpnConnectionName != "vpnConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnConnectionName'", id.VpnConnectionName, "vpnConnectionValue") - } - - if id.VpnLinkConnectionName != "vpnLinkConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnLinkConnectionName'", id.VpnLinkConnectionName, "vpnLinkConnectionValue") - } -} - -func TestFormatVpnLinkConnectionID(t *testing.T) { - actual := NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnLinkConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnLinkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - VpnConnectionName: "vpnConnectionValue", - VpnLinkConnectionName: "vpnLinkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnLinkConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.VpnConnectionName != v.Expected.VpnConnectionName { - t.Fatalf("Expected %q but got %q for VpnConnectionName", v.Expected.VpnConnectionName, actual.VpnConnectionName) - } - - if actual.VpnLinkConnectionName != v.Expected.VpnLinkConnectionName { - t.Fatalf("Expected %q but got %q for VpnLinkConnectionName", v.Expected.VpnLinkConnectionName, actual.VpnLinkConnectionName) - } - - } -} - -func TestParseVpnLinkConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnLinkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - VpnConnectionName: "vpnConnectionValue", - VpnLinkConnectionName: "vpnLinkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS/vPnLiNkCoNnEcTiOnVaLuE", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - VpnConnectionName: "vPnCoNnEcTiOnVaLuE", - VpnLinkConnectionName: "vPnLiNkCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS/vPnLiNkCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnLinkConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.VpnConnectionName != v.Expected.VpnConnectionName { - t.Fatalf("Expected %q but got %q for VpnConnectionName", v.Expected.VpnConnectionName, actual.VpnConnectionName) - } - - if actual.VpnLinkConnectionName != v.Expected.VpnLinkConnectionName { - t.Fatalf("Expected %q but got %q for VpnLinkConnectionName", v.Expected.VpnLinkConnectionName, actual.VpnLinkConnectionName) - } - - } -} - -func TestSegmentsForVpnLinkConnectionId(t *testing.T) { - segments := VpnLinkConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnLinkConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpnserverconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/id_vpnserverconfiguration.go deleted file mode 100644 index 194ee0e58a3..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpnserverconfiguration.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnServerConfigurationId{} - -// VpnServerConfigurationId is a struct representing the Resource ID for a Vpn Server Configuration -type VpnServerConfigurationId struct { - SubscriptionId string - ResourceGroupName string - VpnServerConfigurationName string -} - -// NewVpnServerConfigurationID returns a new VpnServerConfigurationId struct -func NewVpnServerConfigurationID(subscriptionId string, resourceGroupName string, vpnServerConfigurationName string) VpnServerConfigurationId { - return VpnServerConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnServerConfigurationName: vpnServerConfigurationName, - } -} - -// ParseVpnServerConfigurationID parses 'input' into a VpnServerConfigurationId -func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnServerConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseVpnServerConfigurationIDInsensitively parses 'input' case-insensitively into a VpnServerConfigurationId -// note: this method should only be used for API response data and not user input -func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnServerConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateVpnServerConfigurationID checks that 'input' can be parsed as a Vpn Server Configuration ID -func ValidateVpnServerConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnServerConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Server Configuration ID -func (id VpnServerConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnServerConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnServerConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Server Configuration ID -func (id VpnServerConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnServerConfigurations", "vpnServerConfigurations", "vpnServerConfigurations"), - resourceids.UserSpecifiedSegment("vpnServerConfigurationName", "vpnServerConfigurationValue"), - } -} - -// String returns a human-readable description of this Vpn Server Configuration ID -func (id VpnServerConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Server Configuration Name: %q", id.VpnServerConfigurationName), - } - return fmt.Sprintf("Vpn Server Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpnserverconfiguration_test.go b/resource-manager/network/2022-11-01/virtualwans/id_vpnserverconfiguration_test.go deleted file mode 100644 index 1c41b70771c..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpnserverconfiguration_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnServerConfigurationId{} - -func TestNewVpnServerConfigurationID(t *testing.T) { - id := NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnServerConfigurationName != "vpnServerConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnServerConfigurationName'", id.VpnServerConfigurationName, "vpnServerConfigurationValue") - } -} - -func TestFormatVpnServerConfigurationID(t *testing.T) { - actual := NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnServerConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnServerConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnServerConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - } -} - -func TestParseVpnServerConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnServerConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnServerConfigurationName: "vPnSeRvErCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnServerConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - } -} - -func TestSegmentsForVpnServerConfigurationId(t *testing.T) { - segments := VpnServerConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnServerConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpnsite.go b/resource-manager/network/2022-11-01/virtualwans/id_vpnsite.go deleted file mode 100644 index d32b6f6dba4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpnsite.go +++ /dev/null @@ -1,127 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteId{} - -// VpnSiteId is a struct representing the Resource ID for a Vpn Site -type VpnSiteId struct { - SubscriptionId string - ResourceGroupName string - VpnSiteName string -} - -// NewVpnSiteID returns a new VpnSiteId struct -func NewVpnSiteID(subscriptionId string, resourceGroupName string, vpnSiteName string) VpnSiteId { - return VpnSiteId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnSiteName: vpnSiteName, - } -} - -// ParseVpnSiteID parses 'input' into a VpnSiteId -func ParseVpnSiteID(input string) (*VpnSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - return &id, nil -} - -// ParseVpnSiteIDInsensitively parses 'input' case-insensitively into a VpnSiteId -// note: this method should only be used for API response data and not user input -func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - return &id, nil -} - -// ValidateVpnSiteID checks that 'input' can be parsed as a Vpn Site ID -func ValidateVpnSiteID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnSiteID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Site ID -func (id VpnSiteId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnSites/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnSiteName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Site ID -func (id VpnSiteId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnSites", "vpnSites", "vpnSites"), - resourceids.UserSpecifiedSegment("vpnSiteName", "vpnSiteValue"), - } -} - -// String returns a human-readable description of this Vpn Site ID -func (id VpnSiteId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Site Name: %q", id.VpnSiteName), - } - return fmt.Sprintf("Vpn Site (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpnsite_test.go b/resource-manager/network/2022-11-01/virtualwans/id_vpnsite_test.go deleted file mode 100644 index 5fb84931dc3..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpnsite_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteId{} - -func TestNewVpnSiteID(t *testing.T) { - id := NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnSiteName != "vpnSiteValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnSiteName'", id.VpnSiteName, "vpnSiteValue") - } -} - -func TestFormatVpnSiteID(t *testing.T) { - actual := NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnSiteID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - } -} - -func TestParseVpnSiteIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnSiteName: "vPnSiTeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - } -} - -func TestSegmentsForVpnSiteId(t *testing.T) { - segments := VpnSiteId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnSiteId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpnsitelink.go b/resource-manager/network/2022-11-01/virtualwans/id_vpnsitelink.go deleted file mode 100644 index e43deb2be92..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpnsitelink.go +++ /dev/null @@ -1,140 +0,0 @@ -package virtualwans - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteLinkId{} - -// VpnSiteLinkId is a struct representing the Resource ID for a Vpn Site Link -type VpnSiteLinkId struct { - SubscriptionId string - ResourceGroupName string - VpnSiteName string - VpnSiteLinkName string -} - -// NewVpnSiteLinkID returns a new VpnSiteLinkId struct -func NewVpnSiteLinkID(subscriptionId string, resourceGroupName string, vpnSiteName string, vpnSiteLinkName string) VpnSiteLinkId { - return VpnSiteLinkId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnSiteName: vpnSiteName, - VpnSiteLinkName: vpnSiteLinkName, - } -} - -// ParseVpnSiteLinkID parses 'input' into a VpnSiteLinkId -func ParseVpnSiteLinkID(input string) (*VpnSiteLinkId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteLinkId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteLinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - if id.VpnSiteLinkName, ok = parsed.Parsed["vpnSiteLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteLinkName", *parsed) - } - - return &id, nil -} - -// ParseVpnSiteLinkIDInsensitively parses 'input' case-insensitively into a VpnSiteLinkId -// note: this method should only be used for API response data and not user input -func ParseVpnSiteLinkIDInsensitively(input string) (*VpnSiteLinkId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteLinkId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteLinkId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - if id.VpnSiteLinkName, ok = parsed.Parsed["vpnSiteLinkName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteLinkName", *parsed) - } - - return &id, nil -} - -// ValidateVpnSiteLinkID checks that 'input' can be parsed as a Vpn Site Link ID -func ValidateVpnSiteLinkID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnSiteLinkID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Site Link ID -func (id VpnSiteLinkId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnSites/%s/vpnSiteLinks/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnSiteName, id.VpnSiteLinkName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Site Link ID -func (id VpnSiteLinkId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnSites", "vpnSites", "vpnSites"), - resourceids.UserSpecifiedSegment("vpnSiteName", "vpnSiteValue"), - resourceids.StaticSegment("staticVpnSiteLinks", "vpnSiteLinks", "vpnSiteLinks"), - resourceids.UserSpecifiedSegment("vpnSiteLinkName", "vpnSiteLinkValue"), - } -} - -// String returns a human-readable description of this Vpn Site Link ID -func (id VpnSiteLinkId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Site Name: %q", id.VpnSiteName), - fmt.Sprintf("Vpn Site Link Name: %q", id.VpnSiteLinkName), - } - return fmt.Sprintf("Vpn Site Link (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/virtualwans/id_vpnsitelink_test.go b/resource-manager/network/2022-11-01/virtualwans/id_vpnsitelink_test.go deleted file mode 100644 index 03b59702cf9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/id_vpnsitelink_test.go +++ /dev/null @@ -1,327 +0,0 @@ -package virtualwans - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteLinkId{} - -func TestNewVpnSiteLinkID(t *testing.T) { - id := NewVpnSiteLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue", "vpnSiteLinkValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnSiteName != "vpnSiteValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnSiteName'", id.VpnSiteName, "vpnSiteValue") - } - - if id.VpnSiteLinkName != "vpnSiteLinkValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnSiteLinkName'", id.VpnSiteLinkName, "vpnSiteLinkValue") - } -} - -func TestFormatVpnSiteLinkID(t *testing.T) { - actual := NewVpnSiteLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue", "vpnSiteLinkValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnSiteLinkID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteLinkId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue", - Expected: &VpnSiteLinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - VpnSiteLinkName: "vpnSiteLinkValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteLinkID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - if actual.VpnSiteLinkName != v.Expected.VpnSiteLinkName { - t.Fatalf("Expected %q but got %q for VpnSiteLinkName", v.Expected.VpnSiteLinkName, actual.VpnSiteLinkName) - } - - } -} - -func TestParseVpnSiteLinkIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteLinkId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/vPnSiTeLiNkS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue", - Expected: &VpnSiteLinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - VpnSiteLinkName: "vpnSiteLinkValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/vpnSiteLinks/vpnSiteLinkValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/vPnSiTeLiNkS/vPnSiTeLiNkVaLuE", - Expected: &VpnSiteLinkId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnSiteName: "vPnSiTeVaLuE", - VpnSiteLinkName: "vPnSiTeLiNkVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/vPnSiTeLiNkS/vPnSiTeLiNkVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteLinkIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - if actual.VpnSiteLinkName != v.Expected.VpnSiteLinkName { - t.Fatalf("Expected %q but got %q for VpnSiteLinkName", v.Expected.VpnSiteLinkName, actual.VpnSiteLinkName) - } - - } -} - -func TestSegmentsForVpnSiteLinkId(t *testing.T) { - segments := VpnSiteLinkId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnSiteLinkId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupscreateorupdate.go deleted file mode 100644 index b96080c9525..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationPolicyGroupsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ConfigurationPolicyGroupsCreateOrUpdate ... -func (c VirtualWANsClient) ConfigurationPolicyGroupsCreateOrUpdate(ctx context.Context, id ConfigurationPolicyGroupId, input VpnServerConfigurationPolicyGroup) (result ConfigurationPolicyGroupsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ConfigurationPolicyGroupsCreateOrUpdateThenPoll performs ConfigurationPolicyGroupsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) ConfigurationPolicyGroupsCreateOrUpdateThenPoll(ctx context.Context, id ConfigurationPolicyGroupId, input VpnServerConfigurationPolicyGroup) error { - result, err := c.ConfigurationPolicyGroupsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing ConfigurationPolicyGroupsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ConfigurationPolicyGroupsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupsdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupsdelete.go deleted file mode 100644 index faabc47e666..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationPolicyGroupsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ConfigurationPolicyGroupsDelete ... -func (c VirtualWANsClient) ConfigurationPolicyGroupsDelete(ctx context.Context, id ConfigurationPolicyGroupId) (result ConfigurationPolicyGroupsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ConfigurationPolicyGroupsDeleteThenPoll performs ConfigurationPolicyGroupsDelete then polls until it's completed -func (c VirtualWANsClient) ConfigurationPolicyGroupsDeleteThenPoll(ctx context.Context, id ConfigurationPolicyGroupId) error { - result, err := c.ConfigurationPolicyGroupsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing ConfigurationPolicyGroupsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ConfigurationPolicyGroupsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupsget.go b/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupsget.go deleted file mode 100644 index d8b7d1b03a6..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationPolicyGroupsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnServerConfigurationPolicyGroup -} - -// ConfigurationPolicyGroupsGet ... -func (c VirtualWANsClient) ConfigurationPolicyGroupsGet(ctx context.Context, id ConfigurationPolicyGroupId) (result ConfigurationPolicyGroupsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupslistbyvpnserverconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupslistbyvpnserverconfiguration.go deleted file mode 100644 index 67b957a0212..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_configurationpolicygroupslistbyvpnserverconfiguration.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ConfigurationPolicyGroupsListByVpnServerConfigurationOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnServerConfigurationPolicyGroup -} - -type ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteResult struct { - Items []VpnServerConfigurationPolicyGroup -} - -// ConfigurationPolicyGroupsListByVpnServerConfiguration ... -func (c VirtualWANsClient) ConfigurationPolicyGroupsListByVpnServerConfiguration(ctx context.Context, id VpnServerConfigurationId) (result ConfigurationPolicyGroupsListByVpnServerConfigurationOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/configurationPolicyGroups", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnServerConfigurationPolicyGroup `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ConfigurationPolicyGroupsListByVpnServerConfigurationComplete retrieves all the results into a single object -func (c VirtualWANsClient) ConfigurationPolicyGroupsListByVpnServerConfigurationComplete(ctx context.Context, id VpnServerConfigurationId) (ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteResult, error) { - return c.ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteMatchingPredicate(ctx, id, VpnServerConfigurationPolicyGroupOperationPredicate{}) -} - -// ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteMatchingPredicate(ctx context.Context, id VpnServerConfigurationId, predicate VpnServerConfigurationPolicyGroupOperationPredicate) (result ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteResult, err error) { - items := make([]VpnServerConfigurationPolicyGroup, 0) - - resp, err := c.ConfigurationPolicyGroupsListByVpnServerConfiguration(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ConfigurationPolicyGroupsListByVpnServerConfigurationCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_generatevirtualwanvpnserverconfigurationvpnprofile.go b/resource-manager/network/2022-11-01/virtualwans/method_generatevirtualwanvpnserverconfigurationvpnprofile.go deleted file mode 100644 index 81ab2e7025a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_generatevirtualwanvpnserverconfigurationvpnprofile.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GeneratevirtualwanvpnserverconfigurationvpnprofileOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Generatevirtualwanvpnserverconfigurationvpnprofile ... -func (c VirtualWANsClient) Generatevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, id VirtualWANId, input VirtualWanVpnProfileParameters) (result GeneratevirtualwanvpnserverconfigurationvpnprofileOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/generateVpnProfile", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// GeneratevirtualwanvpnserverconfigurationvpnprofileThenPoll performs Generatevirtualwanvpnserverconfigurationvpnprofile then polls until it's completed -func (c VirtualWANsClient) GeneratevirtualwanvpnserverconfigurationvpnprofileThenPoll(ctx context.Context, id VirtualWANId, input VirtualWanVpnProfileParameters) error { - result, err := c.Generatevirtualwanvpnserverconfigurationvpnprofile(ctx, id, input) - if err != nil { - return fmt.Errorf("performing Generatevirtualwanvpnserverconfigurationvpnprofile: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Generatevirtualwanvpnserverconfigurationvpnprofile: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_hubroutetablescreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_hubroutetablescreateorupdate.go deleted file mode 100644 index 4b5cf462625..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_hubroutetablescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTablesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// HubRouteTablesCreateOrUpdate ... -func (c VirtualWANsClient) HubRouteTablesCreateOrUpdate(ctx context.Context, id HubRouteTableId, input HubRouteTable) (result HubRouteTablesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// HubRouteTablesCreateOrUpdateThenPoll performs HubRouteTablesCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) HubRouteTablesCreateOrUpdateThenPoll(ctx context.Context, id HubRouteTableId, input HubRouteTable) error { - result, err := c.HubRouteTablesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing HubRouteTablesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after HubRouteTablesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_hubroutetablesdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_hubroutetablesdelete.go deleted file mode 100644 index e51f251c714..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_hubroutetablesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTablesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// HubRouteTablesDelete ... -func (c VirtualWANsClient) HubRouteTablesDelete(ctx context.Context, id HubRouteTableId) (result HubRouteTablesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// HubRouteTablesDeleteThenPoll performs HubRouteTablesDelete then polls until it's completed -func (c VirtualWANsClient) HubRouteTablesDeleteThenPoll(ctx context.Context, id HubRouteTableId) error { - result, err := c.HubRouteTablesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing HubRouteTablesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after HubRouteTablesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_hubroutetablesget.go b/resource-manager/network/2022-11-01/virtualwans/method_hubroutetablesget.go deleted file mode 100644 index 15d26363bf8..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_hubroutetablesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTablesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *HubRouteTable -} - -// HubRouteTablesGet ... -func (c VirtualWANsClient) HubRouteTablesGet(ctx context.Context, id HubRouteTableId) (result HubRouteTablesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_hubroutetableslist.go b/resource-manager/network/2022-11-01/virtualwans/method_hubroutetableslist.go deleted file mode 100644 index dedcb7ed53a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_hubroutetableslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTablesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]HubRouteTable -} - -type HubRouteTablesListCompleteResult struct { - Items []HubRouteTable -} - -// HubRouteTablesList ... -func (c VirtualWANsClient) HubRouteTablesList(ctx context.Context, id VirtualHubId) (result HubRouteTablesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/hubRouteTables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]HubRouteTable `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// HubRouteTablesListComplete retrieves all the results into a single object -func (c VirtualWANsClient) HubRouteTablesListComplete(ctx context.Context, id VirtualHubId) (HubRouteTablesListCompleteResult, error) { - return c.HubRouteTablesListCompleteMatchingPredicate(ctx, id, HubRouteTableOperationPredicate{}) -} - -// HubRouteTablesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) HubRouteTablesListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate HubRouteTableOperationPredicate) (result HubRouteTablesListCompleteResult, err error) { - items := make([]HubRouteTable, 0) - - resp, err := c.HubRouteTablesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = HubRouteTablesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionscreateorupdate.go deleted file mode 100644 index e7cfb2a8130..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// HubVirtualNetworkConnectionsCreateOrUpdate ... -func (c VirtualWANsClient) HubVirtualNetworkConnectionsCreateOrUpdate(ctx context.Context, id HubVirtualNetworkConnectionId, input HubVirtualNetworkConnection) (result HubVirtualNetworkConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// HubVirtualNetworkConnectionsCreateOrUpdateThenPoll performs HubVirtualNetworkConnectionsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) HubVirtualNetworkConnectionsCreateOrUpdateThenPoll(ctx context.Context, id HubVirtualNetworkConnectionId, input HubVirtualNetworkConnection) error { - result, err := c.HubVirtualNetworkConnectionsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing HubVirtualNetworkConnectionsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after HubVirtualNetworkConnectionsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionsdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionsdelete.go deleted file mode 100644 index d26ec8f61b8..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// HubVirtualNetworkConnectionsDelete ... -func (c VirtualWANsClient) HubVirtualNetworkConnectionsDelete(ctx context.Context, id HubVirtualNetworkConnectionId) (result HubVirtualNetworkConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// HubVirtualNetworkConnectionsDeleteThenPoll performs HubVirtualNetworkConnectionsDelete then polls until it's completed -func (c VirtualWANsClient) HubVirtualNetworkConnectionsDeleteThenPoll(ctx context.Context, id HubVirtualNetworkConnectionId) error { - result, err := c.HubVirtualNetworkConnectionsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing HubVirtualNetworkConnectionsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after HubVirtualNetworkConnectionsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionsget.go b/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionsget.go deleted file mode 100644 index f596eedeb04..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *HubVirtualNetworkConnection -} - -// HubVirtualNetworkConnectionsGet ... -func (c VirtualWANsClient) HubVirtualNetworkConnectionsGet(ctx context.Context, id HubVirtualNetworkConnectionId) (result HubVirtualNetworkConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionslist.go b/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionslist.go deleted file mode 100644 index 8dc360a0f9a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_hubvirtualnetworkconnectionslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]HubVirtualNetworkConnection -} - -type HubVirtualNetworkConnectionsListCompleteResult struct { - Items []HubVirtualNetworkConnection -} - -// HubVirtualNetworkConnectionsList ... -func (c VirtualWANsClient) HubVirtualNetworkConnectionsList(ctx context.Context, id VirtualHubId) (result HubVirtualNetworkConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/hubVirtualNetworkConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]HubVirtualNetworkConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// HubVirtualNetworkConnectionsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) HubVirtualNetworkConnectionsListComplete(ctx context.Context, id VirtualHubId) (HubVirtualNetworkConnectionsListCompleteResult, error) { - return c.HubVirtualNetworkConnectionsListCompleteMatchingPredicate(ctx, id, HubVirtualNetworkConnectionOperationPredicate{}) -} - -// HubVirtualNetworkConnectionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) HubVirtualNetworkConnectionsListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate HubVirtualNetworkConnectionOperationPredicate) (result HubVirtualNetworkConnectionsListCompleteResult, err error) { - items := make([]HubVirtualNetworkConnection, 0) - - resp, err := c.HubVirtualNetworkConnectionsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = HubVirtualNetworkConnectionsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_natrulescreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_natrulescreateorupdate.go deleted file mode 100644 index ed93eaa4809..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_natrulescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NatRulesCreateOrUpdate ... -func (c VirtualWANsClient) NatRulesCreateOrUpdate(ctx context.Context, id NatRuleId, input VpnGatewayNatRule) (result NatRulesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NatRulesCreateOrUpdateThenPoll performs NatRulesCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) NatRulesCreateOrUpdateThenPoll(ctx context.Context, id NatRuleId, input VpnGatewayNatRule) error { - result, err := c.NatRulesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing NatRulesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NatRulesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_natrulesdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_natrulesdelete.go deleted file mode 100644 index 6908f8fa7a2..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_natrulesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NatRulesDelete ... -func (c VirtualWANsClient) NatRulesDelete(ctx context.Context, id NatRuleId) (result NatRulesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NatRulesDeleteThenPoll performs NatRulesDelete then polls until it's completed -func (c VirtualWANsClient) NatRulesDeleteThenPoll(ctx context.Context, id NatRuleId) error { - result, err := c.NatRulesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing NatRulesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NatRulesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_natrulesget.go b/resource-manager/network/2022-11-01/virtualwans/method_natrulesget.go deleted file mode 100644 index 2a81f289ef7..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_natrulesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnGatewayNatRule -} - -// NatRulesGet ... -func (c VirtualWANsClient) NatRulesGet(ctx context.Context, id NatRuleId) (result NatRulesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_natruleslistbyvpngateway.go b/resource-manager/network/2022-11-01/virtualwans/method_natruleslistbyvpngateway.go deleted file mode 100644 index bb8208128e1..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_natruleslistbyvpngateway.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulesListByVpnGatewayOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnGatewayNatRule -} - -type NatRulesListByVpnGatewayCompleteResult struct { - Items []VpnGatewayNatRule -} - -// NatRulesListByVpnGateway ... -func (c VirtualWANsClient) NatRulesListByVpnGateway(ctx context.Context, id VpnGatewayId) (result NatRulesListByVpnGatewayOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/natRules", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnGatewayNatRule `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// NatRulesListByVpnGatewayComplete retrieves all the results into a single object -func (c VirtualWANsClient) NatRulesListByVpnGatewayComplete(ctx context.Context, id VpnGatewayId) (NatRulesListByVpnGatewayCompleteResult, error) { - return c.NatRulesListByVpnGatewayCompleteMatchingPredicate(ctx, id, VpnGatewayNatRuleOperationPredicate{}) -} - -// NatRulesListByVpnGatewayCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) NatRulesListByVpnGatewayCompleteMatchingPredicate(ctx context.Context, id VpnGatewayId, predicate VpnGatewayNatRuleOperationPredicate) (result NatRulesListByVpnGatewayCompleteResult, err error) { - items := make([]VpnGatewayNatRule, 0) - - resp, err := c.NatRulesListByVpnGateway(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = NatRulesListByVpnGatewayCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionscreateorupdate.go deleted file mode 100644 index 5b4b26fc3e4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceConnectionsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NetworkVirtualApplianceConnectionsCreateOrUpdate ... -func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsCreateOrUpdate(ctx context.Context, id NetworkVirtualApplianceConnectionId, input NetworkVirtualApplianceConnection) (result NetworkVirtualApplianceConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NetworkVirtualApplianceConnectionsCreateOrUpdateThenPoll performs NetworkVirtualApplianceConnectionsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsCreateOrUpdateThenPoll(ctx context.Context, id NetworkVirtualApplianceConnectionId, input NetworkVirtualApplianceConnection) error { - result, err := c.NetworkVirtualApplianceConnectionsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing NetworkVirtualApplianceConnectionsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NetworkVirtualApplianceConnectionsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionsdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionsdelete.go deleted file mode 100644 index 38492cbbb11..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceConnectionsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// NetworkVirtualApplianceConnectionsDelete ... -func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsDelete(ctx context.Context, id NetworkVirtualApplianceConnectionId) (result NetworkVirtualApplianceConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// NetworkVirtualApplianceConnectionsDeleteThenPoll performs NetworkVirtualApplianceConnectionsDelete then polls until it's completed -func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsDeleteThenPoll(ctx context.Context, id NetworkVirtualApplianceConnectionId) error { - result, err := c.NetworkVirtualApplianceConnectionsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing NetworkVirtualApplianceConnectionsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after NetworkVirtualApplianceConnectionsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionsget.go b/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionsget.go deleted file mode 100644 index 993a8e813f4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *NetworkVirtualApplianceConnection -} - -// NetworkVirtualApplianceConnectionsGet ... -func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsGet(ctx context.Context, id NetworkVirtualApplianceConnectionId) (result NetworkVirtualApplianceConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionslist.go b/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionslist.go deleted file mode 100644 index 40946b3f8d6..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_networkvirtualapplianceconnectionslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]NetworkVirtualApplianceConnection -} - -type NetworkVirtualApplianceConnectionsListCompleteResult struct { - Items []NetworkVirtualApplianceConnection -} - -// NetworkVirtualApplianceConnectionsList ... -func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsList(ctx context.Context, id NetworkVirtualApplianceId) (result NetworkVirtualApplianceConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/networkVirtualApplianceConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]NetworkVirtualApplianceConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// NetworkVirtualApplianceConnectionsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsListComplete(ctx context.Context, id NetworkVirtualApplianceId) (NetworkVirtualApplianceConnectionsListCompleteResult, error) { - return c.NetworkVirtualApplianceConnectionsListCompleteMatchingPredicate(ctx, id, NetworkVirtualApplianceConnectionOperationPredicate{}) -} - -// NetworkVirtualApplianceConnectionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) NetworkVirtualApplianceConnectionsListCompleteMatchingPredicate(ctx context.Context, id NetworkVirtualApplianceId, predicate NetworkVirtualApplianceConnectionOperationPredicate) (result NetworkVirtualApplianceConnectionsListCompleteResult, err error) { - items := make([]NetworkVirtualApplianceConnection, 0) - - resp, err := c.NetworkVirtualApplianceConnectionsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = NetworkVirtualApplianceConnectionsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayscreateorupdate.go deleted file mode 100644 index c86cbdc71a7..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayscreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// P2sVpnGatewaysCreateOrUpdate ... -func (c VirtualWANsClient) P2sVpnGatewaysCreateOrUpdate(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnGateway) (result P2sVpnGatewaysCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// P2sVpnGatewaysCreateOrUpdateThenPoll performs P2sVpnGatewaysCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) P2sVpnGatewaysCreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId, input P2SVpnGateway) error { - result, err := c.P2sVpnGatewaysCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing P2sVpnGatewaysCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after P2sVpnGatewaysCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewaysdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewaysdelete.go deleted file mode 100644 index 23ae30eaecd..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewaysdelete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// P2sVpnGatewaysDelete ... -func (c VirtualWANsClient) P2sVpnGatewaysDelete(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) (result P2sVpnGatewaysDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// P2sVpnGatewaysDeleteThenPoll performs P2sVpnGatewaysDelete then polls until it's completed -func (c VirtualWANsClient) P2sVpnGatewaysDeleteThenPoll(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) error { - result, err := c.P2sVpnGatewaysDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing P2sVpnGatewaysDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after P2sVpnGatewaysDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewaysget.go b/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewaysget.go deleted file mode 100644 index 35e425baad0..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewaysget.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *P2SVpnGateway -} - -// P2sVpnGatewaysGet ... -func (c VirtualWANsClient) P2sVpnGatewaysGet(ctx context.Context, id commonids.VirtualWANP2SVPNGatewayId) (result P2sVpnGatewaysGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayslist.go b/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayslist.go deleted file mode 100644 index 44ba4371089..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]P2SVpnGateway -} - -type P2sVpnGatewaysListCompleteResult struct { - Items []P2SVpnGateway -} - -// P2sVpnGatewaysList ... -func (c VirtualWANsClient) P2sVpnGatewaysList(ctx context.Context, id commonids.SubscriptionId) (result P2sVpnGatewaysListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/p2sVpnGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]P2SVpnGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// P2sVpnGatewaysListComplete retrieves all the results into a single object -func (c VirtualWANsClient) P2sVpnGatewaysListComplete(ctx context.Context, id commonids.SubscriptionId) (P2sVpnGatewaysListCompleteResult, error) { - return c.P2sVpnGatewaysListCompleteMatchingPredicate(ctx, id, P2SVpnGatewayOperationPredicate{}) -} - -// P2sVpnGatewaysListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) P2sVpnGatewaysListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate P2SVpnGatewayOperationPredicate) (result P2sVpnGatewaysListCompleteResult, err error) { - items := make([]P2SVpnGateway, 0) - - resp, err := c.P2sVpnGatewaysList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = P2sVpnGatewaysListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayslistbyresourcegroup.go b/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayslistbyresourcegroup.go deleted file mode 100644 index 5c0d4de5ec5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_p2svpngatewayslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2sVpnGatewaysListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]P2SVpnGateway -} - -type P2sVpnGatewaysListByResourceGroupCompleteResult struct { - Items []P2SVpnGateway -} - -// P2sVpnGatewaysListByResourceGroup ... -func (c VirtualWANsClient) P2sVpnGatewaysListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result P2sVpnGatewaysListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/p2sVpnGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]P2SVpnGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// P2sVpnGatewaysListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) P2sVpnGatewaysListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (P2sVpnGatewaysListByResourceGroupCompleteResult, error) { - return c.P2sVpnGatewaysListByResourceGroupCompleteMatchingPredicate(ctx, id, P2SVpnGatewayOperationPredicate{}) -} - -// P2sVpnGatewaysListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) P2sVpnGatewaysListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate P2SVpnGatewayOperationPredicate) (result P2sVpnGatewaysListByResourceGroupCompleteResult, err error) { - items := make([]P2SVpnGateway, 0) - - resp, err := c.P2sVpnGatewaysListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = P2sVpnGatewaysListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_routemapscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_routemapscreateorupdate.go deleted file mode 100644 index be6848778c9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_routemapscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// RouteMapsCreateOrUpdate ... -func (c VirtualWANsClient) RouteMapsCreateOrUpdate(ctx context.Context, id RouteMapId, input RouteMap) (result RouteMapsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// RouteMapsCreateOrUpdateThenPoll performs RouteMapsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) RouteMapsCreateOrUpdateThenPoll(ctx context.Context, id RouteMapId, input RouteMap) error { - result, err := c.RouteMapsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing RouteMapsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after RouteMapsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_routemapsdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_routemapsdelete.go deleted file mode 100644 index f89977d5d94..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_routemapsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// RouteMapsDelete ... -func (c VirtualWANsClient) RouteMapsDelete(ctx context.Context, id RouteMapId) (result RouteMapsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// RouteMapsDeleteThenPoll performs RouteMapsDelete then polls until it's completed -func (c VirtualWANsClient) RouteMapsDeleteThenPoll(ctx context.Context, id RouteMapId) error { - result, err := c.RouteMapsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing RouteMapsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after RouteMapsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_routemapsget.go b/resource-manager/network/2022-11-01/virtualwans/method_routemapsget.go deleted file mode 100644 index c2ab3a432f5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_routemapsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RouteMap -} - -// RouteMapsGet ... -func (c VirtualWANsClient) RouteMapsGet(ctx context.Context, id RouteMapId) (result RouteMapsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_routemapslist.go b/resource-manager/network/2022-11-01/virtualwans/method_routemapslist.go deleted file mode 100644 index beaac7240bd..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_routemapslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RouteMap -} - -type RouteMapsListCompleteResult struct { - Items []RouteMap -} - -// RouteMapsList ... -func (c VirtualWANsClient) RouteMapsList(ctx context.Context, id VirtualHubId) (result RouteMapsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routeMaps", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RouteMap `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// RouteMapsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) RouteMapsListComplete(ctx context.Context, id VirtualHubId) (RouteMapsListCompleteResult, error) { - return c.RouteMapsListCompleteMatchingPredicate(ctx, id, RouteMapOperationPredicate{}) -} - -// RouteMapsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) RouteMapsListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate RouteMapOperationPredicate) (result RouteMapsListCompleteResult, err error) { - items := make([]RouteMap, 0) - - resp, err := c.RouteMapsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = RouteMapsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_routingintentcreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_routingintentcreateorupdate.go deleted file mode 100644 index 4f9cf497bc5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_routingintentcreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// RoutingIntentCreateOrUpdate ... -func (c VirtualWANsClient) RoutingIntentCreateOrUpdate(ctx context.Context, id RoutingIntentId, input RoutingIntent) (result RoutingIntentCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// RoutingIntentCreateOrUpdateThenPoll performs RoutingIntentCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) RoutingIntentCreateOrUpdateThenPoll(ctx context.Context, id RoutingIntentId, input RoutingIntent) error { - result, err := c.RoutingIntentCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing RoutingIntentCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after RoutingIntentCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_routingintentdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_routingintentdelete.go deleted file mode 100644 index dd481f41454..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_routingintentdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// RoutingIntentDelete ... -func (c VirtualWANsClient) RoutingIntentDelete(ctx context.Context, id RoutingIntentId) (result RoutingIntentDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// RoutingIntentDeleteThenPoll performs RoutingIntentDelete then polls until it's completed -func (c VirtualWANsClient) RoutingIntentDeleteThenPoll(ctx context.Context, id RoutingIntentId) error { - result, err := c.RoutingIntentDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing RoutingIntentDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after RoutingIntentDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_routingintentget.go b/resource-manager/network/2022-11-01/virtualwans/method_routingintentget.go deleted file mode 100644 index fa8ddeee29c..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_routingintentget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *RoutingIntent -} - -// RoutingIntentGet ... -func (c VirtualWANsClient) RoutingIntentGet(ctx context.Context, id RoutingIntentId) (result RoutingIntentGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_routingintentlist.go b/resource-manager/network/2022-11-01/virtualwans/method_routingintentlist.go deleted file mode 100644 index 61924f8534f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_routingintentlist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]RoutingIntent -} - -type RoutingIntentListCompleteResult struct { - Items []RoutingIntent -} - -// RoutingIntentList ... -func (c VirtualWANsClient) RoutingIntentList(ctx context.Context, id VirtualHubId) (result RoutingIntentListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routingIntent", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]RoutingIntent `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// RoutingIntentListComplete retrieves all the results into a single object -func (c VirtualWANsClient) RoutingIntentListComplete(ctx context.Context, id VirtualHubId) (RoutingIntentListCompleteResult, error) { - return c.RoutingIntentListCompleteMatchingPredicate(ctx, id, RoutingIntentOperationPredicate{}) -} - -// RoutingIntentListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) RoutingIntentListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate RoutingIntentOperationPredicate) (result RoutingIntentListCompleteResult, err error) { - items := make([]RoutingIntent, 0) - - resp, err := c.RoutingIntentList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = RoutingIntentListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_supportedsecurityproviders.go b/resource-manager/network/2022-11-01/virtualwans/method_supportedsecurityproviders.go deleted file mode 100644 index a7ffada01e2..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_supportedsecurityproviders.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SupportedSecurityProvidersOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualWanSecurityProviders -} - -// SupportedSecurityProviders ... -func (c VirtualWANsClient) SupportedSecurityProviders(ctx context.Context, id VirtualWANId) (result SupportedSecurityProvidersOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/supportedSecurityProviders", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_updatetags.go b/resource-manager/network/2022-11-01/virtualwans/method_updatetags.go deleted file mode 100644 index 1f4b6c7114d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualWAN -} - -// UpdateTags ... -func (c VirtualWANsClient) UpdateTags(ctx context.Context, id VirtualWANId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectioncreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectioncreateorupdate.go deleted file mode 100644 index bfbbcc4c752..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectioncreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubBgpConnectionCreateOrUpdate ... -func (c VirtualWANsClient) VirtualHubBgpConnectionCreateOrUpdate(ctx context.Context, id commonids.VirtualHubBGPConnectionId, input BgpConnection) (result VirtualHubBgpConnectionCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubBgpConnectionCreateOrUpdateThenPoll performs VirtualHubBgpConnectionCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualHubBgpConnectionCreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualHubBGPConnectionId, input BgpConnection) error { - result, err := c.VirtualHubBgpConnectionCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubBgpConnectionCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubBgpConnectionCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectiondelete.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectiondelete.go deleted file mode 100644 index b8f353d5be6..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectiondelete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubBgpConnectionDelete ... -func (c VirtualWANsClient) VirtualHubBgpConnectionDelete(ctx context.Context, id commonids.VirtualHubBGPConnectionId) (result VirtualHubBgpConnectionDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubBgpConnectionDeleteThenPoll performs VirtualHubBgpConnectionDelete then polls until it's completed -func (c VirtualWANsClient) VirtualHubBgpConnectionDeleteThenPoll(ctx context.Context, id commonids.VirtualHubBGPConnectionId) error { - result, err := c.VirtualHubBgpConnectionDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubBgpConnectionDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubBgpConnectionDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionget.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionget.go deleted file mode 100644 index 404f5884207..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionget.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *BgpConnection -} - -// VirtualHubBgpConnectionGet ... -func (c VirtualWANsClient) VirtualHubBgpConnectionGet(ctx context.Context, id commonids.VirtualHubBGPConnectionId) (result VirtualHubBgpConnectionGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslist.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslist.go deleted file mode 100644 index 2881195f87b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]BgpConnection -} - -type VirtualHubBgpConnectionsListCompleteResult struct { - Items []BgpConnection -} - -// VirtualHubBgpConnectionsList ... -func (c VirtualWANsClient) VirtualHubBgpConnectionsList(ctx context.Context, id VirtualHubId) (result VirtualHubBgpConnectionsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/bgpConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]BgpConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubBgpConnectionsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubBgpConnectionsListComplete(ctx context.Context, id VirtualHubId) (VirtualHubBgpConnectionsListCompleteResult, error) { - return c.VirtualHubBgpConnectionsListCompleteMatchingPredicate(ctx, id, BgpConnectionOperationPredicate{}) -} - -// VirtualHubBgpConnectionsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubBgpConnectionsListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate BgpConnectionOperationPredicate) (result VirtualHubBgpConnectionsListCompleteResult, err error) { - items := make([]BgpConnection, 0) - - resp, err := c.VirtualHubBgpConnectionsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubBgpConnectionsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslistadvertisedroutes.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslistadvertisedroutes.go deleted file mode 100644 index 6ec6033e7c6..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslistadvertisedroutes.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionsListAdvertisedRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubBgpConnectionsListAdvertisedRoutes ... -func (c VirtualWANsClient) VirtualHubBgpConnectionsListAdvertisedRoutes(ctx context.Context, id commonids.VirtualHubBGPConnectionId) (result VirtualHubBgpConnectionsListAdvertisedRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/advertisedRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubBgpConnectionsListAdvertisedRoutesThenPoll performs VirtualHubBgpConnectionsListAdvertisedRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubBgpConnectionsListAdvertisedRoutesThenPoll(ctx context.Context, id commonids.VirtualHubBGPConnectionId) error { - result, err := c.VirtualHubBgpConnectionsListAdvertisedRoutes(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubBgpConnectionsListAdvertisedRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubBgpConnectionsListAdvertisedRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslistlearnedroutes.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslistlearnedroutes.go deleted file mode 100644 index 15707fcfac5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubbgpconnectionslistlearnedroutes.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubBgpConnectionsListLearnedRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubBgpConnectionsListLearnedRoutes ... -func (c VirtualWANsClient) VirtualHubBgpConnectionsListLearnedRoutes(ctx context.Context, id commonids.VirtualHubBGPConnectionId) (result VirtualHubBgpConnectionsListLearnedRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/learnedRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubBgpConnectionsListLearnedRoutesThenPoll performs VirtualHubBgpConnectionsListLearnedRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubBgpConnectionsListLearnedRoutesThenPoll(ctx context.Context, id commonids.VirtualHubBGPConnectionId) error { - result, err := c.VirtualHubBgpConnectionsListLearnedRoutes(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubBgpConnectionsListLearnedRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubBgpConnectionsListLearnedRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationcreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationcreateorupdate.go deleted file mode 100644 index 79c6df9b0b3..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationcreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubIPConfigurationCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubIPConfigurationCreateOrUpdate ... -func (c VirtualWANsClient) VirtualHubIPConfigurationCreateOrUpdate(ctx context.Context, id commonids.VirtualHubIPConfigurationId, input HubIPConfiguration) (result VirtualHubIPConfigurationCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubIPConfigurationCreateOrUpdateThenPoll performs VirtualHubIPConfigurationCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualHubIPConfigurationCreateOrUpdateThenPoll(ctx context.Context, id commonids.VirtualHubIPConfigurationId, input HubIPConfiguration) error { - result, err := c.VirtualHubIPConfigurationCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubIPConfigurationCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubIPConfigurationCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationdelete.go deleted file mode 100644 index 36341aa33f7..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationdelete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubIPConfigurationDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubIPConfigurationDelete ... -func (c VirtualWANsClient) VirtualHubIPConfigurationDelete(ctx context.Context, id commonids.VirtualHubIPConfigurationId) (result VirtualHubIPConfigurationDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubIPConfigurationDeleteThenPoll performs VirtualHubIPConfigurationDelete then polls until it's completed -func (c VirtualWANsClient) VirtualHubIPConfigurationDeleteThenPoll(ctx context.Context, id commonids.VirtualHubIPConfigurationId) error { - result, err := c.VirtualHubIPConfigurationDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubIPConfigurationDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubIPConfigurationDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationget.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationget.go deleted file mode 100644 index 844b31e79e9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationget.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubIPConfigurationGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *HubIPConfiguration -} - -// VirtualHubIPConfigurationGet ... -func (c VirtualWANsClient) VirtualHubIPConfigurationGet(ctx context.Context, id commonids.VirtualHubIPConfigurationId) (result VirtualHubIPConfigurationGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationlist.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationlist.go deleted file mode 100644 index 8a570a17df5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubipconfigurationlist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubIPConfigurationListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]HubIPConfiguration -} - -type VirtualHubIPConfigurationListCompleteResult struct { - Items []HubIPConfiguration -} - -// VirtualHubIPConfigurationList ... -func (c VirtualWANsClient) VirtualHubIPConfigurationList(ctx context.Context, id VirtualHubId) (result VirtualHubIPConfigurationListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/ipConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]HubIPConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubIPConfigurationListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubIPConfigurationListComplete(ctx context.Context, id VirtualHubId) (VirtualHubIPConfigurationListCompleteResult, error) { - return c.VirtualHubIPConfigurationListCompleteMatchingPredicate(ctx, id, HubIPConfigurationOperationPredicate{}) -} - -// VirtualHubIPConfigurationListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubIPConfigurationListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate HubIPConfigurationOperationPredicate) (result VirtualHubIPConfigurationListCompleteResult, err error) { - items := make([]HubIPConfiguration, 0) - - resp, err := c.VirtualHubIPConfigurationList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubIPConfigurationListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2screateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2screateorupdate.go deleted file mode 100644 index 17c057ea65e..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2screateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2sCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubRouteTableV2sCreateOrUpdate ... -func (c VirtualWANsClient) VirtualHubRouteTableV2sCreateOrUpdate(ctx context.Context, id VirtualHubRouteTableId, input VirtualHubRouteTableV2) (result VirtualHubRouteTableV2sCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubRouteTableV2sCreateOrUpdateThenPoll performs VirtualHubRouteTableV2sCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualHubRouteTableV2sCreateOrUpdateThenPoll(ctx context.Context, id VirtualHubRouteTableId, input VirtualHubRouteTableV2) error { - result, err := c.VirtualHubRouteTableV2sCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubRouteTableV2sCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubRouteTableV2sCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2sdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2sdelete.go deleted file mode 100644 index 91cc7babd28..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2sdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2sDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubRouteTableV2sDelete ... -func (c VirtualWANsClient) VirtualHubRouteTableV2sDelete(ctx context.Context, id VirtualHubRouteTableId) (result VirtualHubRouteTableV2sDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubRouteTableV2sDeleteThenPoll performs VirtualHubRouteTableV2sDelete then polls until it's completed -func (c VirtualWANsClient) VirtualHubRouteTableV2sDeleteThenPoll(ctx context.Context, id VirtualHubRouteTableId) error { - result, err := c.VirtualHubRouteTableV2sDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubRouteTableV2sDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubRouteTableV2sDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2sget.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2sget.go deleted file mode 100644 index c421cab42b0..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2sget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2sGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualHubRouteTableV2 -} - -// VirtualHubRouteTableV2sGet ... -func (c VirtualWANsClient) VirtualHubRouteTableV2sGet(ctx context.Context, id VirtualHubRouteTableId) (result VirtualHubRouteTableV2sGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2slist.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2slist.go deleted file mode 100644 index cff86b6b3e4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubroutetablev2slist.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2sListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualHubRouteTableV2 -} - -type VirtualHubRouteTableV2sListCompleteResult struct { - Items []VirtualHubRouteTableV2 -} - -// VirtualHubRouteTableV2sList ... -func (c VirtualWANsClient) VirtualHubRouteTableV2sList(ctx context.Context, id VirtualHubId) (result VirtualHubRouteTableV2sListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/routeTables", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualHubRouteTableV2 `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubRouteTableV2sListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubRouteTableV2sListComplete(ctx context.Context, id VirtualHubId) (VirtualHubRouteTableV2sListCompleteResult, error) { - return c.VirtualHubRouteTableV2sListCompleteMatchingPredicate(ctx, id, VirtualHubRouteTableV2OperationPredicate{}) -} - -// VirtualHubRouteTableV2sListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubRouteTableV2sListCompleteMatchingPredicate(ctx context.Context, id VirtualHubId, predicate VirtualHubRouteTableV2OperationPredicate) (result VirtualHubRouteTableV2sListCompleteResult, err error) { - items := make([]VirtualHubRouteTableV2, 0) - - resp, err := c.VirtualHubRouteTableV2sList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubRouteTableV2sListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubscreateorupdate.go deleted file mode 100644 index 909feeeac5a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsCreateOrUpdate ... -func (c VirtualWANsClient) VirtualHubsCreateOrUpdate(ctx context.Context, id VirtualHubId, input VirtualHub) (result VirtualHubsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsCreateOrUpdateThenPoll performs VirtualHubsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualHubsCreateOrUpdateThenPoll(ctx context.Context, id VirtualHubId, input VirtualHub) error { - result, err := c.VirtualHubsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsdelete.go deleted file mode 100644 index 70eebb0a343..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsDelete ... -func (c VirtualWANsClient) VirtualHubsDelete(ctx context.Context, id VirtualHubId) (result VirtualHubsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsDeleteThenPoll performs VirtualHubsDelete then polls until it's completed -func (c VirtualWANsClient) VirtualHubsDeleteThenPoll(ctx context.Context, id VirtualHubId) error { - result, err := c.VirtualHubsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualHubsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsget.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsget.go deleted file mode 100644 index 254a4824bc8..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualHub -} - -// VirtualHubsGet ... -func (c VirtualWANsClient) VirtualHubsGet(ctx context.Context, id VirtualHubId) (result VirtualHubsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgeteffectivevirtualhubroutes.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgeteffectivevirtualhubroutes.go deleted file mode 100644 index da163f2cba2..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgeteffectivevirtualhubroutes.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsGetEffectiveVirtualHubRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsGetEffectiveVirtualHubRoutes ... -func (c VirtualWANsClient) VirtualHubsGetEffectiveVirtualHubRoutes(ctx context.Context, id VirtualHubId, input EffectiveRoutesParameters) (result VirtualHubsGetEffectiveVirtualHubRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/effectiveRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsGetEffectiveVirtualHubRoutesThenPoll performs VirtualHubsGetEffectiveVirtualHubRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubsGetEffectiveVirtualHubRoutesThenPoll(ctx context.Context, id VirtualHubId, input EffectiveRoutesParameters) error { - result, err := c.VirtualHubsGetEffectiveVirtualHubRoutes(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubsGetEffectiveVirtualHubRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsGetEffectiveVirtualHubRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgetinboundroutes.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgetinboundroutes.go deleted file mode 100644 index 2bb5ea498e2..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgetinboundroutes.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsGetInboundRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsGetInboundRoutes ... -func (c VirtualWANsClient) VirtualHubsGetInboundRoutes(ctx context.Context, id VirtualHubId, input GetInboundRoutesParameters) (result VirtualHubsGetInboundRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/inboundRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsGetInboundRoutesThenPoll performs VirtualHubsGetInboundRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubsGetInboundRoutesThenPoll(ctx context.Context, id VirtualHubId, input GetInboundRoutesParameters) error { - result, err := c.VirtualHubsGetInboundRoutes(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubsGetInboundRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsGetInboundRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgetoutboundroutes.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgetoutboundroutes.go deleted file mode 100644 index 38d480f2a36..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsgetoutboundroutes.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsGetOutboundRoutesOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualHubsGetOutboundRoutes ... -func (c VirtualWANsClient) VirtualHubsGetOutboundRoutes(ctx context.Context, id VirtualHubId, input GetOutboundRoutesParameters) (result VirtualHubsGetOutboundRoutesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/outboundRoutes", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualHubsGetOutboundRoutesThenPoll performs VirtualHubsGetOutboundRoutes then polls until it's completed -func (c VirtualWANsClient) VirtualHubsGetOutboundRoutesThenPoll(ctx context.Context, id VirtualHubId, input GetOutboundRoutesParameters) error { - result, err := c.VirtualHubsGetOutboundRoutes(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualHubsGetOutboundRoutes: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualHubsGetOutboundRoutes: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubslist.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubslist.go deleted file mode 100644 index 56f87c07d60..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualHub -} - -type VirtualHubsListCompleteResult struct { - Items []VirtualHub -} - -// VirtualHubsList ... -func (c VirtualWANsClient) VirtualHubsList(ctx context.Context, id commonids.SubscriptionId) (result VirtualHubsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualHubs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualHub `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubsListComplete(ctx context.Context, id commonids.SubscriptionId) (VirtualHubsListCompleteResult, error) { - return c.VirtualHubsListCompleteMatchingPredicate(ctx, id, VirtualHubOperationPredicate{}) -} - -// VirtualHubsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualHubOperationPredicate) (result VirtualHubsListCompleteResult, err error) { - items := make([]VirtualHub, 0) - - resp, err := c.VirtualHubsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubslistbyresourcegroup.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubslistbyresourcegroup.go deleted file mode 100644 index d406da0a2c9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualHub -} - -type VirtualHubsListByResourceGroupCompleteResult struct { - Items []VirtualHub -} - -// VirtualHubsListByResourceGroup ... -func (c VirtualWANsClient) VirtualHubsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VirtualHubsListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualHubs", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualHub `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualHubsListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualHubsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VirtualHubsListByResourceGroupCompleteResult, error) { - return c.VirtualHubsListByResourceGroupCompleteMatchingPredicate(ctx, id, VirtualHubOperationPredicate{}) -} - -// VirtualHubsListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualHubsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualHubOperationPredicate) (result VirtualHubsListByResourceGroupCompleteResult, err error) { - items := make([]VirtualHub, 0) - - resp, err := c.VirtualHubsListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualHubsListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsupdatetags.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsupdatetags.go deleted file mode 100644 index 0f848174d09..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualhubsupdatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubsUpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualHub -} - -// VirtualHubsUpdateTags ... -func (c VirtualWANsClient) VirtualHubsUpdateTags(ctx context.Context, id VirtualHubId, input TagsObject) (result VirtualHubsUpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualwanscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualwanscreateorupdate.go deleted file mode 100644 index 07c0e6e2488..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualwanscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualWansCreateOrUpdate ... -func (c VirtualWANsClient) VirtualWansCreateOrUpdate(ctx context.Context, id VirtualWANId, input VirtualWAN) (result VirtualWansCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualWansCreateOrUpdateThenPoll performs VirtualWansCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VirtualWansCreateOrUpdateThenPoll(ctx context.Context, id VirtualWANId, input VirtualWAN) error { - result, err := c.VirtualWansCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VirtualWansCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualWansCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualwansdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualwansdelete.go deleted file mode 100644 index 4ce708a8edd..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualwansdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VirtualWansDelete ... -func (c VirtualWANsClient) VirtualWansDelete(ctx context.Context, id VirtualWANId) (result VirtualWansDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VirtualWansDeleteThenPoll performs VirtualWansDelete then polls until it's completed -func (c VirtualWANsClient) VirtualWansDeleteThenPoll(ctx context.Context, id VirtualWANId) error { - result, err := c.VirtualWansDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VirtualWansDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VirtualWansDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualwansget.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualwansget.go deleted file mode 100644 index bd1e3cd5470..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualwansget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VirtualWAN -} - -// VirtualWansGet ... -func (c VirtualWANsClient) VirtualWansGet(ctx context.Context, id VirtualWANId) (result VirtualWansGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualwanslist.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualwanslist.go deleted file mode 100644 index 6ac178d625e..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualwanslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualWAN -} - -type VirtualWansListCompleteResult struct { - Items []VirtualWAN -} - -// VirtualWansList ... -func (c VirtualWANsClient) VirtualWansList(ctx context.Context, id commonids.SubscriptionId) (result VirtualWansListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualWans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualWAN `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualWansListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualWansListComplete(ctx context.Context, id commonids.SubscriptionId) (VirtualWansListCompleteResult, error) { - return c.VirtualWansListCompleteMatchingPredicate(ctx, id, VirtualWANOperationPredicate{}) -} - -// VirtualWansListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualWansListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VirtualWANOperationPredicate) (result VirtualWansListCompleteResult, err error) { - items := make([]VirtualWAN, 0) - - resp, err := c.VirtualWansList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualWansListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_virtualwanslistbyresourcegroup.go b/resource-manager/network/2022-11-01/virtualwans/method_virtualwanslistbyresourcegroup.go deleted file mode 100644 index 060e5901790..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_virtualwanslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWansListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VirtualWAN -} - -type VirtualWansListByResourceGroupCompleteResult struct { - Items []VirtualWAN -} - -// VirtualWansListByResourceGroup ... -func (c VirtualWANsClient) VirtualWansListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VirtualWansListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/virtualWans", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VirtualWAN `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VirtualWansListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VirtualWansListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VirtualWansListByResourceGroupCompleteResult, error) { - return c.VirtualWansListByResourceGroupCompleteMatchingPredicate(ctx, id, VirtualWANOperationPredicate{}) -} - -// VirtualWansListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VirtualWansListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VirtualWANOperationPredicate) (result VirtualWansListByResourceGroupCompleteResult, err error) { - items := make([]VirtualWAN, 0) - - resp, err := c.VirtualWansListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VirtualWansListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionscreateorupdate.go deleted file mode 100644 index 7f35c0d3c62..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionscreateorupdate.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnConnectionsCreateOrUpdate ... -func (c VirtualWANsClient) VpnConnectionsCreateOrUpdate(ctx context.Context, id commonids.VPNConnectionId, input VpnConnection) (result VpnConnectionsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnConnectionsCreateOrUpdateThenPoll performs VpnConnectionsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VpnConnectionsCreateOrUpdateThenPoll(ctx context.Context, id commonids.VPNConnectionId, input VpnConnection) error { - result, err := c.VpnConnectionsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnConnectionsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnConnectionsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsdelete.go deleted file mode 100644 index 12193490035..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsdelete.go +++ /dev/null @@ -1,72 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnConnectionsDelete ... -func (c VirtualWANsClient) VpnConnectionsDelete(ctx context.Context, id commonids.VPNConnectionId) (result VpnConnectionsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnConnectionsDeleteThenPoll performs VpnConnectionsDelete then polls until it's completed -func (c VirtualWANsClient) VpnConnectionsDeleteThenPoll(ctx context.Context, id commonids.VPNConnectionId) error { - result, err := c.VpnConnectionsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnConnectionsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnConnectionsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsget.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsget.go deleted file mode 100644 index bd838056513..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsget.go +++ /dev/null @@ -1,52 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnConnection -} - -// VpnConnectionsGet ... -func (c VirtualWANsClient) VpnConnectionsGet(ctx context.Context, id commonids.VPNConnectionId) (result VpnConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionslistbyvpngateway.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionslistbyvpngateway.go deleted file mode 100644 index 87be187f6da..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionslistbyvpngateway.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsListByVpnGatewayOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnConnection -} - -type VpnConnectionsListByVpnGatewayCompleteResult struct { - Items []VpnConnection -} - -// VpnConnectionsListByVpnGateway ... -func (c VirtualWANsClient) VpnConnectionsListByVpnGateway(ctx context.Context, id VpnGatewayId) (result VpnConnectionsListByVpnGatewayOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/vpnConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnConnectionsListByVpnGatewayComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnConnectionsListByVpnGatewayComplete(ctx context.Context, id VpnGatewayId) (VpnConnectionsListByVpnGatewayCompleteResult, error) { - return c.VpnConnectionsListByVpnGatewayCompleteMatchingPredicate(ctx, id, VpnConnectionOperationPredicate{}) -} - -// VpnConnectionsListByVpnGatewayCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnConnectionsListByVpnGatewayCompleteMatchingPredicate(ctx context.Context, id VpnGatewayId, predicate VpnConnectionOperationPredicate) (result VpnConnectionsListByVpnGatewayCompleteResult, err error) { - items := make([]VpnConnection, 0) - - resp, err := c.VpnConnectionsListByVpnGateway(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnConnectionsListByVpnGatewayCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsstartpacketcapture.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsstartpacketcapture.go deleted file mode 100644 index ad520efd602..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsstartpacketcapture.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsStartPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnConnectionsStartPacketCapture ... -func (c VirtualWANsClient) VpnConnectionsStartPacketCapture(ctx context.Context, id commonids.VPNConnectionId, input VpnConnectionPacketCaptureStartParameters) (result VpnConnectionsStartPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/startpacketcapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnConnectionsStartPacketCaptureThenPoll performs VpnConnectionsStartPacketCapture then polls until it's completed -func (c VirtualWANsClient) VpnConnectionsStartPacketCaptureThenPoll(ctx context.Context, id commonids.VPNConnectionId, input VpnConnectionPacketCaptureStartParameters) error { - result, err := c.VpnConnectionsStartPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnConnectionsStartPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnConnectionsStartPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsstoppacketcapture.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsstoppacketcapture.go deleted file mode 100644 index 45bf09710f6..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnconnectionsstoppacketcapture.go +++ /dev/null @@ -1,75 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionsStopPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnConnectionsStopPacketCapture ... -func (c VirtualWANsClient) VpnConnectionsStopPacketCapture(ctx context.Context, id commonids.VPNConnectionId, input VpnConnectionPacketCaptureStopParameters) (result VpnConnectionsStopPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stoppacketcapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnConnectionsStopPacketCaptureThenPoll performs VpnConnectionsStopPacketCapture then polls until it's completed -func (c VirtualWANsClient) VpnConnectionsStopPacketCaptureThenPoll(ctx context.Context, id commonids.VPNConnectionId, input VpnConnectionPacketCaptureStopParameters) error { - result, err := c.VpnConnectionsStopPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnConnectionsStopPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnConnectionsStopPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewayscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_vpngatewayscreateorupdate.go deleted file mode 100644 index 539fccd78e0..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewayscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnGatewaysCreateOrUpdate ... -func (c VirtualWANsClient) VpnGatewaysCreateOrUpdate(ctx context.Context, id VpnGatewayId, input VpnGateway) (result VpnGatewaysCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnGatewaysCreateOrUpdateThenPoll performs VpnGatewaysCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VpnGatewaysCreateOrUpdateThenPoll(ctx context.Context, id VpnGatewayId, input VpnGateway) error { - result, err := c.VpnGatewaysCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnGatewaysCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnGatewaysCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewaysdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_vpngatewaysdelete.go deleted file mode 100644 index 76d02ba38d5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewaysdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnGatewaysDelete ... -func (c VirtualWANsClient) VpnGatewaysDelete(ctx context.Context, id VpnGatewayId) (result VpnGatewaysDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnGatewaysDeleteThenPoll performs VpnGatewaysDelete then polls until it's completed -func (c VirtualWANsClient) VpnGatewaysDeleteThenPoll(ctx context.Context, id VpnGatewayId) error { - result, err := c.VpnGatewaysDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnGatewaysDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnGatewaysDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewaysget.go b/resource-manager/network/2022-11-01/virtualwans/method_vpngatewaysget.go deleted file mode 100644 index 72f6e105eab..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewaysget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnGateway -} - -// VpnGatewaysGet ... -func (c VirtualWANsClient) VpnGatewaysGet(ctx context.Context, id VpnGatewayId) (result VpnGatewaysGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewayslist.go b/resource-manager/network/2022-11-01/virtualwans/method_vpngatewayslist.go deleted file mode 100644 index 03be4237a8b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewayslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnGateway -} - -type VpnGatewaysListCompleteResult struct { - Items []VpnGateway -} - -// VpnGatewaysList ... -func (c VirtualWANsClient) VpnGatewaysList(ctx context.Context, id commonids.SubscriptionId) (result VpnGatewaysListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnGatewaysListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnGatewaysListComplete(ctx context.Context, id commonids.SubscriptionId) (VpnGatewaysListCompleteResult, error) { - return c.VpnGatewaysListCompleteMatchingPredicate(ctx, id, VpnGatewayOperationPredicate{}) -} - -// VpnGatewaysListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnGatewaysListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VpnGatewayOperationPredicate) (result VpnGatewaysListCompleteResult, err error) { - items := make([]VpnGateway, 0) - - resp, err := c.VpnGatewaysList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnGatewaysListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewayslistbyresourcegroup.go b/resource-manager/network/2022-11-01/virtualwans/method_vpngatewayslistbyresourcegroup.go deleted file mode 100644 index 72a186be881..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpngatewayslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnGateway -} - -type VpnGatewaysListByResourceGroupCompleteResult struct { - Items []VpnGateway -} - -// VpnGatewaysListByResourceGroup ... -func (c VirtualWANsClient) VpnGatewaysListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VpnGatewaysListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnGateways", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnGateway `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnGatewaysListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnGatewaysListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VpnGatewaysListByResourceGroupCompleteResult, error) { - return c.VpnGatewaysListByResourceGroupCompleteMatchingPredicate(ctx, id, VpnGatewayOperationPredicate{}) -} - -// VpnGatewaysListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnGatewaysListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VpnGatewayOperationPredicate) (result VpnGatewaysListByResourceGroupCompleteResult, err error) { - items := make([]VpnGateway, 0) - - resp, err := c.VpnGatewaysListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnGatewaysListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnlinkconnectionsgetikesas.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnlinkconnectionsgetikesas.go deleted file mode 100644 index e9245bb48d4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnlinkconnectionsgetikesas.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkConnectionsGetIkeSasOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnLinkConnectionsGetIkeSas ... -func (c VirtualWANsClient) VpnLinkConnectionsGetIkeSas(ctx context.Context, id VpnLinkConnectionId) (result VpnLinkConnectionsGetIkeSasOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/getikesas", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnLinkConnectionsGetIkeSasThenPoll performs VpnLinkConnectionsGetIkeSas then polls until it's completed -func (c VirtualWANsClient) VpnLinkConnectionsGetIkeSasThenPoll(ctx context.Context, id VpnLinkConnectionId) error { - result, err := c.VpnLinkConnectionsGetIkeSas(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnLinkConnectionsGetIkeSas: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnLinkConnectionsGetIkeSas: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnlinkconnectionslistbyvpnconnection.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnlinkconnectionslistbyvpnconnection.go deleted file mode 100644 index 43e0fa0b050..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnlinkconnectionslistbyvpnconnection.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkConnectionsListByVpnConnectionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnSiteLinkConnection -} - -type VpnLinkConnectionsListByVpnConnectionCompleteResult struct { - Items []VpnSiteLinkConnection -} - -// VpnLinkConnectionsListByVpnConnection ... -func (c VirtualWANsClient) VpnLinkConnectionsListByVpnConnection(ctx context.Context, id commonids.VPNConnectionId) (result VpnLinkConnectionsListByVpnConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/vpnLinkConnections", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnSiteLinkConnection `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnLinkConnectionsListByVpnConnectionComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnLinkConnectionsListByVpnConnectionComplete(ctx context.Context, id commonids.VPNConnectionId) (VpnLinkConnectionsListByVpnConnectionCompleteResult, error) { - return c.VpnLinkConnectionsListByVpnConnectionCompleteMatchingPredicate(ctx, id, VpnSiteLinkConnectionOperationPredicate{}) -} - -// VpnLinkConnectionsListByVpnConnectionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnLinkConnectionsListByVpnConnectionCompleteMatchingPredicate(ctx context.Context, id commonids.VPNConnectionId, predicate VpnSiteLinkConnectionOperationPredicate) (result VpnLinkConnectionsListByVpnConnectionCompleteResult, err error) { - items := make([]VpnSiteLinkConnection, 0) - - resp, err := c.VpnLinkConnectionsListByVpnConnection(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnLinkConnectionsListByVpnConnectionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsassociatedwithvirtualwanlist.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsassociatedwithvirtualwanlist.go deleted file mode 100644 index a02b8921b46..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsassociatedwithvirtualwanlist.go +++ /dev/null @@ -1,70 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsAssociatedWithVirtualWanListOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnServerConfigurationsAssociatedWithVirtualWanList ... -func (c VirtualWANsClient) VpnServerConfigurationsAssociatedWithVirtualWanList(ctx context.Context, id VirtualWANId) (result VpnServerConfigurationsAssociatedWithVirtualWanListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/vpnServerConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnServerConfigurationsAssociatedWithVirtualWanListThenPoll performs VpnServerConfigurationsAssociatedWithVirtualWanList then polls until it's completed -func (c VirtualWANsClient) VpnServerConfigurationsAssociatedWithVirtualWanListThenPoll(ctx context.Context, id VirtualWANId) error { - result, err := c.VpnServerConfigurationsAssociatedWithVirtualWanList(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnServerConfigurationsAssociatedWithVirtualWanList: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnServerConfigurationsAssociatedWithVirtualWanList: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationscreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationscreateorupdate.go deleted file mode 100644 index 44fe07c321e..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationscreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnServerConfigurationsCreateOrUpdate ... -func (c VirtualWANsClient) VpnServerConfigurationsCreateOrUpdate(ctx context.Context, id VpnServerConfigurationId, input VpnServerConfiguration) (result VpnServerConfigurationsCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnServerConfigurationsCreateOrUpdateThenPoll performs VpnServerConfigurationsCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VpnServerConfigurationsCreateOrUpdateThenPoll(ctx context.Context, id VpnServerConfigurationId, input VpnServerConfiguration) error { - result, err := c.VpnServerConfigurationsCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnServerConfigurationsCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnServerConfigurationsCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsdelete.go deleted file mode 100644 index 2edde34518e..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnServerConfigurationsDelete ... -func (c VirtualWANsClient) VpnServerConfigurationsDelete(ctx context.Context, id VpnServerConfigurationId) (result VpnServerConfigurationsDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnServerConfigurationsDeleteThenPoll performs VpnServerConfigurationsDelete then polls until it's completed -func (c VirtualWANsClient) VpnServerConfigurationsDeleteThenPoll(ctx context.Context, id VpnServerConfigurationId) error { - result, err := c.VpnServerConfigurationsDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnServerConfigurationsDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnServerConfigurationsDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsget.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsget.go deleted file mode 100644 index d5dc41f7804..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnServerConfiguration -} - -// VpnServerConfigurationsGet ... -func (c VirtualWANsClient) VpnServerConfigurationsGet(ctx context.Context, id VpnServerConfigurationId) (result VpnServerConfigurationsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationslist.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationslist.go deleted file mode 100644 index 2f73be8348c..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnServerConfiguration -} - -type VpnServerConfigurationsListCompleteResult struct { - Items []VpnServerConfiguration -} - -// VpnServerConfigurationsList ... -func (c VirtualWANsClient) VpnServerConfigurationsList(ctx context.Context, id commonids.SubscriptionId) (result VpnServerConfigurationsListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnServerConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnServerConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnServerConfigurationsListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnServerConfigurationsListComplete(ctx context.Context, id commonids.SubscriptionId) (VpnServerConfigurationsListCompleteResult, error) { - return c.VpnServerConfigurationsListCompleteMatchingPredicate(ctx, id, VpnServerConfigurationOperationPredicate{}) -} - -// VpnServerConfigurationsListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnServerConfigurationsListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VpnServerConfigurationOperationPredicate) (result VpnServerConfigurationsListCompleteResult, err error) { - items := make([]VpnServerConfiguration, 0) - - resp, err := c.VpnServerConfigurationsList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnServerConfigurationsListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationslistbyresourcegroup.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationslistbyresourcegroup.go deleted file mode 100644 index c458362b537..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnserverconfigurationslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnServerConfiguration -} - -type VpnServerConfigurationsListByResourceGroupCompleteResult struct { - Items []VpnServerConfiguration -} - -// VpnServerConfigurationsListByResourceGroup ... -func (c VirtualWANsClient) VpnServerConfigurationsListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VpnServerConfigurationsListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnServerConfigurations", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnServerConfiguration `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnServerConfigurationsListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnServerConfigurationsListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VpnServerConfigurationsListByResourceGroupCompleteResult, error) { - return c.VpnServerConfigurationsListByResourceGroupCompleteMatchingPredicate(ctx, id, VpnServerConfigurationOperationPredicate{}) -} - -// VpnServerConfigurationsListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnServerConfigurationsListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VpnServerConfigurationOperationPredicate) (result VpnServerConfigurationsListByResourceGroupCompleteResult, err error) { - items := make([]VpnServerConfiguration, 0) - - resp, err := c.VpnServerConfigurationsListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnServerConfigurationsListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinkconnectionsget.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinkconnectionsget.go deleted file mode 100644 index e271896b6d2..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinkconnectionsget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnectionsGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnSiteLinkConnection -} - -// VpnSiteLinkConnectionsGet ... -func (c VirtualWANsClient) VpnSiteLinkConnectionsGet(ctx context.Context, id VpnLinkConnectionId) (result VpnSiteLinkConnectionsGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinksget.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinksget.go deleted file mode 100644 index 4beef5c44ca..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinksget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinksGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnSiteLink -} - -// VpnSiteLinksGet ... -func (c VirtualWANsClient) VpnSiteLinksGet(ctx context.Context, id VpnSiteLinkId) (result VpnSiteLinksGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinkslistbyvpnsite.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinkslistbyvpnsite.go deleted file mode 100644 index 912481bbfb2..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitelinkslistbyvpnsite.go +++ /dev/null @@ -1,89 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinksListByVpnSiteOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnSiteLink -} - -type VpnSiteLinksListByVpnSiteCompleteResult struct { - Items []VpnSiteLink -} - -// VpnSiteLinksListByVpnSite ... -func (c VirtualWANsClient) VpnSiteLinksListByVpnSite(ctx context.Context, id VpnSiteId) (result VpnSiteLinksListByVpnSiteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/vpnSiteLinks", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnSiteLink `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnSiteLinksListByVpnSiteComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnSiteLinksListByVpnSiteComplete(ctx context.Context, id VpnSiteId) (VpnSiteLinksListByVpnSiteCompleteResult, error) { - return c.VpnSiteLinksListByVpnSiteCompleteMatchingPredicate(ctx, id, VpnSiteLinkOperationPredicate{}) -} - -// VpnSiteLinksListByVpnSiteCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnSiteLinksListByVpnSiteCompleteMatchingPredicate(ctx context.Context, id VpnSiteId, predicate VpnSiteLinkOperationPredicate) (result VpnSiteLinksListByVpnSiteCompleteResult, err error) { - items := make([]VpnSiteLink, 0) - - resp, err := c.VpnSiteLinksListByVpnSite(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnSiteLinksListByVpnSiteCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitesconfigurationdownload.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnsitesconfigurationdownload.go deleted file mode 100644 index a20fd02e0fc..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitesconfigurationdownload.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesConfigurationDownloadOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnSitesConfigurationDownload ... -func (c VirtualWANsClient) VpnSitesConfigurationDownload(ctx context.Context, id VirtualWANId, input GetVpnSitesConfigurationRequest) (result VpnSitesConfigurationDownloadOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/vpnConfiguration", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnSitesConfigurationDownloadThenPoll performs VpnSitesConfigurationDownload then polls until it's completed -func (c VirtualWANsClient) VpnSitesConfigurationDownloadThenPoll(ctx context.Context, id VirtualWANId, input GetVpnSitesConfigurationRequest) error { - result, err := c.VpnSitesConfigurationDownload(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnSitesConfigurationDownload: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnSitesConfigurationDownload: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitescreateorupdate.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnsitescreateorupdate.go deleted file mode 100644 index 7bf3c36101b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitescreateorupdate.go +++ /dev/null @@ -1,74 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesCreateOrUpdateOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnSitesCreateOrUpdate ... -func (c VirtualWANsClient) VpnSitesCreateOrUpdate(ctx context.Context, id VpnSiteId, input VpnSite) (result VpnSitesCreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnSitesCreateOrUpdateThenPoll performs VpnSitesCreateOrUpdate then polls until it's completed -func (c VirtualWANsClient) VpnSitesCreateOrUpdateThenPoll(ctx context.Context, id VpnSiteId, input VpnSite) error { - result, err := c.VpnSitesCreateOrUpdate(ctx, id, input) - if err != nil { - return fmt.Errorf("performing VpnSitesCreateOrUpdate: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnSitesCreateOrUpdate: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitesdelete.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnsitesdelete.go deleted file mode 100644 index f3b27d7f18a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitesdelete.go +++ /dev/null @@ -1,71 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesDeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// VpnSitesDelete ... -func (c VirtualWANsClient) VpnSitesDelete(ctx context.Context, id VpnSiteId) (result VpnSitesDeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// VpnSitesDeleteThenPoll performs VpnSitesDelete then polls until it's completed -func (c VirtualWANsClient) VpnSitesDeleteThenPoll(ctx context.Context, id VpnSiteId) error { - result, err := c.VpnSitesDelete(ctx, id) - if err != nil { - return fmt.Errorf("performing VpnSitesDelete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after VpnSitesDelete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitesget.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnsitesget.go deleted file mode 100644 index 9e9c3b8e57f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnsitesget.go +++ /dev/null @@ -1,51 +0,0 @@ -package virtualwans - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesGetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnSite -} - -// VpnSitesGet ... -func (c VirtualWANsClient) VpnSitesGet(ctx context.Context, id VpnSiteId) (result VpnSitesGetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnsiteslist.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnsiteslist.go deleted file mode 100644 index 3de5fb382c7..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnsiteslist.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnSite -} - -type VpnSitesListCompleteResult struct { - Items []VpnSite -} - -// VpnSitesList ... -func (c VirtualWANsClient) VpnSitesList(ctx context.Context, id commonids.SubscriptionId) (result VpnSitesListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnSites", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnSite `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnSitesListComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnSitesListComplete(ctx context.Context, id commonids.SubscriptionId) (VpnSitesListCompleteResult, error) { - return c.VpnSitesListCompleteMatchingPredicate(ctx, id, VpnSiteOperationPredicate{}) -} - -// VpnSitesListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnSitesListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate VpnSiteOperationPredicate) (result VpnSitesListCompleteResult, err error) { - items := make([]VpnSite, 0) - - resp, err := c.VpnSitesList(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnSitesListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/method_vpnsiteslistbyresourcegroup.go b/resource-manager/network/2022-11-01/virtualwans/method_vpnsiteslistbyresourcegroup.go deleted file mode 100644 index b7164f0e5e7..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/method_vpnsiteslistbyresourcegroup.go +++ /dev/null @@ -1,90 +0,0 @@ -package virtualwans - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesListByResourceGroupOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]VpnSite -} - -type VpnSitesListByResourceGroupCompleteResult struct { - Items []VpnSite -} - -// VpnSitesListByResourceGroup ... -func (c VirtualWANsClient) VpnSitesListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result VpnSitesListByResourceGroupOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/vpnSites", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]VpnSite `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// VpnSitesListByResourceGroupComplete retrieves all the results into a single object -func (c VirtualWANsClient) VpnSitesListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (VpnSitesListByResourceGroupCompleteResult, error) { - return c.VpnSitesListByResourceGroupCompleteMatchingPredicate(ctx, id, VpnSiteOperationPredicate{}) -} - -// VpnSitesListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VirtualWANsClient) VpnSitesListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate VpnSiteOperationPredicate) (result VpnSitesListByResourceGroupCompleteResult, err error) { - items := make([]VpnSite, 0) - - resp, err := c.VpnSitesListByResourceGroup(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = VpnSitesListByResourceGroupCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_aadauthenticationparameters.go b/resource-manager/network/2022-11-01/virtualwans/model_aadauthenticationparameters.go deleted file mode 100644 index b0d5e53c358..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_aadauthenticationparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AadAuthenticationParameters struct { - AadAudience *string `json:"aadAudience,omitempty"` - AadIssuer *string `json:"aadIssuer,omitempty"` - AadTenant *string `json:"aadTenant,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_action.go b/resource-manager/network/2022-11-01/virtualwans/model_action.go deleted file mode 100644 index e3c73ef507d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_action.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Action struct { - Parameters *[]Parameter `json:"parameters,omitempty"` - Type *RouteMapActionType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_addressspace.go b/resource-manager/network/2022-11-01/virtualwans/model_addressspace.go deleted file mode 100644 index e1ac53861fc..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddress.go deleted file mode 100644 index 51a23d1c2c5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index adfa8110618..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index c308084cb90..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 184f4db35ed..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 96ab63c3c70..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/virtualwans/model_applicationsecuritygroup.go deleted file mode 100644 index 8df94828320..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 0db023773ff..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_backendaddresspool.go b/resource-manager/network/2022-11-01/virtualwans/model_backendaddresspool.go deleted file mode 100644 index 75b3239a673..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index f82284cb3a4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_bgpconnection.go b/resource-manager/network/2022-11-01/virtualwans/model_bgpconnection.go deleted file mode 100644 index 13c77fe2225..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_bgpconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BgpConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_bgpconnectionproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_bgpconnectionproperties.go deleted file mode 100644 index 4666e421984..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_bgpconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpConnectionProperties struct { - ConnectionState *HubBgpConnectionStatus `json:"connectionState,omitempty"` - HubVirtualNetworkConnection *SubResource `json:"hubVirtualNetworkConnection,omitempty"` - PeerAsn *int64 `json:"peerAsn,omitempty"` - PeerIP *string `json:"peerIp,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_bgpsettings.go b/resource-manager/network/2022-11-01/virtualwans/model_bgpsettings.go deleted file mode 100644 index 5f96d5acf14..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_criterion.go b/resource-manager/network/2022-11-01/virtualwans/model_criterion.go deleted file mode 100644 index e7249b64d4d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_criterion.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Criterion struct { - AsPath *[]string `json:"asPath,omitempty"` - Community *[]string `json:"community,omitempty"` - MatchCondition *RouteMapMatchCondition `json:"matchCondition,omitempty"` - RoutePrefix *[]string `json:"routePrefix,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 557a5a01a6d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_ddossettings.go b/resource-manager/network/2022-11-01/virtualwans/model_ddossettings.go deleted file mode 100644 index 82eef09dc62..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_delegation.go b/resource-manager/network/2022-11-01/virtualwans/model_delegation.go deleted file mode 100644 index 55eeb1fff81..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_deviceproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_deviceproperties.go deleted file mode 100644 index 9c255349846..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_deviceproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeviceProperties struct { - DeviceModel *string `json:"deviceModel,omitempty"` - DeviceVendor *string `json:"deviceVendor,omitempty"` - LinkSpeedInMbps *int64 `json:"linkSpeedInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_effectiveroutemaproute.go b/resource-manager/network/2022-11-01/virtualwans/model_effectiveroutemaproute.go deleted file mode 100644 index 3a565a687e8..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_effectiveroutemaproute.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRouteMapRoute struct { - AsPath *string `json:"asPath,omitempty"` - BgpCommunities *string `json:"bgpCommunities,omitempty"` - Prefix *string `json:"prefix,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_effectiveroutemaproutelist.go b/resource-manager/network/2022-11-01/virtualwans/model_effectiveroutemaproutelist.go deleted file mode 100644 index 326acde877b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_effectiveroutemaproutelist.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRouteMapRouteList struct { - Value *[]EffectiveRouteMapRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_effectiveroutesparameters.go b/resource-manager/network/2022-11-01/virtualwans/model_effectiveroutesparameters.go deleted file mode 100644 index dab27997ab5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_effectiveroutesparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type EffectiveRoutesParameters struct { - ResourceId *string `json:"resourceId,omitempty"` - VirtualWanResourceType *string `json:"virtualWanResourceType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_flowlog.go b/resource-manager/network/2022-11-01/virtualwans/model_flowlog.go deleted file mode 100644 index da3b4f53345..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/virtualwans/model_flowlogformatparameters.go deleted file mode 100644 index 3b64c7c567a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_flowlogpropertiesformat.go deleted file mode 100644 index 61a32b4aded..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_frontendipconfiguration.go deleted file mode 100644 index b9c97d1e6a4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 62b1635a8ed..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_gatewaycustombgpipaddressipconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_gatewaycustombgpipaddressipconfiguration.go deleted file mode 100644 index 81c747c0a4a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_gatewaycustombgpipaddressipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayCustomBgpIPAddressIPConfiguration struct { - CustomBgpIPAddress string `json:"customBgpIpAddress"` - IPConfigurationId string `json:"ipConfigurationId"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/virtualwans/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 96c5d2b39e5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_getinboundroutesparameters.go b/resource-manager/network/2022-11-01/virtualwans/model_getinboundroutesparameters.go deleted file mode 100644 index 1407618f660..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_getinboundroutesparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetInboundRoutesParameters struct { - ConnectionType *string `json:"connectionType,omitempty"` - ResourceUri *string `json:"resourceUri,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_getoutboundroutesparameters.go b/resource-manager/network/2022-11-01/virtualwans/model_getoutboundroutesparameters.go deleted file mode 100644 index 19a89a55b10..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_getoutboundroutesparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOutboundRoutesParameters struct { - ConnectionType *string `json:"connectionType,omitempty"` - ResourceUri *string `json:"resourceUri,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_getvpnsitesconfigurationrequest.go b/resource-manager/network/2022-11-01/virtualwans/model_getvpnsitesconfigurationrequest.go deleted file mode 100644 index 0dd233101ce..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_getvpnsitesconfigurationrequest.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetVpnSitesConfigurationRequest struct { - OutputBlobSasUrl string `json:"outputBlobSasUrl"` - VpnSites *[]string `json:"vpnSites,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_hubipconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_hubipconfiguration.go deleted file mode 100644 index c666224646f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_hubipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *HubIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_hubipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_hubipconfigurationpropertiesformat.go deleted file mode 100644 index 86c4674860b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_hubipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_hubroute.go b/resource-manager/network/2022-11-01/virtualwans/model_hubroute.go deleted file mode 100644 index bc12eef1a4a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_hubroute.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRoute struct { - DestinationType string `json:"destinationType"` - Destinations []string `json:"destinations"` - Name string `json:"name"` - NextHop string `json:"nextHop"` - NextHopType string `json:"nextHopType"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_hubroutetable.go b/resource-manager/network/2022-11-01/virtualwans/model_hubroutetable.go deleted file mode 100644 index 1214fb071b3..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_hubroutetable.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *HubRouteTableProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_hubroutetableproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_hubroutetableproperties.go deleted file mode 100644 index 32d33bc1ec9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_hubroutetableproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubRouteTableProperties struct { - AssociatedConnections *[]string `json:"associatedConnections,omitempty"` - Labels *[]string `json:"labels,omitempty"` - PropagatingConnections *[]string `json:"propagatingConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Routes *[]HubRoute `json:"routes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_hubvirtualnetworkconnection.go b/resource-manager/network/2022-11-01/virtualwans/model_hubvirtualnetworkconnection.go deleted file mode 100644 index 41f20a0a732..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_hubvirtualnetworkconnection.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *HubVirtualNetworkConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_hubvirtualnetworkconnectionproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_hubvirtualnetworkconnectionproperties.go deleted file mode 100644 index 83313e30ed5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_hubvirtualnetworkconnectionproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type HubVirtualNetworkConnectionProperties struct { - AllowHubToRemoteVnetTransit *bool `json:"allowHubToRemoteVnetTransit,omitempty"` - AllowRemoteVnetToUseHubVnetGateways *bool `json:"allowRemoteVnetToUseHubVnetGateways,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_inboundnatrule.go b/resource-manager/network/2022-11-01/virtualwans/model_inboundnatrule.go deleted file mode 100644 index eee8ea195cf..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 17b64e3d468..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_ipconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_ipconfiguration.go deleted file mode 100644 index 1241b6c2c3e..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index fbaabbf7c1b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationprofile.go deleted file mode 100644 index a710fe9c7f0..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 6b808468c3d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 58c575ad69f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_ipsecpolicy.go b/resource-manager/network/2022-11-01/virtualwans/model_ipsecpolicy.go deleted file mode 100644 index 02267e6b24d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_iptag.go b/resource-manager/network/2022-11-01/virtualwans/model_iptag.go deleted file mode 100644 index de05365d519..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/virtualwans/model_loadbalancerbackendaddress.go deleted file mode 100644 index 37820fb13bd..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 3f6629b67eb..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_natgateway.go b/resource-manager/network/2022-11-01/virtualwans/model_natgateway.go deleted file mode 100644 index 7e1a4539e08..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_natgatewaypropertiesformat.go deleted file mode 100644 index 7f5732e1cc0..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_natgatewaysku.go b/resource-manager/network/2022-11-01/virtualwans/model_natgatewaysku.go deleted file mode 100644 index 4cd49e069a9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_natruleportmapping.go b/resource-manager/network/2022-11-01/virtualwans/model_natruleportmapping.go deleted file mode 100644 index 2ce8b302da3..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkinterface.go b/resource-manager/network/2022-11-01/virtualwans/model_networkinterface.go deleted file mode 100644 index b6b5bf73332..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacednssettings.go deleted file mode 100644 index d0dcb411a3e..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 5c0d1edc7ad..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 9ed5a87eb91..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 53b62677571..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacepropertiesformat.go deleted file mode 100644 index eb6875aa05e..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacetapconfiguration.go deleted file mode 100644 index d12531c2798..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index 70fb9b73ddb..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/virtualwans/model_networksecuritygroup.go deleted file mode 100644 index c941605df94..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 54526eb4ea0..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkvirtualapplianceconnection.go b/resource-manager/network/2022-11-01/virtualwans/model_networkvirtualapplianceconnection.go deleted file mode 100644 index 903d78680e7..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkvirtualapplianceconnection.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceConnection struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkVirtualApplianceConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_networkvirtualapplianceconnectionproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_networkvirtualapplianceconnectionproperties.go deleted file mode 100644 index b9fd400828f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_networkvirtualapplianceconnectionproperties.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkVirtualApplianceConnectionProperties struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeerAddress *[]string `json:"bgpPeerAddress,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - Name *string `json:"name,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfigurationNfv `json:"routingConfiguration,omitempty"` - TunnelIdentifier *int64 `json:"tunnelIdentifier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_o365breakoutcategorypolicies.go b/resource-manager/network/2022-11-01/virtualwans/model_o365breakoutcategorypolicies.go deleted file mode 100644 index 0a9ed71a50b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_o365breakoutcategorypolicies.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type O365BreakOutCategoryPolicies struct { - Allow *bool `json:"allow,omitempty"` - Default *bool `json:"default,omitempty"` - Optimize *bool `json:"optimize,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_o365policyproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_o365policyproperties.go deleted file mode 100644 index eeae991ee3f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_o365policyproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type O365PolicyProperties struct { - BreakOutCategories *O365BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_p2sconnectionconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_p2sconnectionconfiguration.go deleted file mode 100644 index 08a6a452843..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_p2sconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *P2SConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_p2sconnectionconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_p2sconnectionconfigurationproperties.go deleted file mode 100644 index a5558cf1e48..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_p2sconnectionconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfigurationProperties struct { - ConfigurationPolicyGroupAssociations *[]SubResource `json:"configurationPolicyGroupAssociations,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - PreviousConfigurationPolicyGroupAssociations *[]VpnServerConfigurationPolicyGroup `json:"previousConfigurationPolicyGroupAssociations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_p2svpngateway.go b/resource-manager/network/2022-11-01/virtualwans/model_p2svpngateway.go deleted file mode 100644 index 8133cc078c9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_p2svpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *P2SVpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_p2svpngatewayproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_p2svpngatewayproperties.go deleted file mode 100644 index d337b304bbd..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_p2svpngatewayproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGatewayProperties struct { - CustomDnsServers *[]string `json:"customDnsServers,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` - VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_parameter.go b/resource-manager/network/2022-11-01/virtualwans/model_parameter.go deleted file mode 100644 index d1619c1138c..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_parameter.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Parameter struct { - AsPath *[]string `json:"asPath,omitempty"` - Community *[]string `json:"community,omitempty"` - RoutePrefix *[]string `json:"routePrefix,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_peerroute.go b/resource-manager/network/2022-11-01/virtualwans/model_peerroute.go deleted file mode 100644 index c03bdbe8722..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_peerroute.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PeerRoute struct { - AsPath *string `json:"asPath,omitempty"` - LocalAddress *string `json:"localAddress,omitempty"` - Network *string `json:"network,omitempty"` - NextHop *string `json:"nextHop,omitempty"` - Origin *string `json:"origin,omitempty"` - SourcePeer *string `json:"sourcePeer,omitempty"` - Weight *int64 `json:"weight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privateendpoint.go b/resource-manager/network/2022-11-01/virtualwans/model_privateendpoint.go deleted file mode 100644 index d493c3ed57a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/virtualwans/model_privateendpointconnection.go deleted file mode 100644 index 191623acf98..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_privateendpointconnectionproperties.go deleted file mode 100644 index f54855d1288..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_privateendpointipconfiguration.go deleted file mode 100644 index 053d067b685..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index d6794440033..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_privateendpointproperties.go deleted file mode 100644 index 3af5e8a64e0..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkservice.go b/resource-manager/network/2022-11-01/virtualwans/model_privatelinkservice.go deleted file mode 100644 index 79f0f888953..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnection.go deleted file mode 100644 index b584feab35a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 5875bd90e15..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index c1664caec07..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 3558cb8095c..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 31251b67685..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceproperties.go deleted file mode 100644 index 286611e0560..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_propagatedroutetable.go b/resource-manager/network/2022-11-01/virtualwans/model_propagatedroutetable.go deleted file mode 100644 index af45ddbedf1..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_propagatedroutetablenfv.go b/resource-manager/network/2022-11-01/virtualwans/model_propagatedroutetablenfv.go deleted file mode 100644 index 78684960155..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_propagatedroutetablenfv.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTableNfv struct { - Ids *[]RoutingConfigurationNfvSubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_publicipaddress.go b/resource-manager/network/2022-11-01/virtualwans/model_publicipaddress.go deleted file mode 100644 index 8bd2fa402a4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package virtualwans - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/virtualwans/model_publicipaddressdnssettings.go deleted file mode 100644 index 2a95851cb0c..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 48fecb8ae90..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/virtualwans/model_publicipaddresssku.go deleted file mode 100644 index 4fcf5fb0e8f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_radiusserver.go b/resource-manager/network/2022-11-01/virtualwans/model_radiusserver.go deleted file mode 100644 index 858a67625c9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_radiusserver.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RadiusServer struct { - RadiusServerAddress string `json:"radiusServerAddress"` - RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/virtualwans/model_resourcenavigationlink.go deleted file mode 100644 index b0d119588a3..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/virtualwans/model_resourcenavigationlinkformat.go deleted file mode 100644 index 9443c31d227..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_resourceset.go b/resource-manager/network/2022-11-01/virtualwans/model_resourceset.go deleted file mode 100644 index f8d5a3c0775..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/virtualwans/model_retentionpolicyparameters.go deleted file mode 100644 index 57394822b9d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_route.go b/resource-manager/network/2022-11-01/virtualwans/model_route.go deleted file mode 100644 index 5ae4b7a4ff8..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routemap.go b/resource-manager/network/2022-11-01/virtualwans/model_routemap.go deleted file mode 100644 index 6c5941f5a4c..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routemap.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteMapProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routemapproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_routemapproperties.go deleted file mode 100644 index a4a019429ff..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routemapproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapProperties struct { - AssociatedInboundConnections *[]string `json:"associatedInboundConnections,omitempty"` - AssociatedOutboundConnections *[]string `json:"associatedOutboundConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Rules *[]RouteMapRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routemaprule.go b/resource-manager/network/2022-11-01/virtualwans/model_routemaprule.go deleted file mode 100644 index cdeacc9a78b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routemaprule.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteMapRule struct { - Actions *[]Action `json:"actions,omitempty"` - MatchCriteria *[]Criterion `json:"matchCriteria,omitempty"` - Name *string `json:"name,omitempty"` - NextStepIfMatched *NextStep `json:"nextStepIfMatched,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_routepropertiesformat.go deleted file mode 100644 index 51259038175..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routetable.go b/resource-manager/network/2022-11-01/virtualwans/model_routetable.go deleted file mode 100644 index 76a72a637be..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_routetablepropertiesformat.go deleted file mode 100644 index 9a5454526a4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routingconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_routingconfiguration.go deleted file mode 100644 index f4ca0018afa..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routingconfigurationnfv.go b/resource-manager/network/2022-11-01/virtualwans/model_routingconfigurationnfv.go deleted file mode 100644 index 9caff495b18..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routingconfigurationnfv.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfigurationNfv struct { - AssociatedRouteTable *RoutingConfigurationNfvSubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *RoutingConfigurationNfvSubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *RoutingConfigurationNfvSubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTableNfv `json:"propagatedRouteTables,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routingconfigurationnfvsubresource.go b/resource-manager/network/2022-11-01/virtualwans/model_routingconfigurationnfvsubresource.go deleted file mode 100644 index a300be52a8c..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routingconfigurationnfvsubresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfigurationNfvSubResource struct { - ResourceUri *string `json:"resourceUri,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routingintent.go b/resource-manager/network/2022-11-01/virtualwans/model_routingintent.go deleted file mode 100644 index 537f1404f3d..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routingintent.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntent struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutingIntentProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routingintentproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_routingintentproperties.go deleted file mode 100644 index 38a3b8e4147..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routingintentproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingIntentProperties struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingPolicies *[]RoutingPolicy `json:"routingPolicies,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_routingpolicy.go b/resource-manager/network/2022-11-01/virtualwans/model_routingpolicy.go deleted file mode 100644 index cef221dbd58..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_routingpolicy.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingPolicy struct { - Destinations []string `json:"destinations"` - Name string `json:"name"` - NextHop string `json:"nextHop"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_securityrule.go b/resource-manager/network/2022-11-01/virtualwans/model_securityrule.go deleted file mode 100644 index 72e68599476..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_securityrulepropertiesformat.go deleted file mode 100644 index 547a37a71ce..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/virtualwans/model_serviceassociationlink.go deleted file mode 100644 index 0b2b5927b19..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 1aa80542228..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_servicedelegationpropertiesformat.go deleted file mode 100644 index aaeb340b2c7..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicy.go deleted file mode 100644 index 62b85e18cbf..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicydefinition.go deleted file mode 100644 index 886de873aea..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 433a85d2006..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index 6c09399b151..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 115ecdfed06..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_staticroute.go b/resource-manager/network/2022-11-01/virtualwans/model_staticroute.go deleted file mode 100644 index c57fdb00cea..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_staticroutesconfig.go b/resource-manager/network/2022-11-01/virtualwans/model_staticroutesconfig.go deleted file mode 100644 index c286d119b66..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_subnet.go b/resource-manager/network/2022-11-01/virtualwans/model_subnet.go deleted file mode 100644 index ecdd88e0207..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_subnetpropertiesformat.go deleted file mode 100644 index be51bf35107..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_subresource.go b/resource-manager/network/2022-11-01/virtualwans/model_subresource.go deleted file mode 100644 index 9c238c85dff..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_tagsobject.go b/resource-manager/network/2022-11-01/virtualwans/model_tagsobject.go deleted file mode 100644 index 1f55b0e7a00..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 1e6b8ac8e23..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_trafficanalyticsproperties.go deleted file mode 100644 index 56d6e09676b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_trafficselectorpolicy.go b/resource-manager/network/2022-11-01/virtualwans/model_trafficselectorpolicy.go deleted file mode 100644 index 09496a292fa..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_trafficselectorpolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficSelectorPolicy struct { - LocalAddressRanges []string `json:"localAddressRanges"` - RemoteAddressRanges []string `json:"remoteAddressRanges"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualhub.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualhub.go deleted file mode 100644 index ce664c65359..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualhub.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHub struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VirtualHubProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubeffectiveroute.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualhubeffectiveroute.go deleted file mode 100644 index d46894da2a8..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubeffectiveroute.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubEffectiveRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - AsPath *string `json:"asPath,omitempty"` - NextHopType *string `json:"nextHopType,omitempty"` - NextHops *[]string `json:"nextHops,omitempty"` - RouteOrigin *string `json:"routeOrigin,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubeffectiveroutelist.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualhubeffectiveroutelist.go deleted file mode 100644 index 3ea5b7b15e4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubeffectiveroutelist.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubEffectiveRouteList struct { - Value *[]VirtualHubEffectiveRoute `json:"value,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualhubproperties.go deleted file mode 100644 index 9b119e8889f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubproperties.go +++ /dev/null @@ -1,29 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubProperties struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` - AzureFirewall *SubResource `json:"azureFirewall,omitempty"` - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - ExpressRouteGateway *SubResource `json:"expressRouteGateway,omitempty"` - HubRoutingPreference *HubRoutingPreference `json:"hubRoutingPreference,omitempty"` - IPConfigurations *[]SubResource `json:"ipConfigurations,omitempty"` - P2SVpnGateway *SubResource `json:"p2SVpnGateway,omitempty"` - PreferredRoutingGateway *PreferredRoutingGateway `json:"preferredRoutingGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RouteMaps *[]SubResource `json:"routeMaps,omitempty"` - RouteTable *VirtualHubRouteTable `json:"routeTable,omitempty"` - RoutingState *RoutingState `json:"routingState,omitempty"` - SecurityPartnerProvider *SubResource `json:"securityPartnerProvider,omitempty"` - SecurityProviderName *string `json:"securityProviderName,omitempty"` - Sku *string `json:"sku,omitempty"` - VirtualHubRouteTableV2s *[]VirtualHubRouteTableV2 `json:"virtualHubRouteTableV2s,omitempty"` - VirtualRouterAsn *int64 `json:"virtualRouterAsn,omitempty"` - VirtualRouterAutoScaleConfiguration *VirtualRouterAutoScaleConfiguration `json:"virtualRouterAutoScaleConfiguration,omitempty"` - VirtualRouterIPs *[]string `json:"virtualRouterIps,omitempty"` - VirtualWAN *SubResource `json:"virtualWan,omitempty"` - VpnGateway *SubResource `json:"vpnGateway,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroute.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroute.go deleted file mode 100644 index 3b9b205ea1a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroute.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetable.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetable.go deleted file mode 100644 index 71ec2c0bca4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetable.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTable struct { - Routes *[]VirtualHubRoute `json:"routes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetablev2.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetablev2.go deleted file mode 100644 index 50fa84c35f5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetablev2.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2 struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualHubRouteTableV2Properties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetablev2properties.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetablev2properties.go deleted file mode 100644 index ed869d1c471..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutetablev2properties.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteTableV2Properties struct { - AttachedConnections *[]string `json:"attachedConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Routes *[]VirtualHubRouteV2 `json:"routes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutev2.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutev2.go deleted file mode 100644 index a47739aa2a5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualhubroutev2.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualHubRouteV2 struct { - DestinationType *string `json:"destinationType,omitempty"` - Destinations *[]string `json:"destinations,omitempty"` - NextHopType *string `json:"nextHopType,omitempty"` - NextHops *[]string `json:"nextHops,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualnetworktap.go deleted file mode 100644 index f7d80351ab5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index efca5566dad..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualrouterautoscaleconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualrouterautoscaleconfiguration.go deleted file mode 100644 index 4ce6be45420..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualrouterautoscaleconfiguration.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualRouterAutoScaleConfiguration struct { - MinCapacity *int64 `json:"minCapacity,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualwan.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualwan.go deleted file mode 100644 index 161915279e6..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualwan.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWAN struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VirtualWanProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualwanproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualwanproperties.go deleted file mode 100644 index 65c2eb829cb..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualwanproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWanProperties struct { - AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` - AllowVnetToVnetTraffic *bool `json:"allowVnetToVnetTraffic,omitempty"` - DisableVpnEncryption *bool `json:"disableVpnEncryption,omitempty"` - Office365LocalBreakoutCategory *OfficeTrafficCategory `json:"office365LocalBreakoutCategory,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *string `json:"type,omitempty"` - VirtualHubs *[]SubResource `json:"virtualHubs,omitempty"` - VpnSites *[]SubResource `json:"vpnSites,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualwansecurityprovider.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualwansecurityprovider.go deleted file mode 100644 index d41346bc4a9..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualwansecurityprovider.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWanSecurityProvider struct { - Name *string `json:"name,omitempty"` - Type *VirtualWanSecurityProviderType `json:"type,omitempty"` - Url *string `json:"url,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualwansecurityproviders.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualwansecurityproviders.go deleted file mode 100644 index 6e7e4ab59f8..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualwansecurityproviders.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWanSecurityProviders struct { - SupportedProviders *[]VirtualWanSecurityProvider `json:"supportedProviders,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_virtualwanvpnprofileparameters.go b/resource-manager/network/2022-11-01/virtualwans/model_virtualwanvpnprofileparameters.go deleted file mode 100644 index dd01888d247..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_virtualwanvpnprofileparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualWanVpnProfileParameters struct { - AuthenticationMethod *AuthenticationMethod `json:"authenticationMethod,omitempty"` - VpnServerConfigurationResourceId *string `json:"vpnServerConfigurationResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vnetroute.go b/resource-manager/network/2022-11-01/virtualwans/model_vnetroute.go deleted file mode 100644 index cbd035f3e06..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnclientconnectionhealth.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnclientconnectionhealth.go deleted file mode 100644 index 82eefc44a41..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnclientconnectionhealth.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealth struct { - AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"` - TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"` - TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"` - VpnClientConnectionsCount *int64 `json:"vpnClientConnectionsCount,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnconnection.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnconnection.go deleted file mode 100644 index 9d157042c70..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnconnection.go +++ /dev/null @@ -1,11 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionpacketcapturestartparameters.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionpacketcapturestartparameters.go deleted file mode 100644 index 97a9e565f9e..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionpacketcapturestartparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionPacketCaptureStartParameters struct { - FilterData *string `json:"filterData,omitempty"` - LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionpacketcapturestopparameters.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionpacketcapturestopparameters.go deleted file mode 100644 index de501375c21..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionpacketcapturestopparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionPacketCaptureStopParameters struct { - LinkConnectionNames *[]string `json:"linkConnectionNames,omitempty"` - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionproperties.go deleted file mode 100644 index 1c238229449..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnconnectionproperties.go +++ /dev/null @@ -1,26 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionProperties struct { - ConnectionBandwidth *int64 `json:"connectionBandwidth,omitempty"` - ConnectionStatus *VpnConnectionStatus `json:"connectionStatus,omitempty"` - DpdTimeoutSeconds *int64 `json:"dpdTimeoutSeconds,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VpnConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpngateway.go b/resource-manager/network/2022-11-01/virtualwans/model_vpngateway.go deleted file mode 100644 index ae7433c3f55..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpngatewayipconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_vpngatewayipconfiguration.go deleted file mode 100644 index b1060397ea0..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpngatewayipconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayIPConfiguration struct { - Id *string `json:"id,omitempty"` - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpngatewaynatrule.go b/resource-manager/network/2022-11-01/virtualwans/model_vpngatewaynatrule.go deleted file mode 100644 index 2de41b7ced6..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpngatewaynatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnGatewayNatRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpngatewaynatruleproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_vpngatewaynatruleproperties.go deleted file mode 100644 index 1aaf7c8f90b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpngatewaynatruleproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayNatRuleProperties struct { - EgressVpnSiteLinkConnections *[]SubResource `json:"egressVpnSiteLinkConnections,omitempty"` - ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` - IPConfigurationId *string `json:"ipConfigurationId,omitempty"` - IngressVpnSiteLinkConnections *[]SubResource `json:"ingressVpnSiteLinkConnections,omitempty"` - InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` - Mode *VpnNatRuleMode `json:"mode,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *VpnNatRuleType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpngatewayproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_vpngatewayproperties.go deleted file mode 100644 index ab2b8b55b1b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpngatewayproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayProperties struct { - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - Connections *[]VpnConnection `json:"connections,omitempty"` - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - IPConfigurations *[]VpnGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - NatRules *[]VpnGatewayNatRule `json:"natRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnlinkbgpsettings.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnlinkbgpsettings.go deleted file mode 100644 index 72de7d65308..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnlinkbgpsettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkBgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnlinkproviderproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnlinkproviderproperties.go deleted file mode 100644 index 555f8739a9b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnlinkproviderproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkProviderProperties struct { - LinkProviderName *string `json:"linkProviderName,omitempty"` - LinkSpeedInMbps *int64 `json:"linkSpeedInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnnatrulemapping.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnnatrulemapping.go deleted file mode 100644 index 09a77912d9f..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnnatrulemapping.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnNatRuleMapping struct { - AddressSpace *string `json:"addressSpace,omitempty"` - PortRange *string `json:"portRange,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnprofileresponse.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnprofileresponse.go deleted file mode 100644 index a96c942841c..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnprofileresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnProfileResponse struct { - ProfileUrl *string `json:"profileUrl,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigradiusclientrootcertificate.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigradiusclientrootcertificate.go deleted file mode 100644 index 21a75789b34..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigradiusclientrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigRadiusClientRootCertificate struct { - Name *string `json:"name,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigradiusserverrootcertificate.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigradiusserverrootcertificate.go deleted file mode 100644 index 6f67a020c6a..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigradiusserverrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigRadiusServerRootCertificate struct { - Name *string `json:"name,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfiguration.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfiguration.go deleted file mode 100644 index debdcf03f04..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfiguration.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroup.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroup.go deleted file mode 100644 index e94549fb063..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationPolicyGroupProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroupmember.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroupmember.go deleted file mode 100644 index f832688900b..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroupproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroupproperties.go deleted file mode 100644 index 93b015d4bd1..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationpolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupProperties struct { - IsDefault *bool `json:"isDefault,omitempty"` - P2SConnectionConfigurations *[]SubResource `json:"p2SConnectionConfigurations,omitempty"` - PolicyMembers *[]VpnServerConfigurationPolicyGroupMember `json:"policyMembers,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationproperties.go deleted file mode 100644 index 1a42b30f7aa..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationproperties.go +++ /dev/null @@ -1,23 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationProperties struct { - AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"` - ConfigurationPolicyGroups *[]VpnServerConfigurationPolicyGroup `json:"configurationPolicyGroups,omitempty"` - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - P2sVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"` - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` - VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - VpnClientIPsecPolicies *[]IPsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` - VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationsresponse.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationsresponse.go deleted file mode 100644 index 185d5a549d4..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigurationsresponse.go +++ /dev/null @@ -1,8 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsResponse struct { - VpnServerConfigurationResourceIds *[]string `json:"vpnServerConfigurationResourceIds,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigvpnclientrevokedcertificate.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigvpnclientrevokedcertificate.go deleted file mode 100644 index 9582df932b5..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigvpnclientrevokedcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigVpnClientRevokedCertificate struct { - Name *string `json:"name,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigvpnclientrootcertificate.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigvpnclientrootcertificate.go deleted file mode 100644 index 606a8393665..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnserverconfigvpnclientrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigVpnClientRootCertificate struct { - Name *string `json:"name,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnsite.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnsite.go deleted file mode 100644 index decb0a5dd27..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnsite.go +++ /dev/null @@ -1,14 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSite struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelink.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelink.go deleted file mode 100644 index 9c72c0567fd..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelink.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteLinkProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkconnection.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkconnection.go deleted file mode 100644 index 88bed41fe65..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteLinkConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkconnectionproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkconnectionproperties.go deleted file mode 100644 index 23b24922441..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkconnectionproperties.go +++ /dev/null @@ -1,25 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnectionProperties struct { - ConnectionBandwidth *int64 `json:"connectionBandwidth,omitempty"` - ConnectionStatus *VpnConnectionStatus `json:"connectionStatus,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VpnConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - VpnGatewayCustomBgpAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"vpnGatewayCustomBgpAddresses,omitempty"` - VpnLinkConnectionMode *VpnLinkConnectionMode `json:"vpnLinkConnectionMode,omitempty"` - VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkproperties.go deleted file mode 100644 index fa7d9002a52..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnsitelinkproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkProperties struct { - BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/model_vpnsiteproperties.go b/resource-manager/network/2022-11-01/virtualwans/model_vpnsiteproperties.go deleted file mode 100644 index da368da2045..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/model_vpnsiteproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteProperties struct { - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` - DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IsSecuritySite *bool `json:"isSecuritySite,omitempty"` - O365Policy *O365PolicyProperties `json:"o365Policy,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SiteKey *string `json:"siteKey,omitempty"` - VirtualWAN *SubResource `json:"virtualWan,omitempty"` - VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/virtualwans/predicates.go b/resource-manager/network/2022-11-01/virtualwans/predicates.go deleted file mode 100644 index 3eba8222dcf..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/predicates.go +++ /dev/null @@ -1,546 +0,0 @@ -package virtualwans - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p BgpConnectionOperationPredicate) Matches(input BgpConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type HubIPConfigurationOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p HubIPConfigurationOperationPredicate) Matches(input HubIPConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type HubRouteTableOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p HubRouteTableOperationPredicate) Matches(input HubRouteTable) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type HubVirtualNetworkConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p HubVirtualNetworkConnectionOperationPredicate) Matches(input HubVirtualNetworkConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} - -type NetworkVirtualApplianceConnectionOperationPredicate struct { - Id *string - Name *string -} - -func (p NetworkVirtualApplianceConnectionOperationPredicate) Matches(input NetworkVirtualApplianceConnection) bool { - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} - -type P2SVpnGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p P2SVpnGatewayOperationPredicate) Matches(input P2SVpnGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type RouteMapOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p RouteMapOperationPredicate) Matches(input RouteMap) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type RoutingIntentOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p RoutingIntentOperationPredicate) Matches(input RoutingIntent) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualHubOperationPredicate struct { - Etag *string - Id *string - Kind *string - Location *string - Name *string - Type *string -} - -func (p VirtualHubOperationPredicate) Matches(input VirtualHub) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Kind != nil && (input.Kind == nil || *p.Kind != *input.Kind) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VirtualHubRouteTableV2OperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p VirtualHubRouteTableV2OperationPredicate) Matches(input VirtualHubRouteTableV2) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} - -type VirtualWANOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VirtualWANOperationPredicate) Matches(input VirtualWAN) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string -} - -func (p VpnConnectionOperationPredicate) Matches(input VpnConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - return true -} - -type VpnGatewayOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VpnGatewayOperationPredicate) Matches(input VpnGateway) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnGatewayNatRuleOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VpnGatewayNatRuleOperationPredicate) Matches(input VpnGatewayNatRule) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnServerConfigurationOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VpnServerConfigurationOperationPredicate) Matches(input VpnServerConfiguration) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnServerConfigurationPolicyGroupOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VpnServerConfigurationPolicyGroupOperationPredicate) Matches(input VpnServerConfigurationPolicyGroup) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnSiteOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p VpnSiteOperationPredicate) Matches(input VpnSite) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && *p.Location != input.Location { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnSiteLinkOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VpnSiteLinkOperationPredicate) Matches(input VpnSiteLink) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} - -type VpnSiteLinkConnectionOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p VpnSiteLinkConnectionOperationPredicate) Matches(input VpnSiteLinkConnection) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/virtualwans/version.go b/resource-manager/network/2022-11-01/virtualwans/version.go deleted file mode 100644 index add33ecf976..00000000000 --- a/resource-manager/network/2022-11-01/virtualwans/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package virtualwans - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/virtualwans/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/README.md b/resource-manager/network/2022-11-01/vmsspublicipaddresses/README.md deleted file mode 100644 index 04cc7c3688b..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/README.md +++ /dev/null @@ -1,70 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vmsspublicipaddresses` Documentation - -The `vmsspublicipaddresses` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vmsspublicipaddresses" -``` - - -### Client Initialization - -```go -client := vmsspublicipaddresses.NewVMSSPublicIPAddressesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VMSSPublicIPAddressesClient.PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddress` - -```go -ctx := context.TODO() -id := vmsspublicipaddresses.NewVirtualMachineScaleSetPublicIPAddressID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue", "ipConfigurationValue", "publicIPAddressValue") - -read, err := client.PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddress(ctx, id, vmsspublicipaddresses.DefaultPublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `VMSSPublicIPAddressesClient.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses` - -```go -ctx := context.TODO() -id := vmsspublicipaddresses.NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - -// alternatively `client.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses(ctx, id)` can be used to do batched pagination -items, err := client.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `VMSSPublicIPAddressesClient.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses` - -```go -ctx := context.TODO() -id := vmsspublicipaddresses.NewVirtualMachineScaleSetIPConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue", "virtualMachineValue", "networkInterfaceValue", "ipConfigurationValue") - -// alternatively `client.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses(ctx, id)` can be used to do batched pagination -items, err := client.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/client.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/client.go deleted file mode 100644 index f563b8df586..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vmsspublicipaddresses - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VMSSPublicIPAddressesClient struct { - Client *resourcemanager.Client -} - -func NewVMSSPublicIPAddressesClientWithBaseURI(api environments.Api) (*VMSSPublicIPAddressesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vmsspublicipaddresses", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VMSSPublicIPAddressesClient: %+v", err) - } - - return &VMSSPublicIPAddressesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/constants.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/constants.go deleted file mode 100644 index 9a57daaa94c..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/constants.go +++ /dev/null @@ -1,1110 +0,0 @@ -package vmsspublicipaddresses - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/id_virtualmachinescaleset.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/id_virtualmachinescaleset.go deleted file mode 100644 index b798e513d2e..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/id_virtualmachinescaleset.go +++ /dev/null @@ -1,127 +0,0 @@ -package vmsspublicipaddresses - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineScaleSetId{} - -// VirtualMachineScaleSetId is a struct representing the Resource ID for a Virtual Machine Scale Set -type VirtualMachineScaleSetId struct { - SubscriptionId string - ResourceGroupName string - VirtualMachineScaleSetName string -} - -// NewVirtualMachineScaleSetID returns a new VirtualMachineScaleSetId struct -func NewVirtualMachineScaleSetID(subscriptionId string, resourceGroupName string, virtualMachineScaleSetName string) VirtualMachineScaleSetId { - return VirtualMachineScaleSetId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VirtualMachineScaleSetName: virtualMachineScaleSetName, - } -} - -// ParseVirtualMachineScaleSetID parses 'input' into a VirtualMachineScaleSetId -func ParseVirtualMachineScaleSetID(input string) (*VirtualMachineScaleSetId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineScaleSetId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - return &id, nil -} - -// ParseVirtualMachineScaleSetIDInsensitively parses 'input' case-insensitively into a VirtualMachineScaleSetId -// note: this method should only be used for API response data and not user input -func ParseVirtualMachineScaleSetIDInsensitively(input string) (*VirtualMachineScaleSetId, error) { - parser := resourceids.NewParserFromResourceIdType(VirtualMachineScaleSetId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VirtualMachineScaleSetId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VirtualMachineScaleSetName, ok = parsed.Parsed["virtualMachineScaleSetName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "virtualMachineScaleSetName", *parsed) - } - - return &id, nil -} - -// ValidateVirtualMachineScaleSetID checks that 'input' can be parsed as a Virtual Machine Scale Set ID -func ValidateVirtualMachineScaleSetID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVirtualMachineScaleSetID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/virtualMachineScaleSets/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VirtualMachineScaleSetName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftCompute", "Microsoft.Compute", "Microsoft.Compute"), - resourceids.StaticSegment("staticVirtualMachineScaleSets", "virtualMachineScaleSets", "virtualMachineScaleSets"), - resourceids.UserSpecifiedSegment("virtualMachineScaleSetName", "virtualMachineScaleSetValue"), - } -} - -// String returns a human-readable description of this Virtual Machine Scale Set ID -func (id VirtualMachineScaleSetId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Virtual Machine Scale Set Name: %q", id.VirtualMachineScaleSetName), - } - return fmt.Sprintf("Virtual Machine Scale Set (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/id_virtualmachinescaleset_test.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/id_virtualmachinescaleset_test.go deleted file mode 100644 index 752c44ba4ca..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/id_virtualmachinescaleset_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vmsspublicipaddresses - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VirtualMachineScaleSetId{} - -func TestNewVirtualMachineScaleSetID(t *testing.T) { - id := NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VirtualMachineScaleSetName != "virtualMachineScaleSetValue" { - t.Fatalf("Expected %q but got %q for Segment 'VirtualMachineScaleSetName'", id.VirtualMachineScaleSetName, "virtualMachineScaleSetValue") - } -} - -func TestFormatVirtualMachineScaleSetID(t *testing.T) { - actual := NewVirtualMachineScaleSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVirtualMachineScaleSetID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineScaleSetId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineScaleSetID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - } -} - -func TestParseVirtualMachineScaleSetIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VirtualMachineScaleSetId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VirtualMachineScaleSetName: "virtualMachineScaleSetValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Compute/virtualMachineScaleSets/virtualMachineScaleSetValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe", - Expected: &VirtualMachineScaleSetId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VirtualMachineScaleSetName: "vIrTuAlMaChInEsCaLeSeTvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.cOmPuTe/vIrTuAlMaChInEsCaLeSeTs/vIrTuAlMaChInEsCaLeSeTvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVirtualMachineScaleSetIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VirtualMachineScaleSetName != v.Expected.VirtualMachineScaleSetName { - t.Fatalf("Expected %q but got %q for VirtualMachineScaleSetName", v.Expected.VirtualMachineScaleSetName, actual.VirtualMachineScaleSetName) - } - - } -} - -func TestSegmentsForVirtualMachineScaleSetId(t *testing.T) { - segments := VirtualMachineScaleSetId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VirtualMachineScaleSetId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go deleted file mode 100644 index 2d85c08dac0..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddressesgetvirtualmachinescalesetpublicipaddress.go +++ /dev/null @@ -1,81 +0,0 @@ -package vmsspublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *PublicIPAddress -} - -type PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions struct { - Expand *string -} - -func DefaultPublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions() PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions { - return PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions{} -} - -func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddress ... -func (c VMSSPublicIPAddressesClient) PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, id commonids.VirtualMachineScaleSetPublicIPAddressId, options PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationOptions) (result PublicIPAddressesGetVirtualMachineScaleSetPublicIPAddressOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetpublicipaddresses.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetpublicipaddresses.go deleted file mode 100644 index b1f0d6f9994..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetpublicipaddresses.go +++ /dev/null @@ -1,89 +0,0 @@ -package vmsspublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteResult struct { - Items []PublicIPAddress -} - -// PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses ... -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses(ctx context.Context, id VirtualMachineScaleSetId) (result PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesComplete retrieves all the results into a single object -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesComplete(ctx context.Context, id VirtualMachineScaleSetId) (PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteResult, error) { - return c.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteMatchingPredicate(ctx context.Context, id VirtualMachineScaleSetId, predicate PublicIPAddressOperationPredicate) (result PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.PublicIPAddressesListVirtualMachineScaleSetPublicIPAddresses(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = PublicIPAddressesListVirtualMachineScaleSetPublicIPAddressesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetvmpublicipaddresses.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetvmpublicipaddresses.go deleted file mode 100644 index 6fd88d429a2..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/method_publicipaddresseslistvirtualmachinescalesetvmpublicipaddresses.go +++ /dev/null @@ -1,90 +0,0 @@ -package vmsspublicipaddresses - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]PublicIPAddress -} - -type PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteResult struct { - Items []PublicIPAddress -} - -// PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses ... -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses(ctx context.Context, id commonids.VirtualMachineScaleSetIPConfigurationId) (result PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/publicIPAddresses", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]PublicIPAddress `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesComplete retrieves all the results into a single object -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesComplete(ctx context.Context, id commonids.VirtualMachineScaleSetIPConfigurationId) (PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteResult, error) { - return c.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteMatchingPredicate(ctx, id, PublicIPAddressOperationPredicate{}) -} - -// PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c VMSSPublicIPAddressesClient) PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualMachineScaleSetIPConfigurationId, predicate PublicIPAddressOperationPredicate) (result PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteResult, err error) { - items := make([]PublicIPAddress, 0) - - resp, err := c.PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddresses(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = PublicIPAddressesListVirtualMachineScaleSetVMPublicIPAddressesCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddress.go deleted file mode 100644 index b5e5db2cc91..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index a08e1bc2b3d..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index a1c62d3aff0..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 29707ea0cc0..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index 3d43bc376d7..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationsecuritygroup.go deleted file mode 100644 index 3886b3a62a9..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 2f9f71ffdfe..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_backendaddresspool.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_backendaddresspool.go deleted file mode 100644 index 2d91da68e06..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index 1066643d554..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index 409dfc74f46..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ddossettings.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ddossettings.go deleted file mode 100644 index 9db9902cfa2..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_delegation.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_delegation.go deleted file mode 100644 index a81e856e7ea..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlog.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlog.go deleted file mode 100644 index b816a9fb4d8..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlogformatparameters.go deleted file mode 100644 index bbe90b3e68a..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlogpropertiesformat.go deleted file mode 100644 index 4dc53318cc3..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_frontendipconfiguration.go deleted file mode 100644 index e9d4835cde7..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 158c303f1eb..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index a997e703d5a..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_inboundnatrule.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_inboundnatrule.go deleted file mode 100644 index 8d6d17e1ee6..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 0400f6c7e24..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfiguration.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfiguration.go deleted file mode 100644 index ec14aaebfb2..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationprofile.go deleted file mode 100644 index 04f420bc9e7..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index cc1b778ec31..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 5c56fd40bae..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_iptag.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_iptag.go deleted file mode 100644 index 0f545f4b72b..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_loadbalancerbackendaddress.go deleted file mode 100644 index 6c1a542cb79..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index 046c6088344..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgateway.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgateway.go deleted file mode 100644 index d11b8d3920d..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgatewaypropertiesformat.go deleted file mode 100644 index 9b3d069fdba..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgatewaysku.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgatewaysku.go deleted file mode 100644 index 3b91a6c98fb..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natruleportmapping.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natruleportmapping.go deleted file mode 100644 index 09ace168bf2..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterface.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterface.go deleted file mode 100644 index e494f13e660..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacednssettings.go deleted file mode 100644 index 178cb8cc8d0..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 5e15e82902b..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index 5b63a7f1427..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index a34194f603c..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacepropertiesformat.go deleted file mode 100644 index 67403077a5f..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 89d8808f2b8..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index dd5cb5650a9..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networksecuritygroup.go deleted file mode 100644 index 390dad55504..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index fd1b9110f0b..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpoint.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpoint.go deleted file mode 100644 index 9d1b5059d51..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointconnection.go deleted file mode 100644 index 37a23931c51..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointconnectionproperties.go deleted file mode 100644 index edd52323b43..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointipconfiguration.go deleted file mode 100644 index 7e43ad06e3b..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index 13d66a23bb9..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointproperties.go deleted file mode 100644 index 9d7c5581f99..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkservice.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkservice.go deleted file mode 100644 index 35696ff7af8..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnection.go deleted file mode 100644 index 15a277940b8..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 36505cb0e91..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 87693646750..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index ffcb7babff1..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 1ac62f6b573..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceproperties.go deleted file mode 100644 index 5a3793b3967..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddress.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddress.go deleted file mode 100644 index 007f38c15a0..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package vmsspublicipaddresses - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddressdnssettings.go deleted file mode 100644 index 5c5c8e381d5..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 04e2f5851e5..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddresssku.go deleted file mode 100644 index 836d26bc7cf..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourcenavigationlink.go deleted file mode 100644 index 2001bb2021a..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourcenavigationlinkformat.go deleted file mode 100644 index 255ed3f4d7d..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourceset.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourceset.go deleted file mode 100644 index aa795989827..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_retentionpolicyparameters.go deleted file mode 100644 index 18486b1b930..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_route.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_route.go deleted file mode 100644 index d5542b4d6a2..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routepropertiesformat.go deleted file mode 100644 index 7306e155bd1..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routetable.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routetable.go deleted file mode 100644 index 0e623eb4de8..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routetablepropertiesformat.go deleted file mode 100644 index 247f8d8ff0b..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_securityrule.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_securityrule.go deleted file mode 100644 index be3c680f597..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_securityrulepropertiesformat.go deleted file mode 100644 index 45a25e92fa7..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceassociationlink.go deleted file mode 100644 index 6e209a0a72c..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index 7761fb2f5e9..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 0ce0853975d..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicy.go deleted file mode 100644 index 32e2b036118..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicydefinition.go deleted file mode 100644 index d0368e894a0..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 970c54c6772..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index fd6dca6bdb5..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 5857cb159be..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subnet.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subnet.go deleted file mode 100644 index fd72bf01d45..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subnetpropertiesformat.go deleted file mode 100644 index c4a547c3c94..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subresource.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subresource.go deleted file mode 100644 index c4627dc0146..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index 9685e4269c8..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_trafficanalyticsproperties.go deleted file mode 100644 index e18abbc1afe..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_virtualnetworktap.go deleted file mode 100644 index 80ebd9f850d..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index cff477ca81b..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/predicates.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/predicates.go deleted file mode 100644 index 3173ab41a32..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package vmsspublicipaddresses - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p PublicIPAddressOperationPredicate) Matches(input PublicIPAddress) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/vmsspublicipaddresses/version.go b/resource-manager/network/2022-11-01/vmsspublicipaddresses/version.go deleted file mode 100644 index 596bd01cab7..00000000000 --- a/resource-manager/network/2022-11-01/vmsspublicipaddresses/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vmsspublicipaddresses - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vmsspublicipaddresses/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/vpngateways/README.md b/resource-manager/network/2022-11-01/vpngateways/README.md deleted file mode 100644 index 2c9fb75b343..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/README.md +++ /dev/null @@ -1,83 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpngateways` Documentation - -The `vpngateways` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpngateways" -``` - - -### Client Initialization - -```go -client := vpngateways.NewVpnGatewaysClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VpnGatewaysClient.Reset` - -```go -ctx := context.TODO() -id := vpngateways.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -if err := client.ResetThenPoll(ctx, id, vpngateways.DefaultResetOperationOptions()); err != nil { - // handle the error -} -``` - - -### Example Usage: `VpnGatewaysClient.StartPacketCapture` - -```go -ctx := context.TODO() -id := vpngateways.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -payload := vpngateways.VpnGatewayPacketCaptureStartParameters{ - // ... -} - - -if err := client.StartPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VpnGatewaysClient.StopPacketCapture` - -```go -ctx := context.TODO() -id := vpngateways.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -payload := vpngateways.VpnGatewayPacketCaptureStopParameters{ - // ... -} - - -if err := client.StopPacketCaptureThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` - - -### Example Usage: `VpnGatewaysClient.UpdateTags` - -```go -ctx := context.TODO() -id := vpngateways.NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - -payload := vpngateways.TagsObject{ - // ... -} - - -if err := client.UpdateTagsThenPoll(ctx, id, payload); err != nil { - // handle the error -} -``` diff --git a/resource-manager/network/2022-11-01/vpngateways/client.go b/resource-manager/network/2022-11-01/vpngateways/client.go deleted file mode 100644 index 08ab0ce47db..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpngateways - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewaysClient struct { - Client *resourcemanager.Client -} - -func NewVpnGatewaysClientWithBaseURI(api environments.Api) (*VpnGatewaysClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vpngateways", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VpnGatewaysClient: %+v", err) - } - - return &VpnGatewaysClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/vpngateways/constants.go b/resource-manager/network/2022-11-01/vpngateways/constants.go deleted file mode 100644 index 2f1745c4980..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/constants.go +++ /dev/null @@ -1,657 +0,0 @@ -package vpngateways - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VirtualNetworkGatewayConnectionProtocol string - -const ( - VirtualNetworkGatewayConnectionProtocolIKEvOne VirtualNetworkGatewayConnectionProtocol = "IKEv1" - VirtualNetworkGatewayConnectionProtocolIKEvTwo VirtualNetworkGatewayConnectionProtocol = "IKEv2" -) - -func PossibleValuesForVirtualNetworkGatewayConnectionProtocol() []string { - return []string{ - string(VirtualNetworkGatewayConnectionProtocolIKEvOne), - string(VirtualNetworkGatewayConnectionProtocolIKEvTwo), - } -} - -func (s *VirtualNetworkGatewayConnectionProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkGatewayConnectionProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkGatewayConnectionProtocol(input string) (*VirtualNetworkGatewayConnectionProtocol, error) { - vals := map[string]VirtualNetworkGatewayConnectionProtocol{ - "ikev1": VirtualNetworkGatewayConnectionProtocolIKEvOne, - "ikev2": VirtualNetworkGatewayConnectionProtocolIKEvTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkGatewayConnectionProtocol(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} - -type VpnConnectionStatus string - -const ( - VpnConnectionStatusConnected VpnConnectionStatus = "Connected" - VpnConnectionStatusConnecting VpnConnectionStatus = "Connecting" - VpnConnectionStatusNotConnected VpnConnectionStatus = "NotConnected" - VpnConnectionStatusUnknown VpnConnectionStatus = "Unknown" -) - -func PossibleValuesForVpnConnectionStatus() []string { - return []string{ - string(VpnConnectionStatusConnected), - string(VpnConnectionStatusConnecting), - string(VpnConnectionStatusNotConnected), - string(VpnConnectionStatusUnknown), - } -} - -func (s *VpnConnectionStatus) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnConnectionStatus(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnConnectionStatus(input string) (*VpnConnectionStatus, error) { - vals := map[string]VpnConnectionStatus{ - "connected": VpnConnectionStatusConnected, - "connecting": VpnConnectionStatusConnecting, - "notconnected": VpnConnectionStatusNotConnected, - "unknown": VpnConnectionStatusUnknown, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnConnectionStatus(input) - return &out, nil -} - -type VpnLinkConnectionMode string - -const ( - VpnLinkConnectionModeDefault VpnLinkConnectionMode = "Default" - VpnLinkConnectionModeInitiatorOnly VpnLinkConnectionMode = "InitiatorOnly" - VpnLinkConnectionModeResponderOnly VpnLinkConnectionMode = "ResponderOnly" -) - -func PossibleValuesForVpnLinkConnectionMode() []string { - return []string{ - string(VpnLinkConnectionModeDefault), - string(VpnLinkConnectionModeInitiatorOnly), - string(VpnLinkConnectionModeResponderOnly), - } -} - -func (s *VpnLinkConnectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnLinkConnectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnLinkConnectionMode(input string) (*VpnLinkConnectionMode, error) { - vals := map[string]VpnLinkConnectionMode{ - "default": VpnLinkConnectionModeDefault, - "initiatoronly": VpnLinkConnectionModeInitiatorOnly, - "responderonly": VpnLinkConnectionModeResponderOnly, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnLinkConnectionMode(input) - return &out, nil -} - -type VpnNatRuleMode string - -const ( - VpnNatRuleModeEgressSnat VpnNatRuleMode = "EgressSnat" - VpnNatRuleModeIngressSnat VpnNatRuleMode = "IngressSnat" -) - -func PossibleValuesForVpnNatRuleMode() []string { - return []string{ - string(VpnNatRuleModeEgressSnat), - string(VpnNatRuleModeIngressSnat), - } -} - -func (s *VpnNatRuleMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleMode(input string) (*VpnNatRuleMode, error) { - vals := map[string]VpnNatRuleMode{ - "egresssnat": VpnNatRuleModeEgressSnat, - "ingresssnat": VpnNatRuleModeIngressSnat, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleMode(input) - return &out, nil -} - -type VpnNatRuleType string - -const ( - VpnNatRuleTypeDynamic VpnNatRuleType = "Dynamic" - VpnNatRuleTypeStatic VpnNatRuleType = "Static" -) - -func PossibleValuesForVpnNatRuleType() []string { - return []string{ - string(VpnNatRuleTypeDynamic), - string(VpnNatRuleTypeStatic), - } -} - -func (s *VpnNatRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnNatRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnNatRuleType(input string) (*VpnNatRuleType, error) { - vals := map[string]VpnNatRuleType{ - "dynamic": VpnNatRuleTypeDynamic, - "static": VpnNatRuleTypeStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnNatRuleType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/vpngateways/id_vpngateway.go b/resource-manager/network/2022-11-01/vpngateways/id_vpngateway.go deleted file mode 100644 index 5e23e288887..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/id_vpngateway.go +++ /dev/null @@ -1,127 +0,0 @@ -package vpngateways - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnGatewayId{} - -// VpnGatewayId is a struct representing the Resource ID for a Vpn Gateway -type VpnGatewayId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string -} - -// NewVpnGatewayID returns a new VpnGatewayId struct -func NewVpnGatewayID(subscriptionId string, resourceGroupName string, vpnGatewayName string) VpnGatewayId { - return VpnGatewayId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - } -} - -// ParseVpnGatewayID parses 'input' into a VpnGatewayId -func ParseVpnGatewayID(input string) (*VpnGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnGatewayId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - return &id, nil -} - -// ParseVpnGatewayIDInsensitively parses 'input' case-insensitively into a VpnGatewayId -// note: this method should only be used for API response data and not user input -func ParseVpnGatewayIDInsensitively(input string) (*VpnGatewayId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnGatewayId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnGatewayId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - return &id, nil -} - -// ValidateVpnGatewayID checks that 'input' can be parsed as a Vpn Gateway ID -func ValidateVpnGatewayID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnGatewayID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Gateway ID -func (id VpnGatewayId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Gateway ID -func (id VpnGatewayId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - } -} - -// String returns a human-readable description of this Vpn Gateway ID -func (id VpnGatewayId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - } - return fmt.Sprintf("Vpn Gateway (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/vpngateways/id_vpngateway_test.go b/resource-manager/network/2022-11-01/vpngateways/id_vpngateway_test.go deleted file mode 100644 index 0e87eff4896..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/id_vpngateway_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vpngateways - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnGatewayId{} - -func TestNewVpnGatewayID(t *testing.T) { - id := NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } -} - -func TestFormatVpnGatewayID(t *testing.T) { - actual := NewVpnGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnGatewayID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnGatewayID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - } -} - -func TestParseVpnGatewayIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnGatewayId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Expected: &VpnGatewayId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnGatewayIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - } -} - -func TestSegmentsForVpnGatewayId(t *testing.T) { - segments := VpnGatewayId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnGatewayId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/vpngateways/method_reset.go b/resource-manager/network/2022-11-01/vpngateways/method_reset.go deleted file mode 100644 index bc4cdd7f867..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/method_reset.go +++ /dev/null @@ -1,98 +0,0 @@ -package vpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -type ResetOperationOptions struct { - IPConfigurationId *string -} - -func DefaultResetOperationOptions() ResetOperationOptions { - return ResetOperationOptions{} -} - -func (o ResetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o ResetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o ResetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.IPConfigurationId != nil { - out.Append("ipConfigurationId", fmt.Sprintf("%v", *o.IPConfigurationId)) - } - return &out -} - -// Reset ... -func (c VpnGatewaysClient) Reset(ctx context.Context, id VpnGatewayId, options ResetOperationOptions) (result ResetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/reset", id.ID()), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetThenPoll performs Reset then polls until it's completed -func (c VpnGatewaysClient) ResetThenPoll(ctx context.Context, id VpnGatewayId, options ResetOperationOptions) error { - result, err := c.Reset(ctx, id, options) - if err != nil { - return fmt.Errorf("performing Reset: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Reset: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/vpngateways/method_startpacketcapture.go b/resource-manager/network/2022-11-01/vpngateways/method_startpacketcapture.go deleted file mode 100644 index eda6646d71c..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/method_startpacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package vpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StartPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StartPacketCapture ... -func (c VpnGatewaysClient) StartPacketCapture(ctx context.Context, id VpnGatewayId, input VpnGatewayPacketCaptureStartParameters) (result StartPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/startpacketcapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StartPacketCaptureThenPoll performs StartPacketCapture then polls until it's completed -func (c VpnGatewaysClient) StartPacketCaptureThenPoll(ctx context.Context, id VpnGatewayId, input VpnGatewayPacketCaptureStartParameters) error { - result, err := c.StartPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StartPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StartPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/vpngateways/method_stoppacketcapture.go b/resource-manager/network/2022-11-01/vpngateways/method_stoppacketcapture.go deleted file mode 100644 index 56d332e0683..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/method_stoppacketcapture.go +++ /dev/null @@ -1,74 +0,0 @@ -package vpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StopPacketCaptureOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// StopPacketCapture ... -func (c VpnGatewaysClient) StopPacketCapture(ctx context.Context, id VpnGatewayId, input VpnGatewayPacketCaptureStopParameters) (result StopPacketCaptureOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/stoppacketcapture", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// StopPacketCaptureThenPoll performs StopPacketCapture then polls until it's completed -func (c VpnGatewaysClient) StopPacketCaptureThenPoll(ctx context.Context, id VpnGatewayId, input VpnGatewayPacketCaptureStopParameters) error { - result, err := c.StopPacketCapture(ctx, id, input) - if err != nil { - return fmt.Errorf("performing StopPacketCapture: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after StopPacketCapture: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/vpngateways/method_updatetags.go b/resource-manager/network/2022-11-01/vpngateways/method_updatetags.go deleted file mode 100644 index 37a79201602..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/method_updatetags.go +++ /dev/null @@ -1,74 +0,0 @@ -package vpngateways - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// UpdateTags ... -func (c VpnGatewaysClient) UpdateTags(ctx context.Context, id VpnGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// UpdateTagsThenPoll performs UpdateTags then polls until it's completed -func (c VpnGatewaysClient) UpdateTagsThenPoll(ctx context.Context, id VpnGatewayId, input TagsObject) error { - result, err := c.UpdateTags(ctx, id, input) - if err != nil { - return fmt.Errorf("performing UpdateTags: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after UpdateTags: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_bgpsettings.go b/resource-manager/network/2022-11-01/vpngateways/model_bgpsettings.go deleted file mode 100644 index f2627d16bf7..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_gatewaycustombgpipaddressipconfiguration.go b/resource-manager/network/2022-11-01/vpngateways/model_gatewaycustombgpipaddressipconfiguration.go deleted file mode 100644 index 6b30604f2da..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_gatewaycustombgpipaddressipconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayCustomBgpIPAddressIPConfiguration struct { - CustomBgpIPAddress string `json:"customBgpIpAddress"` - IPConfigurationId string `json:"ipConfigurationId"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-11-01/vpngateways/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index c3e0e46c541..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_ipsecpolicy.go b/resource-manager/network/2022-11-01/vpngateways/model_ipsecpolicy.go deleted file mode 100644 index 63c4e9184df..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_propagatedroutetable.go b/resource-manager/network/2022-11-01/vpngateways/model_propagatedroutetable.go deleted file mode 100644 index e838e6e2dc7..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_routingconfiguration.go b/resource-manager/network/2022-11-01/vpngateways/model_routingconfiguration.go deleted file mode 100644 index fe2fd37804f..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_staticroute.go b/resource-manager/network/2022-11-01/vpngateways/model_staticroute.go deleted file mode 100644 index 90806109c8c..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_staticroutesconfig.go b/resource-manager/network/2022-11-01/vpngateways/model_staticroutesconfig.go deleted file mode 100644 index b973c853be2..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_subresource.go b/resource-manager/network/2022-11-01/vpngateways/model_subresource.go deleted file mode 100644 index cf0dbcdeb10..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_tagsobject.go b/resource-manager/network/2022-11-01/vpngateways/model_tagsobject.go deleted file mode 100644 index dd09a7e7f34..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_trafficselectorpolicy.go b/resource-manager/network/2022-11-01/vpngateways/model_trafficselectorpolicy.go deleted file mode 100644 index b65874d225f..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_trafficselectorpolicy.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficSelectorPolicy struct { - LocalAddressRanges []string `json:"localAddressRanges"` - RemoteAddressRanges []string `json:"remoteAddressRanges"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vnetroute.go b/resource-manager/network/2022-11-01/vpngateways/model_vnetroute.go deleted file mode 100644 index 31f211b1d1d..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpnconnection.go b/resource-manager/network/2022-11-01/vpngateways/model_vpnconnection.go deleted file mode 100644 index a65d73ea9e8..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpnconnection.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnConnectionProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpnconnectionproperties.go b/resource-manager/network/2022-11-01/vpngateways/model_vpnconnectionproperties.go deleted file mode 100644 index df2da84d685..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpnconnectionproperties.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnConnectionProperties struct { - ConnectionBandwidth *int64 `json:"connectionBandwidth,omitempty"` - ConnectionStatus *VpnConnectionStatus `json:"connectionStatus,omitempty"` - DpdTimeoutSeconds *int64 `json:"dpdTimeoutSeconds,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RemoteVpnSite *SubResource `json:"remoteVpnSite,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - TrafficSelectorPolicies *[]TrafficSelectorPolicy `json:"trafficSelectorPolicies,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VpnConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - VpnLinkConnections *[]VpnSiteLinkConnection `json:"vpnLinkConnections,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpngateway.go b/resource-manager/network/2022-11-01/vpngateways/model_vpngateway.go deleted file mode 100644 index 9ad0ad0bbaf..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewayipconfiguration.go b/resource-manager/network/2022-11-01/vpngateways/model_vpngatewayipconfiguration.go deleted file mode 100644 index 703d0c1d833..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewayipconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayIPConfiguration struct { - Id *string `json:"id,omitempty"` - PrivateIPAddress *string `json:"privateIpAddress,omitempty"` - PublicIPAddress *string `json:"publicIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaynatrule.go b/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaynatrule.go deleted file mode 100644 index 833a44f9a3d..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaynatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnGatewayNatRuleProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaynatruleproperties.go b/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaynatruleproperties.go deleted file mode 100644 index 240415bacef..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaynatruleproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayNatRuleProperties struct { - EgressVpnSiteLinkConnections *[]SubResource `json:"egressVpnSiteLinkConnections,omitempty"` - ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` - IPConfigurationId *string `json:"ipConfigurationId,omitempty"` - IngressVpnSiteLinkConnections *[]SubResource `json:"ingressVpnSiteLinkConnections,omitempty"` - InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` - Mode *VpnNatRuleMode `json:"mode,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Type *VpnNatRuleType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaypacketcapturestartparameters.go b/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaypacketcapturestartparameters.go deleted file mode 100644 index 4afb62c2a68..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaypacketcapturestartparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayPacketCaptureStartParameters struct { - FilterData *string `json:"filterData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaypacketcapturestopparameters.go b/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaypacketcapturestopparameters.go deleted file mode 100644 index ca9fe7cf71d..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewaypacketcapturestopparameters.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayPacketCaptureStopParameters struct { - SasUrl *string `json:"sasUrl,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewayproperties.go b/resource-manager/network/2022-11-01/vpngateways/model_vpngatewayproperties.go deleted file mode 100644 index aa5ac3cbf6c..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpngatewayproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnGatewayProperties struct { - BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` - Connections *[]VpnConnection `json:"connections,omitempty"` - EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` - IPConfigurations *[]VpnGatewayIPConfiguration `json:"ipConfigurations,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - NatRules *[]VpnGatewayNatRule `json:"natRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpnnatrulemapping.go b/resource-manager/network/2022-11-01/vpngateways/model_vpnnatrulemapping.go deleted file mode 100644 index 3cd7718da11..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpnnatrulemapping.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnNatRuleMapping struct { - AddressSpace *string `json:"addressSpace,omitempty"` - PortRange *string `json:"portRange,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpnsitelinkconnection.go b/resource-manager/network/2022-11-01/vpngateways/model_vpnsitelinkconnection.go deleted file mode 100644 index 874a627b999..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpnsitelinkconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteLinkConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/model_vpnsitelinkconnectionproperties.go b/resource-manager/network/2022-11-01/vpngateways/model_vpnsitelinkconnectionproperties.go deleted file mode 100644 index fc23bd1f279..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/model_vpnsitelinkconnectionproperties.go +++ /dev/null @@ -1,25 +0,0 @@ -package vpngateways - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkConnectionProperties struct { - ConnectionBandwidth *int64 `json:"connectionBandwidth,omitempty"` - ConnectionStatus *VpnConnectionStatus `json:"connectionStatus,omitempty"` - EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` - EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"` - EnableBgp *bool `json:"enableBgp,omitempty"` - EnableRateLimiting *bool `json:"enableRateLimiting,omitempty"` - IPsecPolicies *[]IPsecPolicy `json:"ipsecPolicies,omitempty"` - IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` - IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingWeight *int64 `json:"routingWeight,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` - UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` - VpnConnectionProtocolType *VirtualNetworkGatewayConnectionProtocol `json:"vpnConnectionProtocolType,omitempty"` - VpnGatewayCustomBgpAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"vpnGatewayCustomBgpAddresses,omitempty"` - VpnLinkConnectionMode *VpnLinkConnectionMode `json:"vpnLinkConnectionMode,omitempty"` - VpnSiteLink *SubResource `json:"vpnSiteLink,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpngateways/version.go b/resource-manager/network/2022-11-01/vpngateways/version.go deleted file mode 100644 index 10f2f10833a..00000000000 --- a/resource-manager/network/2022-11-01/vpngateways/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpngateways - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpngateways/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/vpnlinkconnections/client.go b/resource-manager/network/2022-11-01/vpnlinkconnections/client.go deleted file mode 100644 index d5db633fa84..00000000000 --- a/resource-manager/network/2022-11-01/vpnlinkconnections/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpnlinkconnections - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkConnectionsClient struct { - Client *resourcemanager.Client -} - -func NewVpnLinkConnectionsClientWithBaseURI(api environments.Api) (*VpnLinkConnectionsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vpnlinkconnections", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VpnLinkConnectionsClient: %+v", err) - } - - return &VpnLinkConnectionsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/vpnlinkconnections/id_vpnlinkconnection.go b/resource-manager/network/2022-11-01/vpnlinkconnections/id_vpnlinkconnection.go deleted file mode 100644 index 1fc8b77b7e9..00000000000 --- a/resource-manager/network/2022-11-01/vpnlinkconnections/id_vpnlinkconnection.go +++ /dev/null @@ -1,153 +0,0 @@ -package vpnlinkconnections - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnLinkConnectionId{} - -// VpnLinkConnectionId is a struct representing the Resource ID for a Vpn Link Connection -type VpnLinkConnectionId struct { - SubscriptionId string - ResourceGroupName string - VpnGatewayName string - VpnConnectionName string - VpnLinkConnectionName string -} - -// NewVpnLinkConnectionID returns a new VpnLinkConnectionId struct -func NewVpnLinkConnectionID(subscriptionId string, resourceGroupName string, vpnGatewayName string, vpnConnectionName string, vpnLinkConnectionName string) VpnLinkConnectionId { - return VpnLinkConnectionId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnGatewayName: vpnGatewayName, - VpnConnectionName: vpnConnectionName, - VpnLinkConnectionName: vpnLinkConnectionName, - } -} - -// ParseVpnLinkConnectionID parses 'input' into a VpnLinkConnectionId -func ParseVpnLinkConnectionID(input string) (*VpnLinkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnLinkConnectionId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) - } - - return &id, nil -} - -// ParseVpnLinkConnectionIDInsensitively parses 'input' case-insensitively into a VpnLinkConnectionId -// note: this method should only be used for API response data and not user input -func ParseVpnLinkConnectionIDInsensitively(input string) (*VpnLinkConnectionId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnLinkConnectionId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnLinkConnectionId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnGatewayName, ok = parsed.Parsed["vpnGatewayName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnGatewayName", *parsed) - } - - if id.VpnConnectionName, ok = parsed.Parsed["vpnConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnConnectionName", *parsed) - } - - if id.VpnLinkConnectionName, ok = parsed.Parsed["vpnLinkConnectionName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnLinkConnectionName", *parsed) - } - - return &id, nil -} - -// ValidateVpnLinkConnectionID checks that 'input' can be parsed as a Vpn Link Connection ID -func ValidateVpnLinkConnectionID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnLinkConnectionID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Link Connection ID -func (id VpnLinkConnectionId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnGateways/%s/vpnConnections/%s/vpnLinkConnections/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnGatewayName, id.VpnConnectionName, id.VpnLinkConnectionName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Link Connection ID -func (id VpnLinkConnectionId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnGateways", "vpnGateways", "vpnGateways"), - resourceids.UserSpecifiedSegment("vpnGatewayName", "vpnGatewayValue"), - resourceids.StaticSegment("staticVpnConnections", "vpnConnections", "vpnConnections"), - resourceids.UserSpecifiedSegment("vpnConnectionName", "vpnConnectionValue"), - resourceids.StaticSegment("staticVpnLinkConnections", "vpnLinkConnections", "vpnLinkConnections"), - resourceids.UserSpecifiedSegment("vpnLinkConnectionName", "vpnLinkConnectionValue"), - } -} - -// String returns a human-readable description of this Vpn Link Connection ID -func (id VpnLinkConnectionId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Gateway Name: %q", id.VpnGatewayName), - fmt.Sprintf("Vpn Connection Name: %q", id.VpnConnectionName), - fmt.Sprintf("Vpn Link Connection Name: %q", id.VpnLinkConnectionName), - } - return fmt.Sprintf("Vpn Link Connection (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/vpnlinkconnections/id_vpnlinkconnection_test.go b/resource-manager/network/2022-11-01/vpnlinkconnections/id_vpnlinkconnection_test.go deleted file mode 100644 index 46a88f7102c..00000000000 --- a/resource-manager/network/2022-11-01/vpnlinkconnections/id_vpnlinkconnection_test.go +++ /dev/null @@ -1,372 +0,0 @@ -package vpnlinkconnections - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnLinkConnectionId{} - -func TestNewVpnLinkConnectionID(t *testing.T) { - id := NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnGatewayName != "vpnGatewayValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnGatewayName'", id.VpnGatewayName, "vpnGatewayValue") - } - - if id.VpnConnectionName != "vpnConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnConnectionName'", id.VpnConnectionName, "vpnConnectionValue") - } - - if id.VpnLinkConnectionName != "vpnLinkConnectionValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnLinkConnectionName'", id.VpnLinkConnectionName, "vpnLinkConnectionValue") - } -} - -func TestFormatVpnLinkConnectionID(t *testing.T) { - actual := NewVpnLinkConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnGatewayValue", "vpnConnectionValue", "vpnLinkConnectionValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnLinkConnectionID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnLinkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - VpnConnectionName: "vpnConnectionValue", - VpnLinkConnectionName: "vpnLinkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnLinkConnectionID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.VpnConnectionName != v.Expected.VpnConnectionName { - t.Fatalf("Expected %q but got %q for VpnConnectionName", v.Expected.VpnConnectionName, actual.VpnConnectionName) - } - - if actual.VpnLinkConnectionName != v.Expected.VpnLinkConnectionName { - t.Fatalf("Expected %q but got %q for VpnLinkConnectionName", v.Expected.VpnLinkConnectionName, actual.VpnLinkConnectionName) - } - - } -} - -func TestParseVpnLinkConnectionIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnLinkConnectionId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnGatewayName: "vpnGatewayValue", - VpnConnectionName: "vpnConnectionValue", - VpnLinkConnectionName: "vpnLinkConnectionValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnGateways/vpnGatewayValue/vpnConnections/vpnConnectionValue/vpnLinkConnections/vpnLinkConnectionValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS/vPnLiNkCoNnEcTiOnVaLuE", - Expected: &VpnLinkConnectionId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnGatewayName: "vPnGaTeWaYvAlUe", - VpnConnectionName: "vPnCoNnEcTiOnVaLuE", - VpnLinkConnectionName: "vPnLiNkCoNnEcTiOnVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnGaTeWaYs/vPnGaTeWaYvAlUe/vPnCoNnEcTiOnS/vPnCoNnEcTiOnVaLuE/vPnLiNkCoNnEcTiOnS/vPnLiNkCoNnEcTiOnVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnLinkConnectionIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnGatewayName != v.Expected.VpnGatewayName { - t.Fatalf("Expected %q but got %q for VpnGatewayName", v.Expected.VpnGatewayName, actual.VpnGatewayName) - } - - if actual.VpnConnectionName != v.Expected.VpnConnectionName { - t.Fatalf("Expected %q but got %q for VpnConnectionName", v.Expected.VpnConnectionName, actual.VpnConnectionName) - } - - if actual.VpnLinkConnectionName != v.Expected.VpnLinkConnectionName { - t.Fatalf("Expected %q but got %q for VpnLinkConnectionName", v.Expected.VpnLinkConnectionName, actual.VpnLinkConnectionName) - } - - } -} - -func TestSegmentsForVpnLinkConnectionId(t *testing.T) { - segments := VpnLinkConnectionId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnLinkConnectionId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/vpnlinkconnections/method_resetconnection.go b/resource-manager/network/2022-11-01/vpnlinkconnections/method_resetconnection.go deleted file mode 100644 index 526963414ea..00000000000 --- a/resource-manager/network/2022-11-01/vpnlinkconnections/method_resetconnection.go +++ /dev/null @@ -1,69 +0,0 @@ -package vpnlinkconnections - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResetConnectionOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// ResetConnection ... -func (c VpnLinkConnectionsClient) ResetConnection(ctx context.Context, id VpnLinkConnectionId) (result ResetConnectionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - }, - HttpMethod: http.MethodPost, - Path: fmt.Sprintf("%s/resetconnection", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// ResetConnectionThenPoll performs ResetConnection then polls until it's completed -func (c VpnLinkConnectionsClient) ResetConnectionThenPoll(ctx context.Context, id VpnLinkConnectionId) error { - result, err := c.ResetConnection(ctx, id) - if err != nil { - return fmt.Errorf("performing ResetConnection: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after ResetConnection: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/vpnlinkconnections/version.go b/resource-manager/network/2022-11-01/vpnlinkconnections/version.go deleted file mode 100644 index 8a8ff0e6045..00000000000 --- a/resource-manager/network/2022-11-01/vpnlinkconnections/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnlinkconnections - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnlinkconnections/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/README.md b/resource-manager/network/2022-11-01/vpnserverconfigurations/README.md deleted file mode 100644 index d49bdc91589..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpnserverconfigurations` Documentation - -The `vpnserverconfigurations` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpnserverconfigurations" -``` - - -### Client Initialization - -```go -client := vpnserverconfigurations.NewVpnServerConfigurationsClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VpnServerConfigurationsClient.UpdateTags` - -```go -ctx := context.TODO() -id := vpnserverconfigurations.NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - -payload := vpnserverconfigurations.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/client.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/client.go deleted file mode 100644 index 722cdb26573..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpnserverconfigurations - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationsClient struct { - Client *resourcemanager.Client -} - -func NewVpnServerConfigurationsClientWithBaseURI(api environments.Api) (*VpnServerConfigurationsClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vpnserverconfigurations", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VpnServerConfigurationsClient: %+v", err) - } - - return &VpnServerConfigurationsClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/constants.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/constants.go deleted file mode 100644 index f297d6e8b17..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/constants.go +++ /dev/null @@ -1,572 +0,0 @@ -package vpnserverconfigurations - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DhGroup string - -const ( - DhGroupDHGroupOne DhGroup = "DHGroup1" - DhGroupDHGroupOneFour DhGroup = "DHGroup14" - DhGroupDHGroupTwo DhGroup = "DHGroup2" - DhGroupDHGroupTwoFour DhGroup = "DHGroup24" - DhGroupDHGroupTwoZeroFourEight DhGroup = "DHGroup2048" - DhGroupECPThreeEightFour DhGroup = "ECP384" - DhGroupECPTwoFiveSix DhGroup = "ECP256" - DhGroupNone DhGroup = "None" -) - -func PossibleValuesForDhGroup() []string { - return []string{ - string(DhGroupDHGroupOne), - string(DhGroupDHGroupOneFour), - string(DhGroupDHGroupTwo), - string(DhGroupDHGroupTwoFour), - string(DhGroupDHGroupTwoZeroFourEight), - string(DhGroupECPThreeEightFour), - string(DhGroupECPTwoFiveSix), - string(DhGroupNone), - } -} - -func (s *DhGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDhGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDhGroup(input string) (*DhGroup, error) { - vals := map[string]DhGroup{ - "dhgroup1": DhGroupDHGroupOne, - "dhgroup14": DhGroupDHGroupOneFour, - "dhgroup2": DhGroupDHGroupTwo, - "dhgroup24": DhGroupDHGroupTwoFour, - "dhgroup2048": DhGroupDHGroupTwoZeroFourEight, - "ecp384": DhGroupECPThreeEightFour, - "ecp256": DhGroupECPTwoFiveSix, - "none": DhGroupNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DhGroup(input) - return &out, nil -} - -type IPsecEncryption string - -const ( - IPsecEncryptionAESOneNineTwo IPsecEncryption = "AES192" - IPsecEncryptionAESOneTwoEight IPsecEncryption = "AES128" - IPsecEncryptionAESTwoFiveSix IPsecEncryption = "AES256" - IPsecEncryptionDES IPsecEncryption = "DES" - IPsecEncryptionDESThree IPsecEncryption = "DES3" - IPsecEncryptionGCMAESOneNineTwo IPsecEncryption = "GCMAES192" - IPsecEncryptionGCMAESOneTwoEight IPsecEncryption = "GCMAES128" - IPsecEncryptionGCMAESTwoFiveSix IPsecEncryption = "GCMAES256" - IPsecEncryptionNone IPsecEncryption = "None" -) - -func PossibleValuesForIPsecEncryption() []string { - return []string{ - string(IPsecEncryptionAESOneNineTwo), - string(IPsecEncryptionAESOneTwoEight), - string(IPsecEncryptionAESTwoFiveSix), - string(IPsecEncryptionDES), - string(IPsecEncryptionDESThree), - string(IPsecEncryptionGCMAESOneNineTwo), - string(IPsecEncryptionGCMAESOneTwoEight), - string(IPsecEncryptionGCMAESTwoFiveSix), - string(IPsecEncryptionNone), - } -} - -func (s *IPsecEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecEncryption(input string) (*IPsecEncryption, error) { - vals := map[string]IPsecEncryption{ - "aes192": IPsecEncryptionAESOneNineTwo, - "aes128": IPsecEncryptionAESOneTwoEight, - "aes256": IPsecEncryptionAESTwoFiveSix, - "des": IPsecEncryptionDES, - "des3": IPsecEncryptionDESThree, - "gcmaes192": IPsecEncryptionGCMAESOneNineTwo, - "gcmaes128": IPsecEncryptionGCMAESOneTwoEight, - "gcmaes256": IPsecEncryptionGCMAESTwoFiveSix, - "none": IPsecEncryptionNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecEncryption(input) - return &out, nil -} - -type IPsecIntegrity string - -const ( - IPsecIntegrityGCMAESOneNineTwo IPsecIntegrity = "GCMAES192" - IPsecIntegrityGCMAESOneTwoEight IPsecIntegrity = "GCMAES128" - IPsecIntegrityGCMAESTwoFiveSix IPsecIntegrity = "GCMAES256" - IPsecIntegrityMDFive IPsecIntegrity = "MD5" - IPsecIntegritySHAOne IPsecIntegrity = "SHA1" - IPsecIntegritySHATwoFiveSix IPsecIntegrity = "SHA256" -) - -func PossibleValuesForIPsecIntegrity() []string { - return []string{ - string(IPsecIntegrityGCMAESOneNineTwo), - string(IPsecIntegrityGCMAESOneTwoEight), - string(IPsecIntegrityGCMAESTwoFiveSix), - string(IPsecIntegrityMDFive), - string(IPsecIntegritySHAOne), - string(IPsecIntegritySHATwoFiveSix), - } -} - -func (s *IPsecIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPsecIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPsecIntegrity(input string) (*IPsecIntegrity, error) { - vals := map[string]IPsecIntegrity{ - "gcmaes192": IPsecIntegrityGCMAESOneNineTwo, - "gcmaes128": IPsecIntegrityGCMAESOneTwoEight, - "gcmaes256": IPsecIntegrityGCMAESTwoFiveSix, - "md5": IPsecIntegrityMDFive, - "sha1": IPsecIntegritySHAOne, - "sha256": IPsecIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPsecIntegrity(input) - return &out, nil -} - -type IkeEncryption string - -const ( - IkeEncryptionAESOneNineTwo IkeEncryption = "AES192" - IkeEncryptionAESOneTwoEight IkeEncryption = "AES128" - IkeEncryptionAESTwoFiveSix IkeEncryption = "AES256" - IkeEncryptionDES IkeEncryption = "DES" - IkeEncryptionDESThree IkeEncryption = "DES3" - IkeEncryptionGCMAESOneTwoEight IkeEncryption = "GCMAES128" - IkeEncryptionGCMAESTwoFiveSix IkeEncryption = "GCMAES256" -) - -func PossibleValuesForIkeEncryption() []string { - return []string{ - string(IkeEncryptionAESOneNineTwo), - string(IkeEncryptionAESOneTwoEight), - string(IkeEncryptionAESTwoFiveSix), - string(IkeEncryptionDES), - string(IkeEncryptionDESThree), - string(IkeEncryptionGCMAESOneTwoEight), - string(IkeEncryptionGCMAESTwoFiveSix), - } -} - -func (s *IkeEncryption) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeEncryption(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeEncryption(input string) (*IkeEncryption, error) { - vals := map[string]IkeEncryption{ - "aes192": IkeEncryptionAESOneNineTwo, - "aes128": IkeEncryptionAESOneTwoEight, - "aes256": IkeEncryptionAESTwoFiveSix, - "des": IkeEncryptionDES, - "des3": IkeEncryptionDESThree, - "gcmaes128": IkeEncryptionGCMAESOneTwoEight, - "gcmaes256": IkeEncryptionGCMAESTwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeEncryption(input) - return &out, nil -} - -type IkeIntegrity string - -const ( - IkeIntegrityGCMAESOneTwoEight IkeIntegrity = "GCMAES128" - IkeIntegrityGCMAESTwoFiveSix IkeIntegrity = "GCMAES256" - IkeIntegrityMDFive IkeIntegrity = "MD5" - IkeIntegritySHAOne IkeIntegrity = "SHA1" - IkeIntegritySHAThreeEightFour IkeIntegrity = "SHA384" - IkeIntegritySHATwoFiveSix IkeIntegrity = "SHA256" -) - -func PossibleValuesForIkeIntegrity() []string { - return []string{ - string(IkeIntegrityGCMAESOneTwoEight), - string(IkeIntegrityGCMAESTwoFiveSix), - string(IkeIntegrityMDFive), - string(IkeIntegritySHAOne), - string(IkeIntegritySHAThreeEightFour), - string(IkeIntegritySHATwoFiveSix), - } -} - -func (s *IkeIntegrity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIkeIntegrity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIkeIntegrity(input string) (*IkeIntegrity, error) { - vals := map[string]IkeIntegrity{ - "gcmaes128": IkeIntegrityGCMAESOneTwoEight, - "gcmaes256": IkeIntegrityGCMAESTwoFiveSix, - "md5": IkeIntegrityMDFive, - "sha1": IkeIntegritySHAOne, - "sha384": IkeIntegritySHAThreeEightFour, - "sha256": IkeIntegritySHATwoFiveSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IkeIntegrity(input) - return &out, nil -} - -type PfsGroup string - -const ( - PfsGroupECPThreeEightFour PfsGroup = "ECP384" - PfsGroupECPTwoFiveSix PfsGroup = "ECP256" - PfsGroupNone PfsGroup = "None" - PfsGroupPFSMM PfsGroup = "PFSMM" - PfsGroupPFSOne PfsGroup = "PFS1" - PfsGroupPFSOneFour PfsGroup = "PFS14" - PfsGroupPFSTwo PfsGroup = "PFS2" - PfsGroupPFSTwoFour PfsGroup = "PFS24" - PfsGroupPFSTwoZeroFourEight PfsGroup = "PFS2048" -) - -func PossibleValuesForPfsGroup() []string { - return []string{ - string(PfsGroupECPThreeEightFour), - string(PfsGroupECPTwoFiveSix), - string(PfsGroupNone), - string(PfsGroupPFSMM), - string(PfsGroupPFSOne), - string(PfsGroupPFSOneFour), - string(PfsGroupPFSTwo), - string(PfsGroupPFSTwoFour), - string(PfsGroupPFSTwoZeroFourEight), - } -} - -func (s *PfsGroup) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePfsGroup(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePfsGroup(input string) (*PfsGroup, error) { - vals := map[string]PfsGroup{ - "ecp384": PfsGroupECPThreeEightFour, - "ecp256": PfsGroupECPTwoFiveSix, - "none": PfsGroupNone, - "pfsmm": PfsGroupPFSMM, - "pfs1": PfsGroupPFSOne, - "pfs14": PfsGroupPFSOneFour, - "pfs2": PfsGroupPFSTwo, - "pfs24": PfsGroupPFSTwoFour, - "pfs2048": PfsGroupPFSTwoZeroFourEight, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PfsGroup(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type VnetLocalRouteOverrideCriteria string - -const ( - VnetLocalRouteOverrideCriteriaContains VnetLocalRouteOverrideCriteria = "Contains" - VnetLocalRouteOverrideCriteriaEqual VnetLocalRouteOverrideCriteria = "Equal" -) - -func PossibleValuesForVnetLocalRouteOverrideCriteria() []string { - return []string{ - string(VnetLocalRouteOverrideCriteriaContains), - string(VnetLocalRouteOverrideCriteriaEqual), - } -} - -func (s *VnetLocalRouteOverrideCriteria) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVnetLocalRouteOverrideCriteria(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVnetLocalRouteOverrideCriteria(input string) (*VnetLocalRouteOverrideCriteria, error) { - vals := map[string]VnetLocalRouteOverrideCriteria{ - "contains": VnetLocalRouteOverrideCriteriaContains, - "equal": VnetLocalRouteOverrideCriteriaEqual, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VnetLocalRouteOverrideCriteria(input) - return &out, nil -} - -type VpnAuthenticationType string - -const ( - VpnAuthenticationTypeAAD VpnAuthenticationType = "AAD" - VpnAuthenticationTypeCertificate VpnAuthenticationType = "Certificate" - VpnAuthenticationTypeRadius VpnAuthenticationType = "Radius" -) - -func PossibleValuesForVpnAuthenticationType() []string { - return []string{ - string(VpnAuthenticationTypeAAD), - string(VpnAuthenticationTypeCertificate), - string(VpnAuthenticationTypeRadius), - } -} - -func (s *VpnAuthenticationType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnAuthenticationType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnAuthenticationType(input string) (*VpnAuthenticationType, error) { - vals := map[string]VpnAuthenticationType{ - "aad": VpnAuthenticationTypeAAD, - "certificate": VpnAuthenticationTypeCertificate, - "radius": VpnAuthenticationTypeRadius, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnAuthenticationType(input) - return &out, nil -} - -type VpnGatewayTunnelingProtocol string - -const ( - VpnGatewayTunnelingProtocolIkeVTwo VpnGatewayTunnelingProtocol = "IkeV2" - VpnGatewayTunnelingProtocolOpenVPN VpnGatewayTunnelingProtocol = "OpenVPN" -) - -func PossibleValuesForVpnGatewayTunnelingProtocol() []string { - return []string{ - string(VpnGatewayTunnelingProtocolIkeVTwo), - string(VpnGatewayTunnelingProtocolOpenVPN), - } -} - -func (s *VpnGatewayTunnelingProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnGatewayTunnelingProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnGatewayTunnelingProtocol(input string) (*VpnGatewayTunnelingProtocol, error) { - vals := map[string]VpnGatewayTunnelingProtocol{ - "ikev2": VpnGatewayTunnelingProtocolIkeVTwo, - "openvpn": VpnGatewayTunnelingProtocolOpenVPN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnGatewayTunnelingProtocol(input) - return &out, nil -} - -type VpnPolicyMemberAttributeType string - -const ( - VpnPolicyMemberAttributeTypeAADGroupId VpnPolicyMemberAttributeType = "AADGroupId" - VpnPolicyMemberAttributeTypeCertificateGroupId VpnPolicyMemberAttributeType = "CertificateGroupId" - VpnPolicyMemberAttributeTypeRadiusAzureGroupId VpnPolicyMemberAttributeType = "RadiusAzureGroupId" -) - -func PossibleValuesForVpnPolicyMemberAttributeType() []string { - return []string{ - string(VpnPolicyMemberAttributeTypeAADGroupId), - string(VpnPolicyMemberAttributeTypeCertificateGroupId), - string(VpnPolicyMemberAttributeTypeRadiusAzureGroupId), - } -} - -func (s *VpnPolicyMemberAttributeType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVpnPolicyMemberAttributeType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVpnPolicyMemberAttributeType(input string) (*VpnPolicyMemberAttributeType, error) { - vals := map[string]VpnPolicyMemberAttributeType{ - "aadgroupid": VpnPolicyMemberAttributeTypeAADGroupId, - "certificategroupid": VpnPolicyMemberAttributeTypeCertificateGroupId, - "radiusazuregroupid": VpnPolicyMemberAttributeTypeRadiusAzureGroupId, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VpnPolicyMemberAttributeType(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/id_vpnserverconfiguration.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/id_vpnserverconfiguration.go deleted file mode 100644 index 688f2431145..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/id_vpnserverconfiguration.go +++ /dev/null @@ -1,127 +0,0 @@ -package vpnserverconfigurations - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnServerConfigurationId{} - -// VpnServerConfigurationId is a struct representing the Resource ID for a Vpn Server Configuration -type VpnServerConfigurationId struct { - SubscriptionId string - ResourceGroupName string - VpnServerConfigurationName string -} - -// NewVpnServerConfigurationID returns a new VpnServerConfigurationId struct -func NewVpnServerConfigurationID(subscriptionId string, resourceGroupName string, vpnServerConfigurationName string) VpnServerConfigurationId { - return VpnServerConfigurationId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnServerConfigurationName: vpnServerConfigurationName, - } -} - -// ParseVpnServerConfigurationID parses 'input' into a VpnServerConfigurationId -func ParseVpnServerConfigurationID(input string) (*VpnServerConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnServerConfigurationId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - return &id, nil -} - -// ParseVpnServerConfigurationIDInsensitively parses 'input' case-insensitively into a VpnServerConfigurationId -// note: this method should only be used for API response data and not user input -func ParseVpnServerConfigurationIDInsensitively(input string) (*VpnServerConfigurationId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnServerConfigurationId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnServerConfigurationId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnServerConfigurationName, ok = parsed.Parsed["vpnServerConfigurationName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnServerConfigurationName", *parsed) - } - - return &id, nil -} - -// ValidateVpnServerConfigurationID checks that 'input' can be parsed as a Vpn Server Configuration ID -func ValidateVpnServerConfigurationID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnServerConfigurationID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Server Configuration ID -func (id VpnServerConfigurationId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnServerConfigurations/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnServerConfigurationName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Server Configuration ID -func (id VpnServerConfigurationId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnServerConfigurations", "vpnServerConfigurations", "vpnServerConfigurations"), - resourceids.UserSpecifiedSegment("vpnServerConfigurationName", "vpnServerConfigurationValue"), - } -} - -// String returns a human-readable description of this Vpn Server Configuration ID -func (id VpnServerConfigurationId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Server Configuration Name: %q", id.VpnServerConfigurationName), - } - return fmt.Sprintf("Vpn Server Configuration (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/id_vpnserverconfiguration_test.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/id_vpnserverconfiguration_test.go deleted file mode 100644 index 0ea0f1fa041..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/id_vpnserverconfiguration_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vpnserverconfigurations - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnServerConfigurationId{} - -func TestNewVpnServerConfigurationID(t *testing.T) { - id := NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnServerConfigurationName != "vpnServerConfigurationValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnServerConfigurationName'", id.VpnServerConfigurationName, "vpnServerConfigurationValue") - } -} - -func TestFormatVpnServerConfigurationID(t *testing.T) { - actual := NewVpnServerConfigurationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnServerConfigurationValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnServerConfigurationID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnServerConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnServerConfigurationID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - } -} - -func TestParseVpnServerConfigurationIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnServerConfigurationId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnServerConfigurationName: "vpnServerConfigurationValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnServerConfigurations/vpnServerConfigurationValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe", - Expected: &VpnServerConfigurationId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnServerConfigurationName: "vPnSeRvErCoNfIgUrAtIoNvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSeRvErCoNfIgUrAtIoNs/vPnSeRvErCoNfIgUrAtIoNvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnServerConfigurationIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnServerConfigurationName != v.Expected.VpnServerConfigurationName { - t.Fatalf("Expected %q but got %q for VpnServerConfigurationName", v.Expected.VpnServerConfigurationName, actual.VpnServerConfigurationName) - } - - } -} - -func TestSegmentsForVpnServerConfigurationId(t *testing.T) { - segments := VpnServerConfigurationId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnServerConfigurationId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/method_updatetags.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/method_updatetags.go deleted file mode 100644 index 1831ed96be5..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package vpnserverconfigurations - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnServerConfiguration -} - -// UpdateTags ... -func (c VpnServerConfigurationsClient) UpdateTags(ctx context.Context, id VpnServerConfigurationId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_aadauthenticationparameters.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_aadauthenticationparameters.go deleted file mode 100644 index 8751fdb95f4..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_aadauthenticationparameters.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AadAuthenticationParameters struct { - AadAudience *string `json:"aadAudience,omitempty"` - AadIssuer *string `json:"aadIssuer,omitempty"` - AadTenant *string `json:"aadTenant,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_addressspace.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_addressspace.go deleted file mode 100644 index 9a83a3bb7bf..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_ipsecpolicy.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_ipsecpolicy.go deleted file mode 100644 index 82c3d0cee04..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_ipsecpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPsecPolicy struct { - DhGroup DhGroup `json:"dhGroup"` - IPsecEncryption IPsecEncryption `json:"ipsecEncryption"` - IPsecIntegrity IPsecIntegrity `json:"ipsecIntegrity"` - IkeEncryption IkeEncryption `json:"ikeEncryption"` - IkeIntegrity IkeIntegrity `json:"ikeIntegrity"` - PfsGroup PfsGroup `json:"pfsGroup"` - SaDataSizeKilobytes int64 `json:"saDataSizeKilobytes"` - SaLifeTimeSeconds int64 `json:"saLifeTimeSeconds"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2sconnectionconfiguration.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2sconnectionconfiguration.go deleted file mode 100644 index a5da2b6e9f5..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2sconnectionconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *P2SConnectionConfigurationProperties `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2sconnectionconfigurationproperties.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2sconnectionconfigurationproperties.go deleted file mode 100644 index 5409c6397bf..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2sconnectionconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SConnectionConfigurationProperties struct { - ConfigurationPolicyGroupAssociations *[]SubResource `json:"configurationPolicyGroupAssociations,omitempty"` - EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` - PreviousConfigurationPolicyGroupAssociations *[]VpnServerConfigurationPolicyGroup `json:"previousConfigurationPolicyGroupAssociations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` - VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2svpngateway.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2svpngateway.go deleted file mode 100644 index 29b947e0d43..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2svpngateway.go +++ /dev/null @@ -1,14 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *P2SVpnGatewayProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2svpngatewayproperties.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2svpngatewayproperties.go deleted file mode 100644 index fcd2e68d61e..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_p2svpngatewayproperties.go +++ /dev/null @@ -1,15 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type P2SVpnGatewayProperties struct { - CustomDnsServers *[]string `json:"customDnsServers,omitempty"` - IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` - P2SConnectionConfigurations *[]P2SConnectionConfiguration `json:"p2SConnectionConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualHub *SubResource `json:"virtualHub,omitempty"` - VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"` - VpnGatewayScaleUnit *int64 `json:"vpnGatewayScaleUnit,omitempty"` - VpnServerConfiguration *SubResource `json:"vpnServerConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_propagatedroutetable.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_propagatedroutetable.go deleted file mode 100644 index d9197431e38..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_propagatedroutetable.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PropagatedRouteTable struct { - Ids *[]SubResource `json:"ids,omitempty"` - Labels *[]string `json:"labels,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_radiusserver.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_radiusserver.go deleted file mode 100644 index 0a8e8ea7a2b..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_radiusserver.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RadiusServer struct { - RadiusServerAddress string `json:"radiusServerAddress"` - RadiusServerScore *int64 `json:"radiusServerScore,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_routingconfiguration.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_routingconfiguration.go deleted file mode 100644 index 418b0d86c12..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_routingconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutingConfiguration struct { - AssociatedRouteTable *SubResource `json:"associatedRouteTable,omitempty"` - InboundRouteMap *SubResource `json:"inboundRouteMap,omitempty"` - OutboundRouteMap *SubResource `json:"outboundRouteMap,omitempty"` - PropagatedRouteTables *PropagatedRouteTable `json:"propagatedRouteTables,omitempty"` - VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_staticroute.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_staticroute.go deleted file mode 100644 index d9a40cf7abe..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_staticroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoute struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - Name *string `json:"name,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_staticroutesconfig.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_staticroutesconfig.go deleted file mode 100644 index 0d9a0db3cfd..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_staticroutesconfig.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type StaticRoutesConfig struct { - PropagateStaticRoutes *bool `json:"propagateStaticRoutes,omitempty"` - VnetLocalRouteOverrideCriteria *VnetLocalRouteOverrideCriteria `json:"vnetLocalRouteOverrideCriteria,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_subresource.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_subresource.go deleted file mode 100644 index b06b768283f..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_tagsobject.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_tagsobject.go deleted file mode 100644 index 73b0464bd7d..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vnetroute.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vnetroute.go deleted file mode 100644 index 26ac1388d05..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vnetroute.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VnetRoute struct { - BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` - StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` - StaticRoutesConfig *StaticRoutesConfig `json:"staticRoutesConfig,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnclientconnectionhealth.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnclientconnectionhealth.go deleted file mode 100644 index f4b6bee5adb..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnclientconnectionhealth.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnClientConnectionHealth struct { - AllocatedIPAddresses *[]string `json:"allocatedIpAddresses,omitempty"` - TotalEgressBytesTransferred *int64 `json:"totalEgressBytesTransferred,omitempty"` - TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty"` - VpnClientConnectionsCount *int64 `json:"vpnClientConnectionsCount,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigradiusclientrootcertificate.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigradiusclientrootcertificate.go deleted file mode 100644 index 32cd3b0c3ce..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigradiusclientrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigRadiusClientRootCertificate struct { - Name *string `json:"name,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigradiusserverrootcertificate.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigradiusserverrootcertificate.go deleted file mode 100644 index f5a02d320d4..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigradiusserverrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigRadiusServerRootCertificate struct { - Name *string `json:"name,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfiguration.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfiguration.go deleted file mode 100644 index 1f8b56984ce..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfiguration.go +++ /dev/null @@ -1,14 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroup.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroup.go deleted file mode 100644 index df7554b1ec5..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroup.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnServerConfigurationPolicyGroupProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupmember.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupmember.go deleted file mode 100644 index 5f72d492483..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupmember.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupMember struct { - AttributeType *VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` - AttributeValue *string `json:"attributeValue,omitempty"` - Name *string `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupproperties.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupproperties.go deleted file mode 100644 index d1f956dc56b..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationpolicygroupproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationPolicyGroupProperties struct { - IsDefault *bool `json:"isDefault,omitempty"` - P2SConnectionConfigurations *[]SubResource `json:"p2SConnectionConfigurations,omitempty"` - PolicyMembers *[]VpnServerConfigurationPolicyGroupMember `json:"policyMembers,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationproperties.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationproperties.go deleted file mode 100644 index bba2bd56557..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigurationproperties.go +++ /dev/null @@ -1,23 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigurationProperties struct { - AadAuthenticationParameters *AadAuthenticationParameters `json:"aadAuthenticationParameters,omitempty"` - ConfigurationPolicyGroups *[]VpnServerConfigurationPolicyGroup `json:"configurationPolicyGroups,omitempty"` - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - P2sVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - RadiusClientRootCertificates *[]VpnServerConfigRadiusClientRootCertificate `json:"radiusClientRootCertificates,omitempty"` - RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` - RadiusServerRootCertificates *[]VpnServerConfigRadiusServerRootCertificate `json:"radiusServerRootCertificates,omitempty"` - RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` - RadiusServers *[]RadiusServer `json:"radiusServers,omitempty"` - VpnAuthenticationTypes *[]VpnAuthenticationType `json:"vpnAuthenticationTypes,omitempty"` - VpnClientIPsecPolicies *[]IPsecPolicy `json:"vpnClientIpsecPolicies,omitempty"` - VpnClientRevokedCertificates *[]VpnServerConfigVpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` - VpnClientRootCertificates *[]VpnServerConfigVpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` - VpnProtocols *[]VpnGatewayTunnelingProtocol `json:"vpnProtocols,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrevokedcertificate.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrevokedcertificate.go deleted file mode 100644 index b2e7cac735e..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrevokedcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigVpnClientRevokedCertificate struct { - Name *string `json:"name,omitempty"` - Thumbprint *string `json:"thumbprint,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrootcertificate.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrootcertificate.go deleted file mode 100644 index eda4a0c8837..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/model_vpnserverconfigvpnclientrootcertificate.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnserverconfigurations - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnServerConfigVpnClientRootCertificate struct { - Name *string `json:"name,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnserverconfigurations/version.go b/resource-manager/network/2022-11-01/vpnserverconfigurations/version.go deleted file mode 100644 index fe4e3b124c5..00000000000 --- a/resource-manager/network/2022-11-01/vpnserverconfigurations/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnserverconfigurations - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnserverconfigurations/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/vpnsites/README.md b/resource-manager/network/2022-11-01/vpnsites/README.md deleted file mode 100644 index 2361d60e8c6..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/README.md +++ /dev/null @@ -1,41 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpnsites` Documentation - -The `vpnsites` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/vpnsites" -``` - - -### Client Initialization - -```go -client := vpnsites.NewVpnSitesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `VpnSitesClient.UpdateTags` - -```go -ctx := context.TODO() -id := vpnsites.NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - -payload := vpnsites.TagsObject{ - // ... -} - - -read, err := client.UpdateTags(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` diff --git a/resource-manager/network/2022-11-01/vpnsites/client.go b/resource-manager/network/2022-11-01/vpnsites/client.go deleted file mode 100644 index d5f3209b45d..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package vpnsites - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSitesClient struct { - Client *resourcemanager.Client -} - -func NewVpnSitesClientWithBaseURI(api environments.Api) (*VpnSitesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "vpnsites", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating VpnSitesClient: %+v", err) - } - - return &VpnSitesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/vpnsites/constants.go b/resource-manager/network/2022-11-01/vpnsites/constants.go deleted file mode 100644 index 58eca968713..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/constants.go +++ /dev/null @@ -1,57 +0,0 @@ -package vpnsites - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/vpnsites/id_vpnsite.go b/resource-manager/network/2022-11-01/vpnsites/id_vpnsite.go deleted file mode 100644 index 01be85624d7..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/id_vpnsite.go +++ /dev/null @@ -1,127 +0,0 @@ -package vpnsites - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteId{} - -// VpnSiteId is a struct representing the Resource ID for a Vpn Site -type VpnSiteId struct { - SubscriptionId string - ResourceGroupName string - VpnSiteName string -} - -// NewVpnSiteID returns a new VpnSiteId struct -func NewVpnSiteID(subscriptionId string, resourceGroupName string, vpnSiteName string) VpnSiteId { - return VpnSiteId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - VpnSiteName: vpnSiteName, - } -} - -// ParseVpnSiteID parses 'input' into a VpnSiteId -func ParseVpnSiteID(input string) (*VpnSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - return &id, nil -} - -// ParseVpnSiteIDInsensitively parses 'input' case-insensitively into a VpnSiteId -// note: this method should only be used for API response data and not user input -func ParseVpnSiteIDInsensitively(input string) (*VpnSiteId, error) { - parser := resourceids.NewParserFromResourceIdType(VpnSiteId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := VpnSiteId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.VpnSiteName, ok = parsed.Parsed["vpnSiteName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "vpnSiteName", *parsed) - } - - return &id, nil -} - -// ValidateVpnSiteID checks that 'input' can be parsed as a Vpn Site ID -func ValidateVpnSiteID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseVpnSiteID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Vpn Site ID -func (id VpnSiteId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/vpnSites/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.VpnSiteName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Vpn Site ID -func (id VpnSiteId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticVpnSites", "vpnSites", "vpnSites"), - resourceids.UserSpecifiedSegment("vpnSiteName", "vpnSiteValue"), - } -} - -// String returns a human-readable description of this Vpn Site ID -func (id VpnSiteId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Vpn Site Name: %q", id.VpnSiteName), - } - return fmt.Sprintf("Vpn Site (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/vpnsites/id_vpnsite_test.go b/resource-manager/network/2022-11-01/vpnsites/id_vpnsite_test.go deleted file mode 100644 index 43d1aa970b3..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/id_vpnsite_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package vpnsites - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = VpnSiteId{} - -func TestNewVpnSiteID(t *testing.T) { - id := NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.VpnSiteName != "vpnSiteValue" { - t.Fatalf("Expected %q but got %q for Segment 'VpnSiteName'", id.VpnSiteName, "vpnSiteValue") - } -} - -func TestFormatVpnSiteID(t *testing.T) { - actual := NewVpnSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "vpnSiteValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseVpnSiteID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - } -} - -func TestParseVpnSiteIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *VpnSiteId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - VpnSiteName: "vpnSiteValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/vpnSites/vpnSiteValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE", - Expected: &VpnSiteId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - VpnSiteName: "vPnSiTeVaLuE", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/vPnSiTeS/vPnSiTeVaLuE/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseVpnSiteIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.VpnSiteName != v.Expected.VpnSiteName { - t.Fatalf("Expected %q but got %q for VpnSiteName", v.Expected.VpnSiteName, actual.VpnSiteName) - } - - } -} - -func TestSegmentsForVpnSiteId(t *testing.T) { - segments := VpnSiteId{}.Segments() - if len(segments) == 0 { - t.Fatalf("VpnSiteId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/vpnsites/method_updatetags.go b/resource-manager/network/2022-11-01/vpnsites/method_updatetags.go deleted file mode 100644 index 9de2920fc8a..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/method_updatetags.go +++ /dev/null @@ -1,55 +0,0 @@ -package vpnsites - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type UpdateTagsOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *VpnSite -} - -// UpdateTags ... -func (c VpnSitesClient) UpdateTags(ctx context.Context, id VpnSiteId, input TagsObject) (result UpdateTagsOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodPatch, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_addressspace.go b/resource-manager/network/2022-11-01/vpnsites/model_addressspace.go deleted file mode 100644 index 14ce21bc15a..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_addressspace.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AddressSpace struct { - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_bgpsettings.go b/resource-manager/network/2022-11-01/vpnsites/model_bgpsettings.go deleted file mode 100644 index 09643cee4ab..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_bgpsettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` - BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` - PeerWeight *int64 `json:"peerWeight,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_deviceproperties.go b/resource-manager/network/2022-11-01/vpnsites/model_deviceproperties.go deleted file mode 100644 index 6b9a69dd5df..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_deviceproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeviceProperties struct { - DeviceModel *string `json:"deviceModel,omitempty"` - DeviceVendor *string `json:"deviceVendor,omitempty"` - LinkSpeedInMbps *int64 `json:"linkSpeedInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_ipconfigurationbgppeeringaddress.go b/resource-manager/network/2022-11-01/vpnsites/model_ipconfigurationbgppeeringaddress.go deleted file mode 100644 index ce931dc8949..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_ipconfigurationbgppeeringaddress.go +++ /dev/null @@ -1,11 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationBgpPeeringAddress struct { - CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` - DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` - IPconfigurationId *string `json:"ipconfigurationId,omitempty"` - TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_o365breakoutcategorypolicies.go b/resource-manager/network/2022-11-01/vpnsites/model_o365breakoutcategorypolicies.go deleted file mode 100644 index 2d1e7f02cf9..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_o365breakoutcategorypolicies.go +++ /dev/null @@ -1,10 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type O365BreakOutCategoryPolicies struct { - Allow *bool `json:"allow,omitempty"` - Default *bool `json:"default,omitempty"` - Optimize *bool `json:"optimize,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_o365policyproperties.go b/resource-manager/network/2022-11-01/vpnsites/model_o365policyproperties.go deleted file mode 100644 index 18b5f663387..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_o365policyproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type O365PolicyProperties struct { - BreakOutCategories *O365BreakOutCategoryPolicies `json:"breakOutCategories,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_subresource.go b/resource-manager/network/2022-11-01/vpnsites/model_subresource.go deleted file mode 100644 index 2b90b3f784d..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_tagsobject.go b/resource-manager/network/2022-11-01/vpnsites/model_tagsobject.go deleted file mode 100644 index c05667ddc1a..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_tagsobject.go +++ /dev/null @@ -1,8 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TagsObject struct { - Tags *map[string]string `json:"tags,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_vpnlinkbgpsettings.go b/resource-manager/network/2022-11-01/vpnsites/model_vpnlinkbgpsettings.go deleted file mode 100644 index cae11e9a335..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_vpnlinkbgpsettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkBgpSettings struct { - Asn *int64 `json:"asn,omitempty"` - BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_vpnlinkproviderproperties.go b/resource-manager/network/2022-11-01/vpnsites/model_vpnlinkproviderproperties.go deleted file mode 100644 index aa802b7bc05..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_vpnlinkproviderproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnLinkProviderProperties struct { - LinkProviderName *string `json:"linkProviderName,omitempty"` - LinkSpeedInMbps *int64 `json:"linkSpeedInMbps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_vpnsite.go b/resource-manager/network/2022-11-01/vpnsites/model_vpnsite.go deleted file mode 100644 index 71b5a77c121..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_vpnsite.go +++ /dev/null @@ -1,14 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSite struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location string `json:"location"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_vpnsitelink.go b/resource-manager/network/2022-11-01/vpnsites/model_vpnsitelink.go deleted file mode 100644 index 0d815e3b164..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_vpnsitelink.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VpnSiteLinkProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_vpnsitelinkproperties.go b/resource-manager/network/2022-11-01/vpnsites/model_vpnsitelinkproperties.go deleted file mode 100644 index 3d9dedc099d..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_vpnsitelinkproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteLinkProperties struct { - BgpProperties *VpnLinkBgpSettings `json:"bgpProperties,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - LinkProperties *VpnLinkProviderProperties `json:"linkProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/model_vpnsiteproperties.go b/resource-manager/network/2022-11-01/vpnsites/model_vpnsiteproperties.go deleted file mode 100644 index b404c9ab09b..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/model_vpnsiteproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package vpnsites - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VpnSiteProperties struct { - AddressSpace *AddressSpace `json:"addressSpace,omitempty"` - BgpProperties *BgpSettings `json:"bgpProperties,omitempty"` - DeviceProperties *DeviceProperties `json:"deviceProperties,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IsSecuritySite *bool `json:"isSecuritySite,omitempty"` - O365Policy *O365PolicyProperties `json:"o365Policy,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SiteKey *string `json:"siteKey,omitempty"` - VirtualWAN *SubResource `json:"virtualWan,omitempty"` - VpnSiteLinks *[]VpnSiteLink `json:"vpnSiteLinks,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/vpnsites/version.go b/resource-manager/network/2022-11-01/vpnsites/version.go deleted file mode 100644 index 39b866203aa..00000000000 --- a/resource-manager/network/2022-11-01/vpnsites/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package vpnsites - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/vpnsites/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/README.md b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/README.md deleted file mode 100644 index fca8b03a864..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/README.md +++ /dev/null @@ -1,103 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/webapplicationfirewallpolicies` Documentation - -The `webapplicationfirewallpolicies` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/webapplicationfirewallpolicies" -``` - - -### Client Initialization - -```go -client := webapplicationfirewallpolicies.NewWebApplicationFirewallPoliciesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.CreateOrUpdate` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue") - -payload := webapplicationfirewallpolicies.WebApplicationFirewallPolicy{ - // ... -} - - -read, err := client.CreateOrUpdate(ctx, id, payload) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.Delete` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue") - -if err := client.DeleteThenPoll(ctx, id); err != nil { - // handle the error -} -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.Get` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue") - -read, err := client.Get(ctx, id) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.List` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group") - -// alternatively `client.List(ctx, id)` can be used to do batched pagination -items, err := client.ListComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` - - -### Example Usage: `WebApplicationFirewallPoliciesClient.ListAll` - -```go -ctx := context.TODO() -id := webapplicationfirewallpolicies.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListAll(ctx, id)` can be used to do batched pagination -items, err := client.ListAllComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/client.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/client.go deleted file mode 100644 index 10b02bcdf85..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallPoliciesClient struct { - Client *resourcemanager.Client -} - -func NewWebApplicationFirewallPoliciesClientWithBaseURI(api environments.Api) (*WebApplicationFirewallPoliciesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "webapplicationfirewallpolicies", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating WebApplicationFirewallPoliciesClient: %+v", err) - } - - return &WebApplicationFirewallPoliciesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/constants.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/constants.go deleted file mode 100644 index bfb2da550b9..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/constants.go +++ /dev/null @@ -1,2798 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "encoding/json" - "fmt" - "strings" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ActionType string - -const ( - ActionTypeAllow ActionType = "Allow" - ActionTypeAnomalyScoring ActionType = "AnomalyScoring" - ActionTypeBlock ActionType = "Block" - ActionTypeLog ActionType = "Log" -) - -func PossibleValuesForActionType() []string { - return []string{ - string(ActionTypeAllow), - string(ActionTypeAnomalyScoring), - string(ActionTypeBlock), - string(ActionTypeLog), - } -} - -func (s *ActionType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseActionType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseActionType(input string) (*ActionType, error) { - vals := map[string]ActionType{ - "allow": ActionTypeAllow, - "anomalyscoring": ActionTypeAnomalyScoring, - "block": ActionTypeBlock, - "log": ActionTypeLog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ActionType(input) - return &out, nil -} - -type ApplicationGatewayClientRevocationOptions string - -const ( - ApplicationGatewayClientRevocationOptionsNone ApplicationGatewayClientRevocationOptions = "None" - ApplicationGatewayClientRevocationOptionsOCSP ApplicationGatewayClientRevocationOptions = "OCSP" -) - -func PossibleValuesForApplicationGatewayClientRevocationOptions() []string { - return []string{ - string(ApplicationGatewayClientRevocationOptionsNone), - string(ApplicationGatewayClientRevocationOptionsOCSP), - } -} - -func (s *ApplicationGatewayClientRevocationOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayClientRevocationOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayClientRevocationOptions(input string) (*ApplicationGatewayClientRevocationOptions, error) { - vals := map[string]ApplicationGatewayClientRevocationOptions{ - "none": ApplicationGatewayClientRevocationOptionsNone, - "ocsp": ApplicationGatewayClientRevocationOptionsOCSP, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayClientRevocationOptions(input) - return &out, nil -} - -type ApplicationGatewayCookieBasedAffinity string - -const ( - ApplicationGatewayCookieBasedAffinityDisabled ApplicationGatewayCookieBasedAffinity = "Disabled" - ApplicationGatewayCookieBasedAffinityEnabled ApplicationGatewayCookieBasedAffinity = "Enabled" -) - -func PossibleValuesForApplicationGatewayCookieBasedAffinity() []string { - return []string{ - string(ApplicationGatewayCookieBasedAffinityDisabled), - string(ApplicationGatewayCookieBasedAffinityEnabled), - } -} - -func (s *ApplicationGatewayCookieBasedAffinity) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCookieBasedAffinity(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCookieBasedAffinity(input string) (*ApplicationGatewayCookieBasedAffinity, error) { - vals := map[string]ApplicationGatewayCookieBasedAffinity{ - "disabled": ApplicationGatewayCookieBasedAffinityDisabled, - "enabled": ApplicationGatewayCookieBasedAffinityEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCookieBasedAffinity(input) - return &out, nil -} - -type ApplicationGatewayCustomErrorStatusCode string - -const ( - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred ApplicationGatewayCustomErrorStatusCode = "HttpStatus500" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour ApplicationGatewayCustomErrorStatusCode = "HttpStatus504" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree ApplicationGatewayCustomErrorStatusCode = "HttpStatus503" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo ApplicationGatewayCustomErrorStatusCode = "HttpStatus502" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred ApplicationGatewayCustomErrorStatusCode = "HttpStatus400" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine ApplicationGatewayCustomErrorStatusCode = "HttpStatus499" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight ApplicationGatewayCustomErrorStatusCode = "HttpStatus408" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive ApplicationGatewayCustomErrorStatusCode = "HttpStatus405" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour ApplicationGatewayCustomErrorStatusCode = "HttpStatus404" - ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree ApplicationGatewayCustomErrorStatusCode = "HttpStatus403" -) - -func PossibleValuesForApplicationGatewayCustomErrorStatusCode() []string { - return []string{ - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour), - string(ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree), - } -} - -func (s *ApplicationGatewayCustomErrorStatusCode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayCustomErrorStatusCode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayCustomErrorStatusCode(input string) (*ApplicationGatewayCustomErrorStatusCode, error) { - vals := map[string]ApplicationGatewayCustomErrorStatusCode{ - "httpstatus500": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveHundred, - "httpstatus504": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroFour, - "httpstatus503": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroThree, - "httpstatus502": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFiveZeroTwo, - "httpstatus400": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourHundred, - "httpstatus499": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourNineNine, - "httpstatus408": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroEight, - "httpstatus405": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFive, - "httpstatus404": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroFour, - "httpstatus403": ApplicationGatewayCustomErrorStatusCodeHTTPStatusFourZeroThree, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayCustomErrorStatusCode(input) - return &out, nil -} - -type ApplicationGatewayFirewallMode string - -const ( - ApplicationGatewayFirewallModeDetection ApplicationGatewayFirewallMode = "Detection" - ApplicationGatewayFirewallModePrevention ApplicationGatewayFirewallMode = "Prevention" -) - -func PossibleValuesForApplicationGatewayFirewallMode() []string { - return []string{ - string(ApplicationGatewayFirewallModeDetection), - string(ApplicationGatewayFirewallModePrevention), - } -} - -func (s *ApplicationGatewayFirewallMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayFirewallMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayFirewallMode(input string) (*ApplicationGatewayFirewallMode, error) { - vals := map[string]ApplicationGatewayFirewallMode{ - "detection": ApplicationGatewayFirewallModeDetection, - "prevention": ApplicationGatewayFirewallModePrevention, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayFirewallMode(input) - return &out, nil -} - -type ApplicationGatewayFirewallRateLimitDuration string - -const ( - ApplicationGatewayFirewallRateLimitDurationFiveMins ApplicationGatewayFirewallRateLimitDuration = "FiveMins" - ApplicationGatewayFirewallRateLimitDurationOneMin ApplicationGatewayFirewallRateLimitDuration = "OneMin" -) - -func PossibleValuesForApplicationGatewayFirewallRateLimitDuration() []string { - return []string{ - string(ApplicationGatewayFirewallRateLimitDurationFiveMins), - string(ApplicationGatewayFirewallRateLimitDurationOneMin), - } -} - -func (s *ApplicationGatewayFirewallRateLimitDuration) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayFirewallRateLimitDuration(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayFirewallRateLimitDuration(input string) (*ApplicationGatewayFirewallRateLimitDuration, error) { - vals := map[string]ApplicationGatewayFirewallRateLimitDuration{ - "fivemins": ApplicationGatewayFirewallRateLimitDurationFiveMins, - "onemin": ApplicationGatewayFirewallRateLimitDurationOneMin, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayFirewallRateLimitDuration(input) - return &out, nil -} - -type ApplicationGatewayFirewallUserSessionVariable string - -const ( - ApplicationGatewayFirewallUserSessionVariableClientAddr ApplicationGatewayFirewallUserSessionVariable = "ClientAddr" - ApplicationGatewayFirewallUserSessionVariableGeoLocation ApplicationGatewayFirewallUserSessionVariable = "GeoLocation" - ApplicationGatewayFirewallUserSessionVariableNone ApplicationGatewayFirewallUserSessionVariable = "None" -) - -func PossibleValuesForApplicationGatewayFirewallUserSessionVariable() []string { - return []string{ - string(ApplicationGatewayFirewallUserSessionVariableClientAddr), - string(ApplicationGatewayFirewallUserSessionVariableGeoLocation), - string(ApplicationGatewayFirewallUserSessionVariableNone), - } -} - -func (s *ApplicationGatewayFirewallUserSessionVariable) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayFirewallUserSessionVariable(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayFirewallUserSessionVariable(input string) (*ApplicationGatewayFirewallUserSessionVariable, error) { - vals := map[string]ApplicationGatewayFirewallUserSessionVariable{ - "clientaddr": ApplicationGatewayFirewallUserSessionVariableClientAddr, - "geolocation": ApplicationGatewayFirewallUserSessionVariableGeoLocation, - "none": ApplicationGatewayFirewallUserSessionVariableNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayFirewallUserSessionVariable(input) - return &out, nil -} - -type ApplicationGatewayLoadDistributionAlgorithm string - -const ( - ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = "IpHash" - ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = "LeastConnections" - ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = "RoundRobin" -) - -func PossibleValuesForApplicationGatewayLoadDistributionAlgorithm() []string { - return []string{ - string(ApplicationGatewayLoadDistributionAlgorithmIPHash), - string(ApplicationGatewayLoadDistributionAlgorithmLeastConnections), - string(ApplicationGatewayLoadDistributionAlgorithmRoundRobin), - } -} - -func (s *ApplicationGatewayLoadDistributionAlgorithm) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayLoadDistributionAlgorithm(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayLoadDistributionAlgorithm(input string) (*ApplicationGatewayLoadDistributionAlgorithm, error) { - vals := map[string]ApplicationGatewayLoadDistributionAlgorithm{ - "iphash": ApplicationGatewayLoadDistributionAlgorithmIPHash, - "leastconnections": ApplicationGatewayLoadDistributionAlgorithmLeastConnections, - "roundrobin": ApplicationGatewayLoadDistributionAlgorithmRoundRobin, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayLoadDistributionAlgorithm(input) - return &out, nil -} - -type ApplicationGatewayOperationalState string - -const ( - ApplicationGatewayOperationalStateRunning ApplicationGatewayOperationalState = "Running" - ApplicationGatewayOperationalStateStarting ApplicationGatewayOperationalState = "Starting" - ApplicationGatewayOperationalStateStopped ApplicationGatewayOperationalState = "Stopped" - ApplicationGatewayOperationalStateStopping ApplicationGatewayOperationalState = "Stopping" -) - -func PossibleValuesForApplicationGatewayOperationalState() []string { - return []string{ - string(ApplicationGatewayOperationalStateRunning), - string(ApplicationGatewayOperationalStateStarting), - string(ApplicationGatewayOperationalStateStopped), - string(ApplicationGatewayOperationalStateStopping), - } -} - -func (s *ApplicationGatewayOperationalState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayOperationalState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayOperationalState(input string) (*ApplicationGatewayOperationalState, error) { - vals := map[string]ApplicationGatewayOperationalState{ - "running": ApplicationGatewayOperationalStateRunning, - "starting": ApplicationGatewayOperationalStateStarting, - "stopped": ApplicationGatewayOperationalStateStopped, - "stopping": ApplicationGatewayOperationalStateStopping, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayOperationalState(input) - return &out, nil -} - -type ApplicationGatewayProtocol string - -const ( - ApplicationGatewayProtocolHTTP ApplicationGatewayProtocol = "Http" - ApplicationGatewayProtocolHTTPS ApplicationGatewayProtocol = "Https" - ApplicationGatewayProtocolTcp ApplicationGatewayProtocol = "Tcp" - ApplicationGatewayProtocolTls ApplicationGatewayProtocol = "Tls" -) - -func PossibleValuesForApplicationGatewayProtocol() []string { - return []string{ - string(ApplicationGatewayProtocolHTTP), - string(ApplicationGatewayProtocolHTTPS), - string(ApplicationGatewayProtocolTcp), - string(ApplicationGatewayProtocolTls), - } -} - -func (s *ApplicationGatewayProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayProtocol(input string) (*ApplicationGatewayProtocol, error) { - vals := map[string]ApplicationGatewayProtocol{ - "http": ApplicationGatewayProtocolHTTP, - "https": ApplicationGatewayProtocolHTTPS, - "tcp": ApplicationGatewayProtocolTcp, - "tls": ApplicationGatewayProtocolTls, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayProtocol(input) - return &out, nil -} - -type ApplicationGatewayRedirectType string - -const ( - ApplicationGatewayRedirectTypeFound ApplicationGatewayRedirectType = "Found" - ApplicationGatewayRedirectTypePermanent ApplicationGatewayRedirectType = "Permanent" - ApplicationGatewayRedirectTypeSeeOther ApplicationGatewayRedirectType = "SeeOther" - ApplicationGatewayRedirectTypeTemporary ApplicationGatewayRedirectType = "Temporary" -) - -func PossibleValuesForApplicationGatewayRedirectType() []string { - return []string{ - string(ApplicationGatewayRedirectTypeFound), - string(ApplicationGatewayRedirectTypePermanent), - string(ApplicationGatewayRedirectTypeSeeOther), - string(ApplicationGatewayRedirectTypeTemporary), - } -} - -func (s *ApplicationGatewayRedirectType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRedirectType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRedirectType(input string) (*ApplicationGatewayRedirectType, error) { - vals := map[string]ApplicationGatewayRedirectType{ - "found": ApplicationGatewayRedirectTypeFound, - "permanent": ApplicationGatewayRedirectTypePermanent, - "seeother": ApplicationGatewayRedirectTypeSeeOther, - "temporary": ApplicationGatewayRedirectTypeTemporary, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRedirectType(input) - return &out, nil -} - -type ApplicationGatewayRequestRoutingRuleType string - -const ( - ApplicationGatewayRequestRoutingRuleTypeBasic ApplicationGatewayRequestRoutingRuleType = "Basic" - ApplicationGatewayRequestRoutingRuleTypePathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" -) - -func PossibleValuesForApplicationGatewayRequestRoutingRuleType() []string { - return []string{ - string(ApplicationGatewayRequestRoutingRuleTypeBasic), - string(ApplicationGatewayRequestRoutingRuleTypePathBasedRouting), - } -} - -func (s *ApplicationGatewayRequestRoutingRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayRequestRoutingRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayRequestRoutingRuleType(input string) (*ApplicationGatewayRequestRoutingRuleType, error) { - vals := map[string]ApplicationGatewayRequestRoutingRuleType{ - "basic": ApplicationGatewayRequestRoutingRuleTypeBasic, - "pathbasedrouting": ApplicationGatewayRequestRoutingRuleTypePathBasedRouting, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayRequestRoutingRuleType(input) - return &out, nil -} - -type ApplicationGatewaySkuName string - -const ( - ApplicationGatewaySkuNameStandardLarge ApplicationGatewaySkuName = "Standard_Large" - ApplicationGatewaySkuNameStandardMedium ApplicationGatewaySkuName = "Standard_Medium" - ApplicationGatewaySkuNameStandardSmall ApplicationGatewaySkuName = "Standard_Small" - ApplicationGatewaySkuNameStandardVTwo ApplicationGatewaySkuName = "Standard_v2" - ApplicationGatewaySkuNameWAFLarge ApplicationGatewaySkuName = "WAF_Large" - ApplicationGatewaySkuNameWAFMedium ApplicationGatewaySkuName = "WAF_Medium" - ApplicationGatewaySkuNameWAFVTwo ApplicationGatewaySkuName = "WAF_v2" -) - -func PossibleValuesForApplicationGatewaySkuName() []string { - return []string{ - string(ApplicationGatewaySkuNameStandardLarge), - string(ApplicationGatewaySkuNameStandardMedium), - string(ApplicationGatewaySkuNameStandardSmall), - string(ApplicationGatewaySkuNameStandardVTwo), - string(ApplicationGatewaySkuNameWAFLarge), - string(ApplicationGatewaySkuNameWAFMedium), - string(ApplicationGatewaySkuNameWAFVTwo), - } -} - -func (s *ApplicationGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySkuName(input string) (*ApplicationGatewaySkuName, error) { - vals := map[string]ApplicationGatewaySkuName{ - "standard_large": ApplicationGatewaySkuNameStandardLarge, - "standard_medium": ApplicationGatewaySkuNameStandardMedium, - "standard_small": ApplicationGatewaySkuNameStandardSmall, - "standard_v2": ApplicationGatewaySkuNameStandardVTwo, - "waf_large": ApplicationGatewaySkuNameWAFLarge, - "waf_medium": ApplicationGatewaySkuNameWAFMedium, - "waf_v2": ApplicationGatewaySkuNameWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySkuName(input) - return &out, nil -} - -type ApplicationGatewaySslCipherSuite string - -const ( - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" - ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" - ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" -) - -func PossibleValuesForApplicationGatewaySslCipherSuite() []string { - return []string{ - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour), - string(ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA), - } -} - -func (s *ApplicationGatewaySslCipherSuite) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslCipherSuite(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslCipherSuite(input string) (*ApplicationGatewaySslCipherSuite, error) { - vals := map[string]ApplicationGatewaySslCipherSuite{ - "tls_dhe_dss_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHA, - "tls_dhe_dss_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_dhe_dss_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHA, - "tls_dhe_dss_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_dhe_dss_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHEDSSWITHThreeDESEDECBCSHA, - "tls_dhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightCBCSHA, - "tls_dhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_dhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_dhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_ecdsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_ecdsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_ecdsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHEECDSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHA, - "tls_ecdhe_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_ecdhe_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHA, - "tls_ecdhe_rsa_with_aes_256_cbc_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixCBCSHAThreeEightFour, - "tls_ecdhe_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSECDHERSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_aes_128_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHA, - "tls_rsa_with_aes_128_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightCBCSHATwoFiveSix, - "tls_rsa_with_aes_128_gcm_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESOneTwoEightGCMSHATwoFiveSix, - "tls_rsa_with_aes_256_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHA, - "tls_rsa_with_aes_256_cbc_sha256": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixCBCSHATwoFiveSix, - "tls_rsa_with_aes_256_gcm_sha384": ApplicationGatewaySslCipherSuiteTLSRSAWITHAESTwoFiveSixGCMSHAThreeEightFour, - "tls_rsa_with_3des_ede_cbc_sha": ApplicationGatewaySslCipherSuiteTLSRSAWITHThreeDESEDECBCSHA, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslCipherSuite(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyName string - -const ( - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101" - ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS ApplicationGatewaySslPolicyName = "AppGwSslPolicy20220101S" -) - -func PossibleValuesForApplicationGatewaySslPolicyName() []string { - return []string{ - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne), - string(ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS), - } -} - -func (s *ApplicationGatewaySslPolicyName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyName(input string) (*ApplicationGatewaySslPolicyName, error) { - vals := map[string]ApplicationGatewaySslPolicyName{ - "appgwsslpolicy20150501": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneFiveZeroFiveZeroOne, - "appgwsslpolicy20170401": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOne, - "appgwsslpolicy20170401s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroOneSevenZeroFourZeroOneS, - "appgwsslpolicy20220101": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOne, - "appgwsslpolicy20220101s": ApplicationGatewaySslPolicyNameAppGwSslPolicyTwoZeroTwoTwoZeroOneZeroOneS, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyName(input) - return &out, nil -} - -type ApplicationGatewaySslPolicyType string - -const ( - ApplicationGatewaySslPolicyTypeCustom ApplicationGatewaySslPolicyType = "Custom" - ApplicationGatewaySslPolicyTypeCustomVTwo ApplicationGatewaySslPolicyType = "CustomV2" - ApplicationGatewaySslPolicyTypePredefined ApplicationGatewaySslPolicyType = "Predefined" -) - -func PossibleValuesForApplicationGatewaySslPolicyType() []string { - return []string{ - string(ApplicationGatewaySslPolicyTypeCustom), - string(ApplicationGatewaySslPolicyTypeCustomVTwo), - string(ApplicationGatewaySslPolicyTypePredefined), - } -} - -func (s *ApplicationGatewaySslPolicyType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslPolicyType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslPolicyType(input string) (*ApplicationGatewaySslPolicyType, error) { - vals := map[string]ApplicationGatewaySslPolicyType{ - "custom": ApplicationGatewaySslPolicyTypeCustom, - "customv2": ApplicationGatewaySslPolicyTypeCustomVTwo, - "predefined": ApplicationGatewaySslPolicyTypePredefined, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslPolicyType(input) - return &out, nil -} - -type ApplicationGatewaySslProtocol string - -const ( - ApplicationGatewaySslProtocolTLSvOneOne ApplicationGatewaySslProtocol = "TLSv1_1" - ApplicationGatewaySslProtocolTLSvOneThree ApplicationGatewaySslProtocol = "TLSv1_3" - ApplicationGatewaySslProtocolTLSvOneTwo ApplicationGatewaySslProtocol = "TLSv1_2" - ApplicationGatewaySslProtocolTLSvOneZero ApplicationGatewaySslProtocol = "TLSv1_0" -) - -func PossibleValuesForApplicationGatewaySslProtocol() []string { - return []string{ - string(ApplicationGatewaySslProtocolTLSvOneOne), - string(ApplicationGatewaySslProtocolTLSvOneThree), - string(ApplicationGatewaySslProtocolTLSvOneTwo), - string(ApplicationGatewaySslProtocolTLSvOneZero), - } -} - -func (s *ApplicationGatewaySslProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewaySslProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewaySslProtocol(input string) (*ApplicationGatewaySslProtocol, error) { - vals := map[string]ApplicationGatewaySslProtocol{ - "tlsv1_1": ApplicationGatewaySslProtocolTLSvOneOne, - "tlsv1_3": ApplicationGatewaySslProtocolTLSvOneThree, - "tlsv1_2": ApplicationGatewaySslProtocolTLSvOneTwo, - "tlsv1_0": ApplicationGatewaySslProtocolTLSvOneZero, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewaySslProtocol(input) - return &out, nil -} - -type ApplicationGatewayTier string - -const ( - ApplicationGatewayTierStandard ApplicationGatewayTier = "Standard" - ApplicationGatewayTierStandardVTwo ApplicationGatewayTier = "Standard_v2" - ApplicationGatewayTierWAF ApplicationGatewayTier = "WAF" - ApplicationGatewayTierWAFVTwo ApplicationGatewayTier = "WAF_v2" -) - -func PossibleValuesForApplicationGatewayTier() []string { - return []string{ - string(ApplicationGatewayTierStandard), - string(ApplicationGatewayTierStandardVTwo), - string(ApplicationGatewayTierWAF), - string(ApplicationGatewayTierWAFVTwo), - } -} - -func (s *ApplicationGatewayTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseApplicationGatewayTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseApplicationGatewayTier(input string) (*ApplicationGatewayTier, error) { - vals := map[string]ApplicationGatewayTier{ - "standard": ApplicationGatewayTierStandard, - "standard_v2": ApplicationGatewayTierStandardVTwo, - "waf": ApplicationGatewayTierWAF, - "waf_v2": ApplicationGatewayTierWAFVTwo, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ApplicationGatewayTier(input) - return &out, nil -} - -type DdosSettingsProtectionMode string - -const ( - DdosSettingsProtectionModeDisabled DdosSettingsProtectionMode = "Disabled" - DdosSettingsProtectionModeEnabled DdosSettingsProtectionMode = "Enabled" - DdosSettingsProtectionModeVirtualNetworkInherited DdosSettingsProtectionMode = "VirtualNetworkInherited" -) - -func PossibleValuesForDdosSettingsProtectionMode() []string { - return []string{ - string(DdosSettingsProtectionModeDisabled), - string(DdosSettingsProtectionModeEnabled), - string(DdosSettingsProtectionModeVirtualNetworkInherited), - } -} - -func (s *DdosSettingsProtectionMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDdosSettingsProtectionMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDdosSettingsProtectionMode(input string) (*DdosSettingsProtectionMode, error) { - vals := map[string]DdosSettingsProtectionMode{ - "disabled": DdosSettingsProtectionModeDisabled, - "enabled": DdosSettingsProtectionModeEnabled, - "virtualnetworkinherited": DdosSettingsProtectionModeVirtualNetworkInherited, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DdosSettingsProtectionMode(input) - return &out, nil -} - -type DeleteOptions string - -const ( - DeleteOptionsDelete DeleteOptions = "Delete" - DeleteOptionsDetach DeleteOptions = "Detach" -) - -func PossibleValuesForDeleteOptions() []string { - return []string{ - string(DeleteOptionsDelete), - string(DeleteOptionsDetach), - } -} - -func (s *DeleteOptions) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseDeleteOptions(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseDeleteOptions(input string) (*DeleteOptions, error) { - vals := map[string]DeleteOptions{ - "delete": DeleteOptionsDelete, - "detach": DeleteOptionsDetach, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := DeleteOptions(input) - return &out, nil -} - -type FlowLogFormatType string - -const ( - FlowLogFormatTypeJSON FlowLogFormatType = "JSON" -) - -func PossibleValuesForFlowLogFormatType() []string { - return []string{ - string(FlowLogFormatTypeJSON), - } -} - -func (s *FlowLogFormatType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseFlowLogFormatType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseFlowLogFormatType(input string) (*FlowLogFormatType, error) { - vals := map[string]FlowLogFormatType{ - "json": FlowLogFormatTypeJSON, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := FlowLogFormatType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelInterfaceType string - -const ( - GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" - GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" - GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" -) - -func PossibleValuesForGatewayLoadBalancerTunnelInterfaceType() []string { - return []string{ - string(GatewayLoadBalancerTunnelInterfaceTypeExternal), - string(GatewayLoadBalancerTunnelInterfaceTypeInternal), - string(GatewayLoadBalancerTunnelInterfaceTypeNone), - } -} - -func (s *GatewayLoadBalancerTunnelInterfaceType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelInterfaceType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelInterfaceType(input string) (*GatewayLoadBalancerTunnelInterfaceType, error) { - vals := map[string]GatewayLoadBalancerTunnelInterfaceType{ - "external": GatewayLoadBalancerTunnelInterfaceTypeExternal, - "internal": GatewayLoadBalancerTunnelInterfaceTypeInternal, - "none": GatewayLoadBalancerTunnelInterfaceTypeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelInterfaceType(input) - return &out, nil -} - -type GatewayLoadBalancerTunnelProtocol string - -const ( - GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" - GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" - GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" -) - -func PossibleValuesForGatewayLoadBalancerTunnelProtocol() []string { - return []string{ - string(GatewayLoadBalancerTunnelProtocolNative), - string(GatewayLoadBalancerTunnelProtocolNone), - string(GatewayLoadBalancerTunnelProtocolVXLAN), - } -} - -func (s *GatewayLoadBalancerTunnelProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseGatewayLoadBalancerTunnelProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseGatewayLoadBalancerTunnelProtocol(input string) (*GatewayLoadBalancerTunnelProtocol, error) { - vals := map[string]GatewayLoadBalancerTunnelProtocol{ - "native": GatewayLoadBalancerTunnelProtocolNative, - "none": GatewayLoadBalancerTunnelProtocolNone, - "vxlan": GatewayLoadBalancerTunnelProtocolVXLAN, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := GatewayLoadBalancerTunnelProtocol(input) - return &out, nil -} - -type IPAllocationMethod string - -const ( - IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" - IPAllocationMethodStatic IPAllocationMethod = "Static" -) - -func PossibleValuesForIPAllocationMethod() []string { - return []string{ - string(IPAllocationMethodDynamic), - string(IPAllocationMethodStatic), - } -} - -func (s *IPAllocationMethod) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPAllocationMethod(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPAllocationMethod(input string) (*IPAllocationMethod, error) { - vals := map[string]IPAllocationMethod{ - "dynamic": IPAllocationMethodDynamic, - "static": IPAllocationMethodStatic, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPAllocationMethod(input) - return &out, nil -} - -type IPVersion string - -const ( - IPVersionIPvFour IPVersion = "IPv4" - IPVersionIPvSix IPVersion = "IPv6" -) - -func PossibleValuesForIPVersion() []string { - return []string{ - string(IPVersionIPvFour), - string(IPVersionIPvSix), - } -} - -func (s *IPVersion) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseIPVersion(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseIPVersion(input string) (*IPVersion, error) { - vals := map[string]IPVersion{ - "ipv4": IPVersionIPvFour, - "ipv6": IPVersionIPvSix, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := IPVersion(input) - return &out, nil -} - -type LoadBalancerBackendAddressAdminState string - -const ( - LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" - LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" - LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" -) - -func PossibleValuesForLoadBalancerBackendAddressAdminState() []string { - return []string{ - string(LoadBalancerBackendAddressAdminStateDown), - string(LoadBalancerBackendAddressAdminStateNone), - string(LoadBalancerBackendAddressAdminStateUp), - } -} - -func (s *LoadBalancerBackendAddressAdminState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseLoadBalancerBackendAddressAdminState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseLoadBalancerBackendAddressAdminState(input string) (*LoadBalancerBackendAddressAdminState, error) { - vals := map[string]LoadBalancerBackendAddressAdminState{ - "down": LoadBalancerBackendAddressAdminStateDown, - "none": LoadBalancerBackendAddressAdminStateNone, - "up": LoadBalancerBackendAddressAdminStateUp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := LoadBalancerBackendAddressAdminState(input) - return &out, nil -} - -type ManagedRuleEnabledState string - -const ( - ManagedRuleEnabledStateDisabled ManagedRuleEnabledState = "Disabled" - ManagedRuleEnabledStateEnabled ManagedRuleEnabledState = "Enabled" -) - -func PossibleValuesForManagedRuleEnabledState() []string { - return []string{ - string(ManagedRuleEnabledStateDisabled), - string(ManagedRuleEnabledStateEnabled), - } -} - -func (s *ManagedRuleEnabledState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseManagedRuleEnabledState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseManagedRuleEnabledState(input string) (*ManagedRuleEnabledState, error) { - vals := map[string]ManagedRuleEnabledState{ - "disabled": ManagedRuleEnabledStateDisabled, - "enabled": ManagedRuleEnabledStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ManagedRuleEnabledState(input) - return &out, nil -} - -type NatGatewaySkuName string - -const ( - NatGatewaySkuNameStandard NatGatewaySkuName = "Standard" -) - -func PossibleValuesForNatGatewaySkuName() []string { - return []string{ - string(NatGatewaySkuNameStandard), - } -} - -func (s *NatGatewaySkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNatGatewaySkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNatGatewaySkuName(input string) (*NatGatewaySkuName, error) { - vals := map[string]NatGatewaySkuName{ - "standard": NatGatewaySkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NatGatewaySkuName(input) - return &out, nil -} - -type NetworkInterfaceAuxiliaryMode string - -const ( - NetworkInterfaceAuxiliaryModeAcceleratedConnections NetworkInterfaceAuxiliaryMode = "AcceleratedConnections" - NetworkInterfaceAuxiliaryModeFloating NetworkInterfaceAuxiliaryMode = "Floating" - NetworkInterfaceAuxiliaryModeMaxConnections NetworkInterfaceAuxiliaryMode = "MaxConnections" - NetworkInterfaceAuxiliaryModeNone NetworkInterfaceAuxiliaryMode = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliaryMode() []string { - return []string{ - string(NetworkInterfaceAuxiliaryModeAcceleratedConnections), - string(NetworkInterfaceAuxiliaryModeFloating), - string(NetworkInterfaceAuxiliaryModeMaxConnections), - string(NetworkInterfaceAuxiliaryModeNone), - } -} - -func (s *NetworkInterfaceAuxiliaryMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliaryMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliaryMode(input string) (*NetworkInterfaceAuxiliaryMode, error) { - vals := map[string]NetworkInterfaceAuxiliaryMode{ - "acceleratedconnections": NetworkInterfaceAuxiliaryModeAcceleratedConnections, - "floating": NetworkInterfaceAuxiliaryModeFloating, - "maxconnections": NetworkInterfaceAuxiliaryModeMaxConnections, - "none": NetworkInterfaceAuxiliaryModeNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliaryMode(input) - return &out, nil -} - -type NetworkInterfaceAuxiliarySku string - -const ( - NetworkInterfaceAuxiliarySkuAEight NetworkInterfaceAuxiliarySku = "A8" - NetworkInterfaceAuxiliarySkuAFour NetworkInterfaceAuxiliarySku = "A4" - NetworkInterfaceAuxiliarySkuAOne NetworkInterfaceAuxiliarySku = "A1" - NetworkInterfaceAuxiliarySkuATwo NetworkInterfaceAuxiliarySku = "A2" - NetworkInterfaceAuxiliarySkuNone NetworkInterfaceAuxiliarySku = "None" -) - -func PossibleValuesForNetworkInterfaceAuxiliarySku() []string { - return []string{ - string(NetworkInterfaceAuxiliarySkuAEight), - string(NetworkInterfaceAuxiliarySkuAFour), - string(NetworkInterfaceAuxiliarySkuAOne), - string(NetworkInterfaceAuxiliarySkuATwo), - string(NetworkInterfaceAuxiliarySkuNone), - } -} - -func (s *NetworkInterfaceAuxiliarySku) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceAuxiliarySku(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceAuxiliarySku(input string) (*NetworkInterfaceAuxiliarySku, error) { - vals := map[string]NetworkInterfaceAuxiliarySku{ - "a8": NetworkInterfaceAuxiliarySkuAEight, - "a4": NetworkInterfaceAuxiliarySkuAFour, - "a1": NetworkInterfaceAuxiliarySkuAOne, - "a2": NetworkInterfaceAuxiliarySkuATwo, - "none": NetworkInterfaceAuxiliarySkuNone, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceAuxiliarySku(input) - return &out, nil -} - -type NetworkInterfaceMigrationPhase string - -const ( - NetworkInterfaceMigrationPhaseAbort NetworkInterfaceMigrationPhase = "Abort" - NetworkInterfaceMigrationPhaseCommit NetworkInterfaceMigrationPhase = "Commit" - NetworkInterfaceMigrationPhaseCommitted NetworkInterfaceMigrationPhase = "Committed" - NetworkInterfaceMigrationPhaseNone NetworkInterfaceMigrationPhase = "None" - NetworkInterfaceMigrationPhasePrepare NetworkInterfaceMigrationPhase = "Prepare" -) - -func PossibleValuesForNetworkInterfaceMigrationPhase() []string { - return []string{ - string(NetworkInterfaceMigrationPhaseAbort), - string(NetworkInterfaceMigrationPhaseCommit), - string(NetworkInterfaceMigrationPhaseCommitted), - string(NetworkInterfaceMigrationPhaseNone), - string(NetworkInterfaceMigrationPhasePrepare), - } -} - -func (s *NetworkInterfaceMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceMigrationPhase(input string) (*NetworkInterfaceMigrationPhase, error) { - vals := map[string]NetworkInterfaceMigrationPhase{ - "abort": NetworkInterfaceMigrationPhaseAbort, - "commit": NetworkInterfaceMigrationPhaseCommit, - "committed": NetworkInterfaceMigrationPhaseCommitted, - "none": NetworkInterfaceMigrationPhaseNone, - "prepare": NetworkInterfaceMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceMigrationPhase(input) - return &out, nil -} - -type NetworkInterfaceNicType string - -const ( - NetworkInterfaceNicTypeElastic NetworkInterfaceNicType = "Elastic" - NetworkInterfaceNicTypeStandard NetworkInterfaceNicType = "Standard" -) - -func PossibleValuesForNetworkInterfaceNicType() []string { - return []string{ - string(NetworkInterfaceNicTypeElastic), - string(NetworkInterfaceNicTypeStandard), - } -} - -func (s *NetworkInterfaceNicType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseNetworkInterfaceNicType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseNetworkInterfaceNicType(input string) (*NetworkInterfaceNicType, error) { - vals := map[string]NetworkInterfaceNicType{ - "elastic": NetworkInterfaceNicTypeElastic, - "standard": NetworkInterfaceNicTypeStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := NetworkInterfaceNicType(input) - return &out, nil -} - -type OwaspCrsExclusionEntryMatchVariable string - -const ( - OwaspCrsExclusionEntryMatchVariableRequestArgKeys OwaspCrsExclusionEntryMatchVariable = "RequestArgKeys" - OwaspCrsExclusionEntryMatchVariableRequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" - OwaspCrsExclusionEntryMatchVariableRequestArgValues OwaspCrsExclusionEntryMatchVariable = "RequestArgValues" - OwaspCrsExclusionEntryMatchVariableRequestCookieKeys OwaspCrsExclusionEntryMatchVariable = "RequestCookieKeys" - OwaspCrsExclusionEntryMatchVariableRequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" - OwaspCrsExclusionEntryMatchVariableRequestCookieValues OwaspCrsExclusionEntryMatchVariable = "RequestCookieValues" - OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys OwaspCrsExclusionEntryMatchVariable = "RequestHeaderKeys" - OwaspCrsExclusionEntryMatchVariableRequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" - OwaspCrsExclusionEntryMatchVariableRequestHeaderValues OwaspCrsExclusionEntryMatchVariable = "RequestHeaderValues" -) - -func PossibleValuesForOwaspCrsExclusionEntryMatchVariable() []string { - return []string{ - string(OwaspCrsExclusionEntryMatchVariableRequestArgKeys), - string(OwaspCrsExclusionEntryMatchVariableRequestArgNames), - string(OwaspCrsExclusionEntryMatchVariableRequestArgValues), - string(OwaspCrsExclusionEntryMatchVariableRequestCookieKeys), - string(OwaspCrsExclusionEntryMatchVariableRequestCookieNames), - string(OwaspCrsExclusionEntryMatchVariableRequestCookieValues), - string(OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys), - string(OwaspCrsExclusionEntryMatchVariableRequestHeaderNames), - string(OwaspCrsExclusionEntryMatchVariableRequestHeaderValues), - } -} - -func (s *OwaspCrsExclusionEntryMatchVariable) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOwaspCrsExclusionEntryMatchVariable(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOwaspCrsExclusionEntryMatchVariable(input string) (*OwaspCrsExclusionEntryMatchVariable, error) { - vals := map[string]OwaspCrsExclusionEntryMatchVariable{ - "requestargkeys": OwaspCrsExclusionEntryMatchVariableRequestArgKeys, - "requestargnames": OwaspCrsExclusionEntryMatchVariableRequestArgNames, - "requestargvalues": OwaspCrsExclusionEntryMatchVariableRequestArgValues, - "requestcookiekeys": OwaspCrsExclusionEntryMatchVariableRequestCookieKeys, - "requestcookienames": OwaspCrsExclusionEntryMatchVariableRequestCookieNames, - "requestcookievalues": OwaspCrsExclusionEntryMatchVariableRequestCookieValues, - "requestheaderkeys": OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys, - "requestheadernames": OwaspCrsExclusionEntryMatchVariableRequestHeaderNames, - "requestheadervalues": OwaspCrsExclusionEntryMatchVariableRequestHeaderValues, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OwaspCrsExclusionEntryMatchVariable(input) - return &out, nil -} - -type OwaspCrsExclusionEntrySelectorMatchOperator string - -const ( - OwaspCrsExclusionEntrySelectorMatchOperatorContains OwaspCrsExclusionEntrySelectorMatchOperator = "Contains" - OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith OwaspCrsExclusionEntrySelectorMatchOperator = "EndsWith" - OwaspCrsExclusionEntrySelectorMatchOperatorEquals OwaspCrsExclusionEntrySelectorMatchOperator = "Equals" - OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny OwaspCrsExclusionEntrySelectorMatchOperator = "EqualsAny" - OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith OwaspCrsExclusionEntrySelectorMatchOperator = "StartsWith" -) - -func PossibleValuesForOwaspCrsExclusionEntrySelectorMatchOperator() []string { - return []string{ - string(OwaspCrsExclusionEntrySelectorMatchOperatorContains), - string(OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith), - string(OwaspCrsExclusionEntrySelectorMatchOperatorEquals), - string(OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny), - string(OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith), - } -} - -func (s *OwaspCrsExclusionEntrySelectorMatchOperator) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseOwaspCrsExclusionEntrySelectorMatchOperator(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseOwaspCrsExclusionEntrySelectorMatchOperator(input string) (*OwaspCrsExclusionEntrySelectorMatchOperator, error) { - vals := map[string]OwaspCrsExclusionEntrySelectorMatchOperator{ - "contains": OwaspCrsExclusionEntrySelectorMatchOperatorContains, - "endswith": OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith, - "equals": OwaspCrsExclusionEntrySelectorMatchOperatorEquals, - "equalsany": OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny, - "startswith": OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := OwaspCrsExclusionEntrySelectorMatchOperator(input) - return &out, nil -} - -type ProvisioningState string - -const ( - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -func PossibleValuesForProvisioningState() []string { - return []string{ - string(ProvisioningStateDeleting), - string(ProvisioningStateFailed), - string(ProvisioningStateSucceeded), - string(ProvisioningStateUpdating), - } -} - -func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseProvisioningState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseProvisioningState(input string) (*ProvisioningState, error) { - vals := map[string]ProvisioningState{ - "deleting": ProvisioningStateDeleting, - "failed": ProvisioningStateFailed, - "succeeded": ProvisioningStateSucceeded, - "updating": ProvisioningStateUpdating, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ProvisioningState(input) - return &out, nil -} - -type PublicIPAddressDnsSettingsDomainNameLabelScope string - -const ( - PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "NoReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "ResourceGroupReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "SubscriptionReuse" - PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse PublicIPAddressDnsSettingsDomainNameLabelScope = "TenantReuse" -) - -func PossibleValuesForPublicIPAddressDnsSettingsDomainNameLabelScope() []string { - return []string{ - string(PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse), - string(PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse), - } -} - -func (s *PublicIPAddressDnsSettingsDomainNameLabelScope) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressDnsSettingsDomainNameLabelScope(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressDnsSettingsDomainNameLabelScope(input string) (*PublicIPAddressDnsSettingsDomainNameLabelScope, error) { - vals := map[string]PublicIPAddressDnsSettingsDomainNameLabelScope{ - "noreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeNoReuse, - "resourcegroupreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeResourceGroupReuse, - "subscriptionreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeSubscriptionReuse, - "tenantreuse": PublicIPAddressDnsSettingsDomainNameLabelScopeTenantReuse, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressDnsSettingsDomainNameLabelScope(input) - return &out, nil -} - -type PublicIPAddressMigrationPhase string - -const ( - PublicIPAddressMigrationPhaseAbort PublicIPAddressMigrationPhase = "Abort" - PublicIPAddressMigrationPhaseCommit PublicIPAddressMigrationPhase = "Commit" - PublicIPAddressMigrationPhaseCommitted PublicIPAddressMigrationPhase = "Committed" - PublicIPAddressMigrationPhaseNone PublicIPAddressMigrationPhase = "None" - PublicIPAddressMigrationPhasePrepare PublicIPAddressMigrationPhase = "Prepare" -) - -func PossibleValuesForPublicIPAddressMigrationPhase() []string { - return []string{ - string(PublicIPAddressMigrationPhaseAbort), - string(PublicIPAddressMigrationPhaseCommit), - string(PublicIPAddressMigrationPhaseCommitted), - string(PublicIPAddressMigrationPhaseNone), - string(PublicIPAddressMigrationPhasePrepare), - } -} - -func (s *PublicIPAddressMigrationPhase) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressMigrationPhase(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressMigrationPhase(input string) (*PublicIPAddressMigrationPhase, error) { - vals := map[string]PublicIPAddressMigrationPhase{ - "abort": PublicIPAddressMigrationPhaseAbort, - "commit": PublicIPAddressMigrationPhaseCommit, - "committed": PublicIPAddressMigrationPhaseCommitted, - "none": PublicIPAddressMigrationPhaseNone, - "prepare": PublicIPAddressMigrationPhasePrepare, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressMigrationPhase(input) - return &out, nil -} - -type PublicIPAddressSkuName string - -const ( - PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" - PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" -) - -func PossibleValuesForPublicIPAddressSkuName() []string { - return []string{ - string(PublicIPAddressSkuNameBasic), - string(PublicIPAddressSkuNameStandard), - } -} - -func (s *PublicIPAddressSkuName) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuName(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuName(input string) (*PublicIPAddressSkuName, error) { - vals := map[string]PublicIPAddressSkuName{ - "basic": PublicIPAddressSkuNameBasic, - "standard": PublicIPAddressSkuNameStandard, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuName(input) - return &out, nil -} - -type PublicIPAddressSkuTier string - -const ( - PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global" - PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional" -) - -func PossibleValuesForPublicIPAddressSkuTier() []string { - return []string{ - string(PublicIPAddressSkuTierGlobal), - string(PublicIPAddressSkuTierRegional), - } -} - -func (s *PublicIPAddressSkuTier) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parsePublicIPAddressSkuTier(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parsePublicIPAddressSkuTier(input string) (*PublicIPAddressSkuTier, error) { - vals := map[string]PublicIPAddressSkuTier{ - "global": PublicIPAddressSkuTierGlobal, - "regional": PublicIPAddressSkuTierRegional, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := PublicIPAddressSkuTier(input) - return &out, nil -} - -type RouteNextHopType string - -const ( - RouteNextHopTypeInternet RouteNextHopType = "Internet" - RouteNextHopTypeNone RouteNextHopType = "None" - RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" -) - -func PossibleValuesForRouteNextHopType() []string { - return []string{ - string(RouteNextHopTypeInternet), - string(RouteNextHopTypeNone), - string(RouteNextHopTypeVirtualAppliance), - string(RouteNextHopTypeVirtualNetworkGateway), - string(RouteNextHopTypeVnetLocal), - } -} - -func (s *RouteNextHopType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseRouteNextHopType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseRouteNextHopType(input string) (*RouteNextHopType, error) { - vals := map[string]RouteNextHopType{ - "internet": RouteNextHopTypeInternet, - "none": RouteNextHopTypeNone, - "virtualappliance": RouteNextHopTypeVirtualAppliance, - "virtualnetworkgateway": RouteNextHopTypeVirtualNetworkGateway, - "vnetlocal": RouteNextHopTypeVnetLocal, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := RouteNextHopType(input) - return &out, nil -} - -type ScrubbingRuleEntryMatchOperator string - -const ( - ScrubbingRuleEntryMatchOperatorEquals ScrubbingRuleEntryMatchOperator = "Equals" - ScrubbingRuleEntryMatchOperatorEqualsAny ScrubbingRuleEntryMatchOperator = "EqualsAny" -) - -func PossibleValuesForScrubbingRuleEntryMatchOperator() []string { - return []string{ - string(ScrubbingRuleEntryMatchOperatorEquals), - string(ScrubbingRuleEntryMatchOperatorEqualsAny), - } -} - -func (s *ScrubbingRuleEntryMatchOperator) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScrubbingRuleEntryMatchOperator(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScrubbingRuleEntryMatchOperator(input string) (*ScrubbingRuleEntryMatchOperator, error) { - vals := map[string]ScrubbingRuleEntryMatchOperator{ - "equals": ScrubbingRuleEntryMatchOperatorEquals, - "equalsany": ScrubbingRuleEntryMatchOperatorEqualsAny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScrubbingRuleEntryMatchOperator(input) - return &out, nil -} - -type ScrubbingRuleEntryMatchVariable string - -const ( - ScrubbingRuleEntryMatchVariableRequestArgNames ScrubbingRuleEntryMatchVariable = "RequestArgNames" - ScrubbingRuleEntryMatchVariableRequestCookieNames ScrubbingRuleEntryMatchVariable = "RequestCookieNames" - ScrubbingRuleEntryMatchVariableRequestHeaderNames ScrubbingRuleEntryMatchVariable = "RequestHeaderNames" - ScrubbingRuleEntryMatchVariableRequestIPAddress ScrubbingRuleEntryMatchVariable = "RequestIPAddress" - ScrubbingRuleEntryMatchVariableRequestJSONArgNames ScrubbingRuleEntryMatchVariable = "RequestJSONArgNames" - ScrubbingRuleEntryMatchVariableRequestPostArgNames ScrubbingRuleEntryMatchVariable = "RequestPostArgNames" -) - -func PossibleValuesForScrubbingRuleEntryMatchVariable() []string { - return []string{ - string(ScrubbingRuleEntryMatchVariableRequestArgNames), - string(ScrubbingRuleEntryMatchVariableRequestCookieNames), - string(ScrubbingRuleEntryMatchVariableRequestHeaderNames), - string(ScrubbingRuleEntryMatchVariableRequestIPAddress), - string(ScrubbingRuleEntryMatchVariableRequestJSONArgNames), - string(ScrubbingRuleEntryMatchVariableRequestPostArgNames), - } -} - -func (s *ScrubbingRuleEntryMatchVariable) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScrubbingRuleEntryMatchVariable(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScrubbingRuleEntryMatchVariable(input string) (*ScrubbingRuleEntryMatchVariable, error) { - vals := map[string]ScrubbingRuleEntryMatchVariable{ - "requestargnames": ScrubbingRuleEntryMatchVariableRequestArgNames, - "requestcookienames": ScrubbingRuleEntryMatchVariableRequestCookieNames, - "requestheadernames": ScrubbingRuleEntryMatchVariableRequestHeaderNames, - "requestipaddress": ScrubbingRuleEntryMatchVariableRequestIPAddress, - "requestjsonargnames": ScrubbingRuleEntryMatchVariableRequestJSONArgNames, - "requestpostargnames": ScrubbingRuleEntryMatchVariableRequestPostArgNames, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScrubbingRuleEntryMatchVariable(input) - return &out, nil -} - -type ScrubbingRuleEntryState string - -const ( - ScrubbingRuleEntryStateDisabled ScrubbingRuleEntryState = "Disabled" - ScrubbingRuleEntryStateEnabled ScrubbingRuleEntryState = "Enabled" -) - -func PossibleValuesForScrubbingRuleEntryState() []string { - return []string{ - string(ScrubbingRuleEntryStateDisabled), - string(ScrubbingRuleEntryStateEnabled), - } -} - -func (s *ScrubbingRuleEntryState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseScrubbingRuleEntryState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseScrubbingRuleEntryState(input string) (*ScrubbingRuleEntryState, error) { - vals := map[string]ScrubbingRuleEntryState{ - "disabled": ScrubbingRuleEntryStateDisabled, - "enabled": ScrubbingRuleEntryStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := ScrubbingRuleEntryState(input) - return &out, nil -} - -type SecurityRuleAccess string - -const ( - SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - SecurityRuleAccessDeny SecurityRuleAccess = "Deny" -) - -func PossibleValuesForSecurityRuleAccess() []string { - return []string{ - string(SecurityRuleAccessAllow), - string(SecurityRuleAccessDeny), - } -} - -func (s *SecurityRuleAccess) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleAccess(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleAccess(input string) (*SecurityRuleAccess, error) { - vals := map[string]SecurityRuleAccess{ - "allow": SecurityRuleAccessAllow, - "deny": SecurityRuleAccessDeny, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleAccess(input) - return &out, nil -} - -type SecurityRuleDirection string - -const ( - SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" -) - -func PossibleValuesForSecurityRuleDirection() []string { - return []string{ - string(SecurityRuleDirectionInbound), - string(SecurityRuleDirectionOutbound), - } -} - -func (s *SecurityRuleDirection) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleDirection(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleDirection(input string) (*SecurityRuleDirection, error) { - vals := map[string]SecurityRuleDirection{ - "inbound": SecurityRuleDirectionInbound, - "outbound": SecurityRuleDirectionOutbound, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleDirection(input) - return &out, nil -} - -type SecurityRuleProtocol string - -const ( - SecurityRuleProtocolAh SecurityRuleProtocol = "Ah" - SecurityRuleProtocolAny SecurityRuleProtocol = "*" - SecurityRuleProtocolEsp SecurityRuleProtocol = "Esp" - SecurityRuleProtocolIcmp SecurityRuleProtocol = "Icmp" - SecurityRuleProtocolTcp SecurityRuleProtocol = "Tcp" - SecurityRuleProtocolUdp SecurityRuleProtocol = "Udp" -) - -func PossibleValuesForSecurityRuleProtocol() []string { - return []string{ - string(SecurityRuleProtocolAh), - string(SecurityRuleProtocolAny), - string(SecurityRuleProtocolEsp), - string(SecurityRuleProtocolIcmp), - string(SecurityRuleProtocolTcp), - string(SecurityRuleProtocolUdp), - } -} - -func (s *SecurityRuleProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseSecurityRuleProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseSecurityRuleProtocol(input string) (*SecurityRuleProtocol, error) { - vals := map[string]SecurityRuleProtocol{ - "ah": SecurityRuleProtocolAh, - "*": SecurityRuleProtocolAny, - "esp": SecurityRuleProtocolEsp, - "icmp": SecurityRuleProtocolIcmp, - "tcp": SecurityRuleProtocolTcp, - "udp": SecurityRuleProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := SecurityRuleProtocol(input) - return &out, nil -} - -type TransportProtocol string - -const ( - TransportProtocolAll TransportProtocol = "All" - TransportProtocolTcp TransportProtocol = "Tcp" - TransportProtocolUdp TransportProtocol = "Udp" -) - -func PossibleValuesForTransportProtocol() []string { - return []string{ - string(TransportProtocolAll), - string(TransportProtocolTcp), - string(TransportProtocolUdp), - } -} - -func (s *TransportProtocol) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseTransportProtocol(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseTransportProtocol(input string) (*TransportProtocol, error) { - vals := map[string]TransportProtocol{ - "all": TransportProtocolAll, - "tcp": TransportProtocolTcp, - "udp": TransportProtocolUdp, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := TransportProtocol(input) - return &out, nil -} - -type VirtualNetworkPrivateEndpointNetworkPolicies string - -const ( - VirtualNetworkPrivateEndpointNetworkPoliciesDisabled VirtualNetworkPrivateEndpointNetworkPolicies = "Disabled" - VirtualNetworkPrivateEndpointNetworkPoliciesEnabled VirtualNetworkPrivateEndpointNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateEndpointNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateEndpointNetworkPoliciesDisabled), - string(VirtualNetworkPrivateEndpointNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateEndpointNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateEndpointNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateEndpointNetworkPolicies(input string) (*VirtualNetworkPrivateEndpointNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateEndpointNetworkPolicies{ - "disabled": VirtualNetworkPrivateEndpointNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateEndpointNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateEndpointNetworkPolicies(input) - return &out, nil -} - -type VirtualNetworkPrivateLinkServiceNetworkPolicies string - -const ( - VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Disabled" - VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled VirtualNetworkPrivateLinkServiceNetworkPolicies = "Enabled" -) - -func PossibleValuesForVirtualNetworkPrivateLinkServiceNetworkPolicies() []string { - return []string{ - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled), - string(VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled), - } -} - -func (s *VirtualNetworkPrivateLinkServiceNetworkPolicies) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseVirtualNetworkPrivateLinkServiceNetworkPolicies(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseVirtualNetworkPrivateLinkServiceNetworkPolicies(input string) (*VirtualNetworkPrivateLinkServiceNetworkPolicies, error) { - vals := map[string]VirtualNetworkPrivateLinkServiceNetworkPolicies{ - "disabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesDisabled, - "enabled": VirtualNetworkPrivateLinkServiceNetworkPoliciesEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := VirtualNetworkPrivateLinkServiceNetworkPolicies(input) - return &out, nil -} - -type WebApplicationFirewallAction string - -const ( - WebApplicationFirewallActionAllow WebApplicationFirewallAction = "Allow" - WebApplicationFirewallActionBlock WebApplicationFirewallAction = "Block" - WebApplicationFirewallActionLog WebApplicationFirewallAction = "Log" -) - -func PossibleValuesForWebApplicationFirewallAction() []string { - return []string{ - string(WebApplicationFirewallActionAllow), - string(WebApplicationFirewallActionBlock), - string(WebApplicationFirewallActionLog), - } -} - -func (s *WebApplicationFirewallAction) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallAction(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallAction(input string) (*WebApplicationFirewallAction, error) { - vals := map[string]WebApplicationFirewallAction{ - "allow": WebApplicationFirewallActionAllow, - "block": WebApplicationFirewallActionBlock, - "log": WebApplicationFirewallActionLog, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallAction(input) - return &out, nil -} - -type WebApplicationFirewallEnabledState string - -const ( - WebApplicationFirewallEnabledStateDisabled WebApplicationFirewallEnabledState = "Disabled" - WebApplicationFirewallEnabledStateEnabled WebApplicationFirewallEnabledState = "Enabled" -) - -func PossibleValuesForWebApplicationFirewallEnabledState() []string { - return []string{ - string(WebApplicationFirewallEnabledStateDisabled), - string(WebApplicationFirewallEnabledStateEnabled), - } -} - -func (s *WebApplicationFirewallEnabledState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallEnabledState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallEnabledState(input string) (*WebApplicationFirewallEnabledState, error) { - vals := map[string]WebApplicationFirewallEnabledState{ - "disabled": WebApplicationFirewallEnabledStateDisabled, - "enabled": WebApplicationFirewallEnabledStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallEnabledState(input) - return &out, nil -} - -type WebApplicationFirewallMatchVariable string - -const ( - WebApplicationFirewallMatchVariablePostArgs WebApplicationFirewallMatchVariable = "PostArgs" - WebApplicationFirewallMatchVariableQueryString WebApplicationFirewallMatchVariable = "QueryString" - WebApplicationFirewallMatchVariableRemoteAddr WebApplicationFirewallMatchVariable = "RemoteAddr" - WebApplicationFirewallMatchVariableRequestBody WebApplicationFirewallMatchVariable = "RequestBody" - WebApplicationFirewallMatchVariableRequestCookies WebApplicationFirewallMatchVariable = "RequestCookies" - WebApplicationFirewallMatchVariableRequestHeaders WebApplicationFirewallMatchVariable = "RequestHeaders" - WebApplicationFirewallMatchVariableRequestMethod WebApplicationFirewallMatchVariable = "RequestMethod" - WebApplicationFirewallMatchVariableRequestUri WebApplicationFirewallMatchVariable = "RequestUri" -) - -func PossibleValuesForWebApplicationFirewallMatchVariable() []string { - return []string{ - string(WebApplicationFirewallMatchVariablePostArgs), - string(WebApplicationFirewallMatchVariableQueryString), - string(WebApplicationFirewallMatchVariableRemoteAddr), - string(WebApplicationFirewallMatchVariableRequestBody), - string(WebApplicationFirewallMatchVariableRequestCookies), - string(WebApplicationFirewallMatchVariableRequestHeaders), - string(WebApplicationFirewallMatchVariableRequestMethod), - string(WebApplicationFirewallMatchVariableRequestUri), - } -} - -func (s *WebApplicationFirewallMatchVariable) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallMatchVariable(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallMatchVariable(input string) (*WebApplicationFirewallMatchVariable, error) { - vals := map[string]WebApplicationFirewallMatchVariable{ - "postargs": WebApplicationFirewallMatchVariablePostArgs, - "querystring": WebApplicationFirewallMatchVariableQueryString, - "remoteaddr": WebApplicationFirewallMatchVariableRemoteAddr, - "requestbody": WebApplicationFirewallMatchVariableRequestBody, - "requestcookies": WebApplicationFirewallMatchVariableRequestCookies, - "requestheaders": WebApplicationFirewallMatchVariableRequestHeaders, - "requestmethod": WebApplicationFirewallMatchVariableRequestMethod, - "requesturi": WebApplicationFirewallMatchVariableRequestUri, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallMatchVariable(input) - return &out, nil -} - -type WebApplicationFirewallMode string - -const ( - WebApplicationFirewallModeDetection WebApplicationFirewallMode = "Detection" - WebApplicationFirewallModePrevention WebApplicationFirewallMode = "Prevention" -) - -func PossibleValuesForWebApplicationFirewallMode() []string { - return []string{ - string(WebApplicationFirewallModeDetection), - string(WebApplicationFirewallModePrevention), - } -} - -func (s *WebApplicationFirewallMode) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallMode(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallMode(input string) (*WebApplicationFirewallMode, error) { - vals := map[string]WebApplicationFirewallMode{ - "detection": WebApplicationFirewallModeDetection, - "prevention": WebApplicationFirewallModePrevention, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallMode(input) - return &out, nil -} - -type WebApplicationFirewallOperator string - -const ( - WebApplicationFirewallOperatorAny WebApplicationFirewallOperator = "Any" - WebApplicationFirewallOperatorBeginsWith WebApplicationFirewallOperator = "BeginsWith" - WebApplicationFirewallOperatorContains WebApplicationFirewallOperator = "Contains" - WebApplicationFirewallOperatorEndsWith WebApplicationFirewallOperator = "EndsWith" - WebApplicationFirewallOperatorEqual WebApplicationFirewallOperator = "Equal" - WebApplicationFirewallOperatorGeoMatch WebApplicationFirewallOperator = "GeoMatch" - WebApplicationFirewallOperatorGreaterThan WebApplicationFirewallOperator = "GreaterThan" - WebApplicationFirewallOperatorGreaterThanOrEqual WebApplicationFirewallOperator = "GreaterThanOrEqual" - WebApplicationFirewallOperatorIPMatch WebApplicationFirewallOperator = "IPMatch" - WebApplicationFirewallOperatorLessThan WebApplicationFirewallOperator = "LessThan" - WebApplicationFirewallOperatorLessThanOrEqual WebApplicationFirewallOperator = "LessThanOrEqual" - WebApplicationFirewallOperatorRegex WebApplicationFirewallOperator = "Regex" -) - -func PossibleValuesForWebApplicationFirewallOperator() []string { - return []string{ - string(WebApplicationFirewallOperatorAny), - string(WebApplicationFirewallOperatorBeginsWith), - string(WebApplicationFirewallOperatorContains), - string(WebApplicationFirewallOperatorEndsWith), - string(WebApplicationFirewallOperatorEqual), - string(WebApplicationFirewallOperatorGeoMatch), - string(WebApplicationFirewallOperatorGreaterThan), - string(WebApplicationFirewallOperatorGreaterThanOrEqual), - string(WebApplicationFirewallOperatorIPMatch), - string(WebApplicationFirewallOperatorLessThan), - string(WebApplicationFirewallOperatorLessThanOrEqual), - string(WebApplicationFirewallOperatorRegex), - } -} - -func (s *WebApplicationFirewallOperator) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallOperator(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallOperator(input string) (*WebApplicationFirewallOperator, error) { - vals := map[string]WebApplicationFirewallOperator{ - "any": WebApplicationFirewallOperatorAny, - "beginswith": WebApplicationFirewallOperatorBeginsWith, - "contains": WebApplicationFirewallOperatorContains, - "endswith": WebApplicationFirewallOperatorEndsWith, - "equal": WebApplicationFirewallOperatorEqual, - "geomatch": WebApplicationFirewallOperatorGeoMatch, - "greaterthan": WebApplicationFirewallOperatorGreaterThan, - "greaterthanorequal": WebApplicationFirewallOperatorGreaterThanOrEqual, - "ipmatch": WebApplicationFirewallOperatorIPMatch, - "lessthan": WebApplicationFirewallOperatorLessThan, - "lessthanorequal": WebApplicationFirewallOperatorLessThanOrEqual, - "regex": WebApplicationFirewallOperatorRegex, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallOperator(input) - return &out, nil -} - -type WebApplicationFirewallPolicyResourceState string - -const ( - WebApplicationFirewallPolicyResourceStateCreating WebApplicationFirewallPolicyResourceState = "Creating" - WebApplicationFirewallPolicyResourceStateDeleting WebApplicationFirewallPolicyResourceState = "Deleting" - WebApplicationFirewallPolicyResourceStateDisabled WebApplicationFirewallPolicyResourceState = "Disabled" - WebApplicationFirewallPolicyResourceStateDisabling WebApplicationFirewallPolicyResourceState = "Disabling" - WebApplicationFirewallPolicyResourceStateEnabled WebApplicationFirewallPolicyResourceState = "Enabled" - WebApplicationFirewallPolicyResourceStateEnabling WebApplicationFirewallPolicyResourceState = "Enabling" -) - -func PossibleValuesForWebApplicationFirewallPolicyResourceState() []string { - return []string{ - string(WebApplicationFirewallPolicyResourceStateCreating), - string(WebApplicationFirewallPolicyResourceStateDeleting), - string(WebApplicationFirewallPolicyResourceStateDisabled), - string(WebApplicationFirewallPolicyResourceStateDisabling), - string(WebApplicationFirewallPolicyResourceStateEnabled), - string(WebApplicationFirewallPolicyResourceStateEnabling), - } -} - -func (s *WebApplicationFirewallPolicyResourceState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallPolicyResourceState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallPolicyResourceState(input string) (*WebApplicationFirewallPolicyResourceState, error) { - vals := map[string]WebApplicationFirewallPolicyResourceState{ - "creating": WebApplicationFirewallPolicyResourceStateCreating, - "deleting": WebApplicationFirewallPolicyResourceStateDeleting, - "disabled": WebApplicationFirewallPolicyResourceStateDisabled, - "disabling": WebApplicationFirewallPolicyResourceStateDisabling, - "enabled": WebApplicationFirewallPolicyResourceStateEnabled, - "enabling": WebApplicationFirewallPolicyResourceStateEnabling, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallPolicyResourceState(input) - return &out, nil -} - -type WebApplicationFirewallRuleType string - -const ( - WebApplicationFirewallRuleTypeInvalid WebApplicationFirewallRuleType = "Invalid" - WebApplicationFirewallRuleTypeMatchRule WebApplicationFirewallRuleType = "MatchRule" - WebApplicationFirewallRuleTypeRateLimitRule WebApplicationFirewallRuleType = "RateLimitRule" -) - -func PossibleValuesForWebApplicationFirewallRuleType() []string { - return []string{ - string(WebApplicationFirewallRuleTypeInvalid), - string(WebApplicationFirewallRuleTypeMatchRule), - string(WebApplicationFirewallRuleTypeRateLimitRule), - } -} - -func (s *WebApplicationFirewallRuleType) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallRuleType(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallRuleType(input string) (*WebApplicationFirewallRuleType, error) { - vals := map[string]WebApplicationFirewallRuleType{ - "invalid": WebApplicationFirewallRuleTypeInvalid, - "matchrule": WebApplicationFirewallRuleTypeMatchRule, - "ratelimitrule": WebApplicationFirewallRuleTypeRateLimitRule, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallRuleType(input) - return &out, nil -} - -type WebApplicationFirewallScrubbingState string - -const ( - WebApplicationFirewallScrubbingStateDisabled WebApplicationFirewallScrubbingState = "Disabled" - WebApplicationFirewallScrubbingStateEnabled WebApplicationFirewallScrubbingState = "Enabled" -) - -func PossibleValuesForWebApplicationFirewallScrubbingState() []string { - return []string{ - string(WebApplicationFirewallScrubbingStateDisabled), - string(WebApplicationFirewallScrubbingStateEnabled), - } -} - -func (s *WebApplicationFirewallScrubbingState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallScrubbingState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallScrubbingState(input string) (*WebApplicationFirewallScrubbingState, error) { - vals := map[string]WebApplicationFirewallScrubbingState{ - "disabled": WebApplicationFirewallScrubbingStateDisabled, - "enabled": WebApplicationFirewallScrubbingStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallScrubbingState(input) - return &out, nil -} - -type WebApplicationFirewallState string - -const ( - WebApplicationFirewallStateDisabled WebApplicationFirewallState = "Disabled" - WebApplicationFirewallStateEnabled WebApplicationFirewallState = "Enabled" -) - -func PossibleValuesForWebApplicationFirewallState() []string { - return []string{ - string(WebApplicationFirewallStateDisabled), - string(WebApplicationFirewallStateEnabled), - } -} - -func (s *WebApplicationFirewallState) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallState(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallState(input string) (*WebApplicationFirewallState, error) { - vals := map[string]WebApplicationFirewallState{ - "disabled": WebApplicationFirewallStateDisabled, - "enabled": WebApplicationFirewallStateEnabled, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallState(input) - return &out, nil -} - -type WebApplicationFirewallTransform string - -const ( - WebApplicationFirewallTransformHtmlEntityDecode WebApplicationFirewallTransform = "HtmlEntityDecode" - WebApplicationFirewallTransformLowercase WebApplicationFirewallTransform = "Lowercase" - WebApplicationFirewallTransformRemoveNulls WebApplicationFirewallTransform = "RemoveNulls" - WebApplicationFirewallTransformTrim WebApplicationFirewallTransform = "Trim" - WebApplicationFirewallTransformUppercase WebApplicationFirewallTransform = "Uppercase" - WebApplicationFirewallTransformUrlDecode WebApplicationFirewallTransform = "UrlDecode" - WebApplicationFirewallTransformUrlEncode WebApplicationFirewallTransform = "UrlEncode" -) - -func PossibleValuesForWebApplicationFirewallTransform() []string { - return []string{ - string(WebApplicationFirewallTransformHtmlEntityDecode), - string(WebApplicationFirewallTransformLowercase), - string(WebApplicationFirewallTransformRemoveNulls), - string(WebApplicationFirewallTransformTrim), - string(WebApplicationFirewallTransformUppercase), - string(WebApplicationFirewallTransformUrlDecode), - string(WebApplicationFirewallTransformUrlEncode), - } -} - -func (s *WebApplicationFirewallTransform) UnmarshalJSON(bytes []byte) error { - var decoded string - if err := json.Unmarshal(bytes, &decoded); err != nil { - return fmt.Errorf("unmarshaling: %+v", err) - } - out, err := parseWebApplicationFirewallTransform(decoded) - if err != nil { - return fmt.Errorf("parsing %q: %+v", decoded, err) - } - *s = *out - return nil -} - -func parseWebApplicationFirewallTransform(input string) (*WebApplicationFirewallTransform, error) { - vals := map[string]WebApplicationFirewallTransform{ - "htmlentitydecode": WebApplicationFirewallTransformHtmlEntityDecode, - "lowercase": WebApplicationFirewallTransformLowercase, - "removenulls": WebApplicationFirewallTransformRemoveNulls, - "trim": WebApplicationFirewallTransformTrim, - "uppercase": WebApplicationFirewallTransformUppercase, - "urldecode": WebApplicationFirewallTransformUrlDecode, - "urlencode": WebApplicationFirewallTransformUrlEncode, - } - if v, ok := vals[strings.ToLower(input)]; ok { - return &v, nil - } - - // otherwise presume it's an undefined value and best-effort it - out := WebApplicationFirewallTransform(input) - return &out, nil -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go deleted file mode 100644 index d15af832185..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy.go +++ /dev/null @@ -1,127 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayWebApplicationFirewallPolicyId{} - -// ApplicationGatewayWebApplicationFirewallPolicyId is a struct representing the Resource ID for a Application Gateway Web Application Firewall Policy -type ApplicationGatewayWebApplicationFirewallPolicyId struct { - SubscriptionId string - ResourceGroupName string - ApplicationGatewayWebApplicationFirewallPolicyName string -} - -// NewApplicationGatewayWebApplicationFirewallPolicyID returns a new ApplicationGatewayWebApplicationFirewallPolicyId struct -func NewApplicationGatewayWebApplicationFirewallPolicyID(subscriptionId string, resourceGroupName string, applicationGatewayWebApplicationFirewallPolicyName string) ApplicationGatewayWebApplicationFirewallPolicyId { - return ApplicationGatewayWebApplicationFirewallPolicyId{ - SubscriptionId: subscriptionId, - ResourceGroupName: resourceGroupName, - ApplicationGatewayWebApplicationFirewallPolicyName: applicationGatewayWebApplicationFirewallPolicyName, - } -} - -// ParseApplicationGatewayWebApplicationFirewallPolicyID parses 'input' into a ApplicationGatewayWebApplicationFirewallPolicyId -func ParseApplicationGatewayWebApplicationFirewallPolicyID(input string) (*ApplicationGatewayWebApplicationFirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayWebApplicationFirewallPolicyId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayWebApplicationFirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayWebApplicationFirewallPolicyName, ok = parsed.Parsed["applicationGatewayWebApplicationFirewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayWebApplicationFirewallPolicyName", *parsed) - } - - return &id, nil -} - -// ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively parses 'input' case-insensitively into a ApplicationGatewayWebApplicationFirewallPolicyId -// note: this method should only be used for API response data and not user input -func ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(input string) (*ApplicationGatewayWebApplicationFirewallPolicyId, error) { - parser := resourceids.NewParserFromResourceIdType(ApplicationGatewayWebApplicationFirewallPolicyId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := ApplicationGatewayWebApplicationFirewallPolicyId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.ResourceGroupName, ok = parsed.Parsed["resourceGroupName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "resourceGroupName", *parsed) - } - - if id.ApplicationGatewayWebApplicationFirewallPolicyName, ok = parsed.Parsed["applicationGatewayWebApplicationFirewallPolicyName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "applicationGatewayWebApplicationFirewallPolicyName", *parsed) - } - - return &id, nil -} - -// ValidateApplicationGatewayWebApplicationFirewallPolicyID checks that 'input' can be parsed as a Application Gateway Web Application Firewall Policy ID -func ValidateApplicationGatewayWebApplicationFirewallPolicyID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseApplicationGatewayWebApplicationFirewallPolicyID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Application Gateway Web Application Firewall Policy ID -func (id ApplicationGatewayWebApplicationFirewallPolicyId) ID() string { - fmtString := "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.ResourceGroupName, id.ApplicationGatewayWebApplicationFirewallPolicyName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Application Gateway Web Application Firewall Policy ID -func (id ApplicationGatewayWebApplicationFirewallPolicyId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticResourceGroups", "resourceGroups", "resourceGroups"), - resourceids.ResourceGroupSegment("resourceGroupName", "example-resource-group"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticApplicationGatewayWebApplicationFirewallPolicies", "applicationGatewayWebApplicationFirewallPolicies", "applicationGatewayWebApplicationFirewallPolicies"), - resourceids.UserSpecifiedSegment("applicationGatewayWebApplicationFirewallPolicyName", "applicationGatewayWebApplicationFirewallPolicyValue"), - } -} - -// String returns a human-readable description of this Application Gateway Web Application Firewall Policy ID -func (id ApplicationGatewayWebApplicationFirewallPolicyId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Resource Group Name: %q", id.ResourceGroupName), - fmt.Sprintf("Application Gateway Web Application Firewall Policy Name: %q", id.ApplicationGatewayWebApplicationFirewallPolicyName), - } - return fmt.Sprintf("Application Gateway Web Application Firewall Policy (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy_test.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy_test.go deleted file mode 100644 index 3d6d26b84cd..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/id_applicationgatewaywebapplicationfirewallpolicy_test.go +++ /dev/null @@ -1,282 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = ApplicationGatewayWebApplicationFirewallPolicyId{} - -func TestNewApplicationGatewayWebApplicationFirewallPolicyID(t *testing.T) { - id := NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.ResourceGroupName != "example-resource-group" { - t.Fatalf("Expected %q but got %q for Segment 'ResourceGroupName'", id.ResourceGroupName, "example-resource-group") - } - - if id.ApplicationGatewayWebApplicationFirewallPolicyName != "applicationGatewayWebApplicationFirewallPolicyValue" { - t.Fatalf("Expected %q but got %q for Segment 'ApplicationGatewayWebApplicationFirewallPolicyName'", id.ApplicationGatewayWebApplicationFirewallPolicyName, "applicationGatewayWebApplicationFirewallPolicyValue") - } -} - -func TestFormatApplicationGatewayWebApplicationFirewallPolicyID(t *testing.T) { - actual := NewApplicationGatewayWebApplicationFirewallPolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "applicationGatewayWebApplicationFirewallPolicyValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseApplicationGatewayWebApplicationFirewallPolicyID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayWebApplicationFirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue", - Expected: &ApplicationGatewayWebApplicationFirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayWebApplicationFirewallPolicyName: "applicationGatewayWebApplicationFirewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayWebApplicationFirewallPolicyID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayWebApplicationFirewallPolicyName != v.Expected.ApplicationGatewayWebApplicationFirewallPolicyName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayWebApplicationFirewallPolicyName", v.Expected.ApplicationGatewayWebApplicationFirewallPolicyName, actual.ApplicationGatewayWebApplicationFirewallPolicyName) - } - - } -} - -func TestParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *ApplicationGatewayWebApplicationFirewallPolicyId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue", - Expected: &ApplicationGatewayWebApplicationFirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "example-resource-group", - ApplicationGatewayWebApplicationFirewallPolicyName: "applicationGatewayWebApplicationFirewallPolicyValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/applicationGatewayWebApplicationFirewallPolicyValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcIeS/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcYvAlUe", - Expected: &ApplicationGatewayWebApplicationFirewallPolicyId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - ResourceGroupName: "eXaMpLe-rEsOuRcE-GrOuP", - ApplicationGatewayWebApplicationFirewallPolicyName: "aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/rEsOuRcEgRoUpS/eXaMpLe-rEsOuRcE-GrOuP/pRoViDeRs/mIcRoSoFt.nEtWoRk/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcIeS/aPpLiCaTiOnGaTeWaYwEbApPlIcAtIoNfIrEwAlLpOlIcYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseApplicationGatewayWebApplicationFirewallPolicyIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.ResourceGroupName != v.Expected.ResourceGroupName { - t.Fatalf("Expected %q but got %q for ResourceGroupName", v.Expected.ResourceGroupName, actual.ResourceGroupName) - } - - if actual.ApplicationGatewayWebApplicationFirewallPolicyName != v.Expected.ApplicationGatewayWebApplicationFirewallPolicyName { - t.Fatalf("Expected %q but got %q for ApplicationGatewayWebApplicationFirewallPolicyName", v.Expected.ApplicationGatewayWebApplicationFirewallPolicyName, actual.ApplicationGatewayWebApplicationFirewallPolicyName) - } - - } -} - -func TestSegmentsForApplicationGatewayWebApplicationFirewallPolicyId(t *testing.T) { - segments := ApplicationGatewayWebApplicationFirewallPolicyId{}.Segments() - if len(segments) == 0 { - t.Fatalf("ApplicationGatewayWebApplicationFirewallPolicyId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_createorupdate.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_createorupdate.go deleted file mode 100644 index a0c9dc5da18..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_createorupdate.go +++ /dev/null @@ -1,56 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CreateOrUpdateOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *WebApplicationFirewallPolicy -} - -// CreateOrUpdate ... -func (c WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Context, id ApplicationGatewayWebApplicationFirewallPolicyId, input WebApplicationFirewallPolicy) (result CreateOrUpdateOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusCreated, - http.StatusOK, - }, - HttpMethod: http.MethodPut, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - if err = req.Marshal(input); err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_delete.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_delete.go deleted file mode 100644 index c4547e95952..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DeleteOperationResponse struct { - Poller pollers.Poller - HttpResponse *http.Response - OData *odata.OData -} - -// Delete ... -func (c WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, id ApplicationGatewayWebApplicationFirewallPolicyId) (result DeleteOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusAccepted, - http.StatusNoContent, - http.StatusOK, - }, - HttpMethod: http.MethodDelete, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - result.Poller, err = resourcemanager.PollerFromResponse(resp, c.Client) - if err != nil { - return - } - - return -} - -// DeleteThenPoll performs Delete then polls until it's completed -func (c WebApplicationFirewallPoliciesClient) DeleteThenPoll(ctx context.Context, id ApplicationGatewayWebApplicationFirewallPolicyId) error { - result, err := c.Delete(ctx, id) - if err != nil { - return fmt.Errorf("performing Delete: %+v", err) - } - - if err := result.Poller.PollUntilDone(ctx); err != nil { - return fmt.Errorf("polling after Delete: %+v", err) - } - - return nil -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_get.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_get.go deleted file mode 100644 index 469a6ae6fa5..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_get.go +++ /dev/null @@ -1,51 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *WebApplicationFirewallPolicy -} - -// Get ... -func (c WebApplicationFirewallPoliciesClient) Get(ctx context.Context, id ApplicationGatewayWebApplicationFirewallPolicyId) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_list.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_list.go deleted file mode 100644 index 84af44e524c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_list.go +++ /dev/null @@ -1,90 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]WebApplicationFirewallPolicy -} - -type ListCompleteResult struct { - Items []WebApplicationFirewallPolicy -} - -// List ... -func (c WebApplicationFirewallPoliciesClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]WebApplicationFirewallPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListComplete retrieves all the results into a single object -func (c WebApplicationFirewallPoliciesClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error) { - return c.ListCompleteMatchingPredicate(ctx, id, WebApplicationFirewallPolicyOperationPredicate{}) -} - -// ListCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebApplicationFirewallPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate WebApplicationFirewallPolicyOperationPredicate) (result ListCompleteResult, err error) { - items := make([]WebApplicationFirewallPolicy, 0) - - resp, err := c.List(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_listall.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_listall.go deleted file mode 100644 index 67391896a5c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/method_listall.go +++ /dev/null @@ -1,90 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListAllOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]WebApplicationFirewallPolicy -} - -type ListAllCompleteResult struct { - Items []WebApplicationFirewallPolicy -} - -// ListAll ... -func (c WebApplicationFirewallPoliciesClient) ListAll(ctx context.Context, id commonids.SubscriptionId) (result ListAllOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]WebApplicationFirewallPolicy `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListAllComplete retrieves all the results into a single object -func (c WebApplicationFirewallPoliciesClient) ListAllComplete(ctx context.Context, id commonids.SubscriptionId) (ListAllCompleteResult, error) { - return c.ListAllCompleteMatchingPredicate(ctx, id, WebApplicationFirewallPolicyOperationPredicate{}) -} - -// ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebApplicationFirewallPoliciesClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate WebApplicationFirewallPolicyOperationPredicate) (result ListAllCompleteResult, err error) { - items := make([]WebApplicationFirewallPolicy, 0) - - resp, err := c.ListAll(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListAllCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgateway.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgateway.go deleted file mode 100644 index 69aa82140ea..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgateway.go +++ /dev/null @@ -1,21 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/identity" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificate.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificate.go deleted file mode 100644 index 74175523bc1..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificatepropertiesformat.go deleted file mode 100644 index 7536ffa2439..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayauthenticationcertificatepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayautoscaleconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayautoscaleconfiguration.go deleted file mode 100644 index 06e7df4e24e..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayautoscaleconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayAutoscaleConfiguration struct { - MaxCapacity *int64 `json:"maxCapacity,omitempty"` - MinCapacity int64 `json:"minCapacity"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddress.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddress.go deleted file mode 100644 index dcc624a13aa..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddress struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspool.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspool.go deleted file mode 100644 index 0f188b359ad..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go deleted file mode 100644 index 64a4ed2e836..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { - BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettings.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettings.go deleted file mode 100644 index 052f312d7b3..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettingspropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettingspropertiesformat.go deleted file mode 100644 index 16305b5de81..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendhttpsettingspropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { - AffinityCookieName *string `json:"affinityCookieName,omitempty"` - AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` - ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` - CookieBasedAffinity *ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` - HostName *string `json:"hostName,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - ProbeEnabled *bool `json:"probeEnabled,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestTimeout *int64 `json:"requestTimeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettings.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettings.go deleted file mode 100644 index 1bc8a5c5fe1..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettings struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayBackendSettingsPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettingspropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettingspropertiesformat.go deleted file mode 100644 index 5d5f77f3c8d..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaybackendsettingspropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayBackendSettingsPropertiesFormat struct { - HostName *string `json:"hostName,omitempty"` - PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` - Port *int64 `json:"port,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayclientauthconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayclientauthconfiguration.go deleted file mode 100644 index 36e0f43021d..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayclientauthconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayClientAuthConfiguration struct { - VerifyClientCertIssuerDN *bool `json:"verifyClientCertIssuerDN,omitempty"` - VerifyClientRevocation *ApplicationGatewayClientRevocationOptions `json:"verifyClientRevocation,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayconnectiondraining.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayconnectiondraining.go deleted file mode 100644 index 369c8494e6f..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayconnectiondraining.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayConnectionDraining struct { - DrainTimeoutInSec int64 `json:"drainTimeoutInSec"` - Enabled bool `json:"enabled"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaycustomerror.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaycustomerror.go deleted file mode 100644 index 82f3501791c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaycustomerror.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayCustomError struct { - CustomErrorPageUrl *string `json:"customErrorPageUrl,omitempty"` - StatusCode *ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfirewalldisabledrulegroup.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfirewalldisabledrulegroup.go deleted file mode 100644 index c88a33b735c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfirewalldisabledrulegroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallDisabledRuleGroup struct { - RuleGroupName string `json:"ruleGroupName"` - Rules *[]int64 `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfirewallexclusion.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfirewallexclusion.go deleted file mode 100644 index 541e5052e8f..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfirewallexclusion.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFirewallExclusion struct { - MatchVariable string `json:"matchVariable"` - Selector string `json:"selector"` - SelectorMatchOperator string `json:"selectorMatchOperator"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfiguration.go deleted file mode 100644 index f5f9c5bebc7..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfigurationpropertiesformat.go deleted file mode 100644 index 1b61dc71c1d..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConfiguration *SubResource `json:"privateLinkConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendport.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendport.go deleted file mode 100644 index dfcb5e52ee3..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendport.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPort struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendportpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendportpropertiesformat.go deleted file mode 100644 index d37b168d0aa..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayfrontendportpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayFrontendPortPropertiesFormat struct { - Port *int64 `json:"port,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayglobalconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayglobalconfiguration.go deleted file mode 100644 index b80dabed9a0..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayglobalconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayGlobalConfiguration struct { - EnableRequestBuffering *bool `json:"enableRequestBuffering,omitempty"` - EnableResponseBuffering *bool `json:"enableResponseBuffering,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayheaderconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayheaderconfiguration.go deleted file mode 100644 index fbbd324adce..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayheaderconfiguration.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHeaderConfiguration struct { - HeaderName *string `json:"headerName,omitempty"` - HeaderValue *string `json:"headerValue,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistener.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistener.go deleted file mode 100644 index 0fd70bac201..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistenerpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistenerpropertiesformat.go deleted file mode 100644 index 9c4eb515f42..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayhttplistenerpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayHTTPListenerPropertiesFormat struct { - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - HostName *string `json:"hostName,omitempty"` - HostNames *[]string `json:"hostNames,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayipconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayipconfiguration.go deleted file mode 100644 index 6ffd65f71c2..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayipconfigurationpropertiesformat.go deleted file mode 100644 index e8482b21e60..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayipconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayIPConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaylistener.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaylistener.go deleted file mode 100644 index 71fe702c98e..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaylistener.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListener struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayListenerPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaylistenerpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaylistenerpropertiesformat.go deleted file mode 100644 index 3f3c35b3412..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaylistenerpropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayListenerPropertiesFormat struct { - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *SubResource `json:"frontendPort,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslCertificate *SubResource `json:"sslCertificate,omitempty"` - SslProfile *SubResource `json:"sslProfile,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicy.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicy.go deleted file mode 100644 index 55e8713746c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionPolicyPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicypropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicypropertiesformat.go deleted file mode 100644 index fe721166bf2..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributionpolicypropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { - LoadDistributionAlgorithm *ApplicationGatewayLoadDistributionAlgorithm `json:"loadDistributionAlgorithm,omitempty"` - LoadDistributionTargets *[]ApplicationGatewayLoadDistributionTarget `json:"loadDistributionTargets,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontarget.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontarget.go deleted file mode 100644 index d361c4e3d97..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontarget.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTarget struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayLoadDistributionTargetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontargetpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontargetpropertiesformat.go deleted file mode 100644 index 6ba821b2e82..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayloaddistributiontargetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayLoadDistributionTargetPropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - WeightPerServer *int64 `json:"weightPerServer,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypathrule.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypathrule.go deleted file mode 100644 index 992b948c558..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypathrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypathrulepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypathrulepropertiesformat.go deleted file mode 100644 index 5c8b00da085..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypathrulepropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPathRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Paths *[]string `json:"paths,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnection.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnection.go deleted file mode 100644 index 5b45596cedc..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnectionproperties.go deleted file mode 100644 index c6a900feb31..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivateendpointconnectionproperties.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfiguration.go deleted file mode 100644 index 73e8756981a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfigurationproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfigurationproperties.go deleted file mode 100644 index 8855a67b9ce..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkconfigurationproperties.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkConfigurationProperties struct { - IPConfigurations *[]ApplicationGatewayPrivateLinkIPConfiguration `json:"ipConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfiguration.go deleted file mode 100644 index ce8e67a68d0..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayPrivateLinkIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfigurationproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfigurationproperties.go deleted file mode 100644 index ff68d2052d7..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprivatelinkipconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPrivateLinkIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobe.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobe.go deleted file mode 100644 index 9c935a9fbba..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobe.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbe struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobehealthresponsematch.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobehealthresponsematch.go deleted file mode 100644 index 20c18109ec0..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobehealthresponsematch.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbeHealthResponseMatch struct { - Body *string `json:"body,omitempty"` - StatusCodes *[]string `json:"statusCodes,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobepropertiesformat.go deleted file mode 100644 index b36845c57bf..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayprobepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayProbePropertiesFormat struct { - Host *string `json:"host,omitempty"` - Interval *int64 `json:"interval,omitempty"` - Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` - MinServers *int64 `json:"minServers,omitempty"` - Path *string `json:"path,omitempty"` - PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` - PickHostNameFromBackendSettings *bool `json:"pickHostNameFromBackendSettings,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *ApplicationGatewayProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Timeout *int64 `json:"timeout,omitempty"` - UnhealthyThreshold *int64 `json:"unhealthyThreshold,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypropertiesformat.go deleted file mode 100644 index 4535447263c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaypropertiesformat.go +++ /dev/null @@ -1,42 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayPropertiesFormat struct { - AuthenticationCertificates *[]ApplicationGatewayAuthenticationCertificate `json:"authenticationCertificates,omitempty"` - AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `json:"autoscaleConfiguration,omitempty"` - BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` - BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` - BackendSettingsCollection *[]ApplicationGatewayBackendSettings `json:"backendSettingsCollection,omitempty"` - CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` - EnableFips *bool `json:"enableFips,omitempty"` - EnableHTTP2 *bool `json:"enableHttp2,omitempty"` - FirewallPolicy *SubResource `json:"firewallPolicy,omitempty"` - ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"` - FrontendIPConfigurations *[]ApplicationGatewayFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` - FrontendPorts *[]ApplicationGatewayFrontendPort `json:"frontendPorts,omitempty"` - GatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"gatewayIPConfigurations,omitempty"` - GlobalConfiguration *ApplicationGatewayGlobalConfiguration `json:"globalConfiguration,omitempty"` - HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` - Listeners *[]ApplicationGatewayListener `json:"listeners,omitempty"` - LoadDistributionPolicies *[]ApplicationGatewayLoadDistributionPolicy `json:"loadDistributionPolicies,omitempty"` - OperationalState *ApplicationGatewayOperationalState `json:"operationalState,omitempty"` - PrivateEndpointConnections *[]ApplicationGatewayPrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - PrivateLinkConfigurations *[]ApplicationGatewayPrivateLinkConfiguration `json:"privateLinkConfigurations,omitempty"` - Probes *[]ApplicationGatewayProbe `json:"probes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` - RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` - RoutingRules *[]ApplicationGatewayRoutingRule `json:"routingRules,omitempty"` - Sku *ApplicationGatewaySku `json:"sku,omitempty"` - SslCertificates *[]ApplicationGatewaySslCertificate `json:"sslCertificates,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - SslProfiles *[]ApplicationGatewaySslProfile `json:"sslProfiles,omitempty"` - TrustedClientCertificates *[]ApplicationGatewayTrustedClientCertificate `json:"trustedClientCertificates,omitempty"` - TrustedRootCertificates *[]ApplicationGatewayTrustedRootCertificate `json:"trustedRootCertificates,omitempty"` - UrlPathMaps *[]ApplicationGatewayUrlPathMap `json:"urlPathMaps,omitempty"` - WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfiguration.go deleted file mode 100644 index 85eed147eb2..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfigurationpropertiesformat.go deleted file mode 100644 index 7808c57c7f7..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayredirectconfigurationpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { - IncludePath *bool `json:"includePath,omitempty"` - IncludeQueryString *bool `json:"includeQueryString,omitempty"` - PathRules *[]SubResource `json:"pathRules,omitempty"` - RedirectType *ApplicationGatewayRedirectType `json:"redirectType,omitempty"` - RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` - TargetListener *SubResource `json:"targetListener,omitempty"` - TargetUrl *string `json:"targetUrl,omitempty"` - UrlPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrule.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrule.go deleted file mode 100644 index 9eb6ffe9c4a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrulepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrulepropertiesformat.go deleted file mode 100644 index 53dc9f99474..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrequestroutingrulepropertiesformat.go +++ /dev/null @@ -1,17 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - HTTPListener *SubResource `json:"httpListener,omitempty"` - LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` - Priority *int64 `json:"priority,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` - RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` - UrlPathMap *SubResource `json:"urlPathMap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterule.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterule.go deleted file mode 100644 index 21ce81c5a24..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterule.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRule struct { - ActionSet *ApplicationGatewayRewriteRuleActionSet `json:"actionSet,omitempty"` - Conditions *[]ApplicationGatewayRewriteRuleCondition `json:"conditions,omitempty"` - Name *string `json:"name,omitempty"` - RuleSequence *int64 `json:"ruleSequence,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleactionset.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleactionset.go deleted file mode 100644 index ed418b0d4a5..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleactionset.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleActionSet struct { - RequestHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"requestHeaderConfigurations,omitempty"` - ResponseHeaderConfigurations *[]ApplicationGatewayHeaderConfiguration `json:"responseHeaderConfigurations,omitempty"` - UrlConfiguration *ApplicationGatewayUrlConfiguration `json:"urlConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulecondition.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulecondition.go deleted file mode 100644 index 1e70a94ea80..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulecondition.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleCondition struct { - IgnoreCase *bool `json:"ignoreCase,omitempty"` - Negate *bool `json:"negate,omitempty"` - Pattern *string `json:"pattern,omitempty"` - Variable *string `json:"variable,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleset.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleset.go deleted file mode 100644 index a25c70e4a05..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriteruleset.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRewriteRuleSetPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulesetpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulesetpropertiesformat.go deleted file mode 100644 index 3a1e3374217..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayrewriterulesetpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RewriteRules *[]ApplicationGatewayRewriteRule `json:"rewriteRules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrule.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrule.go deleted file mode 100644 index 78053b23a9c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayRoutingRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrulepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrulepropertiesformat.go deleted file mode 100644 index 05ed98ab597..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayroutingrulepropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayRoutingRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendSettings *SubResource `json:"backendSettings,omitempty"` - Listener *SubResource `json:"listener,omitempty"` - Priority int64 `json:"priority"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RuleType *ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysku.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysku.go deleted file mode 100644 index 0b639c7628a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysku.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySku struct { - Capacity *int64 `json:"capacity,omitempty"` - Name *ApplicationGatewaySkuName `json:"name,omitempty"` - Tier *ApplicationGatewayTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificate.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificate.go deleted file mode 100644 index 328f6a90d88..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificatepropertiesformat.go deleted file mode 100644 index f087bfec9a8..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslcertificatepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - Password *string `json:"password,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicCertData *string `json:"publicCertData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslpolicy.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslpolicy.go deleted file mode 100644 index ae860f1460f..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslpolicy.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslPolicy struct { - CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` - DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` - MinProtocolVersion *ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` - PolicyName *ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` - PolicyType *ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofile.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofile.go deleted file mode 100644 index 8c1d0630c2f..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewaySslProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofilepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofilepropertiesformat.go deleted file mode 100644 index b89279b0c7f..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaysslprofilepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewaySslProfilePropertiesFormat struct { - ClientAuthConfiguration *ApplicationGatewayClientAuthConfiguration `json:"clientAuthConfiguration,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SslPolicy *ApplicationGatewaySslPolicy `json:"sslPolicy,omitempty"` - TrustedClientCertificates *[]SubResource `json:"trustedClientCertificates,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificate.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificate.go deleted file mode 100644 index f2fb2244e71..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedClientCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificatepropertiesformat.go deleted file mode 100644 index ac7454cb8f4..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedclientcertificatepropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct { - ClientCertIssuerDN *string `json:"clientCertIssuerDN,omitempty"` - Data *string `json:"data,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ValidatedCertData *string `json:"validatedCertData,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificate.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificate.go deleted file mode 100644 index 9deacd55fe8..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificate.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificate struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayTrustedRootCertificatePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificatepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificatepropertiesformat.go deleted file mode 100644 index f79bf663f76..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaytrustedrootcertificatepropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct { - Data *string `json:"data,omitempty"` - KeyVaultSecretId *string `json:"keyVaultSecretId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlconfiguration.go deleted file mode 100644 index 03021e43980..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlconfiguration.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlConfiguration struct { - ModifiedPath *string `json:"modifiedPath,omitempty"` - ModifiedQueryString *string `json:"modifiedQueryString,omitempty"` - Reroute *bool `json:"reroute,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmap.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmap.go deleted file mode 100644 index 57b9cac7aa3..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmap.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationGatewayUrlPathMapPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmappropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmappropertiesformat.go deleted file mode 100644 index e69ae8cbde4..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewayurlpathmappropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayUrlPathMapPropertiesFormat struct { - DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` - DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` - DefaultLoadDistributionPolicy *SubResource `json:"defaultLoadDistributionPolicy,omitempty"` - DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` - DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` - PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaywebapplicationfirewallconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaywebapplicationfirewallconfiguration.go deleted file mode 100644 index 0ccb185da05..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationgatewaywebapplicationfirewallconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationGatewayWebApplicationFirewallConfiguration struct { - DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` - Enabled bool `json:"enabled"` - Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"` - FileUploadLimitInMb *int64 `json:"fileUploadLimitInMb,omitempty"` - FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode"` - MaxRequestBodySize *int64 `json:"maxRequestBodySize,omitempty"` - MaxRequestBodySizeInKb *int64 `json:"maxRequestBodySizeInKb,omitempty"` - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationsecuritygroup.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationsecuritygroup.go deleted file mode 100644 index 8dccd748428..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationsecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationsecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationsecuritygrouppropertiesformat.go deleted file mode 100644 index 2713b23e0a5..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_applicationsecuritygrouppropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ApplicationSecurityGroupPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_backendaddresspool.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_backendaddresspool.go deleted file mode 100644 index a5f3d1e0367..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_backendaddresspool.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPool struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_backendaddresspoolpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_backendaddresspoolpropertiesformat.go deleted file mode 100644 index d3079086b6c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_backendaddresspoolpropertiesformat.go +++ /dev/null @@ -1,18 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type BackendAddressPoolPropertiesFormat struct { - BackendIPConfigurations *[]NetworkInterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` - DrainPeriodInSeconds *int64 `json:"drainPeriodInSeconds,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - Location *string `json:"location,omitempty"` - OutboundRule *SubResource `json:"outboundRule,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_customdnsconfigpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_customdnsconfigpropertiesformat.go deleted file mode 100644 index e9022fbeb4f..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_customdnsconfigpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type CustomDnsConfigPropertiesFormat struct { - Fqdn *string `json:"fqdn,omitempty"` - IPAddresses *[]string `json:"ipAddresses,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ddossettings.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ddossettings.go deleted file mode 100644 index 4f7e1e20764..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ddossettings.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type DdosSettings struct { - DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` - ProtectionMode *DdosSettingsProtectionMode `json:"protectionMode,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_delegation.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_delegation.go deleted file mode 100644 index 9a088e2a507..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_delegation.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Delegation struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceDelegationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedrule.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedrule.go deleted file mode 100644 index ffa39b22711..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedrule.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExclusionManagedRule struct { - RuleId string `json:"ruleId"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedrulegroup.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedrulegroup.go deleted file mode 100644 index 29d30ef6bc1..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedrulegroup.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExclusionManagedRuleGroup struct { - RuleGroupName string `json:"ruleGroupName"` - Rules *[]ExclusionManagedRule `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedruleset.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedruleset.go deleted file mode 100644 index cb569797cec..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_exclusionmanagedruleset.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ExclusionManagedRuleSet struct { - RuleGroups *[]ExclusionManagedRuleGroup `json:"ruleGroups,omitempty"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlog.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlog.go deleted file mode 100644 index 36d32c9316a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlog.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLog struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FlowLogPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlogformatparameters.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlogformatparameters.go deleted file mode 100644 index 8e97873a7c3..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlogformatparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogFormatParameters struct { - Type *FlowLogFormatType `json:"type,omitempty"` - Version *int64 `json:"version,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlogpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlogpropertiesformat.go deleted file mode 100644 index 9e90fd9cd8a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_flowlogpropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FlowLogPropertiesFormat struct { - Enabled *bool `json:"enabled,omitempty"` - FlowAnalyticsConfiguration *TrafficAnalyticsProperties `json:"flowAnalyticsConfiguration,omitempty"` - Format *FlowLogFormatParameters `json:"format,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` - StorageId string `json:"storageId"` - TargetResourceGuid *string `json:"targetResourceGuid,omitempty"` - TargetResourceId string `json:"targetResourceId"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_frontendipconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_frontendipconfiguration.go deleted file mode 100644 index 717217cc3a2..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_frontendipconfiguration.go +++ /dev/null @@ -1,17 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_frontendipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_frontendipconfigurationpropertiesformat.go deleted file mode 100644 index 4f11b119df9..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_frontendipconfigurationpropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type FrontendIPConfigurationPropertiesFormat struct { - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` - InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` - LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` - OutboundRules *[]SubResource `json:"outboundRules,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_gatewayloadbalancertunnelinterface.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_gatewayloadbalancertunnelinterface.go deleted file mode 100644 index 698c1c6a1b4..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_gatewayloadbalancertunnelinterface.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GatewayLoadBalancerTunnelInterface struct { - Identifier *int64 `json:"identifier,omitempty"` - Port *int64 `json:"port,omitempty"` - Protocol *GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` - Type *GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_groupbyusersession.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_groupbyusersession.go deleted file mode 100644 index 5995831381a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_groupbyusersession.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GroupByUserSession struct { - GroupByVariables []GroupByVariable `json:"groupByVariables"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_groupbyvariable.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_groupbyvariable.go deleted file mode 100644 index 132602a8758..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_groupbyvariable.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GroupByVariable struct { - VariableName ApplicationGatewayFirewallUserSessionVariable `json:"variableName"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_inboundnatrule.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_inboundnatrule.go deleted file mode 100644 index f9908a65135..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_inboundnatrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *InboundNatRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_inboundnatrulepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_inboundnatrulepropertiesformat.go deleted file mode 100644 index 2ed26d6a6d0..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_inboundnatrulepropertiesformat.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type InboundNatRulePropertiesFormat struct { - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendIPConfiguration *NetworkInterfaceIPConfiguration `json:"backendIPConfiguration,omitempty"` - BackendPort *int64 `json:"backendPort,omitempty"` - EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` - EnableTcpReset *bool `json:"enableTcpReset,omitempty"` - FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - FrontendPortRangeEnd *int64 `json:"frontendPortRangeEnd,omitempty"` - FrontendPortRangeStart *int64 `json:"frontendPortRangeStart,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - Protocol *TransportProtocol `json:"protocol,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfiguration.go deleted file mode 100644 index ee1ee9f9ce3..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationprofile.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationprofile.go deleted file mode 100644 index 4467a251182..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationprofile.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfile struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *IPConfigurationProfilePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationprofilepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationprofilepropertiesformat.go deleted file mode 100644 index 4746cb9a921..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationprofilepropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationProfilePropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationpropertiesformat.go deleted file mode 100644 index 6455af984df..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_ipconfigurationpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPConfigurationPropertiesFormat struct { - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_iptag.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_iptag.go deleted file mode 100644 index da603122799..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_iptag.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type IPTag struct { - IPTagType *string `json:"ipTagType,omitempty"` - Tag *string `json:"tag,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddress.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddress.go deleted file mode 100644 index 07977c08269..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddress.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddress struct { - Name *string `json:"name,omitempty"` - Properties *LoadBalancerBackendAddressPropertiesFormat `json:"properties,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddresspropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddresspropertiesformat.go deleted file mode 100644 index ca60fdf8735..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_loadbalancerbackendaddresspropertiesformat.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type LoadBalancerBackendAddressPropertiesFormat struct { - AdminState *LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` - LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` - NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` - Subnet *SubResource `json:"subnet,omitempty"` - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go deleted file mode 100644 index 2810e8e0e4d..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedrulegroupoverride.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedRuleGroupOverride struct { - RuleGroupName string `json:"ruleGroupName"` - Rules *[]ManagedRuleOverride `json:"rules,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedruleoverride.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedruleoverride.go deleted file mode 100644 index c6f8a500e23..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedruleoverride.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedRuleOverride struct { - Action *ActionType `json:"action,omitempty"` - RuleId string `json:"ruleId"` - State *ManagedRuleEnabledState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedrulesdefinition.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedrulesdefinition.go deleted file mode 100644 index 720824c2670..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedrulesdefinition.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedRulesDefinition struct { - Exclusions *[]OwaspCrsExclusionEntry `json:"exclusions,omitempty"` - ManagedRuleSets []ManagedRuleSet `json:"managedRuleSets"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedruleset.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedruleset.go deleted file mode 100644 index 2bbf971c792..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_managedruleset.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ManagedRuleSet struct { - RuleGroupOverrides *[]ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"` - RuleSetType string `json:"ruleSetType"` - RuleSetVersion string `json:"ruleSetVersion"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_matchcondition.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_matchcondition.go deleted file mode 100644 index c8d3e722c75..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_matchcondition.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MatchCondition struct { - MatchValues []string `json:"matchValues"` - MatchVariables []MatchVariable `json:"matchVariables"` - NegationConditon *bool `json:"negationConditon,omitempty"` - Operator WebApplicationFirewallOperator `json:"operator"` - Transforms *[]WebApplicationFirewallTransform `json:"transforms,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_matchvariable.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_matchvariable.go deleted file mode 100644 index bd0473317b2..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_matchvariable.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type MatchVariable struct { - Selector *string `json:"selector,omitempty"` - VariableName WebApplicationFirewallMatchVariable `json:"variableName"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgateway.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgateway.go deleted file mode 100644 index 4a594a57232..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgateway.go +++ /dev/null @@ -1,20 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGateway struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"` - Sku *NatGatewaySku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgatewaypropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgatewaypropertiesformat.go deleted file mode 100644 index 30e0ed98075..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgatewaypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewayPropertiesFormat struct { - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddresses *[]SubResource `json:"publicIpAddresses,omitempty"` - PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Subnets *[]SubResource `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgatewaysku.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgatewaysku.go deleted file mode 100644 index 01f9595dd47..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natgatewaysku.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatGatewaySku struct { - Name *NatGatewaySkuName `json:"name,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natruleportmapping.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natruleportmapping.go deleted file mode 100644 index 636fb66e30f..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_natruleportmapping.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NatRulePortMapping struct { - BackendPort *int64 `json:"backendPort,omitempty"` - FrontendPort *int64 `json:"frontendPort,omitempty"` - InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterface.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterface.go deleted file mode 100644 index 5f43f78eff1..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterface.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterface struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfacePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacednssettings.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacednssettings.go deleted file mode 100644 index 2d9f1326e9a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacednssettings.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceDnsSettings struct { - AppliedDnsServers *[]string `json:"appliedDnsServers,omitempty"` - DnsServers *[]string `json:"dnsServers,omitempty"` - InternalDnsNameLabel *string `json:"internalDnsNameLabel,omitempty"` - InternalDomainNameSuffix *string `json:"internalDomainNameSuffix,omitempty"` - InternalFqdn *string `json:"internalFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfiguration.go deleted file mode 100644 index 80650073a43..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go deleted file mode 100644 index ed9c49c6aa3..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationprivatelinkconnectionproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties struct { - Fqdns *[]string `json:"fqdns,omitempty"` - GroupId *string `json:"groupId,omitempty"` - RequiredMemberName *string `json:"requiredMemberName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationpropertiesformat.go deleted file mode 100644 index 244007a3148..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfaceipconfigurationpropertiesformat.go +++ /dev/null @@ -1,21 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceIPConfigurationPropertiesFormat struct { - ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` - LoadBalancerBackendAddressPools *[]BackendAddressPool `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatRules *[]InboundNatRule `json:"loadBalancerInboundNatRules,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - PrivateLinkConnectionProperties *NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties `json:"privateLinkConnectionProperties,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` - VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacepropertiesformat.go deleted file mode 100644 index e24f37ad4e4..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacepropertiesformat.go +++ /dev/null @@ -1,29 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfacePropertiesFormat struct { - AuxiliaryMode *NetworkInterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` - AuxiliarySku *NetworkInterfaceAuxiliarySku `json:"auxiliarySku,omitempty"` - DisableTcpStateTracking *bool `json:"disableTcpStateTracking,omitempty"` - DnsSettings *NetworkInterfaceDnsSettings `json:"dnsSettings,omitempty"` - DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"` - EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` - EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"` - HostedWorkloads *[]string `json:"hostedWorkloads,omitempty"` - IPConfigurations *[]NetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"` - MacAddress *string `json:"macAddress,omitempty"` - MigrationPhase *NetworkInterfaceMigrationPhase `json:"migrationPhase,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - NicType *NetworkInterfaceNicType `json:"nicType,omitempty"` - Primary *bool `json:"primary,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - TapConfigurations *[]NetworkInterfaceTapConfiguration `json:"tapConfigurations,omitempty"` - VirtualMachine *SubResource `json:"virtualMachine,omitempty"` - VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` - WorkloadType *string `json:"workloadType,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacetapconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacetapconfiguration.go deleted file mode 100644 index 559fab4512d..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacetapconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkInterfaceTapConfigurationPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacetapconfigurationpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacetapconfigurationpropertiesformat.go deleted file mode 100644 index d28ce56ff99..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networkinterfacetapconfigurationpropertiesformat.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkInterfaceTapConfigurationPropertiesFormat struct { - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - VirtualNetworkTap *VirtualNetworkTap `json:"virtualNetworkTap,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networksecuritygroup.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networksecuritygroup.go deleted file mode 100644 index 7edb20a30eb..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networksecuritygroup.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroup struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *NetworkSecurityGroupPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networksecuritygrouppropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networksecuritygrouppropertiesformat.go deleted file mode 100644 index 63dfb0a3753..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_networksecuritygrouppropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type NetworkSecurityGroupPropertiesFormat struct { - DefaultSecurityRules *[]SecurityRule `json:"defaultSecurityRules,omitempty"` - FlowLogs *[]FlowLog `json:"flowLogs,omitempty"` - FlushConnection *bool `json:"flushConnection,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_owaspcrsexclusionentry.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_owaspcrsexclusionentry.go deleted file mode 100644 index 447c5ce3185..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_owaspcrsexclusionentry.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type OwaspCrsExclusionEntry struct { - ExclusionManagedRuleSets *[]ExclusionManagedRuleSet `json:"exclusionManagedRuleSets,omitempty"` - MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable"` - Selector string `json:"selector"` - SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_policysettings.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_policysettings.go deleted file mode 100644 index ad2543067d3..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_policysettings.go +++ /dev/null @@ -1,18 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PolicySettings struct { - CustomBlockResponseBody *string `json:"customBlockResponseBody,omitempty"` - CustomBlockResponseStatusCode *int64 `json:"customBlockResponseStatusCode,omitempty"` - FileUploadEnforcement *bool `json:"fileUploadEnforcement,omitempty"` - FileUploadLimitInMb *int64 `json:"fileUploadLimitInMb,omitempty"` - LogScrubbing *PolicySettingsLogScrubbing `json:"logScrubbing,omitempty"` - MaxRequestBodySizeInKb *int64 `json:"maxRequestBodySizeInKb,omitempty"` - Mode *WebApplicationFirewallMode `json:"mode,omitempty"` - RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` - RequestBodyEnforcement *bool `json:"requestBodyEnforcement,omitempty"` - RequestBodyInspectLimitInKB *int64 `json:"requestBodyInspectLimitInKB,omitempty"` - State *WebApplicationFirewallEnabledState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_policysettingslogscrubbing.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_policysettingslogscrubbing.go deleted file mode 100644 index a97418be867..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_policysettingslogscrubbing.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PolicySettingsLogScrubbing struct { - ScrubbingRules *[]WebApplicationFirewallScrubbingRules `json:"scrubbingRules,omitempty"` - State *WebApplicationFirewallScrubbingState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpoint.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpoint.go deleted file mode 100644 index aabcb4ef384..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpoint.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpoint struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointconnection.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointconnection.go deleted file mode 100644 index c66bc0045c7..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointconnectionproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointconnectionproperties.go deleted file mode 100644 index dbd38c8e4ca..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointConnectionProperties struct { - LinkIdentifier *string `json:"linkIdentifier,omitempty"` - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - PrivateEndpointLocation *string `json:"privateEndpointLocation,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointipconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointipconfiguration.go deleted file mode 100644 index 86f24c803d3..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointipconfiguration.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointipconfigurationproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointipconfigurationproperties.go deleted file mode 100644 index f40d8cf2be4..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointipconfigurationproperties.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointIPConfigurationProperties struct { - GroupId *string `json:"groupId,omitempty"` - MemberName *string `json:"memberName,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointproperties.go deleted file mode 100644 index 93cab138813..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privateendpointproperties.go +++ /dev/null @@ -1,16 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateEndpointProperties struct { - ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` - CustomDnsConfigs *[]CustomDnsConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` - CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` - IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` - ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"privateLinkServiceConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkservice.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkservice.go deleted file mode 100644 index 8b8ffdc399e..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkservice.go +++ /dev/null @@ -1,19 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkService struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceProperties `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnection.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnection.go deleted file mode 100644 index ac293dace51..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnection.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnection struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceConnectionProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionproperties.go deleted file mode 100644 index 164ef869982..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionProperties struct { - GroupIds *[]string `json:"groupIds,omitempty"` - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - PrivateLinkServiceId *string `json:"privateLinkServiceId,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - RequestMessage *string `json:"requestMessage,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionstate.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionstate.go deleted file mode 100644 index 3ea66cb9940..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceconnectionstate.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceConnectionState struct { - ActionsRequired *string `json:"actionsRequired,omitempty"` - Description *string `json:"description,omitempty"` - Status *string `json:"status,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfiguration.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfiguration.go deleted file mode 100644 index 7d17f466192..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfiguration.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfiguration struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PrivateLinkServiceIPConfigurationProperties `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfigurationproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfigurationproperties.go deleted file mode 100644 index 814df952c03..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceipconfigurationproperties.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceIPConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - PrivateIPAddress *string `json:"privateIPAddress,omitempty"` - PrivateIPAddressVersion *IPVersion `json:"privateIPAddressVersion,omitempty"` - PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Subnet *Subnet `json:"subnet,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceproperties.go deleted file mode 100644 index c58556d385c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_privatelinkserviceproperties.go +++ /dev/null @@ -1,17 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PrivateLinkServiceProperties struct { - Alias *string `json:"alias,omitempty"` - AutoApproval *ResourceSet `json:"autoApproval,omitempty"` - EnableProxyProtocol *bool `json:"enableProxyProtocol,omitempty"` - Fqdns *[]string `json:"fqdns,omitempty"` - IPConfigurations *[]PrivateLinkServiceIPConfiguration `json:"ipConfigurations,omitempty"` - LoadBalancerFrontendIPConfigurations *[]FrontendIPConfiguration `json:"loadBalancerFrontendIpConfigurations,omitempty"` - NetworkInterfaces *[]NetworkInterface `json:"networkInterfaces,omitempty"` - PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Visibility *ResourceSet `json:"visibility,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddress.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddress.go deleted file mode 100644 index 6f2116661f4..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddress.go +++ /dev/null @@ -1,22 +0,0 @@ -package webapplicationfirewallpolicies - -import ( - "github.com/hashicorp/go-azure-helpers/resourcemanager/edgezones" - "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddress struct { - Etag *string `json:"etag,omitempty"` - ExtendedLocation *edgezones.Model `json:"extendedLocation,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Sku *PublicIPAddressSku `json:"sku,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` - Zones *zones.Schema `json:"zones,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddressdnssettings.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddressdnssettings.go deleted file mode 100644 index c122bbf9d00..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddressdnssettings.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressDnsSettings struct { - DomainNameLabel *string `json:"domainNameLabel,omitempty"` - DomainNameLabelScope *PublicIPAddressDnsSettingsDomainNameLabelScope `json:"domainNameLabelScope,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - ReverseFqdn *string `json:"reverseFqdn,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddresspropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddresspropertiesformat.go deleted file mode 100644 index 76e237783ef..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddresspropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressPropertiesFormat struct { - DdosSettings *DdosSettings `json:"ddosSettings,omitempty"` - DeleteOption *DeleteOptions `json:"deleteOption,omitempty"` - DnsSettings *PublicIPAddressDnsSettings `json:"dnsSettings,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - IPConfiguration *IPConfiguration `json:"ipConfiguration,omitempty"` - IPTags *[]IPTag `json:"ipTags,omitempty"` - IdleTimeoutInMinutes *int64 `json:"idleTimeoutInMinutes,omitempty"` - LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` - MigrationPhase *PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` - NatGateway *NatGateway `json:"natGateway,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - PublicIPAddressVersion *IPVersion `json:"publicIPAddressVersion,omitempty"` - PublicIPAllocationMethod *IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` - PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServicePublicIPAddress *PublicIPAddress `json:"servicePublicIPAddress,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddresssku.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddresssku.go deleted file mode 100644 index 1b8495a46b0..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_publicipaddresssku.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type PublicIPAddressSku struct { - Name *PublicIPAddressSkuName `json:"name,omitempty"` - Tier *PublicIPAddressSkuTier `json:"tier,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourcenavigationlink.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourcenavigationlink.go deleted file mode 100644 index 8cf0d6ae754..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourcenavigationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ResourceNavigationLinkFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourcenavigationlinkformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourcenavigationlinkformat.go deleted file mode 100644 index cfc65feb648..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourcenavigationlinkformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceNavigationLinkFormat struct { - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourceset.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourceset.go deleted file mode 100644 index 7bd3ff7ff53..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_resourceset.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ResourceSet struct { - Subscriptions *[]string `json:"subscriptions,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_retentionpolicyparameters.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_retentionpolicyparameters.go deleted file mode 100644 index 700cf48fcef..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_retentionpolicyparameters.go +++ /dev/null @@ -1,9 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RetentionPolicyParameters struct { - Days *int64 `json:"days,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_route.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_route.go deleted file mode 100644 index 854dbcba973..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_route.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Route struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RoutePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routepropertiesformat.go deleted file mode 100644 index 65879ed15ad..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RoutePropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - HasBgpOverride *bool `json:"hasBgpOverride,omitempty"` - NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` - NextHopType RouteNextHopType `json:"nextHopType"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routetable.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routetable.go deleted file mode 100644 index 73fdbc844dc..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routetable.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTable struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *RouteTablePropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routetablepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routetablepropertiesformat.go deleted file mode 100644 index f7082dd7d4a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_routetablepropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type RouteTablePropertiesFormat struct { - DisableBgpRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - Routes *[]Route `json:"routes,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_securityrule.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_securityrule.go deleted file mode 100644 index 9a8c2e557c7..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_securityrule.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRule struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SecurityRulePropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_securityrulepropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_securityrulepropertiesformat.go deleted file mode 100644 index d40d084432c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_securityrulepropertiesformat.go +++ /dev/null @@ -1,23 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SecurityRulePropertiesFormat struct { - Access SecurityRuleAccess `json:"access"` - Description *string `json:"description,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` - DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` - Direction SecurityRuleDirection `json:"direction"` - Priority int64 `json:"priority"` - Protocol SecurityRuleProtocol `json:"protocol"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` - SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceassociationlink.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceassociationlink.go deleted file mode 100644 index 9f75aeaec5b..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceassociationlink.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLink struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceAssociationLinkPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceassociationlinkpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceassociationlinkpropertiesformat.go deleted file mode 100644 index abae149b764..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceassociationlinkpropertiesformat.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceAssociationLinkPropertiesFormat struct { - AllowDelete *bool `json:"allowDelete,omitempty"` - Link *string `json:"link,omitempty"` - LinkedResourceType *string `json:"linkedResourceType,omitempty"` - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_servicedelegationpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_servicedelegationpropertiesformat.go deleted file mode 100644 index 160d9aebc9f..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_servicedelegationpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceDelegationPropertiesFormat struct { - Actions *[]string `json:"actions,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ServiceName *string `json:"serviceName,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicy.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicy.go deleted file mode 100644 index ae5e0fd396a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicy.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinition.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinition.go deleted file mode 100644 index ac60c21f09b..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinition.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinition struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *ServiceEndpointPolicyDefinitionPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go deleted file mode 100644 index 34679603f3a..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicydefinitionpropertiesformat.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyDefinitionPropertiesFormat struct { - Description *string `json:"description,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` - ServiceResources *[]string `json:"serviceResources,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicypropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicypropertiesformat.go deleted file mode 100644 index aa5effcc158..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpolicypropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPolicyPropertiesFormat struct { - ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` - ServiceAlias *string `json:"serviceAlias,omitempty"` - ServiceEndpointPolicyDefinitions *[]ServiceEndpointPolicyDefinition `json:"serviceEndpointPolicyDefinitions,omitempty"` - Subnets *[]Subnet `json:"subnets,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpropertiesformat.go deleted file mode 100644 index 03e37bc11f8..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_serviceendpointpropertiesformat.go +++ /dev/null @@ -1,10 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ServiceEndpointPropertiesFormat struct { - Locations *[]string `json:"locations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Service *string `json:"service,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subnet.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subnet.go deleted file mode 100644 index 22ae6378be5..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subnet.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type Subnet struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *SubnetPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subnetpropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subnetpropertiesformat.go deleted file mode 100644 index e98defaa49c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subnetpropertiesformat.go +++ /dev/null @@ -1,26 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` - ApplicationGatewayIPConfigurations *[]ApplicationGatewayIPConfiguration `json:"applicationGatewayIPConfigurations,omitempty"` - Delegations *[]Delegation `json:"delegations,omitempty"` - IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` - IPConfigurationProfiles *[]IPConfigurationProfile `json:"ipConfigurationProfiles,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - NatGateway *SubResource `json:"natGateway,omitempty"` - NetworkSecurityGroup *NetworkSecurityGroup `json:"networkSecurityGroup,omitempty"` - PrivateEndpointNetworkPolicies *VirtualNetworkPrivateEndpointNetworkPolicies `json:"privateEndpointNetworkPolicies,omitempty"` - PrivateEndpoints *[]PrivateEndpoint `json:"privateEndpoints,omitempty"` - PrivateLinkServiceNetworkPolicies *VirtualNetworkPrivateLinkServiceNetworkPolicies `json:"privateLinkServiceNetworkPolicies,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - Purpose *string `json:"purpose,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - ServiceAssociationLinks *[]ServiceAssociationLink `json:"serviceAssociationLinks,omitempty"` - ServiceEndpointPolicies *[]ServiceEndpointPolicy `json:"serviceEndpointPolicies,omitempty"` - ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subresource.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subresource.go deleted file mode 100644 index f80e970be83..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_subresource.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type SubResource struct { - Id *string `json:"id,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_trafficanalyticsconfigurationproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_trafficanalyticsconfigurationproperties.go deleted file mode 100644 index fd4b0e7ec17..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_trafficanalyticsconfigurationproperties.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsConfigurationProperties struct { - Enabled *bool `json:"enabled,omitempty"` - TrafficAnalyticsInterval *int64 `json:"trafficAnalyticsInterval,omitempty"` - WorkspaceId *string `json:"workspaceId,omitempty"` - WorkspaceRegion *string `json:"workspaceRegion,omitempty"` - WorkspaceResourceId *string `json:"workspaceResourceId,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_trafficanalyticsproperties.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_trafficanalyticsproperties.go deleted file mode 100644 index 872500d56bf..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_trafficanalyticsproperties.go +++ /dev/null @@ -1,8 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type TrafficAnalyticsProperties struct { - NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_virtualnetworktap.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_virtualnetworktap.go deleted file mode 100644 index e2de0ca881d..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_virtualnetworktap.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTap struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *VirtualNetworkTapPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_virtualnetworktappropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_virtualnetworktappropertiesformat.go deleted file mode 100644 index 418d09be371..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_virtualnetworktappropertiesformat.go +++ /dev/null @@ -1,13 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type VirtualNetworkTapPropertiesFormat struct { - DestinationLoadBalancerFrontEndIPConfiguration *FrontendIPConfiguration `json:"destinationLoadBalancerFrontEndIPConfiguration,omitempty"` - DestinationNetworkInterfaceIPConfiguration *NetworkInterfaceIPConfiguration `json:"destinationNetworkInterfaceIPConfiguration,omitempty"` - DestinationPort *int64 `json:"destinationPort,omitempty"` - NetworkInterfaceTapConfigurations *[]NetworkInterfaceTapConfiguration `json:"networkInterfaceTapConfigurations,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceGuid *string `json:"resourceGuid,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallcustomrule.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallcustomrule.go deleted file mode 100644 index c66c1257253..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallcustomrule.go +++ /dev/null @@ -1,17 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallCustomRule struct { - Action WebApplicationFirewallAction `json:"action"` - Etag *string `json:"etag,omitempty"` - GroupByUserSession *[]GroupByUserSession `json:"groupByUserSession,omitempty"` - MatchConditions []MatchCondition `json:"matchConditions"` - Name *string `json:"name,omitempty"` - Priority int64 `json:"priority"` - RateLimitDuration *ApplicationGatewayFirewallRateLimitDuration `json:"rateLimitDuration,omitempty"` - RateLimitThreshold *int64 `json:"rateLimitThreshold,omitempty"` - RuleType WebApplicationFirewallRuleType `json:"ruleType"` - State *WebApplicationFirewallState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicy.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicy.go deleted file mode 100644 index c79f926a28c..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicy.go +++ /dev/null @@ -1,14 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallPolicy struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - Properties *WebApplicationFirewallPolicyPropertiesFormat `json:"properties,omitempty"` - Tags *map[string]string `json:"tags,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicypropertiesformat.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicypropertiesformat.go deleted file mode 100644 index 0c43a36d2a8..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallpolicypropertiesformat.go +++ /dev/null @@ -1,15 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallPolicyPropertiesFormat struct { - ApplicationGateways *[]ApplicationGateway `json:"applicationGateways,omitempty"` - CustomRules *[]WebApplicationFirewallCustomRule `json:"customRules,omitempty"` - HTTPListeners *[]SubResource `json:"httpListeners,omitempty"` - ManagedRules ManagedRulesDefinition `json:"managedRules"` - PathBasedRules *[]SubResource `json:"pathBasedRules,omitempty"` - PolicySettings *PolicySettings `json:"policySettings,omitempty"` - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` - ResourceState *WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallscrubbingrules.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallscrubbingrules.go deleted file mode 100644 index b3d3f6dd209..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/model_webapplicationfirewallscrubbingrules.go +++ /dev/null @@ -1,11 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallScrubbingRules struct { - MatchVariable ScrubbingRuleEntryMatchVariable `json:"matchVariable"` - Selector *string `json:"selector,omitempty"` - SelectorMatchOperator ScrubbingRuleEntryMatchOperator `json:"selectorMatchOperator"` - State *ScrubbingRuleEntryState `json:"state,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/predicates.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/predicates.go deleted file mode 100644 index a7973b0a14f..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/predicates.go +++ /dev/null @@ -1,37 +0,0 @@ -package webapplicationfirewallpolicies - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebApplicationFirewallPolicyOperationPredicate struct { - Etag *string - Id *string - Location *string - Name *string - Type *string -} - -func (p WebApplicationFirewallPolicyOperationPredicate) Matches(input WebApplicationFirewallPolicy) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/version.go b/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/version.go deleted file mode 100644 index 44a6a6c9bbb..00000000000 --- a/resource-manager/network/2022-11-01/webapplicationfirewallpolicies/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package webapplicationfirewallpolicies - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webapplicationfirewallpolicies/%s", defaultApiVersion) -} diff --git a/resource-manager/network/2022-11-01/webcategories/README.md b/resource-manager/network/2022-11-01/webcategories/README.md deleted file mode 100644 index a8e7dd2636a..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/README.md +++ /dev/null @@ -1,53 +0,0 @@ - -## `github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/webcategories` Documentation - -The `webcategories` SDK allows for interaction with the Azure Resource Manager Service `network` (API Version `2022-11-01`). - -This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). - -### Import Path - -```go -import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2022-11-01/webcategories" -``` - - -### Client Initialization - -```go -client := webcategories.NewWebCategoriesClientWithBaseURI("https://management.azure.com") -client.Client.Authorizer = authorizer -``` - - -### Example Usage: `WebCategoriesClient.Get` - -```go -ctx := context.TODO() -id := webcategories.NewAzureWebCategoryID("12345678-1234-9876-4563-123456789012", "azureWebCategoryValue") - -read, err := client.Get(ctx, id, webcategories.DefaultGetOperationOptions()) -if err != nil { - // handle the error -} -if model := read.Model; model != nil { - // do something with the model/response object -} -``` - - -### Example Usage: `WebCategoriesClient.ListBySubscription` - -```go -ctx := context.TODO() -id := webcategories.NewSubscriptionID("12345678-1234-9876-4563-123456789012") - -// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination -items, err := client.ListBySubscriptionComplete(ctx, id) -if err != nil { - // handle the error -} -for _, item := range items { - // do something -} -``` diff --git a/resource-manager/network/2022-11-01/webcategories/client.go b/resource-manager/network/2022-11-01/webcategories/client.go deleted file mode 100644 index 7d213fbca46..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/client.go +++ /dev/null @@ -1,26 +0,0 @@ -package webcategories - -import ( - "fmt" - - "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" - "github.com/hashicorp/go-azure-sdk/sdk/environments" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type WebCategoriesClient struct { - Client *resourcemanager.Client -} - -func NewWebCategoriesClientWithBaseURI(api environments.Api) (*WebCategoriesClient, error) { - client, err := resourcemanager.NewResourceManagerClient(api, "webcategories", defaultApiVersion) - if err != nil { - return nil, fmt.Errorf("instantiating WebCategoriesClient: %+v", err) - } - - return &WebCategoriesClient{ - Client: client, - }, nil -} diff --git a/resource-manager/network/2022-11-01/webcategories/id_azurewebcategory.go b/resource-manager/network/2022-11-01/webcategories/id_azurewebcategory.go deleted file mode 100644 index 05fb4633638..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/id_azurewebcategory.go +++ /dev/null @@ -1,114 +0,0 @@ -package webcategories - -import ( - "fmt" - "strings" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AzureWebCategoryId{} - -// AzureWebCategoryId is a struct representing the Resource ID for a Azure Web Category -type AzureWebCategoryId struct { - SubscriptionId string - AzureWebCategoryName string -} - -// NewAzureWebCategoryID returns a new AzureWebCategoryId struct -func NewAzureWebCategoryID(subscriptionId string, azureWebCategoryName string) AzureWebCategoryId { - return AzureWebCategoryId{ - SubscriptionId: subscriptionId, - AzureWebCategoryName: azureWebCategoryName, - } -} - -// ParseAzureWebCategoryID parses 'input' into a AzureWebCategoryId -func ParseAzureWebCategoryID(input string) (*AzureWebCategoryId, error) { - parser := resourceids.NewParserFromResourceIdType(AzureWebCategoryId{}) - parsed, err := parser.Parse(input, false) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AzureWebCategoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.AzureWebCategoryName, ok = parsed.Parsed["azureWebCategoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureWebCategoryName", *parsed) - } - - return &id, nil -} - -// ParseAzureWebCategoryIDInsensitively parses 'input' case-insensitively into a AzureWebCategoryId -// note: this method should only be used for API response data and not user input -func ParseAzureWebCategoryIDInsensitively(input string) (*AzureWebCategoryId, error) { - parser := resourceids.NewParserFromResourceIdType(AzureWebCategoryId{}) - parsed, err := parser.Parse(input, true) - if err != nil { - return nil, fmt.Errorf("parsing %q: %+v", input, err) - } - - var ok bool - id := AzureWebCategoryId{} - - if id.SubscriptionId, ok = parsed.Parsed["subscriptionId"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "subscriptionId", *parsed) - } - - if id.AzureWebCategoryName, ok = parsed.Parsed["azureWebCategoryName"]; !ok { - return nil, resourceids.NewSegmentNotSpecifiedError(id, "azureWebCategoryName", *parsed) - } - - return &id, nil -} - -// ValidateAzureWebCategoryID checks that 'input' can be parsed as a Azure Web Category ID -func ValidateAzureWebCategoryID(input interface{}, key string) (warnings []string, errors []error) { - v, ok := input.(string) - if !ok { - errors = append(errors, fmt.Errorf("expected %q to be a string", key)) - return - } - - if _, err := ParseAzureWebCategoryID(v); err != nil { - errors = append(errors, err) - } - - return -} - -// ID returns the formatted Azure Web Category ID -func (id AzureWebCategoryId) ID() string { - fmtString := "/subscriptions/%s/providers/Microsoft.Network/azureWebCategories/%s" - return fmt.Sprintf(fmtString, id.SubscriptionId, id.AzureWebCategoryName) -} - -// Segments returns a slice of Resource ID Segments which comprise this Azure Web Category ID -func (id AzureWebCategoryId) Segments() []resourceids.Segment { - return []resourceids.Segment{ - resourceids.StaticSegment("staticSubscriptions", "subscriptions", "subscriptions"), - resourceids.SubscriptionIdSegment("subscriptionId", "12345678-1234-9876-4563-123456789012"), - resourceids.StaticSegment("staticProviders", "providers", "providers"), - resourceids.ResourceProviderSegment("staticMicrosoftNetwork", "Microsoft.Network", "Microsoft.Network"), - resourceids.StaticSegment("staticAzureWebCategories", "azureWebCategories", "azureWebCategories"), - resourceids.UserSpecifiedSegment("azureWebCategoryName", "azureWebCategoryValue"), - } -} - -// String returns a human-readable description of this Azure Web Category ID -func (id AzureWebCategoryId) String() string { - components := []string{ - fmt.Sprintf("Subscription: %q", id.SubscriptionId), - fmt.Sprintf("Azure Web Category Name: %q", id.AzureWebCategoryName), - } - return fmt.Sprintf("Azure Web Category (%s)", strings.Join(components, "\n")) -} diff --git a/resource-manager/network/2022-11-01/webcategories/id_azurewebcategory_test.go b/resource-manager/network/2022-11-01/webcategories/id_azurewebcategory_test.go deleted file mode 100644 index e93b1ae03e7..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/id_azurewebcategory_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package webcategories - -import ( - "testing" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -var _ resourceids.ResourceId = AzureWebCategoryId{} - -func TestNewAzureWebCategoryID(t *testing.T) { - id := NewAzureWebCategoryID("12345678-1234-9876-4563-123456789012", "azureWebCategoryValue") - - if id.SubscriptionId != "12345678-1234-9876-4563-123456789012" { - t.Fatalf("Expected %q but got %q for Segment 'SubscriptionId'", id.SubscriptionId, "12345678-1234-9876-4563-123456789012") - } - - if id.AzureWebCategoryName != "azureWebCategoryValue" { - t.Fatalf("Expected %q but got %q for Segment 'AzureWebCategoryName'", id.AzureWebCategoryName, "azureWebCategoryValue") - } -} - -func TestFormatAzureWebCategoryID(t *testing.T) { - actual := NewAzureWebCategoryID("12345678-1234-9876-4563-123456789012", "azureWebCategoryValue").ID() - expected := "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue" - if actual != expected { - t.Fatalf("Expected the Formatted ID to be %q but got %q", expected, actual) - } -} - -func TestParseAzureWebCategoryID(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AzureWebCategoryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue", - Expected: &AzureWebCategoryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - AzureWebCategoryName: "azureWebCategoryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAzureWebCategoryID(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.AzureWebCategoryName != v.Expected.AzureWebCategoryName { - t.Fatalf("Expected %q but got %q for AzureWebCategoryName", v.Expected.AzureWebCategoryName, actual.AzureWebCategoryName) - } - - } -} - -func TestParseAzureWebCategoryIDInsensitively(t *testing.T) { - testData := []struct { - Input string - Error bool - Expected *AzureWebCategoryId - }{ - { - // Incomplete URI - Input: "", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk", - Error: true, - }, - { - // Incomplete URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories", - Error: true, - }, - { - // Incomplete URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReWeBcAtEgOrIeS", - Error: true, - }, - { - // Valid URI - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue", - Expected: &AzureWebCategoryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - AzureWebCategoryName: "azureWebCategoryValue", - }, - }, - { - // Invalid (Valid Uri with Extra segment) - Input: "/subscriptions/12345678-1234-9876-4563-123456789012/providers/Microsoft.Network/azureWebCategories/azureWebCategoryValue/extra", - Error: true, - }, - { - // Valid URI (mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReWeBcAtEgOrIeS/aZuReWeBcAtEgOrYvAlUe", - Expected: &AzureWebCategoryId{ - SubscriptionId: "12345678-1234-9876-4563-123456789012", - AzureWebCategoryName: "aZuReWeBcAtEgOrYvAlUe", - }, - }, - { - // Invalid (Valid Uri with Extra segment - mIxEd CaSe since this is insensitive) - Input: "/sUbScRiPtIoNs/12345678-1234-9876-4563-123456789012/pRoViDeRs/mIcRoSoFt.nEtWoRk/aZuReWeBcAtEgOrIeS/aZuReWeBcAtEgOrYvAlUe/extra", - Error: true, - }, - } - for _, v := range testData { - t.Logf("[DEBUG] Testing %q", v.Input) - - actual, err := ParseAzureWebCategoryIDInsensitively(v.Input) - if err != nil { - if v.Error { - continue - } - - t.Fatalf("Expect a value but got an error: %+v", err) - } - if v.Error { - t.Fatal("Expect an error but didn't get one") - } - - if actual.SubscriptionId != v.Expected.SubscriptionId { - t.Fatalf("Expected %q but got %q for SubscriptionId", v.Expected.SubscriptionId, actual.SubscriptionId) - } - - if actual.AzureWebCategoryName != v.Expected.AzureWebCategoryName { - t.Fatalf("Expected %q but got %q for AzureWebCategoryName", v.Expected.AzureWebCategoryName, actual.AzureWebCategoryName) - } - - } -} - -func TestSegmentsForAzureWebCategoryId(t *testing.T) { - segments := AzureWebCategoryId{}.Segments() - if len(segments) == 0 { - t.Fatalf("AzureWebCategoryId has no segments") - } - - uniqueNames := make(map[string]struct{}, 0) - for _, segment := range segments { - uniqueNames[segment.Name] = struct{}{} - } - if len(uniqueNames) != len(segments) { - t.Fatalf("Expected the Segments to be unique but got %q unique segments and %d total segments", len(uniqueNames), len(segments)) - } -} diff --git a/resource-manager/network/2022-11-01/webcategories/method_get.go b/resource-manager/network/2022-11-01/webcategories/method_get.go deleted file mode 100644 index 888ca660ced..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/method_get.go +++ /dev/null @@ -1,80 +0,0 @@ -package webcategories - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type GetOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *AzureWebCategory -} - -type GetOperationOptions struct { - Expand *string -} - -func DefaultGetOperationOptions() GetOperationOptions { - return GetOperationOptions{} -} - -func (o GetOperationOptions) ToHeaders() *client.Headers { - out := client.Headers{} - - return &out -} - -func (o GetOperationOptions) ToOData() *odata.Query { - out := odata.Query{} - return &out -} - -func (o GetOperationOptions) ToQuery() *client.QueryParams { - out := client.QueryParams{} - if o.Expand != nil { - out.Append("$expand", fmt.Sprintf("%v", *o.Expand)) - } - return &out -} - -// Get ... -func (c WebCategoriesClient) Get(ctx context.Context, id AzureWebCategoryId, options GetOperationOptions) (result GetOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: id.ID(), - OptionsObject: options, - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.Execute(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - if err = resp.Unmarshal(&result.Model); err != nil { - return - } - - return -} diff --git a/resource-manager/network/2022-11-01/webcategories/method_listbysubscription.go b/resource-manager/network/2022-11-01/webcategories/method_listbysubscription.go deleted file mode 100644 index a3f741655b7..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/method_listbysubscription.go +++ /dev/null @@ -1,90 +0,0 @@ -package webcategories - -import ( - "context" - "fmt" - "net/http" - - "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" - "github.com/hashicorp/go-azure-sdk/sdk/client" - "github.com/hashicorp/go-azure-sdk/sdk/odata" -) - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type ListBySubscriptionOperationResponse struct { - HttpResponse *http.Response - OData *odata.OData - Model *[]AzureWebCategory -} - -type ListBySubscriptionCompleteResult struct { - Items []AzureWebCategory -} - -// ListBySubscription ... -func (c WebCategoriesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error) { - opts := client.RequestOptions{ - ContentType: "application/json; charset=utf-8", - ExpectedStatusCodes: []int{ - http.StatusOK, - }, - HttpMethod: http.MethodGet, - Path: fmt.Sprintf("%s/providers/Microsoft.Network/azureWebCategories", id.ID()), - } - - req, err := c.Client.NewRequest(ctx, opts) - if err != nil { - return - } - - var resp *client.Response - resp, err = req.ExecutePaged(ctx) - if resp != nil { - result.OData = resp.OData - result.HttpResponse = resp.Response - } - if err != nil { - return - } - - var values struct { - Values *[]AzureWebCategory `json:"value"` - } - if err = resp.Unmarshal(&values); err != nil { - return - } - - result.Model = values.Values - - return -} - -// ListBySubscriptionComplete retrieves all the results into a single object -func (c WebCategoriesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error) { - return c.ListBySubscriptionCompleteMatchingPredicate(ctx, id, AzureWebCategoryOperationPredicate{}) -} - -// ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate -func (c WebCategoriesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AzureWebCategoryOperationPredicate) (result ListBySubscriptionCompleteResult, err error) { - items := make([]AzureWebCategory, 0) - - resp, err := c.ListBySubscription(ctx, id) - if err != nil { - err = fmt.Errorf("loading results: %+v", err) - return - } - if resp.Model != nil { - for _, v := range *resp.Model { - if predicate.Matches(v) { - items = append(items, v) - } - } - } - - result = ListBySubscriptionCompleteResult{ - Items: items, - } - return -} diff --git a/resource-manager/network/2022-11-01/webcategories/model_azurewebcategory.go b/resource-manager/network/2022-11-01/webcategories/model_azurewebcategory.go deleted file mode 100644 index 81fe8aa1777..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/model_azurewebcategory.go +++ /dev/null @@ -1,12 +0,0 @@ -package webcategories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureWebCategory struct { - Etag *string `json:"etag,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Properties *AzureWebCategoryPropertiesFormat `json:"properties,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webcategories/model_azurewebcategorypropertiesformat.go b/resource-manager/network/2022-11-01/webcategories/model_azurewebcategorypropertiesformat.go deleted file mode 100644 index 7e327867064..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/model_azurewebcategorypropertiesformat.go +++ /dev/null @@ -1,8 +0,0 @@ -package webcategories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureWebCategoryPropertiesFormat struct { - Group *string `json:"group,omitempty"` -} diff --git a/resource-manager/network/2022-11-01/webcategories/predicates.go b/resource-manager/network/2022-11-01/webcategories/predicates.go deleted file mode 100644 index ab82b0c92b5..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/predicates.go +++ /dev/null @@ -1,32 +0,0 @@ -package webcategories - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -type AzureWebCategoryOperationPredicate struct { - Etag *string - Id *string - Name *string - Type *string -} - -func (p AzureWebCategoryOperationPredicate) Matches(input AzureWebCategory) bool { - - if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { - return false - } - - if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { - return false - } - - if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { - return false - } - - if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { - return false - } - - return true -} diff --git a/resource-manager/network/2022-11-01/webcategories/version.go b/resource-manager/network/2022-11-01/webcategories/version.go deleted file mode 100644 index 10fd14cb398..00000000000 --- a/resource-manager/network/2022-11-01/webcategories/version.go +++ /dev/null @@ -1,12 +0,0 @@ -package webcategories - -import "fmt" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See NOTICE.txt in the project root for license information. - -const defaultApiVersion = "2022-11-01" - -func userAgent() string { - return fmt.Sprintf("hashicorp/go-azure-sdk/webcategories/%s", defaultApiVersion) -}